Hi OpenSG users,

While working on texture coordinates, i came across a problem:
using cylindrical and spherical textures i can't find a way to
avoid the singularity problem in the texture wrapping area.
The only solution i could think about was the vertex splitting 
where the texture starts, so there are a series of vertices with
texcoord 0, and a copy of them with texcoord 1 overlapping and making
the texture melt correctly where the singularity lays.

Now I looked at the starting guide where it talks about geometry, indexing,
and primitives, but I still can't get a very clear idea on how indexing
works in 
OpenSG.

Right now i am using a FaceIterator to sweep along the scene and spot which
faces
cross the singularity area. The next step will be finding the vertices
crossing it and
splitting them between the two triangles on the opposite sides.

In pseudo code it would be like:

1) find the crossing face (done)
2) find the crossing vertex (almost done)
3) make a copy of the vertex
4) change the index in the faceiterator so that it points to the new vertex
5) try to make the process easy to invert (since i would like to update
texture
coordinates often, i'd like to melt again the vertices before applyng this
algo again).

Keeping aside the multi indexing for the moment (i'd like to get it straight
the single indexing first) I don't seem able to find a funcion
osg::FaceIterator::setPositionIndex that allows me to change on the fly the
topology of the primitives in the geometry core.

Since the subject is quite difficult to describe in wrote language,
i'll look forward to exchange some more messages with u on the subject


thanks 
E.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to