Can GroundCover really work?
by Huan Li · in Torque Game Engine Advanced · 02/20/2009 (4:44 pm) · 16 replies
I tried to understand how GroundCover can work, but haven't had any good results.
Can GroundCover realy work? or I must modify the engine codes in tgea1.7~1.8?For example,can GroundCover work in tgea 1.8.1 with the originally released engine codes?
If TGEA originally surpports GroundCover then how to make it work, I haven't found anything practicaly useful yet.
Any useful info will be greatly thanked.
Can GroundCover realy work? or I must modify the engine codes in tgea1.7~1.8?For example,can GroundCover work in tgea 1.8.1 with the originally released engine codes?
If TGEA originally surpports GroundCover then how to make it work, I haven't found anything practicaly useful yet.
Any useful info will be greatly thanked.
#2
02/20/2009 (5:42 pm)
Yeah, ground cover works fine - It's even better when you have the Surface Reference code in. I can post a datablock if you're interested.
#3
canSaveDynamicFields = "1";
Enabled = "1";
position = "187.587 112.007 120.286";
rotation = "1 0 0 0";
scale = "1 1 1";
windDirection = "1 0";
windGustLength = "20";
windGustFrequency = "0.5";
windGustStrength = "0.2";
windTurbulenceFrequency = "0.1";
windTurbulenceStrength = "0.1";
Radius = "65";
dissolveRadius = "50";
reflectScale = "0.25";
gridSize = "7";
zOffset = "0";
Seed = "1";
terrain = "terrain";
maxElements = "12000";
billboardTexture = "scriptsAndAssets/data/Groundcover/DesertCover";
maxBillboardTiltAngle = "90";
shapeCullRadius = "75";
lockFrustum = "0";
renderCells = "0";
noBillboards = "0";
noShapes = "1";
billboardUVs0 = "0 0 1 1";
layer0 = "0";
invertLayer0 = "0";
probability0 = "0";
sizeMin0 = "1";
sizeMax0 = "1";
sizeExponent0 = "1";
windScale0 = "1";
maxSlope0 = "0";
minElevation0 = "-99999";
maxElevation0 = "99999";
minClumpCount0 = "1";
maxClumpCount0 = "1";
clumpExponent0 = "1";
clumpRadius0 = "1";
SurfaceExclusionMode0 = "0";
SurfaceType0 = "Any";
billboardUVs1 = "0 0 0.25 1";
shapeFilename1 = "scriptsAndAssets/data/missions/";
layer1 = "-1";
invertLayer1 = "0";
probability1 = "20";
sizeMin1 = "1.4";
sizeMax1 = "2";
sizeExponent1 = "1";
windScale1 = "1";
maxSlope1 = "25";
minElevation1 = "-99999";
maxElevation1 = "99999";
minClumpCount1 = "1";
maxClumpCount1 = "2";
clumpExponent1 = "1";
clumpRadius1 = "1";
SurfaceExclusionMode1 = "0";
SurfaceType1 = "Any";
billboardUVs2 = "0.25 0 0.25 1";
layer2 = "-1";
invertLayer2 = "0";
probability2 = "1";
sizeMin2 = "1";
sizeMax2 = "1.2";
sizeExponent2 = "1";
windScale2 = "1";
maxSlope2 = "25";
02/20/2009 (5:50 pm)
new GroundCover(Scrub) {canSaveDynamicFields = "1";
Enabled = "1";
position = "187.587 112.007 120.286";
rotation = "1 0 0 0";
scale = "1 1 1";
windDirection = "1 0";
windGustLength = "20";
windGustFrequency = "0.5";
windGustStrength = "0.2";
windTurbulenceFrequency = "0.1";
windTurbulenceStrength = "0.1";
Radius = "65";
dissolveRadius = "50";
reflectScale = "0.25";
gridSize = "7";
zOffset = "0";
Seed = "1";
terrain = "terrain";
maxElements = "12000";
billboardTexture = "scriptsAndAssets/data/Groundcover/DesertCover";
maxBillboardTiltAngle = "90";
shapeCullRadius = "75";
lockFrustum = "0";
renderCells = "0";
noBillboards = "0";
noShapes = "1";
billboardUVs0 = "0 0 1 1";
layer0 = "0";
invertLayer0 = "0";
probability0 = "0";
sizeMin0 = "1";
sizeMax0 = "1";
sizeExponent0 = "1";
windScale0 = "1";
maxSlope0 = "0";
minElevation0 = "-99999";
maxElevation0 = "99999";
minClumpCount0 = "1";
maxClumpCount0 = "1";
clumpExponent0 = "1";
clumpRadius0 = "1";
SurfaceExclusionMode0 = "0";
SurfaceType0 = "Any";
billboardUVs1 = "0 0 0.25 1";
shapeFilename1 = "scriptsAndAssets/data/missions/";
layer1 = "-1";
invertLayer1 = "0";
probability1 = "20";
sizeMin1 = "1.4";
sizeMax1 = "2";
sizeExponent1 = "1";
windScale1 = "1";
maxSlope1 = "25";
minElevation1 = "-99999";
maxElevation1 = "99999";
minClumpCount1 = "1";
maxClumpCount1 = "2";
clumpExponent1 = "1";
clumpRadius1 = "1";
SurfaceExclusionMode1 = "0";
SurfaceType1 = "Any";
billboardUVs2 = "0.25 0 0.25 1";
layer2 = "-1";
invertLayer2 = "0";
probability2 = "1";
sizeMin2 = "1";
sizeMax2 = "1.2";
sizeExponent2 = "1";
windScale2 = "1";
maxSlope2 = "25";
#4
maxElevation2 = "99999";
minClumpCount2 = "1";
maxClumpCount2 = "1";
clumpExponent2 = "1";
clumpRadius2 = "1";
SurfaceExclusionMode2 = "0";
SurfaceType2 = "Any";
billboardUVs3 = "0.5 0 0.25 1";
shapeFilename3 = "scriptsAndAssets/data/missions/";
layer3 = "-1";
invertLayer3 = "0";
probability3 = "5";
sizeMin3 = "1";
sizeMax3 = "1";
sizeExponent3 = "1";
windScale3 = "1";
maxSlope3 = "25";
minElevation3 = "-99999";
maxElevation3 = "99999";
minClumpCount3 = "1";
maxClumpCount3 = "1";
clumpExponent3 = "1";
clumpRadius3 = "1";
SurfaceExclusionMode3 = "0";
SurfaceType3 = "Any";
billboardUVs4 = "0.5 0.5 1 1";
shapeFilename4 = "scriptsAndAssets/data/missions/";
layer4 = "-1";
invertLayer4 = "0";
probability4 = "0";
sizeMin4 = "1";
sizeMax4 = "1";
sizeExponent4 = "1";
windScale4 = "1";
maxSlope4 = "24";
minElevation4 = "-99999";
maxElevation4 = "99999";
minClumpCount4 = "1";
maxClumpCount4 = "1";
clumpExponent4 = "1";
clumpRadius4 = "1";
SurfaceExclusionMode4 = "0";
SurfaceType4 = "Any";
billboardUVs5 = "0 0 1 1";
layer5 = "-1";
invertLayer5 = "0";
probability5 = "0";
sizeMin5 = "1";
sizeMax5 = "1";
sizeExponent5 = "1";
windScale5 = "1";
maxSlope5 = "25";
minElevation5 = "-99999";
maxElevation5 = "99999";
minClumpCount5 = "1";
maxClumpCount5 = "1";
clumpExponent5 = "1";
clumpRadius5 = "1";
SurfaceExclusionMode5 = "0";
SurfaceType5 = "Any";
};
02/20/2009 (5:53 pm)
minElevation2 = "-99999";maxElevation2 = "99999";
minClumpCount2 = "1";
maxClumpCount2 = "1";
clumpExponent2 = "1";
clumpRadius2 = "1";
SurfaceExclusionMode2 = "0";
SurfaceType2 = "Any";
billboardUVs3 = "0.5 0 0.25 1";
shapeFilename3 = "scriptsAndAssets/data/missions/";
layer3 = "-1";
invertLayer3 = "0";
probability3 = "5";
sizeMin3 = "1";
sizeMax3 = "1";
sizeExponent3 = "1";
windScale3 = "1";
maxSlope3 = "25";
minElevation3 = "-99999";
maxElevation3 = "99999";
minClumpCount3 = "1";
maxClumpCount3 = "1";
clumpExponent3 = "1";
clumpRadius3 = "1";
SurfaceExclusionMode3 = "0";
SurfaceType3 = "Any";
billboardUVs4 = "0.5 0.5 1 1";
shapeFilename4 = "scriptsAndAssets/data/missions/";
layer4 = "-1";
invertLayer4 = "0";
probability4 = "0";
sizeMin4 = "1";
sizeMax4 = "1";
sizeExponent4 = "1";
windScale4 = "1";
maxSlope4 = "24";
minElevation4 = "-99999";
maxElevation4 = "99999";
minClumpCount4 = "1";
maxClumpCount4 = "1";
clumpExponent4 = "1";
clumpRadius4 = "1";
SurfaceExclusionMode4 = "0";
SurfaceType4 = "Any";
billboardUVs5 = "0 0 1 1";
layer5 = "-1";
invertLayer5 = "0";
probability5 = "0";
sizeMin5 = "1";
sizeMax5 = "1";
sizeExponent5 = "1";
windScale5 = "1";
maxSlope5 = "25";
minElevation5 = "-99999";
maxElevation5 = "99999";
minClumpCount5 = "1";
maxClumpCount5 = "1";
clumpExponent5 = "1";
clumpRadius5 = "1";
SurfaceExclusionMode5 = "0";
SurfaceType5 = "Any";
};
#5
02/20/2009 (8:18 pm)
Quote:Yeah, ground cover works fine - It's even better when you have the Surface Reference code in.What exactly does the surface reference code add? I looked up the resources, but it's not really clear to me what they are for or how they are used. For that matter, what is the stock GroundCover for? How is it different from fxFoliageReplicator?
#6
fxFoliageReplicator is confined to a location defined by you in the editor, and can only use a single billboard. Both have their place - FxFoliageReplicator should be used for things like crops (etc), otherwise, use GroundCover.
The TWSurfaceReference is used to limit GroundCover and FxFoliageReplicator based on the type of terrain under them. For example, you could turn off replication for certain things when it's over a certain texture (like turn the grass off when you have a cement texture).
02/20/2009 (8:46 pm)
Groundcover works over your entire map, and can have multiple shapes as well as billboards, and "clump" them together for a more natural look. You can limit the different types of cover by elevation, slope, etc. It also has a more programmable wind effect.fxFoliageReplicator is confined to a location defined by you in the editor, and can only use a single billboard. Both have their place - FxFoliageReplicator should be used for things like crops (etc), otherwise, use GroundCover.
The TWSurfaceReference is used to limit GroundCover and FxFoliageReplicator based on the type of terrain under them. For example, you could turn off replication for certain things when it's over a certain texture (like turn the grass off when you have a cement texture).
#7
02/21/2009 (12:57 am)
Thanks Jaimi, that's a very concise and useful answer. Exactly the sort of comments that should be in the docs.
#8
Do you have a reference link?
never mind the search function worked for me very awesome!!!
02/21/2009 (8:27 pm)
just curious i dont see TWSurfaceReference anywhere...Do you have a reference link?
never mind the search function worked for me very awesome!!!
#9
Jaimi McEntire,i see
02/22/2009 (12:58 am)
thanks to all friends:)Jaimi McEntire,i see
Quote:terrain = "terrain";in the datablock GroundCover that you posted here,but i didn't find the property terrain of the GroundCover in world editor.Should i have to have the Surface Reference code in or i may say do i have to use TWSurfaceReference?
#10
It looks like "Terrain" was removed in 1.8x - I copied that from a 1.7.1 mission.
You don't have to have TWSurfaceReference but the TWSurfaceReference makes the ground cover much more general use. It simplest terms, it really allows you to paint where you want the ground cover to be.
02/22/2009 (11:31 am)
@Huan Li:It looks like "Terrain" was removed in 1.8x - I copied that from a 1.7.1 mission.
You don't have to have TWSurfaceReference but the TWSurfaceReference makes the ground cover much more general use. It simplest terms, it really allows you to paint where you want the ground cover to be.
#11
Do you have to redo the structs and Box3F to get this to work in 1.8.1? or am I missing a simple solution...like everything is still there, just have to #include all the files in renderInstance folder?
Any help would be appreciated!
02/26/2009 (7:23 am)
Anyone have the twSurface ported to 1.8.1? I'm having a time trying. I keep getting a: "cannot find file: 'renderInstance/renderInstMgr.h'"Do you have to redo the structs and Box3F to get this to work in 1.8.1? or am I missing a simple solution...like everything is still there, just have to #include all the files in renderInstance folder?
Any help would be appreciated!
#12
02/26/2009 (11:25 am)
I'll need to make a pass at porting this on the weekend. If you haven't got it working by then, I'll post my results in this thread.
#13
02/26/2009 (12:27 pm)
@J - I went ahead and ported it. I'll post a resource for it later tonight when I get home.
#14
02/26/2009 (3:03 pm)
Your awesome Jaimi!!!! Wonder what I missed, never could get it...
#15
www.aztica.com/images/twsurfacereference.zip
02/26/2009 (8:27 pm)
Ok, no resource, but here is the file with the updated TwsurfaceReference.cpp & TwSurfaceReference.h files. I've also include fxfoliagereplicator.www.aztica.com/images/twsurfacereference.zip
#16
03/04/2009 (7:52 am)
I would have never figured out the rendering changes, good for learning. Thanks Jaimi!
Torque 3D Owner J.C. Smith