problem with reflective textures

Avatar
tly
8 Posts
Posted Mar 25, 2012
hey :smile:
i have the problem that every texture that uses $envmap is shown normally in hammer, but pink and black ingame after rendering :sad:

i put a "env_cubemap" in the room and used this vmt:

"LightmappedGeneric"
{
"$basetexture" "icy"
"$bumpmap" "icy_nrm"
"$surfaceprop" "Tile"
"$envmap" "env_cubemap"
"$envmaptint" "[ .5 .5 .5]"
}
icy_nrm is a standard normalmap and both textures have mipmaps.

do you have any idea how to fix it?

Advertisement
Registered users don’t see ads! Register now!
Avatar
Lpfreaky90
2,842 Posts
Posted Mar 25, 2012
Replied 40 minutes later
Did you place the env_cubemap anywhere close? They have a certain size in where they work. Also make sure your map actually has cubemaps; if you're using the modern elevators you should notice this by a white glow in the glass on map spawn.
Avatar
ChickenMobile
2,460 Posts
Posted Mar 26, 2012
Replied 13 hours later
Have you been building the cubemaps (buildcubemaps in console) with a full compile?

Also try putting"$normalmapalphaenvmapmask" "1"Inside your .vmt

Avatar
tly
8 Posts
Posted Mar 27, 2012
Replied 1 day later

lpfreaky90 wrote:
Did you place the env_cubemap anywhere close? They have a certain size in where they work. Also make sure your map actually has cubemaps; if you're using the modern elevators you should notice this by a white glow in the glass on map spawn.

-the env_cubemap is near
-i didnt use them, but i built the cubemaps :wink:

chickenmobile wrote:
Have you been building the cubemaps (buildcubemaps in console) with a full compile?

Also try putting"$normalmapalphaenvmapmask" "1"Inside your .vmt

-i made a full compile (if bsp-normal, vvis-normal, vrad-normal+hdr is the full compile :wink: )
-i tried "$normalmapalphaenvmapmask" "1",but nothing new happened...

-in portal 1, the texture is pink-black squared and in portal2 its white (or maybe not drawing :biggrin:)
-i tried to add the surface to the brush faces of the env_cubemap and nothing happened
-if i take a standard texture (metalwall048b) and use my vmt with it, i have the same issue :sad:

thanks for your answers, but nothing worked...

Avatar
Lpfreaky90
2,842 Posts
Posted Mar 27, 2012
Replied 16 minutes later
I think the env_cubemap thing isn't done the way it should be. I took glasswindow_frosted_002.vmt:

LightmappedGeneric
{
$basetexture "Glass/glasswindow_frosted_002"
$envmap "metal/black_wall_envmap_002a_hdr"
$envmapmask "glass/glasswindow_frosted_002b_mask"

$envmapsaturation .1
$envmaptint "[ .1 .2 .3 ]"
$surfaceprop glass
$translucent 1
$fresnelreflection .5

"srgb?$alpha" "0.5"
"%noportal" 1
"%keywords" portal2
$worldimposter 1
}

You're linking to env_cubemap; which should be a material in materials/env_cubemap but there isn't one by default. Maybe this helps?

Avatar
HMW
806 Posts
Posted Mar 27, 2012
Replied 2 hours later
The text "env_cubemap" is just a place holder, it doesn't refer to an actual material file.
When the map is compiled, it's replaced with a special texture that is part of the BSP. There is one of those textures for each cube map entity in the map, and these textures receive the cube map images that the "buildcubemaps" command produces.

Is it just your own texture that has this problem? If so, try removing the double quotes around the word env_cubemap. I'm not sure if the compile tools will recognise it as a special value when it's in double quotes.

Avatar
Lpfreaky90
2,842 Posts
Posted Mar 27, 2012
Replied 5 minutes later

HMW wrote:
The text "env_cubemap" is just a place holder, it doesn't refer to an actual material file.
When the map is compiled, it's replaced with a special texture that is part of the BSP. There is one of those textures for each cube map entity in the map, and these textures receive the cube map images that the "buildcubemaps" command produces.

Is it just your own texture that has this problem? If so, try removing the double quotes around the word env_cubemap. I'm not sure if the compile tools will recognise it as a special value when it's in double quotes.

fair enough; I know what env_cubemaps do but I didn't know it worked for textures in this way.

Avatar
tly
8 Posts
Posted Mar 28, 2012
Replied 11 hours later

lpfreaky90 wrote:
I didn't know it worked for textures in this way.

i knew that it works like that , but i didnt work for me :biggrin:

i tried it the way, you said and i got a white texture,and i tried removing the "...
i saw all that in a tutorial on youtube :wink:

http://www.youtube.com/watch?feature=pl ... 9RM#t=429s
how is it possible that it works for him, although he uses prefectly the same method?

Avatar
ChickenMobile
2,460 Posts
Posted Mar 28, 2012
Replied 3 hours later

tly wrote:
http://www.youtube.com/watch?feature=player_detailpage&v=TACkX4R49RM#t=429s
how is it possible that it works for him, although he uses prefectly the same method?

Grab your computer, shove it in a fire, when it is melted put it through a crusher. When it is crushed throw it into the ocean. Once it rusts for a couple of years, take it out and put it in an inferno. When completely melted: get the remains and bury them in a meteor crater. Only then will you be sure that your cubemap problem will be solved.

Oh wait... that's for destroying your computer...
I got nothing.

Avatar
HMW
806 Posts
Posted Mar 28, 2012
Replied 10 hours later

chickenmobile wrote:
Oh wait... that's for destroying your computer...

Easier way is easier.

self_destruct.png
Avatar
DaMaGepy
361 Posts
Posted Mar 29, 2012
Replied 11 hours later
:smile:
Avatar
HMW
806 Posts
Posted Mar 29, 2012
Replied 10 hours later
Heh, sorry for further derailing this thread, but I just couldn't help myself :smile:

Back on topic: I assume you know that you have to save your bsp to the $SteamUserDir\portal 2\portal2_dlc1\maps folder, right?, otherwise building cube maps will not work.

This has been an issue since the DLC release, but I thought I'd mention it just in case you didn't know.
See this post / thread for details.

It is also important not to rename the bsp after building cube maps, or they will stop working.

Advertisement
Registered users don’t see ads! Register now!
Avatar
tly
8 Posts
Posted Mar 31, 2012
Replied 1 day later
thx, but i know :wink:
i tried portal 1 and 2 :biggrin:

maybe ill get it some day and ill tell you how i made it :smile: