<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Hi,</div>
<div> </div>
<div>> For now I have implemented the use of ShadowEngines. I'll look into the details of the ShadowsStages in the next days..</div>
<div> </div>
<div>After some testing the results of the ShadowEngine's seems to be not as good as the shadow technique's in OpenSG1.8 were. Therefore I switched to the ShadowStage approach.</div>
<div>Works as expected in principle, but with shadows enabled we loose anti-aliasing. I guess multisampling needs to be enabled for the Framebuffer object that renders to main view. I already looked at the code but I have no idea how integrate that in a clean way.</div>
<div> </div>
<div>Thanks,</div>
<div>Michael</div>
<div>
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Mittwoch, 14. Mai 2014 um 11:52 Uhr<br/>
<b>Von:</b> "Michael Raab" <michael-***@gmx.de><br/>
<b>An:</b> opensg-***@lists.sourceforge.net<br/>
<b>Betreff:</b> Re: [Opensg-users] OpenSG2: Open questions</div>
<div name="quoted-content">
<div style="font-family: Verdana;font-size: 12.0px;">
<div>
<div>Hello Carsten,</div>
<div> </div>
<div>> hmm, from a quick look into the code the beacon is used to calculate the<br/>
> modelview matrix for rendering the SkyBackground. However, in 2.0<br/>
> beacons are only held through weak pointers [1], meaning if nothing else<br/>
> refers to the beacon node (perhaps it is not in the tree?) it will not<br/>
> be kept alive.<br/>
> Could that be the case here?</div>
<div>
<div> </div>
<div>Good catch. Works now as expected. Thanks.</div>
<div> </div>
<div>> So, I'd say if you are porting existing code ShadowStage should work<br/>
> pretty similar on the other hand having a more complete set of<br/>
> ShadowEngines would be great :)</div>
<div> </div>
<div>For now I have implemented the use of ShadowEngines. I'll look into the details of the ShadowsStages in the next days..</div>
<div> </div>
<div>> Does the above sequence reliably reproduce the problem or does it<br/>
> sometimes work/sometimes not? Is the commitChanges() placement after<br/>
> addChunk() relevant?<br/>
> Sorry, not really a good idea what could be the cause, other than some<br/>
> kind of caching on the status of the uniform...</div>
<div> </div>
<div>The problem seems to be that before rendering the shader in our main application window, we create a material preview icon using a fbo in combination with a passive window.</div>
<div>For that icon rendering everything works as expected. The main rendering then creates in SimpleSHLChunk::handleGL() the shader, programs but does not update the uniform variables as they are not marked as changed.</div>
<div>I wrote a fix that eliminates the problem on our side. Patch is attached.</div>
<div> </div>
<div>Regards,</div>
<div>Michael</div>
<div> </div>
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><b>Gesendet:</b> Dienstag, 13. Mai 2014 um 20:13 Uhr<br/>
<b>Von:</b> "Carsten Neumann" <***@gmx.net><br/>
<b>An:</b> opensg-***@lists.sourceforge.net<br/>
<b>Betreff:</b> Re: [Opensg-users] OpenSG2: Open questions</div>
<div>Hello Michael,<br/>
<br/>
On 05/13/2014 05:16 PM, Michael Raab wrote:<br/>
> I have still the following open issues:<br/>
> 1.) SkyBackground:<br/>
> In OpenSG1.8 we were using the SkyBackground beacon to rotate it to our<br/>
> native coordinates. With OpenSG2 all our skybackground seem to miss that<br/>
> transformation. Playing around with the transformation value seems to<br/>
> have no effect at all. Maybe there's something missing?!<br/>
<br/>
hmm, from a quick look into the code the beacon is used to calculate the<br/>
modelview matrix for rendering the SkyBackground. However, in 2.0<br/>
beacons are only held through weak pointers [1], meaning if nothing else<br/>
refers to the beacon node (perhaps it is not in the tree?) it will not<br/>
be kept alive.<br/>
Could that be the case here?<br/>
<br/>
> 2.) Shadows:<br/>
> I can see 2 possibilities to use shadows in OpenSG2: ShadowEngines and<br/>
> ShadowStages. What is the recommended way to create shadows? I'm asking<br/>
> as the supported modes differ (Standard/Trapezoidal vs.<br/>
> Perspective/PCF/PCSS/Dither/..).<br/>
<br/>
IMHO the ShadowEngines are the technically superior solution since they<br/>
allow much greater flexibility for the shadow algorithms. However, as<br/>
you've discovered only limited modes have been implemented for those.<br/>
The ShadowStage is ported from 1.x ShadowViewport (?) and behaves quite<br/>
similar to that.<br/>
So, I'd say if you are porting existing code ShadowStage should work<br/>
pretty similar on the other hand having a more complete set of<br/>
ShadowEngines would be great :)<br/>
<br/>
> 3.) Shaders<br/>
> We have the problem that in some cases uniform values are not<br/>
> initialized. Here's an example:<br/>
> shlChunk->setVertexProgram(vertexProgram.str());<br/>
> shlChunk->setFragmentProgram(fragmentProgram.str());<br/>
> //add chunks to chunk material<br/>
> chunkMaterial->addChunk(shlChunk);<br/>
> commitChanges();<br/>
> //add shader parameters<br/>
> shlChunk->addUniformVariable("gDiffuseFactor", 0.5f);<br/>
> commitChanges();<br/>
> After that the shader code seems to be transferred and compiled<br/>
> correctly but the uniform value isn't. If I call updateUniformVariable a<br/>
> frame later, the value gets transmitted and shader results look as expected.<br/>
> Ideas on that?<br/>
<br/>
Does the above sequence reliably reproduce the problem or does it<br/>
sometimes work/sometimes not? Is the commitChanges() placement after<br/>
addChunk() relevant?<br/>
Sorry, not really a good idea what could be the cause, other than some<br/>
kind of caching on the status of the uniform...<br/>
<br/>
Cheers,<br/>
Carsten<br/>
<br/>
[1] The motivation is that a beacon can be a parent of the node<br/>
referring to it - which leads to circles in the chain of references and<br/>
thus objects that are never cleaned up.<br/>
<br/>
------------------------------------------------------------------------------<br/>
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE<br/>
Instantly run your Selenium tests across 300+ browser/OS combos.<br/>
Get unparalleled scalability from the best Selenium testing platform available<br/>
Simple to use. Nothing to install. Get started now for free."<br/>
<a href="http://p.sf.net/sfu/SauceLabs" target="_blank">http://p.sf.net/sfu/SauceLabs</a><br/>
_______________________________________________<br/>
Opensg-users mailing list<br/>
Opensg-***@lists.sourceforge.net<br/>
<a href="https://lists.sourceforge.net/lists/listinfo/opensg-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/opensg-users</a></div>
</div>
</div>
</div>
</div>
------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." <a href="http://p.sf.net/sfu/SauceLabs_______________________________________________" target="_blank">http://p.sf.net/sfu/SauceLabs_______________________________________________</a> Opensg-users mailing list Opensg-***@lists.sourceforge.net <a href="https://lists.sourceforge.net/lists/listinfo/opensg-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/opensg-users</a></div>
</div>
</div>
</div></div></body></html>