<div dir="ltr"><div>H Jiljith,</div><div>The material has both an ambient and a diffuse texture (both refer to the same file)</div><div>while this can be made to work with a shader, using the fixed function pipeline means you'll have to choose one:</div><div><br></div>osgviewer -O DIFFUSE=0 12228_Dog_v1_L2.obj<br><div>Laurens.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 14, 2020 at 10:53 AM JILJITH JOHN <<a href="mailto:jiljithjohncse@gmail.com">jiljithjohncse@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><p style="text-align:center;clear:both"><img src="cid:159e47d9-d2f5-4c78-92bc-b9cd196e7c10" alt="Capture.PNG" width="320" height="244" style="margin-left: 1em; margin-right: 1em;"></p><p style="text-align:center;clear:both"><img src="cid:3694d1d9-cee0-4545-ba79-8973be69acdf" alt="Capture.PNG" width="320" height="112" style="margin-left: 1em; margin-right: 1em;"></p>Hi,<div><br></div><div>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.</div><div>The model is imported using the below code. </div><div style="background-color:rgb(250,250,250);border-color:rgb(187,187,187);border-style:solid;border-width:1px"><code><div><span style="color:rgb(0,0,0)"><br><br> osg</span><span style="color:rgb(102,102,0)">::</span><span style="color:rgb(0,0,0)">ref_ptr</span><span style="color:rgb(102,102,0)"><</span><span style="color:rgb(0,0,0)">osg</span><span style="color:rgb(102,102,0)">::</span><span style="color:rgb(102,0,102)">Node</span><span style="color:rgb(102,102,0)">></span><span style="color:rgb(0,0,0)"> model1</span><span style="color:rgb(102,102,0)">=</span><span style="color:rgb(0,0,0)"> osgDB</span><span style="color:rgb(102,102,0)">::</span><span style="color:rgb(0,0,0)">readNodeFile</span><span style="color:rgb(102,102,0)">(</span><span style="color:rgb(0,0,0)">path</span><span style="color:rgb(102,102,0)">.</span><span style="color:rgb(0,0,0)">toStdString</span><span style="color:rgb(102,102,0)">());</span><span style="color:rgb(0,0,0)"><br> model1</span><span style="color:rgb(102,102,0)">-></span><span style="color:rgb(0,0,0)">setDataVariance</span><span style="color:rgb(102,102,0)">(</span><span style="color:rgb(0,0,0)">osg</span><span style="color:rgb(102,102,0)">::</span><span style="color:rgb(102,0,102)">Object</span><span style="color:rgb(102,102,0)">::</span><span style="color:rgb(0,0,0)">DYNAMIC</span><span style="color:rgb(102,102,0)">);</span><span style="color:rgb(0,0,0)"><br></span></div></code></div><div><pre><br></pre>
<pre><br></pre></div></div>
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com" target="_blank">osg-users+unsubscribe@googlegroups.com</a>.<br>
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/2877ba6a-106a-4833-a726-8c318648a466%40googlegroups.com?utm_medium=email&utm_source=footer" target="_blank">https://groups.google.com/d/msgid/osg-users/2877ba6a-106a-4833-a726-8c318648a466%40googlegroups.com</a>.<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div>