Jump to content

Filling poylgons Decals vs Triangulation


photo

Recommended Posts

Posted

Hi all,

 

We're currently trying to map road network data onto terrain and need some help.  

 

We've tried using a (rather expensive) 3rd party tool (cgal) to triangulate the points defining the path (screenshots attached) then filling the triangles with a particular colour.  However, I don't think it's the ideal solution.  There are sometimes extrusions in the middle of the road and the points are coincident with the surface which creates issues.  

 

I would like to know whether it is possible/advisable to programmatically map a decal onto the terrain surface in unigine instead as this would be a more elegant solution.

 

Is this possible?  Has anyone had experience with anything similar?  I'm open to any alternatives ideas or opensource libraries that can handle the "grunt work".

 

Any help would be much appreciated.

 

Thanks,

Simon

post-1501-0-63923000-1416282274_thumb.png

post-1501-0-93548000-1416282278_thumb.png

Posted

After a bit of research I'm thinking a 2-step solution might be best here:

 

1.  Programmatically create a 2D image (texture) at runtime using a simple fill algorithm to fill in the pixels within the road boundary.

2.  Import this into unigine and create a Decal (at runtime) which is then draped over the terrain surface.

 

Does this sound like a  decent solution?  Is this possible in Unigine?

 

Thanks in advance,

Simon

Posted

Thanks  - but as it needs an underlying mesh to begin with we would need a way of triangulating the points representing the road.

 

Can Unigine do this?

Posted

no, this has to be done within your modelling tool or proceduraly with e.g. Unigine script based on some road network definition/model. Nevertheless the advantage is that the mesh only has to be 2D.

Posted

I am sometimes using workflow, that I import height map into Unity3d and use 3rd party plugin Easy roads3D to generate road mesh + modify terrain. Cheap, fast, works well. On the other side I would expect such tools in Unigine by default. Also possibility to paint decal_terrain_base material (base+detail) on the fly in similar way like terrain textures (diffuse+mask) should be there, It would tremendously increase artist productivity.

×
×
  • Create New...