Game Development Community

Ground cover density is low even with multiple instances

by Kenneth Eves · in Torque 3D Beginner · 09/29/2012 (5:00 pm) · 3 replies

I had a single groundcover object located at origin with a distance sufficient to cover the zone (4km x 4km). Even with the count very high, I was getting low density. As an experiment I dropped the radius to 500 and density got much better as expected.

Problem I'm having now is I changed the mission to have 16 groundcover objects evenly spaced on a 512m grid and density was very bad (a few clusters here and there) plus there was a huge framerate hit.

Here's one of my current object definitions. With 16 of these I should be seeing 16 x 20,000 grasses, but I don't think it's even 10% of that.

In TGE/A I used fxFoliageReplicator, so I'm new to using the groundcover system. Am I doing something wrong?

new GroundCover() {
      Material = "matgrass1";
      radius = "362";
      dissolveRadius = "50";
      reflectScale = "0.25";
      gridSize = "7";
      zOffset = "0";
      seed = "1";
      maxElements = "20000";
      maxBillboardTiltAngle = "90";
      shapeCullRadius = "75";
      shapesCastShadows = "1";
      billboardUVs[0] = "0 0 1 1";
      billboardUVs[1] = "0 0 1 1";
      billboardUVs[2] = "0 0 1 1";
      billboardUVs[3] = "0 0 1 1";
      billboardUVs[4] = "0 0 1 1";
      billboardUVs[5] = "0 0 1 1";
      billboardUVs[6] = "0 0 1 1";
      billboardUVs[7] = "0 0 1 1";
      invertLayer[0] = "0";
      invertLayer[1] = "0";
      invertLayer[2] = "0";
      invertLayer[3] = "0";
      invertLayer[4] = "0";
      invertLayer[5] = "0";
      invertLayer[6] = "0";
      invertLayer[7] = "0";
      probability[0] = "1";
      probability[1] = "0";
      probability[2] = "0";
      probability[3] = "0";
      probability[4] = "0";
      probability[5] = "0";
      probability[6] = "0";
      probability[7] = "0";
      sizeMin[0] = "1";
      sizeMin[1] = "1";
      sizeMin[2] = "1";
      sizeMin[3] = "1";
      sizeMin[4] = "1";
      sizeMin[5] = "1";
      sizeMin[6] = "1";
      sizeMin[7] = "1";
      sizeMax[0] = "1";
      sizeMax[1] = "1";
      sizeMax[2] = "1";
      sizeMax[3] = "1";
      sizeMax[4] = "1";
      sizeMax[5] = "1";
      sizeMax[6] = "1";
      sizeMax[7] = "1";
      sizeExponent[0] = "1";
      sizeExponent[1] = "1";
      sizeExponent[2] = "1";
      sizeExponent[3] = "1";
      sizeExponent[4] = "1";
      sizeExponent[5] = "1";
      sizeExponent[6] = "1";
      sizeExponent[7] = "1";
      windScale[0] = "1";
      windScale[1] = "1";
      windScale[2] = "1";
      windScale[3] = "1";
      windScale[4] = "1";
      windScale[5] = "1";
      windScale[6] = "1";
      windScale[7] = "1";
      minSlope[0] = "10";
      minSlope[1] = "0";
      minSlope[2] = "0";
      minSlope[3] = "0";
      minSlope[4] = "0";
      minSlope[5] = "0";
      minSlope[6] = "0";
      minSlope[7] = "0";
      maxSlope[0] = "20";
      maxSlope[1] = "0";
      maxSlope[2] = "0";
      maxSlope[3] = "0";
      maxSlope[4] = "0";
      maxSlope[5] = "0";
      maxSlope[6] = "0";
      maxSlope[7] = "0";
      minElevation[0] = "-99999";
      minElevation[1] = "-99999";
      minElevation[2] = "-99999";
      minElevation[3] = "-99999";
      minElevation[4] = "-99999";
      minElevation[5] = "-99999";
      minElevation[6] = "-99999";
      minElevation[7] = "-99999";
      maxElevation[0] = "99999";
      maxElevation[1] = "99999";
      maxElevation[2] = "99999";
      maxElevation[3] = "99999";
      maxElevation[4] = "99999";
      maxElevation[5] = "99999";
      maxElevation[6] = "99999";
      maxElevation[7] = "99999";
      minClumpCount[0] = "5";
      minClumpCount[1] = "1";
      minClumpCount[2] = "1";
      minClumpCount[3] = "1";
      minClumpCount[4] = "1";
      minClumpCount[5] = "1";
      minClumpCount[6] = "1";
      minClumpCount[7] = "1";
      maxClumpCount[0] = "10";
      maxClumpCount[1] = "1";
      maxClumpCount[2] = "1";
      maxClumpCount[3] = "1";
      maxClumpCount[4] = "1";
      maxClumpCount[5] = "1";
      maxClumpCount[6] = "1";
      maxClumpCount[7] = "1";
      clumpExponent[0] = "1";
      clumpExponent[1] = "1";
      clumpExponent[2] = "1";
      clumpExponent[3] = "1";
      clumpExponent[4] = "1";
      clumpExponent[5] = "1";
      clumpExponent[6] = "1";
      clumpExponent[7] = "1";
      clumpRadius[0] = "4";
      clumpRadius[1] = "1";
      clumpRadius[2] = "1";
      clumpRadius[3] = "1";
      clumpRadius[4] = "1";
      clumpRadius[5] = "1";
      clumpRadius[6] = "1";
      clumpRadius[7] = "1";
      windDirection = "1 0";
      windGustLength = "20";
      windGustFrequency = "4";
      windGustStrength = "0.5";
      windTurbulenceFrequency = "0.5";
      windTurbulenceStrength = "0.125";
      lockFrustum = "0";
      renderCells = "0";
      noBillboards = "0";
      noShapes = "0";
      position = "256 -256 0";
      rotation = "1 0 0 0";
      scale = "1 1 1";
      canSave = "1";
      canSaveDynamicFields = "1";
   };

#1
09/29/2012 (5:51 pm)
the radius is the full circle centered around you(camera) unless you lock the frustum, so you see only 30% anyway. The chances are that your actual fade/cull distance is significantly smaller than the raidus also so its placing many outside of your visual range as far as distance as well as viewing angle.

As far as having 16 groundcover objects? i'm pretty sure you can only have 1 per layer, if you want more types you have to add them to the one groundcover object you apply to that layer, or at least thats the way ive always had to do it.
#2
09/29/2012 (6:36 pm)
ok, i'm half right, if you set your radius and dissolve radios to 100 each you should get much closer to what you want.

#3
09/29/2012 (7:02 pm)
Thanks! Works.

I didn't expect it to be camera centric.