UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Trying to make a lens effect in the player view (Lens Overlay)

broken avatar :(
Created 6 years ago
by Deleted User
0 Members and 1 Guest are viewing this topic.
1,756 views
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
I was wondering if I could make the lens effect, when the players looks to any light and reflects in his retina, this image only appears when the light is focused in some point of the image itself, when not you can see clear. It's like the effect of those graphics mod around the net.
Marked as best answer by Deleted User 6 years ago
broken avatar :(
×
broken avatar :(
Location: kh
Date Registered: 9 August 2013
Last active: 5 years ago
Posts
503
Respect
Forum Rank
Zombie Enslaver
Primary Group
Member
×
codmoddd1234's Groups
codmoddd1234's Contact & Social Links
The sun settings in mapname.sun will make lens flare effect from the sun or moon to the players eye.
The glow settings in your mapname.vision will make rays emit from unlit textures like light bulbs (_on textures and bulb texture),and make bright spots in skybox have rays. You can switch vision files using triggers or through gsc.
Corona and fx can add flare ring to other light sources.
Godrays can also be added in radiant or through fx to lights.
You might be able to rotate a single ray fx and flare ring in csc towards the player eye and put max min fade setting on the fx but its not a real lens flare.
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
It is not the flare coming out the light (corona effect), it's the reflection on the eyes of the player, you can see it here:


3:45. I don't want to install this mod, just to fake it for custom maps. You can see that is a whole image on the screen, only some parts show up when the player focus to the light, but it isn't like the corona effect, when you are walking backwards and the effect disappears. Actually I have the image, and the script to make it show on the screen, I'm only trying to find out what is the configuration to make this happen. I know (because the image has black background) that I have to convert the image with blend function + alpha, the problem is the lens reflection.

Edit: I found some images with the term "fxt", these images contain some parts of the lens image. What "fxt" is related to?
broken avatar :(
×
broken avatar :(
Location: kh
Date Registered: 9 August 2013
Last active: 5 years ago
Posts
503
Respect
Forum Rank
Zombie Enslaver
Primary Group
Member
×
codmoddd1234's Groups
codmoddd1234's Contact & Social Links
Edit: I found some images with the term "fxt", these images contain some parts of the lens image. What "fxt" is related to?
Fxt_ and gfx_ are prefix for materials that are used in effect editor. In asset manager it usually says something about it when converting fx.
When loading an image into fx editor it will search raw/materials and show only "gfx_" textures unless you select "all files".
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
So Is it possible to link that to make this effect mentioned? I still have no idea how to do that effect. Yesterday I tried to make a custom material, but 2d only considers color map, so I'm bit stuck.

Double Post Merge: January 12, 2018, 03:20:04 am
Have you ever wondered how the wet and burning screen are made of? I think this has to do with all that, we do not even have access to know how they operate these interactive screens.
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
I found a clue about this, I looked in the script of the mission "Celerium" of Black Ops 2:

Code Snippet
Plaintext
			level.player waittill_player_looking_at( self gettagorigin( "TAG_LASER" ), 90 );
self play_fx( "cic_turret_lens_flare", undefined, undefined, "stop_flare", 1, "TAG_FX" );
level.player waittill_player_not_looking_at( self gettagorigin( "TAG_LASER" ) );
self notify( "stop_flare" );

So this is an effect material, like the burning and electrocuting screen. You can see the effect in this video at 8:10

http://www.youtube.com/watch?time_continue=485&v=g4R5DTP_P_s

So using the information you gave me in the other thread I can have an idea about how to convert this lens image, maybe if I make a array searching for all the lights in the map using this function (or other similar) I can do this.
broken avatar :(
×
broken avatar :(
Location: kh
Date Registered: 9 August 2013
Last active: 5 years ago
Posts
503
Respect
Forum Rank
Zombie Enslaver
Primary Group
Member
×
codmoddd1234's Groups
codmoddd1234's Contact & Social Links
Use these codwaw materials and you can make a good lens flare fx in codwaw.
Gfx_fxt_light_flare3_god_ray
Gfx_fxt_light_flare2_mouthglow
Gfx_fxt_light_flare2_eyeglow
Gfx_fxt_light_flare2_eyeglow2
Gfx_fxt_light_flare3_god_ray
Gfx_fxt_fx_lensflare
When the player looks at these fx elements the material will focus and get brighter, when the player looks away it will fade.
In your map put a few script_struct with targetname then in script use getstructarray array_thread and playfx.
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
Well, I converted an image following your tut, I realize you didn't tell me if I had to remove the other parts of the fx, so I removed finally. In radiant I created a light with the targetname of "shader_light", I did a little script in base of the Celerium script, because it have a function that WaW does not have so, this is what I made:

Code Snippet
Plaintext
graphic_shader()
{

        level._effect["fx_shader"] = LoadFx ( "shader/fx_shader" );

        light = getEnt("shader_light","targetname");       
        fx_shader = level._effect["fx_shader"];

        players = get_players();
for(i=0;i<players.size;i++)
{
           if ( player_looking_at( light.origin ) )
           {
              playFX (fx_shader, players.origin);
           }
        }
}


But it doesn't show me the image, I tried to add players i next to the playFX it gives me unknown function, then I put undefined instead of players.origin, it didn't give me error but the image doesn't come up, so I don't know what more I can do.

Double Post Merge: January 15, 2018, 06:51:17 am
I called my function in my mapname.gsc, at least half of the code works, just not the looking part, any idea on how to verificate a player is looking an entity?.

 
Loading ...