Another reflection problem

Got problems with your models? Struggling with textures? Get help with your custom assets.

Another reflection problem

Postby niechta on Fri Nov 19, 2010 11:22 pm

While making a map for l4d2 I encountered a really annoying problem. LightMappedGeneric materials like glass or metal using cubemaps for envmap (doesn't matter if these materials are mine or Valve) don't have reflections in game. Models work fine, but no shiny reflective effect on brush surfaces. Another thing is that sometimes everything works fine. Under HL2E2 everything is also fine.
I'd spent like three hours trying to figure out the cause, but found out nothing :?
Here's my test vmt. It's pretty simle, for testing purposes:

Code: Select all
"LightmappedGeneric"
{
"$basetexture" "testmap/testglass"
"$surfaceprop" "glass"
"$envmap" "env_cubemap"
"$envmapmask" "testmap/testglass_envmap"
}


Removing/adding environment map doesn't help me. And, to tell again, default textures also don't work. That makes me upset :? Does anybody know anything about this problem?
User avatar
niechta
Dumpling
Dumpling
 
Joined: Sat May 24, 2008 7:04 pm
Location: Belarus, Minsk

Re: Another reflection problem

Postby city14 on Fri Nov 19, 2010 11:43 pm

Just making sure, you are building cubemaps right?

Or does l4d2 not use buildcubemaps, I've never mapped for it.

Also, are you using the cordon tool to compile?
coder0xff wrote:I wonder if Gabe ever lies in bed at night, thinking about all the fat jokes, and just cries himself to sleep, wiping his tears away with one-thousand dollar bills.
User avatar
city14
Pheropod
Pheropod
 
Joined: Tue Jun 16, 2009 8:35 pm
Location: Troutdale, Oregon

Re: Another reflection problem

Postby niechta on Fri Nov 19, 2010 11:49 pm

Yes, I'm building cubemaps, but that doesn't help. And I don't use cordon tool.
User avatar
niechta
Dumpling
Dumpling
 
Joined: Sat May 24, 2008 7:04 pm
Location: Belarus, Minsk

Re: Another reflection problem

Postby Groxkiller585 on Sun Nov 21, 2010 2:01 am

Wait, from the looks of things you made an envmap texture for the mask. The mask is a monochrome (black and white) image of the first texture, with whiter areas representing more rflective spots. It doesn't work well though; I more reliable mthod would be to embed it in the bastexure or Normal map; for the normal it's as simple as making non-relfective parts transparent (see-through) and reflectve parts nontransparent. Then add the parameter "$Normalmapalphaenvmapmask" 1.

If you made a custom envmap, put that behind $envmap, NOT $envmapmask.
User avatar
Groxkiller585
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Fri Jul 09, 2010 3:43 pm

Re: Another reflection problem

Postby xopa on Sun Nov 21, 2010 8:59 am

while in game, pull up your graphics options and turn shaders and effects down to low. wait for it to do its thing then close the menus. take a deep breath, and go back into options and turn everything back up to high. should fix your problem.
xopa
Member
Member
 
Joined: Sat Jan 23, 2010 11:49 pm
Location: center of the universe

Re: Another reflection problem

Postby Gradius on Sun Nov 21, 2010 1:09 pm

That or use the command mat_reloadallmaterials.
User avatar
Gradius
1337 p0st3r
1337 p0st3r
 
Joined: Thu Aug 27, 2009 2:52 pm

Re: Another reflection problem

Postby xopa on Sun Nov 21, 2010 3:58 pm

oo, if that does the trick, Ill be happy. I got enough problems that I create on my own without havin all these little engine issues pop up.
xopa
Member
Member
 
Joined: Sat Jan 23, 2010 11:49 pm
Location: center of the universe

Re: Another reflection problem

Postby niechta on Sun Nov 21, 2010 6:55 pm

SOLVED
Well, the only thing I had to do was not simply reloading map after building cubemaps. I had to load another map, then load the necessary map and that worked. Weird. Changing settings and using mat_reloadallmaterials didn't help, that's also strange. Anyway, thanks for help everybody :)
User avatar
niechta
Dumpling
Dumpling
 
Joined: Sat May 24, 2008 7:04 pm
Location: Belarus, Minsk

Return to Custom Asset Help

Who is online

Users browsing this forum: No registered users

cron