Jump to content

[SOLVED] Dynamic removal of grass


photo

Recommended Posts

Hi guys!

There is an area (mesh with grass). (the hierarchy is from parental Objectmesh ans affiliated Objectgrass).

There are also objects of various types which can be dynamically arranged on this area with grass.

The question is how to dynamically conceal or remove the grass under an object.

Speaking about the dynamics we mean that the object can be moved to another place afterwards and thus the grass should be returned back.

P.s. Occluder of the object will not work because the size of the Objectgrass is about the size of the all area (pay attention to the green frame).

Explained the problemmy.Klient server application, location data objects come from the server, we need to dynamically change the mask on the client.

post-649-0-64246500-1347986108_thumb.jpg

Link to comment

It would be nice to be able to paint/modify all vegetatation masks directly in editor. It would save LOTS of time.

 

Not sure but...

 

UNIGINE-SDK-2012-04-11

.....

UnigineEditor:

  • Added Tracker system (see details below).
  • Added mask editor for ObjectGrass, ObjectMeshClutter and WorldClutter.
  • Added 'Create mask' button for ObjectGrass, ObjectMeshClutter and WorldClutter objects

Link to comment

Client server application, location data objects come from the server, we need to dynamically change the mask on the client.

 

You could organize all objects that should clip grass under a single WindgetSpriteNode and render these objects from top-down into an image via WidgetSpriteNode::renderImage(). This image can than be assigned to the ObjectGrass node as new mask. Maybe some image post-processing will be required (conversion to intensity-image, proper RGB-channel mask encoding etc), but this is quite easy with UNIGINE Image class.

Link to comment
×
×
  • Create New...