Simon.Anderson Posted November 18, 2014 Posted November 18, 2014 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
Simon.Anderson Posted November 18, 2014 Author Posted November 18, 2014 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
ulf.schroeter Posted November 18, 2014 Posted November 18, 2014 Maybe DecalDeferredMesh fits your use-case. As it uses deferred rendering propper anti-aliasing at edges might be an issue-
Simon.Anderson Posted November 18, 2014 Author Posted November 18, 2014 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?
ulf.schroeter Posted November 18, 2014 Posted November 18, 2014 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.
demostenes Posted November 19, 2014 Posted November 19, 2014 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.
Recommended Posts