Hi Nadia,

On 30/6/09 11:16 AM, Nadia Comanici wrote:
I have a Vec3Array of points and the associated triangles generated using the
DelaunayTriangulator. Is there any way of making the surface more smooth (now 
it's
really pointy because of the triangles). From these points and triangles I have 
created
a Geometry and added it to a Geode.

One way would be to smooth the normals i.e. make a vertex normal the average of its adjacent surface normals. Unfortunately neighbourship information isn't readily available in most geometries.

Another would be surface subdivision but that also requires information regarding adjacent surfaces.

Also texturing can be used to give more detail to the surface.

AFAIK none of these methods are available in OSG out of the box. Texturing is of course supported but proper texture coordinates would still need to be assigned.

I have tried using

Code: osgUtil::TriStripVisitor tsv; tsv.stripify( *geometry );

to minimize the number of triangles, but it seems not to be working, as the 
number of
triangles is the same after the operation; Is there anything do any 
additionally?

Removing triangles would be the last thing you want to do, it makes the geometry even chunkier!

TriStripVisitor optimizes the geometry for faster drawing (by arranging triangles into triangle strips, hence the name), it does not modify the geometry.

Also, I tried using the SmoothingVisitor

Code: osgUtil::SmoothingVisitor sv; geode->accept(sv);

but there is no visible result.

SmoothingVisitor creates normals for the geometry. These normals are guaranteed to be properly oriented but they are not smooth. Unfortunately it doesn't smooth anything as its name might suggest. (Except maybe when the geometry doesn't have *any* normals in the first place.)

Cheers,
/ulrich
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to