"$envmap" "skybox/sky_well_01" works, others don't

FernandoWhitmore

L1: Registered
Jan 19, 2016
19
2
"$envmap" "skybox/sky_well_01" shows up in game properly, but other stock ones like "skybox/sky_granary_01" and custom ones give the fuchsia-black grid. As skyboxes they all work fine. Does anyone know what's going on? Thanks
 

FernandoWhitmore

L1: Registered
Jan 19, 2016
19
2
I found well has 2 sets of skies, one with separate faces, and one with all faces and a spheremap in a single vmt where the others don't. No idea why it should make any difference but it does. Funny little engine.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
I've never understood why Source skyboxes are six separate materials in the first place when cubemap and spheremap textures already exist in the engine, but there you are.

I'm curious why you wanted to use a skybox as an $envmap in the first place, since hard-coded environment maps almost always look crap unless it's a really toned down one (see: those weird cubes in Asteroid vs. the shiny floors in Portal 2).
 

FernandoWhitmore

L1: Registered
Jan 19, 2016
19
2
It's a bit of a compromise. The texture its for is on a lot of curved and connected displacement maps and env_cubemaps will show seams. I could get away with using a single high resolution env_cubemap if need be but it'll be a big file that's basically a copy of the skybox

Can't remember the Portal 2 ones, but I know the stock TF2 cubemaps are low resolution which would look horrible on something highly specular

Having some success recompiling skyboxes to get the spheremaps now though. Just found out HDRShop isn't free any more, and hasn't been for the past 7 or so years
 
Last edited:

FernandoWhitmore

L1: Registered
Jan 19, 2016
19
2
Spheremaps are a pain to get working too - the ones I made looked fine when compiled in vtfedit, but they seem to be 'sideways' in game - seeing the horizon when looking down and such
 
Mar 23, 2013
1,013
347
Some more advanced textures should be compiled with vtex, vtfedit is only a third party tool.
 
Mar 23, 2013
1,013
347
don't know but I doubt it, the best tool is probably vtex since it's made by Valve, but it's complicated to use.
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
What are you even doing? Why do you need to plug a skybox texture into the envmap parameter? What's wrong with using
$envmap env_cubemap??

As far as making vtfs, I've always used Nem's photoshop plugin

sky_well_02 was for Watergate, wasn't it? so ask @Egan or @Bakscratch about it
 

Egan

aa
Feb 14, 2010
1,375
1,721
the stock TF2 cubemaps are low resolution

Just an FYI the env_cubemap entity has a 'cubemap size' keyvalue that you can use to bump up how precise the reflection is. I used it once on water and while I thought it looked cool people responded in feedback "Water looks weird" - so maybe keep in mind it is unusual in tf2 in some cases.

@YM I don't think he means that one; I don't think sky_well_02 is included in the valve files. But for reference ya watergate has a rotated copy of the Well skybox because I didn't want to rotate the map awkwardly to get the correct sky. In retrospect it's mostly only added space, but the extra set of VMT files is only 2.73kb.
 

FernandoWhitmore

L1: Registered
Jan 19, 2016
19
2
What are you even doing? Why do you need to plug a skybox texture into the envmap parameter? What's wrong with using
$envmap env_cubemap??

It's really to save space. The env_cubemap generated cubemap would just contain the skybox and not anything else, so I may as well use the skybox - it's just extraneous data otherwise .

"Water looks weird"

Do you mean that it doesn't match the TF2 style? - Because something like water would warrant larger cubemaps[/QUOTE]
 

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
@FernandoWhitmore Nothing at all? That sounds like a rather odd situation.
When you say env_cubemaps would show seams do you mean the corners of the cubemap textures or the joins between individual cubemap locations?

@Egan Did you need to rotate the up texture or just swizzle the sides?