OK. If you got time for this before I do... :) Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
----- "Michael Platings" <mplati...@gmail.com> a écrit : > Waht you could do is leave all the triangles and quads in one > PrimitiveSet (like it is already), but put each polygon with >=5 > vertices in it's own PrimitiveSet with Mode=POLYGON. Then run the > Tesselator on the Geometry which should tesselate the polygons > automagically. > > > On 5 July 2010 13:49, Sukender < suky0...@free.fr > wrote: > > > Hi Michael, > > Yes, sorry about OpenGL interpretation of polygons, I forgot that. > > Well actually, I guess the reader has to handle most (all?) cases. So > I suggest to have something like: > - If number of points <= 4, use current code. > - Else call GLU tesselation. > > Do you agree? > The problem I have is that osgUtil::Tessellator is intended to operate > on osg's structures. Any idea on how to make it work easily in the > reader plugin? > > > Sukender > PVLE - Lightweight cross-platform game engine - > http://pvle.sourceforge.net/ > > ----- "Michael Platings" < mplati...@gmail.com > a écrit : > > > > > > No, 1 to 1 mapping of primitives isn't possible because OpenGL > doesn't > > render concave polygons correctly (in practice GL_POLYGON is the > same > > as GL_TRIANGLE_FAN). > > Tesselation is possible via GLU but very slow so we need to be > careful > > about how we use that. Most models I've come across have many > > triangles and quads but few polygons >=5 vertices. If we apply > > triangulation to those few polygons then most models will be > > unaffected. For quads I imagine it would be possible to write some > > fast specialised code to see if they should be split across vertices > > (0,2) or (1,3) so that loading times remain bearable. > > However, if your content provider could just produce models that are > > already suitable for real-time rendering that would be best ;) > > > > > > On 5 July 2010 09:09, Sukender < suky0...@free.fr > wrote: > > > > > > Hi all, > > > > The FBX reader seems to interpret FBX polygons as triangles. Well I > > guess this should not be, as 1-to-1 mapping of primitives is > possible > > (as far as I know), but this is not really an issue. What is an > issue > > is that concave polygons are not intepreted the right way. I think > > about two solutions: > > 1. Use tessellation code to get correct "splitting" > > 2. Do the 1-to-1 mapping of primitives > > > > Am I right ? > > Other ideas? > > Anyone having time for this? > > > > Thanks folks! > > > > Cheers, > > > > Sukender > > PVLE - Lightweight cross-platform game engine - > > http://pvle.sourceforge.net/ > > _______________________________________________ > > osg-users mailing list > > osg-users@lists.openscenegraph.org > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > > _______________________________________________ > > osg-users mailing list > > osg-users@lists.openscenegraph.org > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org