Re: [osg-users] Loading textured meshes (obj+mtl) leads to crash in osg 3.4.1

2020-01-15 Thread 'Tom Pollok' via OpenSceneGraph Users
Hi Laurens, thank you for clarification! My problem was that im using openscenegraph in combination with osgEarth. I figured out how to fix it, so in case other osg and osgEarth users might run into the same issue. To fix the issue i had to include #include and after loading the model i had

Re: [osg-users] Loading textured meshes (obj+mtl) leads to crash in osg 3.4.1

2020-01-15 Thread Voerman, L.
Hi Tom, Your model works with texture for me, in osg 3.4.0 as well as 3.6.5 with the following commands: sed -E "s#(f [0-9]+/[0-9]+)/0 ([0-9]+/[0-9]+)/0 ([0-9]+/[0-9]+)/0#\1 \2 \3#" "Data2.obj" > noNormals.obj osgviewer -O noRotation noNormals.obj Laurens. On Wed, Jan 15, 2020 at 12:24 PM 'Tom P

Re: [osg-users] Loading textured meshes (obj+mtl) leads to crash in osg 3.4.1

2020-01-15 Thread 'Tom Pollok' via OpenSceneGraph Users
Hello Robert, to test it with my old osg version, i fixed the obj file such it does not contain any indices to normals anymore, as there are no normals. This indeed helped loading the model, but no textures appear at all. Should it load the textures automatically due to the first line in the obj

Re: [osg-users] Loading textured meshes (obj+mtl) leads to crash in osg 3.4.1

2020-01-14 Thread Robert Osfield
On Tue, 14 Jan 2020 at 15:26, 'Tom Pollok' via OpenSceneGraph Users < osg-us...@googlegroups.com> wrote: > Thank you for the workaround. > > So as far as i understand you only add the texture coordinate and normal, > if there exists one with a index greater than 0 and less then the number of > nor

Re: [osg-users] Loading textured meshes (obj+mtl) leads to crash in osg 3.4.1

2020-01-14 Thread 'Tom Pollok' via OpenSceneGraph Users
Thank you for the workaround. So as far as i understand you only add the texture coordinate and normal, if there exists one with a index greater than 0 and less then the number of normals or texture coordinates. So that means that openscenegraph now will be able to display the textured mesh, ev

Re: [osg-users] Loading textured meshes (obj+mtl) leads to crash in osg 3.4.1

2020-01-14 Thread Robert Osfield
I have checked in a workaround for the invalid indices to the 3.6 branch and master: https://github.com/openscenegraph/OpenSceneGraph/commit/2b9c501e18b6eded7375c0e272aff401ad9793a2 -- You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.

Re: [osg-users] Loading textured meshes (obj+mtl) leads to crash in osg 3.4.1

2020-01-14 Thread 'Tom Pollok' via OpenSceneGraph Users
Am Dienstag, 14. Januar 2020 15:23:15 UTC+1 schrieb Robert Osfield: > > > On Tuesday, 14 January 2020 13:54:37 UTC, Tom Pollok wrote: >> >> I used OpenMVS to create it: >> >> https://github.com/cdcseacave/openMVS >> > > The model isn't a valid .obj file, I am not familiar with OpenMVS and as I >

Re: [osg-users] Loading textured meshes (obj+mtl) leads to crash in osg 3.4.1

2020-01-14 Thread Robert Osfield
On Tuesday, 14 January 2020 13:54:37 UTC, Tom Pollok wrote: > > I used OpenMVS to create it: > > https://github.com/cdcseacave/openMVS > The model isn't a valid .obj file, I am not familiar with OpenMVS and as I have my own open source projects to manage I'll leave it to others to fix OpenMVS.

Re: [osg-users] Loading textured meshes (obj+mtl) leads to crash in osg 3.4.1

2020-01-14 Thread 'Tom Pollok' via OpenSceneGraph Users
Hello Laurens, thank you for your investigation! Best, Tom Am Dienstag, 14. Januar 2020 14:10:27 UTC+1 schrieb L. Voerman: > > repost in google group; It seems like my reply to the mailing list does > not show up in google groups. > > Hi Tom, > I think your obj file is invalid, as the faces all

Re: [osg-users] Loading textured meshes (obj+mtl) leads to crash in osg 3.4.1

2020-01-14 Thread 'Tom Pollok' via OpenSceneGraph Users
I used OpenMVS to create it: https://github.com/cdcseacave/openMVS I can also view the model using MeshLab or other tools. Is it possible to fix the invalid references in openscenegraph? Am Dienstag, 14. Januar 2020 14:36:29 UTC+1 schrieb Robert Osfield: > > I have looked at the model with the

Re: [osg-users] Loading textured meshes (obj+mtl) leads to crash in osg 3.4.1

2020-01-14 Thread Robert Osfield
I have looked at the model with the 3.6 branch and get the crash and concur with Luarens - the model is broken, it has normal indices assigned to the faces but no normal array. The crash occurs because the OSG's obj plugin is assuming that if normal indices are provided they are valid normal i

Re: [osg-users] Loading textured meshes (obj+mtl) leads to crash in osg 3.4.1

2020-01-14 Thread L. Voerman
repost in google group; It seems like my reply to the mailing list does not show up in google groups. Hi Tom, I think your obj file is invalid, as the faces all reference normal "0" and 1> no normals are provided 2> normal indices start at 1 (according to wikipedia

Re: [osg-users] Loading textured meshes (obj+mtl) leads to crash in osg 3.4.1

2020-01-13 Thread Voerman, L.
Hi Tom, I think your obj file is invalid, as the faces all reference normal "0" and 1> no normals are provided 2> normal indices start at 1 (according to wikipedia ) if I reduce your obj file to just the first face (removing material

Re: [osg-users] Loading textured meshes (obj+mtl) leads to crash in osg 3.4.1

2020-01-13 Thread 'Tom Pollok' via OpenSceneGraph Users
Hello Robert, I added a minimal reproducer and a stracktrace (release). Unfortunately i only have release builds on this machine, but I could provide debug stack trace from another system later... Best, Tom Am Montag, 13. Januar 2020 12:12:48 UTC+1 schrieb Tom Pollok: > > I added a zip file

Re: [osg-users] Loading textured meshes (obj+mtl) leads to crash in osg 3.4.1

2020-01-13 Thread 'Tom Pollok' via OpenSceneGraph Users
I added a zip file with the mesh. It happens when loading that obj file. https://owncloud.iosb.fraunhofer.de/owncloud/s/dc8dkbXrQz3gTuh Pw: osg I have to check for the stack trace again. osgDB::Options* opt = new osgDB::Options;opt->setOptionString("noRotation");osg::ref_ptr node = osgDB::rea

Re: [osg-users] Loading textured meshes (obj+mtl) leads to crash in osg 3.4.1

2020-01-10 Thread Robert Osfield
On Friday, 10 January 2020 18:01:57 UTC, Tom Pollok wrote: > > When loading a textured mesh from an obj file with mtl + texture file, > openscenegraph crashes. > > I use openscenegraph 3.4.1. Does anybody know if that issue has been fixed > in newer versions? > I don;t recall reports of crashes

[osg-users] Loading textured meshes (obj+mtl) leads to crash in osg 3.4.1

2020-01-10 Thread 'Tom Pollok' via OpenSceneGraph Users
When loading a textured mesh from an obj file with mtl + texture file, openscenegraph crashes. I use openscenegraph 3.4.1. Does anybody know if that issue has been fixed in newer versions? -- You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" grou