HI Aitor,

Thanks for the changes.  I have applied to master but on doing a
osgconv box.ply I see that the number of texture coordinates is 8 with
a per vertex binding on the array while the number of vertices is 32.
This means that the data at least when represented on the OSG side is
invalid and could well cause a crash if one attempts to send the data
to OpenGL.  Currently the OSG's osg::Geometry::drawImplementation()
assumes the all tex coordinates are provided as PER_VERTEX, so
requires there to be 32 with the model your provided.

This all means the data needs further conversion before it's a valid
OSG osg::Geometry.  I'm not familiar with PLY so can't comment on what
is meant for this this model.  Another thing I spotted that was off
about the converted .osgt was the normal array has 32 entries by most
were clearly invalid with various nan's etc.  Perhaps the normal code
is wrong too.

Given there are problems with the way that the tex coords are set up I
don't feel it's appropriate to merge the changes as is, as they will
result in broken scene graphs.

Robert.





On 12 November 2015 at 15:02, Aitor Moreno <[email protected]> wrote:
> Hi,
>
> The plugin for PLY files does not support reading texture coordinates.
>
> The attached files (compatible with Trunk and 3.4 branch, in
> src/osgPlugins/ply ) add this capability to the reader of PLY files.
>
> As PLY format is quite flexible, it does not impose the naming of such
> properties. The "u" and "v" names have been used in these files (
> http://www.okino.com/conv/exp_ply.htm ).
>
> As a sample, box.ply is just a box generated by OpenMesh
> (http://www.openmesh.org/). You may notice it has u and v properties. After
> applying theses changes, running "osgconv box.ply box.obj" will produce a
> valid obj file containing the texture coordinates.
>
> Bye,
>
> --
> Aitor Moreno
>    aitormoreno [@] gmail.com
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to