Game Development Community

Null brushes casting shadows

by Paul Teall · in Artist Corner · 08/01/2007 (2:01 pm) · 9 replies

I've got an exterior city (.dif) that's surrounded by terrain. I'm trying to use brushes with null textures to create invisible boundaries so the players can't leave the city. This works, but the brushes end up casting shadows on the level.

Is there a way to avoid this? Or a better way to keep people from being able to leave a defined area?

Thanks!

#1
08/01/2007 (3:09 pm)
Hmm, sounds like a bug in the light map calculation. Any brushes with NULL textures certainly shouldn't be used for calculating light maps...

But with that said, you should probably be using collision brushes instead. That's what they're there for. =)

(Edited for clarity.)
#2
08/01/2007 (3:23 pm)
Thanks Kevin. I'm working on a level that was delivered to me, and I'm not much of a level designer myself. Kind of learning this as I go. I assume you're referring to the force field texture mentioned here: http://tdn.garagegames.com/wiki/DIF/Overview?
#3
08/03/2007 (1:54 pm)
Actually, I'm talking about applying the collision entity type to a brush. (This is similar to specifying a detail brush by applying the detail entity type.)

Setting the brushes to use the force field texture might work. I haven't used that at all; can't say if it will affect the lighting calculations or not.
#4
08/03/2007 (1:58 pm)
I just re-read your original post... If you're just trying to keep the players within your city bounds, this would likely be a more optimal solution: www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4292

Best of luck! =)
#5
08/03/2007 (2:07 pm)
Thanks for all the help, Kevin. I'll check it out. One of our programmers suggested it's a bug within the Constructor map2dif that's causing lights maps (I think) to be cast on the null brushes when they shouldn't be.
#6
08/03/2007 (2:59 pm)
The bug would indeed be in map2dif. However, it may also be present in the engine itself. =(

World light map calculation is done separately (from DIF light map calculation) on a per mission basis. So there's still the potential for null brushes to cast shadows on terrain or other static objects. Something else to watch out for. =)

(Now I'm curious to see this in action... When I get some time I'll dig into it and see what's going...)
#7
08/12/2007 (12:46 pm)
Hey guys, I just wanted to mention that shadow casting from null surfaces is by design.

Null surfaces are used to help reduce poly counts by removing geometry you'll never see. In the case of a completely indoor level all outer surfaces can be removed with null textures, however you'd still need those surfaces to block the sunlight from entering the interior.

There are several collision brush entity types available in Torque, these block player movement without affecting lighting.
#8
08/15/2007 (2:27 pm)
Thanks John. Makes sense - can you suggest an alternative way to set this up?
#9
08/19/2007 (10:23 pm)
Try using collision brushes instead, they should block players and vehicles without casting shadows.