Firebinder's Half-Life Pages

 

9. FLOORS & CEILINGS IN A ROUND ROOM

Recently a discussion came up on the Valve-ERC Forum about how to fit the floor in a oblong round room (a hockey rink actually). My bright idea was to simply make the floor a large rectangular brush, and then set the walls on top of it. That drew a quick response from the more experienced mapper Yesukai, who (after suggesting that I was on drugs) informed me that this technique would cause excessive face splits and result in a higher wpoly. The proper technique, he insisted, was to fit the floor inside the walls. That made no sense to me, so I set out to prove Yesukai wrong, and another experiment was born.

Since this was a test of room building techniques, the regular Test Chamber would not serve. Instead I made two separate maps, each with a single 'round' room. The walls for both were made from an eight sided cylinder, 512L x 512W, with a matching eight sided cylinder 384L x 384W used to "carve" out the centers. This gave both rooms a wall thickness of 64.

For the first room I carefully fitted the floor and ceiling brushes inside the walls as Yesukai described, and made the walls 384H. The other was made as I had suggested, with the floor and ceiling as 512L x 512W x 64H slabs placed over and under the walls, which were only 256H. All walls were covered in the Babtech6_2 texture, and the floors and ceilings were covered in the Babtech_bordl52 texture.

From the player's perspective inside the game, the two rooms looked identical, being featureless 384L x 384W x 256H eight sided rooms.

Incidentally, this is the first experiment performed on my new PC (P4, 1.8GHz, 512Mb RAM, 64Mb nVidia GeForce 2 400 Graphics card, MS Windows XP Home)

Setting FPS WPOLY EPOLY
Yesukai's Room 70+ 22 to 26

0

Firebinder's Room 70+ 22 to 30 0

So it seems that Yesukai was right (about the face-splits, not the drugs). Now that I think about this, it does make some sense. The moral of this story seems to be that you can't get away with short-cuts.

What's going on here?
You tell me. I still haven't quite figured out why it works this way. Even when you turn r_drawflat on the two rooms look identical, so I don't see where the extra WPOLY is coming from.

 

10. TEXTURE SCALE ON SMALL OBJECTS

After discovering in Experiment 8 that reduced texture scales caused FPS to decline more severely than expected, I wondered if this were true for reduced texture scales that each covered a single brush face. In other words for textures that did not have to tile to cover a surface.

To test this with my new PC, I was going to need more room. I began by enlarging the Test Chamber such that its outside dimensions were 768L x 768W x 384H, with walls 64 thick. Inside dimensions were 640L x 640W x 256H. Then I made 126 boxes, each 32L x 32W x 32H, arranged in collumns 3 high, 7 wide, and 6 deep, with at least 32 units separating each box from all other brushes.

Initially I covered them all in the GENERIC99C (16x16) texture, scaled to 2.00 so that the texture exactly covered one face of the box. Then I ran the map and checked R-Speeds. This was followed by covering all the boxes in the CRATE09B (32x32) texture at 1.00 scale, then the BCRATE09C (64x64) texture at 0.50 scale, and finally the C3A1_CRATE3 (128x128) texture at 0.25 scale. FPS and WPOLY were as follows.

Texture

FPS WPOLY EPOLY
GENERIC99C (16x16) - Scale 2.00 60+ 420

0

CRATE09B (32x32) - Scale 1.00 60+ 420

0

BCRATE09C (64x64) - Scale 0.50 60+ 420

0

C3A1_CRATE3 (128x128) - Scale 0.25 60+ 420

0

No Change in FPS or WPOLY at all. Apparently it is safe to reduce texture scale as long the texture does not have to tile to cover the surface. Also, increasing scale provides no benefit on small objects.

What's going on here?

Actually, if I had used a texture that was 256x256 I think there would have been an efect on WPOLY. Such a large texture would have been scaled down to 0.125 . The engine divides every face into 240x240 polygons, but reduced to the 0.125 scale these polygons would be about 30x30. This would make the polygons smaller than the side of the crate, so there would have been 4 times as many.

Likewise there probably was an effect on FPS but my fancy new computer was able to absorb it. Remember that lightmaps use patches of 64x64. On the 128x128 texture scaled to 0.25 those lightmap patches would have been only 16x16. Again each crate would have had 4 times as many.

I should probably expand this experiment to verify this.

In any case, it seems likely that there are some effects when scaling a texture smaller to fit, but they are usually small enough to be of little concern. Don't get carried away though.

 

Test Chamber Previous Page Test Chamber Next Page

 

Return to Top

Site Map  
Respawn Frames Frag Frames