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 Pollok' via OpenSceneGraph Users < osg-us...@googlegroups.com> wrote: > 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 > file being mtllib Data.mtl and the use of usemtl material_0 before the > faces or do i need to take extra care when loading a textured model? > > For loading, im using only: > > osgDB::Options* opt = new > osgDB::Options;opt->setOptionString("noRotation");osg::ref_ptr<osg::Node> > node = osgDB::readNodeFile(pathToObjFile, opt); > > > Best, > Tom > > > Am Dienstag, 14. Januar 2020 17:25:27 UTC+1 schrieb Robert Osfield: >> >> On Tue, 14 Jan 2020 at 15:26, 'Tom Pollok' via OpenSceneGraph Users < >> osg-...@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 normals or texture coordinates. >>> So that means that openscenegraph now will be able to display the >>> textured mesh, even if the normals are missing, right? >>> >> >> Yes, that's correct, you'll get a textured mesh with no normals assigned. >> >> Robert. >> >> > -- > You received this message because you are subscribed to the Google Groups > "OpenSceneGraph Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to osg-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/osg-users/b55a82c5-4801-49da-b1c4-149d868bd6fa%40googlegroups.com > <https://groups.google.com/d/msgid/osg-users/b55a82c5-4801-49da-b1c4-149d868bd6fa%40googlegroups.com?utm_medium=email&utm_source=footer> > . > _______________________________________________ > 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