Game Development Community

Object Clipping

by azerak · in Artist Corner · 12/10/2002 (2:14 am) · 2 replies

Hey everyone

ok, so I've got this level with this huge tree model whose branches span all throughout the level. The problem of course is that torque seems to use the center point of the object to apply fog and detail levels to it, so by the time I get to the far end of a branch, the entire tree just vanishes. Also, the fog effects are applied uniformly to the whole object, which means the branches look flat and gray the further you travel from the tree's center.

Here's a snapshot:http://www.mojosite.org/stuff/tree.jpg
That's what the tree looks like when I move too far from it's center.

Is there any way to force torque to treat this object's clipping properties differently? Maybe there's something I can do to it before I export the DTS, like give it some more levels of detail (there's currently 1) or set the details up so it almost never disappears?
any solutions you guys can think of would be greatly appreciated :)

The only fix I can think of is breaking the tree up into dozens of segments, but that's a royal pain to piece together in the map editor.

thanks!
-az

#1
12/10/2002 (6:15 am)
You're probably going to have to add some flags so that Torque's rendering code treats the tree specially. If it's a big fixture in your game, this is probably well worth it.

I would imagine that you can use the built-in fogging capabilities of OpenGL to get the right sort of fogging effect (as long as you don't use layered fog).

Of course, you'll still have the issue of Torque treating it as "centered" for stuff like LOD. I think that you're going to have to cut it up. :-/

You might try manually editing the .mis file - when you cut up a chunk, note down its new center co-ordinates and manually enter them into the file. That way everything ought to line up immediately, without a lengthy arranging process, and LOD/fogging will work out better.

If you're very good, you could even make the tree modular ;)

Still, a really cool concept. I wish you luck with it!
#2
12/10/2002 (6:11 pm)
Thanks for the advice Ben. This tree can end up looking great if I could just tweak torque into treating it differently, or thinking it's a different object type. It seems to fog the terrain smoothly though, so I hope there's some way to make it do the same for static objects. I haven't a clue about the flags, but that's probably the key. Has anyone else done extremely large objects before?

Anyway, the cutup would be a last resort, since it probably still wouldn't apply the fog smoothly. It'd probably look really segmented.

-az