[osg-users] Imported .obj file not showing textures.

'Tom Pollok' via OpenSceneGraph Users osg-users at googlegroups.com
Tue Jan 14 02:24:05 PST 2020

Which version of openscenegraph are you using?

Would you mind trying my obj model with mtl and jpg texture file.


Pw: osg

I use the following to load it, but it crashes on my system with openscenegraph_3.4.1. 
Im curious if it works on your system.

osgDB::Options* opt = new osgDB::Options;opt->setOptionString("noRotation");osg::ref_ptr<osg::Node> node = osgDB::readNodeFile(pathToObjFile, opt);

Am Dienstag, 14. Januar 2020 10:52:54 UTC+1 schrieb JILJITH JOHN:
> [image: Capture.PNG]
> [image: Capture.PNG]
> Hi,
> I am developing a tool for editing 3D models using openscenegraph. When I 
> tried to load an .obj file, the texture is not applied. I am getting only 
> black shade.
> The model is imported using the below code. 
>  osg::ref_ptr<osg::Node> model1= osgDB::readNodeFile(path.toStdString());
>  model1->setDataVariance(osg::Object::DYNAMIC);

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+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/16b6202d-9322-4880-a5a9-bb92abf1e1aa%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200114/858754a7/attachment.html>

More information about the osg-users mailing list