Hi Enrico,
Enrico Borrione wrote:
> hi opensg users,
>
> i am doing some operations on models imported
>>from obj files. When i do some tasks with normals and
> indices, like swapping face normals, eventually i get
> stuck in wrong displayed geometries.
>
> i.e. the famous knot model from 3ds is displayed with
> most of the triangles missing or displaced.
>
> Since i am having such problems just with OBJ imported
> models, I was wondering what must be wrong with them.
AFAIK the OBJ loader creates geometries that contain only GL_POLYGON
primitives.
> My best shot is something about how triangles are defined,
> like presence of TRIANGLES_STRIPS or TRIANGLES_FAN.
> Is there a fast way to check the geometry node
> vs triangle organization/indexing? And then for reducing
> the geometry to simple list of triangles (which i assume
> would be safer to use during geometry manipulation)?
Do you disable the default GraphOps? By default the loaders apply a set
of optimizations to the loaded scene, among them striping of geometries.
You can disable them with:
SceneFileHandler::the().read("fileName", NULL)
Hope it helps,
Carsten
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users