Game Development Community

Fxgrass vs Fxfoliage

by Ian Dale · in Torque Game Engine · 12/22/2004 (10:39 pm) · 37 replies

What is the difference between these two?

I know that fxfoliage is a standard part of torque 1.3, but what about fxgrass?

Any info will be helpful.

Regards,
Page «Previous 1 2
#1
12/22/2004 (11:02 pm)
I looked into this a little bit recenty, from what I could tell, the main difference is that fxFolliage is billboarded to always face teh camera, and fx grass has grass at a single rotation in the world...it looked like there was maybe some different decision making going on in how it chose to place each piece of folliage also.

I'm sure Melv, or somebody else with a better understanding could give you more details though.
#2
12/22/2004 (11:11 pm)
Clint,

Yes I do remember reading about the billoarding bit. I was wondering about this because if the grass isn't billboarded won't it look funny at certain camera angles?

Or is it that fxgrass is designed to put grass on areas that won't be interacted with by the player, i.e. a far of hill.
#3
12/22/2004 (11:25 pm)
@Ian: The fxFoliage was written by me to provide a mechanism to show billboarded folliage. The orientation of the billboards can be changed easily in the C++ code if required. It got to the point where it was working pretty well and apart from a few tweaks, it was left there. Apart from the culling algorithm, no major performance tweaks were added such as batching render calls etc although it does suit for most purposed apart from a jungle scene. Bendik Stang used the fxFoliage code as a basis for his CG thesis. He made several adaptions to the foliage work to make it more realistic with things such as vertex colouring, different foliage-distribution models, grass/crop row orientation, different terrain placement algo etc.

The result is that there is around 90% similarity between the two but the fxGrass has key differences which could be better for your project. The fxFoliage is in the engine now but there's no reason why the fxGrass couldn't be there either.

It's about time that someone took Bendiks'/my work and made major improvements to them; it's all there and all it needs is time and effort. :)

- Melv.
#4
12/22/2004 (11:45 pm)
Melv,

You said: "The result is that there is around 90% similarity between the two but the fxGrass has key differences which could be better for your project. The fxFoliage is in the engine now but there's no reason why the fxGrass couldn't be there either."

Apart from no billboarding, what else is different between fxgrass and fxfoliage?
#5
12/22/2004 (11:57 pm)
Ian,

Didn't I just say above? ;)

As much as I'd like to help, to get a detailed list of changes you'll have to look at the resource posts or speak to Bendik himself as I didn't keep track of all the changes and their impact. Also remember that I wasn't involved in the fxGrass development at all apart from doing the base code. I did read his thesis which discusses his adaptions albeit nothing more than you can find on the resource posts.

Presumably the edit properties show the differences between the features?

- Melv.
#6
12/23/2004 (12:13 am)
I recommend using the fxgrass, the fx foliage replicators, and the fx shape replicator to make some good looking scenes.
#7
12/23/2004 (12:00 pm)
Fxgrass is dead easy to setup and get running, so why don't you give it a try? It creates a more convincing volumetric feeling for grass, since the grass elements won't rotate to face the camera. You can cover larger areas with fxgrass than you can with fxfoliage, and it looks less repeated, since you can randomize the vertex colors and other stuff.

By mixing the two together you can get some awesome effects.
#8
12/24/2004 (2:31 pm)
Melv said:
Quote: It's about time that someone took Bendiks'/my work and made major improvements to them; it's all there and all it needs is time and effort. :)

Merry Christmas, I'm working on it.
I installed fxgrass and played with it. It's nice. I'm not going to copy it exactly, but I'll take all of what I see as the best parts, and combine it into fxfoliage with some configuration options so you can use it the way you want. I'm also adding some more configuration options that neither had before and fixing up a few 'bugs' I've found.

I'll also do some further render options to hopefully push through more foliage items and get us to the point that we aren't cpu bound but bound by the graphics card's power. at least as far as foliage is concerned

I'll post more after Christmas.
happy holidays all.
-Clint
#9
12/24/2004 (3:04 pm)
I've also been working on this for a month or two.. but got stuck with TSE inbetween. I've been looking to add some features discussed in the FxGrass Performance Thread (at work so I couldn't find it and link though).

Clint how long have you progressed and what have you done? Maybe we could talk sometime.
#10
12/25/2004 (2:52 am)
@Clint/Stefan: Okay, I shouldn't be on the compy on xmas day but this is great news. I'm suprised nobody has done this already. The foliage back-end code is pretty good but the front-end rendering needs a little work. Most of the work needs doing on the configuration of each foliage item (flexibility/rationalisation) and the actual rendering function itself. Hey, I'm preempting what you're doing so it'll be good to see someone spend some time on it and make it the best it can be.

Good luck!

- Melv.
#11
12/25/2004 (2:19 pm)
Sheesh, Melv, what you doing on the GG forums on this day of all days? ;)
#12
12/25/2004 (4:06 pm)
What are you doing to on the GG forums on this day of all days, Ben? :P
#13
12/25/2004 (8:55 pm)
Um... I... uh... What's your mom doing on the forums on this day of all days? :P
#14
12/25/2004 (9:59 pm)
I wish I knew......
#15
12/25/2004 (10:08 pm)
SMILING'S MY FAVORITE!
#16
12/26/2004 (12:07 am)
I've been messing around with the FX Grass Replicator these past few days, and it's really a great class. The grass will almost always bring me under 10 fps, though. While I'm getting close to 200fps inside of interiors. Are the any optomizations floating around somewhere? I've searched the forums and resources, but I didn't turn anything up.

www.illumina-game.com/index.php/mod/gallery/file/display/image/115
#17
12/26/2004 (12:23 am)
How much grass are you drawing? What graphics card?
#18
12/26/2004 (12:47 am)
Right, that's my one day holiday; I feel refreshed ... back to it I guess!

@Josh: What Ben said!
#19
12/26/2004 (1:16 am)
A whole lot. ;) I have 580,000 grass elements total. I'm not drawing them all at the same time, though. That screenshot shows what it looks like in game. I have a Radeon 9200 and a P4 processor. I uped the grass count a little bit after making some opamizations(might explain why my indoor fps's are so good).
#20
12/26/2004 (1:29 am)
@Josh: I think the problem with stuff like grass is that it's a difficult balancing act and there just isn't one object that will suit all. At best, the object needs to provide plenty of info such as objects considered and objects actually rendered. It'd be easy to get that info out of it though with minor work. If you've got a single replicator handling so much then the respective view distances combined with the culling size is extremely important. If you're actually rendering lots of billboards then GPU batching would become very important to have; something that's not in there, at least not in the fxFoliageReplicator.

My knowledge of the fxGrass is limited but you may consider looking at the debug mode which will show you if your culling-blocks looks respectably sized although this is a very subjective mesure.

There really should be some feedback metrics to provide at least an idea of where the stress is.

Slightly off course here but it'd be a great idea if someone wanted to create a generic, registerable (is this a word?) metric viewer GUI for the TGE. You could register a name and value and it would add it to its list. The GUI would then render these values each frame, similar to a tweaker. Maybe even support the ability to actually average values. It could perhaps even be a sub-object of the TS-control. The console just plain sucks for this kind of feedback.

- Melv.
Page «Previous 1 2