[osg-users] Adapting a height field with a triangle/polygon?
Robert Osfield
robert.osfield at gmail.com
Wed Sep 6 01:23:59 PDT 2017
Hi Raymond,
There a number of ways of mixing polygonal data with height fields, the
best way will depend upon the requirements/constraints of your
application.
If you need exactly intersections then converting the height fields into a
polygon mesh and then inserting the vertices and edges from the mesh you
want to add will be required. This will be slow so something you'll likely
want to do as a pre-processing stage. The osgTDS code that Don wrote many
years back uses this approach. I'm afraid I don't have an insights into
osgTDS or where to get it these days.
If you don't need exact match then you could possible modify the height
fields values to match the polygonal mesh, you could do this on the CPU as
a pre-processing step, or render the polygonal mesh to a depth texture and
then use a vertex shader to read from two depth/height field textures to
render a single heightfield.
Another approach would be to use a constructive solid modelling approach,
at least I have hunch you could do this somehow but would need to think it
through fully first.
Given more time I'm sure I could come up with half a dozen more approaches
that may or may not work :-)
Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170906/f6e87051/attachment.htm>
More information about the osg-users
mailing list