[osg-users] obj plugin does not support diffuse and specular texture maps

Chris Hanson xenon at alphapixel.com
Mon Sep 18 12:22:36 PDT 2017


I think all that what's going on is that the loader is simply assigning the
image maps (diffuse and specular) to various texture unit numbers:
http://trac.openscenegraph.org/projects/osg//browser/OpenSceneGraph/trunk/src/osgPlugins/obj/ReaderWriterOBJ.cpp?rev=13006#L67
http://trac.openscenegraph.org/projects/osg//browser/OpenSceneGraph/trunk/src/osgPlugins/obj/ReaderWriterOBJ.cpp?rev=13006#L835

but it doesn't really set up a shader or anything special to utilize them,
so the specular texture just clobbers the diffuse texture. You most likely
need to write a small fragment shader to actually interpret the maps in
whatever way you want.

On Mon, Sep 18, 2017 at 2:10 AM, Ralf Habacker <ralf.habacker at freenet.de>
wrote:

> Hi,
>
> we tried to use the obj plugin in an osg based vr application for the
> HTC Vive to load the steamvr controller (which is provided as .obj file)
> and recognized that it is displayed with black surfaces instead of
> showing the provided textures (which works for example in blender).
>
> We found out that the osg plugin shows always black surfaces if a
> material used by an obj file contains a diffuse *and* a specular texture
> which could be verified with the appended test case.
>
> Are there any hints how to solve this issue ?
>
> Regards
> Ralf
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
Chris 'Xenon' Hanson, omo sanza lettere. Xenon at AlphaPixel.com
http://www.alphapixel.com/
Training • Consulting • Contracting
3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 •
GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL
Legal/IP • Forensics • Imaging • UAVs • GIS • GPS •
osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile •
iPhone/iPad/iOS • Android
@alphapixel <https://twitter.com/alphapixel> facebook.com/alphapixel (775)
623-PIXL [7495]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170918/3b10ffd4/attachment.htm>


More information about the osg-users mailing list