Fortress Forever

Go Back   Fortress Forever > Editing > Mapping

Reply
 
Thread Tools Display Modes
Old 03-25-2008, 08:33 PM   #1
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
env_cubemaps

I have some problems understanding env_cubemaps so here are my question(s):

As I understand it with cubemaps you want to put them all around your map at pretty much eye level of the player and approximately 32 units away from all walls.

That's pretty simple and I get that, I also kinda understand why they are used.

Now my dilemma is that I'm doing a concmap and I have multiple rooms that are closed off...some are huge (1284+ long by 640+ wide) and some are pretty small (512 x 640)

So:

1) What is the general rule of thumb for how to space them...like in a smallish room do I need 2 env_cubemaps or should I stick to one and in my bigger rooms how many? Is there some sort of generally accepted spacing in a large room for how far apart each should be?

2) Water - This confuses the hell out of me. I know I need (or think so at least) env_cubemap for anywhere where I put water. Most of the tutorials I have read say put one about 16 units above your water and it's perfect. BUT how do I do it in a small room? Like if I have the small room (512 x 640) with a 256 x 128 chunck of water in the room should I put 2 cubemaps in there and have one be above the water for the water and another somewhere else in the room for the rest of the room? If so how far apart should these be?

3) If anyone can explain how glass and env_cubemap works that would be awesome too! The senario here is I have a room that is cut in half by a window, do I need to place env_cubemaps on either side of the glass texture so that either side gets whatever it is that the cubemap gives? (hopefully #4 will help answer this too!)

4) What exactly is the env_cubemap doing for my map? From what I have read I gather that it basically pulls the reflections from that point for all of your textures which is why it's needed for water b/c it makes the water reflect? But is that all it does or does it do more?

5) Should I do this(click) or just stick to using the entities in game?

Thanks for all the help!
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan is offline   Reply With Quote


Old 03-26-2008, 12:43 AM   #2
Mr. Happy
FF LOL
 
Join Date: Sep 2007
Posts Rated Helpful 0 Times
1. Placing cube maps can be tricky. Maybe one every 128 - 512 units.
Also though, you should place one-two near each other in areas that transition from light to dark. You should also place more in areas that are more complex, because you don't want something reflecting something else that is no where near it! But generally, don't place them closer than 64 units.

Also, since FF is such a vertical game, especially in your conc map, you'll want some of them running vertically as well. The reason why people put them at eye level, is because a reflection is light bouncing from your eye against a surface and off in the opposite vector/direction.

But don't litter your map with them either!

2. Water is a special case for cube maps. Each water surface or rather brush needs it's own cubemap. You place one above the water, 16 32 or 64 units is good depending on the viewing angle the player will be seeing the water at (I generally place them higher up if the player is mostly seeing the water from above, but never more than 64 units). Then you open the env_cubemap's properties, and where it says brush face you click "pick" and select the face of the water.

Each water face needs one, directly assigned, cubemap which will only be used for that water. So you will need others in the area for the weapon model and other surfaces.

There is a small problem with this you should be aware of. If you've ever noticed in monkey, in the water tunnel, theres a place where the surface of the water has a visible seam, where it's more shiny in one place than another, this is because that's two seperate brushes with seperate cubemaps.

3. Yes, put one on either side of the glass. The reflections on each side are different!

4. Here's a quick rundown of how specularity (albedo) ((reflections)) work in source:

A reflective texture has what is known as an envmap, a gray scale image that shows which parts of the texture are shiny, and which aren't. White is shiny, black is matte, and grays are inbetween!

Inside the material's script file (the vmt) there are two lines, one tells the material where to get it's envmap, and one tells where to get it's reflections from.

An example of the former is "$normalmapenvmapmask" "path/to/texture".

And example of the later is "$envmap" "env_cubemap"

A texture can reflect either 1. a color, 2. another texture (iirc) or 3. a cubemap!

A cubemap is an inverted cube, kind of like a skybox. When you run buildcubemaps in the console, the engine takes six pictures from the location of each cubemap (up, down, left, right, front, back). These images line up perfectly and are reflected by the texture in places where the envmap is not black. Your weapon model reflects the closest cubemap to you, and models and brushes reflect the one closest to them.

So, the short answer to number 5, is that if your making your own materials, you have to do both!

If you are making your own materials, there's a very helpful shader code you can put in your vmt that looks something like this:

$envmaptint "[.1 .1 .1]"

This tint's (darkens) the envmap. It's usefull because reflections are usually way to bright in source, even if your envmap is quite dark.

The .1 .1 .1 are RGB values, so you can even do something like [.3 .8 .1] which will scale the reflections with a colorspace bias!

2.
Mr. Happy is offline   Reply With Quote


Old 03-26-2008, 01:07 AM   #3
greenday5494
Holy shit, thats kerrigan!
D&A Member
 
greenday5494's Avatar
 
Join Date: Sep 2007
Class/Position: D, whatever the team needs, usually engy
Gametype: AvD
Affiliations: None
Posts Rated Helpful 1 Times
cubemaps are actually quite simple. i know mr happy has got me beat in many ways, but ill have a go at it:

for water, in Source, you cannot have more than one cubemap applied to one surface of a brush. as you should know, water need to be completly nodraw with water on top. oh, and even if you're using Expensive (like waterpolo's_ Water, you still need to use CubeMaps for subdirectX9.0 hardware.

if you have a semi-large room, you can increase the sides of the cubemap by a little, but not too much, it's better to have more cubemaps than one cubemaps with lots of sides. especially when there's: 1. a transition from dark to light, no matter how big or small. 2. different color-lighting in the same room.

and you got cubemaps pretty much right. it makes things that (as mr. happy pointed out) have shiny attributes in it's VMT shiny in the correct places. if you have a non-shiny surface, it's rather useless to put a cubemap there, but, generally, you should put one to two cubemaps per room, if more needed. it varies a little, but cubemaps are rahter simple. the worst things that could go wrong is it doesnt look good. just make sure you type buildcubemaps in the console, or it will be VERY VERY VERY shiny, or in the case of HDR, just white and washed-out. BTW, adding HDR is easy, just check the HDR box and whammo you got it. but you have no tonemapping, that's done by triggers
greenday5494 is offline   Reply With Quote


Old 03-26-2008, 01:27 AM   #4
Crazycarl
D&A Member
Wiki Team
Fortress Forever Staff
 
Crazycarl's Avatar
 
Join Date: Apr 2007
Posts Rated Helpful 31 Times
You know when you type buildcubemaps in the console and you see a bunch of images flash by on the screen? Those are the cubemaps. Each env_cubemap takes 6 small screenshots to make a 360-degree view, like a skybox. They are then saved into the map file.

The game always uses the nearest cubemap, even through walls, I believe. So you want to place enough so that wherever the player goes he's near a cubemap that resembles his surroundings.

A good way to test your cubemaps is to go sniper and run around with the rifle out. The cubemaps are visible in the lens of the scope. If you see a reflection in your scope that doesn't look like the room you're in, you need to add another env_cubemap or move around the ones you have.
__________________
Support FF:
Crazycarl is offline   Reply With Quote


Old 03-26-2008, 02:48 AM   #5
greenday5494
Holy shit, thats kerrigan!
D&A Member
 
greenday5494's Avatar
 
Join Date: Sep 2007
Class/Position: D, whatever the team needs, usually engy
Gametype: AvD
Affiliations: None
Posts Rated Helpful 1 Times
yep, exactly. when you build the cubemaps, well, it builds them by taking pictures and correctly using them. oh, and cubemaps are also used by the conc effect (i THINK im not certain) and especially the SG in 2.0.
greenday5494 is offline   Reply With Quote


Old 03-26-2008, 04:25 PM   #6
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
Great thank you all.

I think that I have it and I know I need them b/c most of my textures for this map are metal and that needs cubemaps to shine correctly. I guess I'll have to play with this a ton to get it all correct, but that's definitely a good start.
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan is offline   Reply With Quote


Old 04-01-2008, 12:20 PM   #7
BumGravy
Black Cyclops
 
BumGravy's Avatar
 
Join Date: Mar 2007
Location: Scotland
Posts Rated Helpful 0 Times
Quote:
2. Water is a special case for cube maps. Each water surface or rather brush needs it's own cubemap. You place one above the water, 16 32 or 64 units is good depending on the viewing angle the player will be seeing the water at (I generally place them higher up if the player is mostly seeing the water from above, but never more than 64 units). Then you open the env_cubemap's properties, and where it says brush face you click "pick" and select the face of the water.
As I understand it, the cubemap you assign to the water texture should sit directly on top of the water, ie use your entity tool in hammer and click directly onto the waters surface so the bottom of the cubemap entity is flush with the surface of the water, then in the overead view move the entity so it is somewhere near the centre of the water surface. I gather this is the best way to achieve accurate reflections.
BumGravy is offline   Reply With Quote


Old 04-01-2008, 12:37 PM   #8
GambiT
Fortress Forever Staff
 
GambiT's Avatar
 
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy
Affiliations: -=DoM=-
Posts Rated Helpful 0 Times
i think more or less it depends on the area that your placing it in, flush or 32 above is fine...
__________________
-------------------------------FF_Rock2(WIP)------------------------------
---------------------------FF_RedGiant(Released)-------------------------
--------------------------FF_Fragzone_G(Released)------------------------
--------------------------FF_Civibash_G(Released)------------------------
-------------------FF_Conc_G1(WIP)--------------------
-------------------FF_Hollow_G(WIP)---------------------
GambiT is offline   Reply With Quote


Old 04-01-2008, 09:49 PM   #9
greenday5494
Holy shit, thats kerrigan!
D&A Member
 
greenday5494's Avatar
 
Join Date: Sep 2007
Class/Position: D, whatever the team needs, usually engy
Gametype: AvD
Affiliations: None
Posts Rated Helpful 1 Times
or just use expensive water and you need no cubemaps!
greenday5494 is offline   Reply With Quote


Old 04-20-2008, 08:42 PM   #10
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
Ok so I finally got to the point where I could start adding these in. I put them all around my map and then went in game and typed "buildcubemaps" and now I get an error (actually a ton of them):


Quote:
bounce: 1/1 sample: 694/694 (starts out like this with 1 and goes all the way through)
vtex failed to compile cubemap!
Unable to remove c:\program files\steam\steamapps\sourcemods\fortressforever\m aterials\maps\conc_school\c-6080_5184_-348.vtf!
~ This goes on for a long while until the bottom where it just ends up getting the default cubemap from my skybox. What am I doing wrong?
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan is offline   Reply With Quote


Old 04-20-2008, 10:11 PM   #11
GambiT
Fortress Forever Staff
 
GambiT's Avatar
 
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy
Affiliations: -=DoM=-
Posts Rated Helpful 0 Times
c-6080_5184_-348.vtf!


remove the red from your textures name, see if that helps
__________________
-------------------------------FF_Rock2(WIP)------------------------------
---------------------------FF_RedGiant(Released)-------------------------
--------------------------FF_Fragzone_G(Released)------------------------
--------------------------FF_Civibash_G(Released)------------------------
-------------------FF_Conc_G1(WIP)--------------------
-------------------FF_Hollow_G(WIP)---------------------
GambiT is offline   Reply With Quote


Old 04-21-2008, 12:48 AM   #12
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
Quote:
Originally Posted by GambiT
c-6080_5184_-348.vtf!


remove the red from your textures name, see if that helps
actually I think it might have just been a matter of needing to exit and jumping back in cause everything looks fine now...I'm not really sure how to test if they are working, but my water and my windows are reflecting the skybox colors like they were...I know that I can use the sniper rifle, but I'm not really sure what that means or how to do that.
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan is offline   Reply With Quote


Old 04-21-2008, 01:09 AM   #13
GambiT
Fortress Forever Staff
 
GambiT's Avatar
 
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy
Affiliations: -=DoM=-
Posts Rated Helpful 0 Times
i would remove them anyway, source hates the "-" in file names, "possibly" not textures, but better safe than sorry
__________________
-------------------------------FF_Rock2(WIP)------------------------------
---------------------------FF_RedGiant(Released)-------------------------
--------------------------FF_Fragzone_G(Released)------------------------
--------------------------FF_Civibash_G(Released)------------------------
-------------------FF_Conc_G1(WIP)--------------------
-------------------FF_Hollow_G(WIP)---------------------
GambiT is offline   Reply With Quote


Old 04-21-2008, 01:14 AM   #14
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
Quote:
Originally Posted by GambiT
i would remove them anyway, source hates the "-" in file names, "possibly" not textures, but better safe than sorry
I don't have any textures (that I know of) that have "-" in them...just "_" but I guess I should probably look lol.
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan is offline   Reply With Quote


Old 04-21-2008, 01:59 AM   #15
GambiT
Fortress Forever Staff
 
GambiT's Avatar
 
Join Date: Mar 2007
Location: Baton Rouge
Class/Position: Spy
Affiliations: -=DoM=-
Posts Rated Helpful 0 Times
"c-6080_5184_-348.vtf" is a texture, in your "conc_school" folder
__________________
-------------------------------FF_Rock2(WIP)------------------------------
---------------------------FF_RedGiant(Released)-------------------------
--------------------------FF_Fragzone_G(Released)------------------------
--------------------------FF_Civibash_G(Released)------------------------
-------------------FF_Conc_G1(WIP)--------------------
-------------------FF_Hollow_G(WIP)---------------------
GambiT is offline   Reply With Quote


Old 04-21-2008, 04:53 AM   #16
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
Quote:
Originally Posted by GambiT
"c-6080_5184_-348.vtf" is a texture, in your "conc_school" folder
but I don't even have a conc_school folder...all I have is a fortressforever\materials\DrSatan\ folder with some sub-folders:

arrows
ceilings
floors
walls
metal_walls
and then a bunch of textures named slate_jumpx (where x is a number 1 through 15)

I have a conc_school folder on my pc...but that has nothing to do with hammer or vtf's
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan is offline   Reply With Quote


Old 04-21-2008, 05:09 AM   #17
Crazycarl
D&A Member
Wiki Team
Fortress Forever Staff
 
Crazycarl's Avatar
 
Join Date: Apr 2007
Posts Rated Helpful 31 Times
That's a cubemap vtf and it should be getting zipped into your bsp right after it's created.

Just pull up the rifle and look at the scope. If it looks like the sky, the cubemaps are not working. If it looks like the wall behind you, they are.
__________________
Support FF:
Crazycarl is offline   Reply With Quote


Old 04-21-2008, 05:25 AM   #18
Dr.Satan
Wiki Team
Fortress Forever Staff
 
Dr.Satan's Avatar
 
Join Date: Sep 2007
Location: Greeley, CO
Class/Position: Med / Solly
Gametype: PAYLOAD
Affiliations: DET-
Posts Rated Helpful 19 Times
Quote:
Originally Posted by Crazycarl
That's a cubemap vtf and it should be getting zipped into your bsp right after it's created.

Just pull up the rifle and look at the scope. If it looks like the sky, the cubemaps are not working. If it looks like the wall behind you, they are.
ok...that's what I thought everyone meant by you can see them in the sniper rifle...but wasn't sure. I see the wall so it's all good!
__________________
(Released) conc_school | hellion_classic | ksour_PAYLOAD | mulch_faf
(Beta) alchimy_b1
(Lua) base_payload_2015
(Models) props_trainyard
Support FF:
Dr.Satan is offline   Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:37 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.