I've had a quick look but I'm going to need to rewrite it to fit with newer code so it's on my to-do list.
On 13 July 2010 16:16, Sukender <[email protected]> wrote: > Hi Michael, hi all, > > Sorry to push this topic up, but did you test the code (anyone)? > Thanks. > > Sukender > PVLE - Lightweight cross-platform game engine - > http://pvle.sourceforge.net/ > > ----- "Sukender" <[email protected]> a écrit : > > > Hi Michael, > > > > I managed to write the code, but I need testing. Moreover I can't > > update the FBX plugin because of the regression I told you in another > > thread, concerning images. > > Can you, please: > > - Merge changes to your working copy, and > > - Make a few tests with your models? > > > > Also feel free to commit if everything seems okay. > > Attached file is against rev. 11322 of the trunk. > > > > Many thanks. > > > > For info, my implemtation looks like: > > - Add points of the triangles > > - Detect how to split quads (02 or 13), and add points for the two > > triangles > > - Save polygons in a temporary array > > - Add a primitive set for all triangles (DrawArray) > > - Add polygons points AFTER the points of the triangles > > - Add primitive sets for polygons > > - Tessellate > > > > Sukender > > PVLE - Lightweight cross-platform game engine - > > http://pvle.sourceforge.net/ > > > > ----- "Sukender" <[email protected]> a écrit : > > > > > Alright. I started working on it. > > > > > > Sukender > > > PVLE - Lightweight cross-platform game engine - > > > http://pvle.sourceforge.net/ > > > > > > ----- "Sukender" <[email protected]> a écrit : > > > > > > > Oh, right, sorry I didn't spot this. Thanks. > > > > > > > > Sukender > > > > PVLE - Lightweight cross-platform game engine - > > > > http://pvle.sourceforge.net/ > > > > > > > > ----- "Michael Platings" <[email protected]> a écrit : > > > > > > > > > I was referring to that by "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." > > > > > > > > > > > > > > > On 6 July 2010 09:02, Sukender < [email protected] > wrote: > > > > > > > > > > > > > > > Oh... What about concave "quads" (I mean 4 points polygons)? > > > > > > > > > > > > > > > Sukender > > > > > PVLE - Lightweight cross-platform game engine - > > > > > http://pvle.sourceforge.net/ > > > > > > > > > > ----- "Sukender" < [email protected] > a écrit : > > > > > > > > > > > > > > > > > > > > > > > > > > OK. If you got time for this before I do... :) > > > > > > > > > > > > Sukender > > > > > > PVLE - Lightweight cross-platform game engine - > > > > > > http://pvle.sourceforge.net/ > > > > > > > > > > > > ----- "Michael Platings" < [email protected] > 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 < [email protected] > 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" < [email protected] > 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 < [email protected] > > > 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 > > > > > > > > [email protected] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > osg-users mailing list > > > > > > > > [email protected] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > > > _______________________________________________ > > > > > > > osg-users mailing list > > > > > > > [email protected] > > > > > > > > > > > > > > > > > > > > > > > > > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > osg-users mailing list > > > > > > > [email protected] > > > > > > > > > > > > > > > > > > > > > > > > > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > > _______________________________________________ > > > > > > osg-users mailing list > > > > > > [email protected] > > > > > > > > > > > > > > > > > > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > _______________________________________________ > > > > > osg-users mailing list > > > > > [email protected] > > > > > > > > > > > > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > > > > > > > > > > > _______________________________________________ > > > > > osg-users mailing list > > > > > [email protected] > > > > > > > > > > > > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > _______________________________________________ > > > > osg-users mailing list > > > > [email protected] > > > > > > > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > _______________________________________________ > > > osg-users mailing list > > > [email protected] > > > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > _______________________________________________ > > osg-users mailing list > > [email protected] > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

