Game Development Community

Groundcover, how does it work?

by Alaric Karczag · in Torque Game Engine Advanced · 11/19/2008 (11:51 pm) · 7 replies

I've been trying to get groundcover to work to no avial. I have TGEA 1.7.1
in the Stronghold demo, i've tried to get it to work.
Anyone have a step by step of what to select, to get it to work?
ie: what fields go in the Groundcover inputs?

thanks again for your help.

#1
12/01/2008 (3:37 pm)
Real quick:

1. Add ground cover object
2. Choose ground cover type section in property editor (5 available)
3. Load shape (shapeFilenameN) property
4. Fiddle with parameters (e.g. set probabilityN to 1 and you should see the shapes popping up; most of the parameters should be pretty self-explanatory)

Take a look the the ground cover in the T3D mission for an example.

Sorry, for the short explanation, but hope it helps anyway.
#2
12/01/2008 (4:39 pm)
The singular billboard field is for a nice grass effect; the shape billboardUV fields I've never gotten to work. The maxElements field controls the _maximum_ per cell. For grass, you'll probably set this pretty high (500,000 for me). You probably won't want that many trees, so you set the probability field for them. 0.01 will give you 5,000 trees for example. Layer/Invert is only partially finished, and don't currently do anything (unless you read JC Smith's forum post for Atlas). Clustering semi-controls the shapes tending to clump together. You won't want ALL of your trees to be in copse most likely, so you can set the probability here as well (called clumpExponent this time). Generally, a setting of 0.5 here, with a 5-10 cluster, will cause your trees/rocks to cluster in groups of 5-10 50% of the time, with the rest of the time being just singular, randomly placed elements.
Hmm, most of the other fields are easy; wind is pretty much the same as the replicators. Radius is how far out around you they can be seen (default is good). Dissolve radius is I _think_ an alpha fading effect, but I've never gotten that to work either. ReflectScale has something to do with showing your objects in reflections, such as water. I don't know what value would do what, but the default seems to be pretty good.
#3
12/02/2008 (3:23 pm)
Thanks in advance,

I dont see any groundcover being used in any of the examples?
I redownloaded 1.8beta and I still dont see the groundcover in the T3D example?
if anyone has a base level to look at it would be nice.
or maybe just snapshots of the fields

Rene:
thanks for the help, but can you be more specific please:
2.+3: type? are these .dts files or .png? ie:same as a foiliage replicator, or a shapereplicator? is it a billboard .dts object? or just a picture file?

i see no entry for "shapefilenameN"

sorry, im not a programmer but an artist. trying to learn torque. and the new groundcover feature isn't that obivious to me.

it would be nice to have it added to one of the examples that are downloaded with TGEA so we can see it in action somewhere...
#4
12/02/2008 (6:22 pm)
Type is just going to be a number. It just defines a "layer" which will hold how much influence that layer takes up at any given place on your terrain.

Also, for DTS shapes, you'll want the field called shapeFilenameN where "N" at the end is a number denoting which layer it will go on. The field for doing textures for bilboarded elements is billboardTexture and the billboardUVsN (where "N" is a number denoting the layer) defines the UVs for the billboard that will be placed on the layer denoted by N (so you can have a texture with multiple different grass/etc. textures, and split them up by which UVs they use...so if you had green grass on one half and tan grass on another, you'd put "0 0 0.5 0.5" in the billboardUVs0, and "0.5 0.5 1 1" in billboardUVs1 and that would give you green grass when you painted layer 0 and tan grass when you painted layer 1).

Let me know if you guys have any other questions...I didn't write the GroundCover (Tom Spilman did) but I wrote the layer system for it (which is quite suckage, really, but it got the job done)/fixed bugs in it at various points so I have a decent handle on the system.
#5
12/03/2008 (1:28 pm)
So layering does work? What is your definition of layer in this case? I keep thinking in terms of JC's def, which is basically an opacity map, allowing one to paint the dts shapes in certain areas, but without limiting oneself to the actual ground material.
Cool info on the billboardUV's, I might get some use out of them now! I'd always had the thought of merging in JC's quadgrass enhancement someday, but this appears to be just about the same thing.
#6
12/03/2008 (2:47 pm)
@Erik, yes you're correct, it's basically just an opacity map (U8s, 0-255) and is independent of the material/terrain texture opacity maps.
#7
02/23/2010 (11:07 pm)
Thank you Eric,
I'm new to this, so I was trying to do the GroundCover User Guide Tutorial and was totally lost. But your remark cleared it up for me.