Hello Carsten, looks much better now. I can confirm item (3)(below) is still open. Pressing 1 2 1 2 1 2 ... still increases the size of indices. If you press 1 2 1 2 1 3 4 a crash happens. Seems that calcVertexTangents() has problems with to much indices...
Thanks, Michael -------- Original-Nachricht -------- > Datum: Tue, 15 Nov 2011 18:13:18 -0600 > Von: Carsten Neumann <carsten_neum...@gmx.net> > An: opensg-users@lists.sourceforge.net > Betreff: Re: [Opensg-users] OpenSG1.8 - Geometry functions > Hello Michael, > > On 11/15/2011 01:07 PM, Michael Raab wrote: > > I've tried both patches. These are the results: > > thanks for testing! > > > 1. osg::calcFaceNormals(geo) is still buggy. Indices size is still > > increasing > > in general that can not be avoided. It is possible that a position is > part of multiple faces, but for each a different normal must be used. > This can only be achieved by having a separate index for the normal (or > duplicating positions/other vertex attribs). > What the code did not get right (and the patch attempted to fix) is that > if there already was a separate index for normals it was not reused, > this happens now. > > > and result normals are still wrong. > > yes, I see that now. The problem is specific to strip/fan primitives > where, for the first face of the primitive, the normal was only set on > the last vertex. I've fixed that in the attached patch. > Please note that for non-planar fans/strips it's not really possible to > have face normals, it would require splitting the fan/strip primitive > into independent triangles/quads. > > > Calling it twice now destroys the geometry :) > > hmm, I don't see that here, pushing the button sequence 'a', '7', '3', > '3', '3', ... produces only a change after the first '3' afterwards the > rendering and log output remain the same. Can you give more details on > how the geometry gets destroyed in your case? > > > 2. osg::calcVertexTangents(geo) seems to work fine now > > ok, thanks. > > > 3. calling calcVertexNormals(geo, angle) first, then > > calcVertexNormal(geo), then calcVertexNormals(geo, angle) again > > and so on also increases the indices size > > I suspect this is a similar issue with not reusing the normal index, but > instead just inserting a new one. > > > to make debugging easier ,please find attached our test > > application./(See attached file: main.cpp)/ > > great, thank you for sending this! > > Cheers, > Carsten -- NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! Jetzt informieren: http://www.gmx.net/de/go/freephone ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users