[osg-users] Polygon sorting

Joachim E. Vollrath vollrath at vis.uni-stuttgart.de
Thu Sep 6 03:01:30 PDT 2007


I don't know anything about the data you want to visualize, but in case 
of isosurfaces of a scalar field you could get correct sorting via GPU 
Raycasting (a.k.a. volume rendering) if you manage to fit the scalar 
field into a 3D Texture on the graphics card.



Michele Bosi wrote:
> Hello,
> I need to sort the polygons of my meshes in order to obtain decent
> transparencies for complex autointerstecting objects like 3d
> isosurfaces.
> I figured out that a very raw way to do so would be to subclass
> Viewer, reimplement frame(), and from there getting the viewMatrix and
> sorting my poligons based on their distance from the viewer (having
> disabled display list support for the node). The actual sorting would
> be done on the list of indices (osg::DrawElementsUInt) since I use
> indexed triangles.
> Since to get correct results I also have to take into account the
> transformation applied to my Geometry I was wondering if there was a
> more "clever" way to do all this mess, maybe there are already
> mechanisms that inform my Geometry that is going to be drawn so that I
> can react sorting my polygons appropriately at the correct moment and
> accounting for the currently active transformations, something similar
> to the VTK/pipeline system.
> Any idea?
> Regards,
> Mike
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Joachim E. Vollrath
University of Stuttgart
Institute for Visualization and Interactive Systems (VIS)
web:   http://www.vis.uni-stuttgart.de/~vollrajm/
mail:  vollrath at vis.uni-stuttgart.de
phone: 49.711.7816.403
fax:   49.711.7816.340

german postal address:
Dipl. Inf. Joachim E. Vollrath
Universitaet Stuttgart, Institutsverbund Informatik
Institut fuer Visualisierung und Interaktive Systeme
Universitaetstrasse 38
70569 Stuttgart

More information about the osg-users mailing list