<div dir="ltr"><div><div>repost in google group; It seems like my reply to the mailing list does not show up in google groups.</div><div><br></div></div><div><br></div><div>Hi Jiljith,</div><div><br></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>On Tuesday, January 14, 2020 at 10:52:54 AM UTC+1, JILJITH JOHN wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr"><p style="text-align:center;clear:both"><br></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:#000"><br><br> osg</span><span style="color:#660">::</span><span style="color:#000">ref_ptr</span><span style="color:#660"><</span><span style="color:#000">osg</span><span style="color:#660">::</span><span style="color:#606">Node</span><span style="color:#660">></span><span style="color:#000"> model1</span><span style="color:#660">=</span><span style="color:#000"> osgDB</span><span style="color:#660">::</span><span style="color:#000">readNodeFile</span><span style="color:#660">(</span><span style="color:#000">path</span><span style="color:#660">.</span><span style="color:#000">toStd<wbr>String</span><span style="color:#660">());</span><span style="color:#000"><br> model1</span><span style="color:#660">-></span><span style="color:#000">setDataVariance</span><span style="color:#660">(</span><span style="color:#000">osg</span><span style="color:#660">::</span><span style="color:#606"><wbr>Object</span><span style="color:#660">::</span><span style="color:#000">DYNAMIC</span><span style="color:#660">);</span><span style="color:#000"><br></span></div></code></div><div><pre><br></pre>
<pre><br></pre></div></div></blockquote>
<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">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/5967a3a0-ec6e-44d1-810b-6b907def6979%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/5967a3a0-ec6e-44d1-810b-6b907def6979%40googlegroups.com</a>.<br />