<div dir="ltr">Robert,<div><br></div><div>Thanks. There are two main culprits the behavior change I was seeing. The first is that for some reason, between OSG 3.0 and 3.4, I now need to explicitly set a BlendFunc. With the exception of MIP, it looks like the rest of osgVolume just renders with a default BlendFunc and doesn't explictly set anything. </div><div><br></div><div>I found that by setting</div><div><br></div><div> stateset->setAttribute(new osg::BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA), osg::StateAttribute::ON);</div><div><br></div><div>There is a second issue I want to ask about:</div><div><br></div><div>It looks to me there was a change to the shaders I'm using regarding the position of the light source between OSG 3.0 and OSG 3.4:</div><div><br></div><div><font face="Calibri, Arial, Helvetica, sans-serif"><span style="font-size:16px;line-height:normal"><a href="https://github.com/openscenegraph/osg/commit/4525ec49a386b48608fdb3107033a1c915d928e6">https://github.com/openscenegraph/osg/commit/4525ec49a386b48608fdb3107033a1c915d928e6</a></span></font></div><div><br></div><div>The change is to honor the lightDirection from GL_LIGHT0 rather than use the eye direction as the direction of the light source. </div><div><br></div><div>If I wanted to get the old behavior of using the eyeDirection, is there an easy way to go about that?</div><div><br></div><div>Thanks,</div><div><br></div><div>Alex<br><br><div class="gmail_quote"><div dir="ltr">On Thu, Jan 28, 2016 at 3:16 PM Robert Osfield <<a href="mailto:robert.osfield@gmail.com">robert.osfield@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Alex,<br><br></div>There were quite a few improvements to osgVolume between OSG-3.0 and OSG-3.4, both in shaders and the introduction of the new MultiPassTechnique. One thing to look at with your own setup is that you aren't picking up on old<br> shaders such as by having your own path to old shaders.<br><br></div>It's quite a while since I did the work on osgVolume, around two years, so won't be able to be specific without viewing code and being able to reproduce the problems you are seeing first hand.<br><br></div>Robert.<br></div><div class="gmail_extra"><br><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">On 28 January 2016 at 15:25, Alex Taylor <span dir="ltr"><<a href="mailto:alextaylor@gmail.com" target="_blank">alextaylor@gmail.com</a>></span> wrote:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div>Hi,</div><div dir="ltr"><br></div><div dir="ltr">I'm working on upgrading the OSG version used in the product I work on. When OSG is upgraded with the same client code, I'm noticing differences is the way my volumes are rendered with all of the rendering algorithms that I can't explain. I've fixed the parameters I'm using to define the osgVolume in both versions, so it can't be a matter of picking up a different default option for a parameter.<br></div><div dir="ltr"><div><br></div><div><b>OSG 3.4 Fixed Function</b></div><div><img src="cid:15288cab10a634206b81" alt="osg34RayTraced.jpg" class="GQ" style="max-width: 100%;"><br></div><div><b>OSG 3.0 Fixed Function</b></div><div><b><img src="cid:15288caf6a2fa0e8d9f2" alt="osg30FixedFunction.jpg" class="GQ" style="max-width: 100%;"><br></b></div><div><b><br></b></div><div><b>OSG 3.4 Ray Traced Lit</b></div><div><b><br></b></div><div><b><img src="cid:15288d55b12f1f208051" alt="osg34RayTracedLit.jpg" class="GQ" style="max-width: 100%;"><br></b></div><div><b>OSG 3.0 Ray Traced Lit</b></div><div><b><br></b></div><div><b><img src="cid:15288d5bb1eaf4a90012" alt="osg30RayTracedLit.jpg" class="GQ" style="max-width: 100%;"><br></b></div><div><b><br></b></div><div><b>OSG 3.4 Isosurface</b></div><div><b><img src="cid:15288d60559aed3833f3" alt="osg34Isosurface.jpg" class="GQ" style="max-width: 100%;"><br></b></div><div><b>OSG 3.0 Isosurface</b></div><div><b><img src="cid:15288d6664d4765da3b4" alt="osg30Isosurface.jpg" class="GQ" style="max-width: 100%;"><br></b></div><div><b><br></b></div><div>In the Ray Traced cases, I'm using the properties:</div><div><br></div><div>AlphaFunc = 0.02;</div><div>SampleDensity = 0.005;</div><div><br></div><div>I'm using setting the TransferFunctionProperty, so I'm using the shaders to do the alpha/color mapping. </div><div><br></div><div>For the FixedFunctionTechnique, I'm using AlphaFunc = 0.02, and using the applyTransferFunction function to obtain an RGBA mapped osg::Image buffer. </div><div><br></div><div>It's very possible that the upgrade to 3.4 has changed something else in my overall use of OSG elsewhere in the pipeline, unrelated to osgVolume, that is causing this issue. That said, I thought i'd ask if visually anyone has a guess it what might have changed between osg 3.0 and osg 3.4 that might explain these visual differences.</div><div><br></div><div>Thanks for your help,</div><div><br></div><div>Alex</div><div><br></div><div><br></div></div></div></div>
<br></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<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>
<br></blockquote></div><br></div>
_______________________________________________<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></div></div>