Overlay Help

Modelling, Textures, Animating and other general engine asset topics.

Overlay Help

Postby Smurftyours on Thu Sep 22, 2011 3:01 am

I need this
Code: Select all
Refract
{

   $normalmap "smurft/goggleglass"
   $dudvmap "smurft/goggleglass"
   $refracttint "[1 1 1]"
   $refractamount .05

}


And this

Code: Select all
Unlitgeneric
{
   $basetexture "smurft/goggles"
   $translucent 1
}


Both to be on the players screen at the same time. I am open to any workaround including some sort of vmt reconfiguration. Thanks for any help.
jangalomph wrote:Wise words from a wise man. ^
User avatar
Smurftyours
Senior Member
Senior Member
 
Joined: Tue Aug 04, 2009 6:11 pm
Location: California, US.

Re: Overlay Help

Postby Stormy on Thu Sep 22, 2011 3:52 am

$refracttinttexture?

http://www.interlopers.net/tutorials/7216

It does behave a little strangely, but I think you should be able to tweak it in.
User avatar
Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: Overlay Help

Postby Gary on Thu Sep 22, 2011 4:51 am

Smurf, you idiot, you go to sleep only minutes before I found a solution. Be it a shit one.
Image
Hard to tell in the picture, but I am drawing both a UnlitGeneric and a refraction material("tp_refract" and "combine_binocoverlay"). The "tp_refract" overlay is produced by the env_screenoverlay thingie.

Added this at the beginning of the function CViewRender::PerformScreenOverlay:
Code: Select all
IMaterial *blah = materials->FindMaterial( "effects/combine_binocoverlay", TEXTURE_GROUP_OTHER ); //Gary- Find the material we want and give it a name
      DrawScreenEffectMaterial( blah, x, y, w, h ); //Draw dis bitch
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Overlay Help

Postby Stormy on Thu Sep 22, 2011 5:25 am

Ah yeah I realised how far off I potentially was just now. Was going to suggest parenting a prop to the viewport but garys solution is far more elegant.
User avatar
Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: Overlay Help

Postby Gary on Thu Sep 22, 2011 5:38 am

You can't parent shit to the head unless you are working with view models, as anything else will get clipped out of existence.

Yeah, he wasn't very descriptive here, I talked to him in the chat before he went to sleep. He wanted a texture of the goggles to show, as well as refraction on the lens part.

Like this but with refraction on the transparent/lens part:
Image
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Overlay Help

Postby Gary on Thu Sep 22, 2011 6:54 am

In case you want to be able to set it via ConVar and turn it off/on.

Code: Select all
ConVar r_otheroverlay( "gary_r_otheroverlay","", FCVAR_CHEAT, "Path to overlay, remember to set gary_r_otheroverlay to 1 for this to show" ); //Gary
ConVar r_drawotheroverlay( "gary_r_drawotheroverlay","0", FCVAR_CHEAT, "Draws gary_r_otheroverlay, so we can have two" ); //gary

Code: Select all
   if ( r_drawotheroverlay.GetBool() ) //cause I don't want dis all the time....
   {
IMaterial *blah = materials->FindMaterial( r_otheroverlay.GetString(), TEXTURE_GROUP_OTHER ); //Gary- Find the material we want and give it a name
      DrawScreenEffectMaterial( blah, x, y, w, h ); //Draw dis bitch
   }
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Return to Art Creation

Who is online

Users browsing this forum: No registered users