problem with reflective textures
Quote from tly on March 25, 2012, 11:38 amhey
i have the problem that every texture that uses $envmap is shown normally in hammer, but pink and black ingame after rendering![]()
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?
hey
i have the problem that every texture that uses $envmap is shown normally in hammer, but pink and black ingame after rendering
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?
Quote from Lpfreaky90 on March 25, 2012, 12:18 pmDid 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.
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.

Quote from ChickenMobile on March 26, 2012, 1:53 amHave you been building the cubemaps (buildcubemaps in console) with a full compile?
Also try putting
- Code: Select all
"$normalmapalphaenvmapmask" "1"
Inside your .vmt
Have you been building the cubemaps (buildcubemaps in console) with a full compile?
Also try putting
- Code: Select all
"$normalmapalphaenvmapmask" "1"
Inside your .vmt
Quote from tly on March 27, 2012, 2:32 pmlpfreaky90 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 cubemapschickenmobile wrote:Have you been building the cubemaps (buildcubemaps in console) with a full compile?Also try putting
- Code: Select all
"$normalmapalphaenvmapmask" "1"
Inside your .vmt
-i made a full compile (if bsp-normal, vvis-normal, vrad-normal+hdr is the full compile
)
-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
)
-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 issuethanks for your answers, but nothing worked...
-the env_cubemap is near
-i didnt use them, but i built the cubemaps
Also try putting
- Code: Select all
"$normalmapalphaenvmapmask" "1"
Inside your .vmt
-i made a full compile (if bsp-normal, vvis-normal, vrad-normal+hdr is the full compile )
-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 )
-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
thanks for your answers, but nothing worked...
Quote from Lpfreaky90 on March 27, 2012, 2:49 pmI think the env_cubemap thing isn't done the way it should be. I took glasswindow_frosted_002.vmt:
- Code: Select all
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?
I think the env_cubemap thing isn't done the way it should be. I took glasswindow_frosted_002.vmt:
- Code: Select all
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?
Quote from HMW on March 27, 2012, 5:29 pmThe 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.
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.
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
Quote from Lpfreaky90 on March 27, 2012, 5:34 pmHMW 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.
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.
Quote from tly on March 28, 2012, 5:09 amlpfreaky90 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
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
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?
i knew that it works like that , but i didnt work for me
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
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?

Quote from ChickenMobile on March 28, 2012, 8:14 amtly 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.
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.
Quote from HMW on March 28, 2012, 6:55 pmchickenmobile wrote:Oh wait... that's for destroying your computer...Easier way is easier.
self_destruct.png
Easier way is easier.
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic