[osg-users] [vpb] Terrain Deformation as per Road Profile
umesh ramesh
mailpm01 at yahoo.co.in
Mon Dec 4 08:44:20 PST 2017
Hi,
I am planning to use VPB for terrain deformation as per road profile. The road mesh has been generated separately and I shall put it on the terrain. The terrain generated by VPB must deform itself as per the road profile. Also additional geometry must be added to terrain geometry close to the road borders for smoothness as the terrain quad tile cells may be too big. This situation I have tried to visualize as shown in the two below images.
Now the best approach I see is to let VPB generate the terrain tiles as OSG files. I know the road border points. I can figure out which terrain tile a segment of the road shall fall. Let’s say I know the road border points for the particular terrain quad tile as per figure 1. Now I need to tessellate or subdivide the Terrain tile cells that are falling on the road path.
Thus I need to deform as well as increase the terrain mesh at the road borders.
Question: What should be my best approach to achieve this?
• I might use tessellation shaders approach, but it might tessellate everywhere I move camera not specifically at road borders. Maybe create a grayscale texture runtime that highlights the road surface & pass it to Tess shaders to tessellate at the road borders?
• I might use old GluTess with winding order to cut holes in terrain where road goes. But those may create very long triangles if cell size is large.
So please can anybody give me some pointers to approach this? I know this goes beyond VPB. By the way, each terrain tile also has its road cut piece.
Thank you, Robert!
Cheers,
umesh
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72531#72531
Attachments:
http://forum.openscenegraph.org//files/2_990.jpg
http://forum.openscenegraph.org//files/1_160.jpg
More information about the osg-users
mailing list