Pregunta

I would like to add terrain to my project, which uses OSG.

I've read osgTerrain documentation. As I understand from it's interface, it treats data as uniform height field -- grid of heights.

I want terrain to be non-uniform. It would be represented as triangulation wuth height specified at vertices.

Does osgTerrain supports this out of the box? Or should I implement myself, deriving from Layer? Where to find extensive docs? Where to start from?

¿Fue útil?

Solución

osgTerrain at one point, through the VPB tool, supported irregular triangulated terrain models. There's nothing in OSG itself that prevents you from doing this still. However, I must question your reasons for doing so. Are you looking for performance? The reason osg uses regular heightfields now is that with modern GPUs, they're just as fast as the old indexed triangles. Are you planning on doing some modifications to the terrain at runtime that requires a irregular mesh?

Also, you might consider osgEarth. It is sort of the replacement terrain subsystem for OSG. It is much more feature-filled than osgTerrain. It uses quadtrees of regular grids too though.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top