Jump to content

[SOLVED] Editing Terrain density


Recommended Posts

hi.

 

I want to modify the density of TerrainObject.

 

I want to give terrain to the properties of sand.

If it's not setting or modified in the script from the c++ source would like to know how to fix.

 

Quick answer please.

Link to comment

don't know what you mean density of TerrainObject. Mesh grid density can be set at creation of terrain.

 

sand... I suppose it can be done with proper textures.

Link to comment
What is a Mesh Grid?

It's the step between terrain vertices. Large step -> larger terrain, but less detailed.

 

hi. I want to modify the density of TerrainObject. I want to give terrain to the properties of sand. If it's not setting or modified in the script from the c++ source would like to know how to fix. Quick answer please.

Can't understand what terrain density means as well. Could you provide more details?

Link to comment

I think the question is how to assign different physical properties (e.g. friction, density/mass, angular/linear damping) to ObjectTerrain regions for simulation of different underground types like sand (high damping, a falling ball should stay on the ground) or rock (low damping, the same falling ball should bouce off the ground).

 

I am no expert for UNIGINE physics, but I think this is not possible for ObjectTerrain. Terrain surface just acts as collider like static mesh geometry. Staying with the above example therefore you would have to change the physical properties of the ball physical shape depending on the local terrain underground type, but there is no way to assign physical properties directly to ObjectTerrain.

 

For an implementation you will have to implement some customized terrain underground type mask image for storing relevant physical values and use this mask image for dynamic lookup and object shape pysical properties modifications of based on object position during runtime for achieving the desired effect.

 

A different approach than modifying your object shape properties might be to use PhysicalWind object with super damping instead for simulation of sand effect on falling things as shown in the physicals-demo. Just an idea, might be hard to get the desired effect right in practice

 

post-82-0-29816800-1342723103_thumb.jpg

Link to comment

If you want to change the physical properties of the whole terrain object (friction and how objects bounce off it) you can edit Node->Surfaces->Property->Parameters (Friction and Restitution options).

Link to comment
×
×
  • Create New...