Game Development Community

FxFoliage: switch for temporary transparency

by David Stewart Zink · in Torque Game Engine · 02/18/2003 (11:04 am) · 7 replies

So I dropped some FxFoliage on WaterWorld in the standard demo, and ran around experimenting. It's beautiful. Theres a cool feature where when you fire the crossbow through the foliage it goes transparent and you can watch the progress of the missile. I think there might be a use for that feature, but I was also wondering if there was a way to switch it off?

#1
02/19/2003 (3:54 am)
that actually sounds like a sorting bug not a feature ;)
#2
02/19/2003 (8:46 am)
Ahem ... sure, yes, that's a feature. ;)

- Melv.
#3
02/20/2003 (8:18 pm)
Undocumented feature anyways.
#4
02/21/2003 (5:09 am)
sounds like someone is takeing a page from microsofts book ;)
we got no bugs, just features
#5
02/24/2003 (6:58 am)
To answer sensibly:

The foliage stuff takes a few shortcuts to gain rendering speed although it's not optmised by a long way. Don't forget that I designed it to render LOTS of billboards quickly and not to be an absolutely generic foolproof object. It would be easy to make the amendments required to sort out minor issues like this though.

I thought I'd leave that up to the person who required it for a specific purpose/game, pretty much like the way the fxGrass went.

But then again, if you like the 'feature' then I'm glad I ... ahem ... put it in there. ;)

- Melv.
#6
03/05/2003 (12:55 pm)
Actually I keep thinking of new uses for the feature...in general we call such things "features" if they make things work in a suprising way rather than blue-screening or whatever in the microsoft fashion.

I haven't looked at any of that code yet.

I saw mention of an fxFoliage example with a million bushes, so I made one with a million. Whooee! Could use some optimization. I did the obvious in the generation code which cut the load time 7%--nothing to write home about. Haven't looked at the rendering code at all.
#7
03/05/2003 (1:18 pm)
David,

Yes, it could definately do with some more optimisation. There's certainly an opportunity to reduce the memory footprint for large quantities of billboards. There's also a considerable gain that could be made in the rendering aspects.

The effect you see wouldn't happen at all if it wasn't for the interpolation of completely transparent/non-transparent pixels e.g. GL_NEAREST texturing. Either that or sort the billboards or other methods but that obviously effects the speed as well.

The quad-tree coupled with frustum-culling gives you the best performance increase, especially when the quad-tree is configured to an optimum culling size rather than using the default setting. Putting debug-mode on and watch the FPS helps considerably with this.

- Melv.