Underwater grasses, seaweed
by KevinG · in Torque Game Engine · 10/22/2009 (7:28 pm) · 7 replies
What is the quickest, best way to get or make a replicator to allow
rendering of underwater plant life?
Project uses TGE1.4+TLK+CgH2O.
Cheers!
rendering of underwater plant life?
Project uses TGE1.4+TLK+CgH2O.
Cheers!
About the author
#2
Now lets say that's done and neither replicator is rendering anything underwater!! Kelp+seaweed+grasses are required for this 3d diving sim/thing I am working on.
Both replicators render as expected on the terrain that is above sea-level. Btw, the render on shoreline check box didn't help this rendering issue either.
In the mission editor when my camera is under water I can see the parts of my dts boat objects that are underwater, so the engine is rendering some of this stuff. I can also see the billboards work fine in both replicators on land. Smells like replicator culling vs. waterblock to me, but then again this clients' project is A.) using an old GG engine B.) had some bad code done to get Cg water in his build.
If it is not the replicator culling, it would be some issue with the Cg and the alpha maybe[?].
I'll trudge into the code and do more testing in stock tge1.5, but thanks for the insight!!
Cheers,
k
10/26/2009 (3:44 pm)
So lets say that was how i got them in, pretty simple stuff to setup.Now lets say that's done and neither replicator is rendering anything underwater!! Kelp+seaweed+grasses are required for this 3d diving sim/thing I am working on.
Both replicators render as expected on the terrain that is above sea-level. Btw, the render on shoreline check box didn't help this rendering issue either.
In the mission editor when my camera is under water I can see the parts of my dts boat objects that are underwater, so the engine is rendering some of this stuff. I can also see the billboards work fine in both replicators on land. Smells like replicator culling vs. waterblock to me, but then again this clients' project is A.) using an old GG engine B.) had some bad code done to get Cg water in his build.
If it is not the replicator culling, it would be some issue with the Cg and the alpha maybe[?].
I'll trudge into the code and do more testing in stock tge1.5, but thanks for the insight!!
Cheers,
k
#3
10/26/2009 (10:59 pm)
It has to be your additions interfering with it. I have it working fine in tge 1.5 and tgea.new SimGroup(Underwater) {
canSaveDynamicFields = "1";
new fxShapeReplicator(underwatergrass) {
canSaveDynamicFields = "1";
position = "410.711 476.34 8.68904";
rotation = "1 0 0 0";
scale = "0.78624 1 1";
HideReplications = "0";
ShowPlacementArea = "1";
PlacementAreaHeight = "25";
PlacementColour = "0.4 0 0.8 1";
shapeFile = "~/data/shapes/Foliage/kelp/kelp.dts";
Seed = "1376312589";
ShapeCount = "1010";
ShapeRetries = "100";
InnerRadiusX = "0";
InnerRadiusY = "0";
OuterRadiusX = "170";
OuterRadiusY = "170";
AllowOnTerrain = "1";
AllowOnInteriors = "0";
AllowOnStatics = "1";
AllowOnWater = "1";
AllowWaterSurface = "0";
AlignToTerrain = "1";
Interactions = "0";
AllowedTerrainSlope = "90";
TerrainAlignment = "1 1 1";
FixShapeAspect = "0";
ShapeScaleMin = "1 1 1";
ShapeScaleMax = "1 1 1";
ShapeRotateMin = "0 0 0";
ShapeRotateMax = "0 0 0";
OffsetZ = "0";
receiveSunLight = "1";
receiveLMLighting = "1";
useAdaptiveSelfIllumination = "0";
useCustomAmbientLighting = "0";
customAmbientSelfIllumination = "0";
customAmbientLighting = "0 0 0 1";
disableDynamicShadowMove = "0";
disableDynamicShadowAnimate = "0";
disableDynamicShadows = "0";
};
};
#4
I have the same settings as you do. I do notice you took a slightly different approach, which I need to do next...make a dts for the shapeReplicator. I'm using the fxFoliage with the automatic billboarding type the grasses use. Have you had success using that as well?
Does your kelp.dts use an alpha at all?[ may be a silly question, but i have to ask]
The source to this project is locked to us Art peeps, so there won't be much I can do other than test various dts.
I'll start testing with fxShapeReplicator next.
Thanks again Mike!!
Cheers!
10/27/2009 (3:37 pm)
Thanks Mike!! Comparing my replicator to this one was very helpful.I have the same settings as you do. I do notice you took a slightly different approach, which I need to do next...make a dts for the shapeReplicator. I'm using the fxFoliage with the automatic billboarding type the grasses use. Have you had success using that as well?
Does your kelp.dts use an alpha at all?[ may be a silly question, but i have to ask]
The source to this project is locked to us Art peeps, so there won't be much I can do other than test various dts.
I'll start testing with fxShapeReplicator next.
Thanks again Mike!!
Cheers!
#5
Hope you get it working for you. And, you are welcome.
10/27/2009 (6:46 pm)
I haven't tried the foliage replicator in tge/tgea/t3d for underwater. Most everything I do is above ground. I knew this worked becouse of a demo I did a very long time ago. Hope you get it working for you. And, you are welcome.
#6
Maybe i need to take more vacations? LOL!
Thanks again Mike!!!
11/16/2009 (1:27 pm)
I just got back from a long, much needed vacation and thought i'd revisit this issue. It turns out it _was_ the Cg water getting hacked in by some novice programmer long ago. Upon my return,everything is fixed and working 100% as if by automagic. Nice! Maybe i need to take more vacations? LOL!
Thanks again Mike!!!
Torque Owner Mike Rowley
Mike Rowley