Please or Register to create posts and topics.

Env_cubemaps

i was looking for an average number of about how many cubemaps should be used on a portal map.

It depends on the size of the map of course. For an idea you could vmex some of the professional testchambers and see how many cubemaps they put in and where.

Remember that a shiny surface shows its nearest cubemap as its reflection so, for example, if you had a cubemap above where the floor was water you wouldnt want nearby walls to lock onto that cubemap if there is was a concrete floor below those nearby walls; so you would need two cubemaps, one reflecting the water and one reflecting the concrete.

Hope this helps.

Cubemaps can significately add up to the size of a map file. But the wrong cubemaps on a surface look very ugly. You should bother more about the places you put cubemaps than about the number. As long as you place them smart, you don't need too many. It's just like optimisation.

For example: a square room almost completely composed out of metal with a few concrete surfaces can easily do with 1 cubemap placed in the middle. The same for an almost completely concrete chamber with a few metal surfaces. It requires a lot of trial and error to get right.

Having said that, you of course still don't have a real answer to your question. The number of cubemaps really depends on your map. Like I said, through simple trial and error you'll get there.

Image

"Duct Tape is the answer."

Cubemapping is an art, not a science. There is no "right" way to do it, but there sure are plenty of "wrong" ways.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

As the resident Rube, I think it's worth pointing out that the above points about "winging it" and learning the proper way through trial and error are correct. But the question was simple and is, as yet, unanswered: what's a ballpark figure for a good number of them?

"Games are made out of smaller games ? turtles all the way down, until you hit the game that is so trivial and stupid it isn?t deserving of the name." --Raph Koster

There is no ballpark figure out there, the ballpark is based on each map individually.

The easiest way to get an estimate is to add up the number of areas of visual contrast in you map (contrast in lighting, texture etc.).

    Example: If you have a completely metal room between 2 elevators, you would want to use 3 cubemaps: 1 cubemap in the middle of the room and 1 cubemap in front of each elevator.

You'll still need to test the cubemaps to make sure everything looks good, but this should give you a good place to start.

msleeper wrote:
Cubemapping is an art, not a science. There is no "right" way to do it, but there sure are plenty of "wrong" ways.

:potd:

Like mentioned above it depends on the brush work and surrounding of your map, not the size, Cube mapping is an art. Each cubemap should be placed 35 units above a surface that is reflective. Also you wont need more than one cubemap for a single room, unless the room it self is very large. A cubemap should be placed in a 512 unit radius. That means every 512 units a cubemap should be present as long as the room is large. That however does not mean you should have large ass reflective brushes. You also have to take care of the fill-rate rendering for those surfaces. Also what they reflect. So, cubemap values and keys arent needed to be used unless your doing some really special reflection work, but even then, you'll hardly use them either.Same thing for glass, if theres a glass wall, a cubemap should be on each side, 15 units away from the glass.

Floor - 35
Glass - 15
Water - 40
wall - 35
Sky - 40 (only for HL2 of course)

I hope that helps.

Currently working on Darksiders 3.
MrTwoVideoCards wrote:
:potd:

Like mentioned above it depends on the brush work and surrounding of your map, not the size, Cube mapping is an art. Each cubemap should be placed 35 units above a surface that is reflective. Also you wont need more than one cubemap for a single room, unless the room it self is very large. A cubemap should be placed in a 512 unit radius. That means every 512 units a cubemap should be present as long as the room is large. That however does not mean you should have large ass reflective brushes. You also have to take care of the fill-rate rendering for those surfaces. Also what they reflect. So, cubemap values and keys arent needed to be used unless your doing some really special reflection work, but even then, you'll hardly use them either.Same thing for glass, if theres a glass wall, a cubemap should be on each side, 15 units away from the glass.

Floor - 35
Glass - 15
Water - 40
wall - 35
Sky - 40 (only for HL2 of course)

I hope that helps.

I wouldn't go as far as calling it an art. I agree that the amount of cubemaps don't nesseceraly depend on the size of the map, but the distances you talked about don't make sense. Where did you get those values from? Why 15 units when you can have 16 units (so you easily can align them to the 16 units wide grid)? Why put a cubemap by the sky? And 64 units above the floor is better than 35. 64 units is about the same hight as the hands of the player. I wouldn't make a recommendation for distances between cubemaps and surfaces at all except for one. A cubemap shouldn't be closer than 16 units from a surface.

IMO, the fewer cubemaps, the better. The file size will be smaller and you don't get flickering reflections as you walk through them. The framerate could be affected too in some cases. I usually put one cubemap per room. The default resolution for the cubemaps is too low in most cases for you to see the difference between having one or ten cubemaps in a room. There are exceptions of course, for example rooms with complex design.

If the room is large I put cubemaps by the entrances so no other cubemap will be too close to the farther ends of the room. Assigning brush faces can be a good idea for large reflective surfaces that are devided in many brushes. Then you don't get different cubemaps on the same wall or ceiling etc.

This is a good page to read for more info:
http://developer.valvesoftware.com/wiki/Cubemaps

thanks a lot for your responses so fast! ive read plenty of cubemap tuts, but a lot of the recommend different ideas, so id thought i would ask you peoples for some help. ill probably stick with one cubemap per room i guess, and ill add more where ever i need them such as glass :D

Ald?z wrote:
I wouldn't go as far as calling it an art. I agree that the amount of cubemaps don't nesseceraly depend on the size of the map, but the distances you talked about don't make sense. Where did you get those values from? Why 15 units when you can have 16 units (so you easily can align them to the 16 units wide grid)? Why put a cubemap by the sky? And 64 units above the floor is better than 35. 64 units is about the same hight as the hands of the player. I wouldn't make a recommendation for distances between cubemaps and surfaces at all except for one. A cubemap shouldn't be closer than 16 units from a surface.

IMO, the fewer cubemaps, the better. The file size will be smaller and you don't get flickering reflections as you walk through them. The framerate could be affected too in some cases. I usually put one cubemap per room. The default resolution for the cubemaps is too low in most cases for you to see the difference between having one or ten cubemaps in a room. There are exceptions of course, for example rooms with complex design.

If the room is large I put cubemaps by the entrances so no other cubemap will be too close to the farther ends of the room. Assigning brush faces can be a good idea for large reflective surfaces that are devided in many brushes. Then you don't get different cubemaps on the same wall or ceiling etc.

This is a good page to read for more info:
http://developer.valvesoftware.com/wiki/Cubemaps

Heh, well then you answer his question Mighty Cubemap Lord. But, when you get down to it, the reason I listed these values, are all apparent when you get to the Lump file In the BSP, and the BuildCubeMap's Process. MAINLY! With HDR!

Currently working on Darksiders 3.