Re: [osg-users] [osgOcean] Regulate the Ocean Reflection intensity.

2013-12-02 Thread Dario Minieri
Hi,

Nice, I've seen now the mod, I'll try them as soon


Thank you!

Cheers,
Dario

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=57512#57512





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgOcean] Regulate the Ocean Reflection intensity.

2013-12-02 Thread Dario Minieri
Hi,

Looking the patch, I've seen that this is the same mod that I've tried but 
doesn't looks good to me...I'm using the trunk version, so the patch is 
different because some stuffs are moved in Technique file, but the mod is the 
same and I'm not really able to tone down (mean: add a lower reflection 
intensity) the reflection. Playing with fresnel mul and reflection mul don't 
move to me along a right final effect.

Have you tried some other parameters combination?  Have you a snapshot to see 
your result?

Thank you!

Cheers,
Dario

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=57513#57513





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgOcean] Regulate the Ocean Reflection intensity.

2013-11-15 Thread Kim Bale
Thanks I'll check out the effect and merge it.

Kim.


On 15 November 2013 00:33, Tisham Dhar tisham.d...@aerometrex.com.auwrote:

 Hi,

 I have successfully implemented a changing reflection intensity by adding
 1) Multiplier to env_map
 2) Creating a uniform corresponding to the multiplier in the shader
 3) Setting this uniform via stateset and creating a corresponding variable
 in FFTOceanSurface.

 SVN diff to release tag attached.

 Cheers,

 whatnick.

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=57225#57225




 Attachments:
 http://forum.openscenegraph.org//files/refelection_var_diff_551.txt


 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgOcean] Regulate the Ocean Reflection intensity.

2013-11-14 Thread Tisham Dhar
Hi,

I have successfully implemented a changing reflection intensity by adding
1) Multiplier to env_map
2) Creating a uniform corresponding to the multiplier in the shader
3) Setting this uniform via stateset and creating a corresponding variable in 
FFTOceanSurface.

SVN diff to release tag attached.

Cheers, 

whatnick.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=57225#57225




Attachments: 
http://forum.openscenegraph.org//files/refelection_var_diff_551.txt


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgOcean] Regulate the Ocean Reflection intensity.

2013-10-02 Thread Dario Minieri
Hi,

In effect, I see the env_color computation in the fragment shader. I'm able to 
multiply this one by a tiny constant  1 (like 0.2) to obtain the result 
desired, but the problem is that the total final tone change drastically. 

I don't know if I've made right operation, but I'm trying to re-calibrate the 
total tone using wave and bottom top color and come another problem: changing 
those values at runtime I receive a double corruption from FFTOceanSurface like 
this:


Code:
*** glibc detected *** bin/Demo: double free or corruption (!prev): 
0x06fab330 ***
=== Backtrace: =
/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7f0ac5ab8b96]
/usr/local/lib/libosgOcean.so(_ZNSt12_Destroy_auxILb0EE9__destroyIPSt6vectorIN8osgOcean9OceanTileESaIS4_vT_S8_+0x52)[0x7f0ac126d602]
/usr/local/lib/libosgOcean.so(_ZN8osgOcean15FFTOceanSurface10computeSeaEj+0x142)[0x7f0ac126b782]
/usr/local/lib/libosgOcean.so(_ZN8osgOcean15FFTOceanSurface5buildEv+0x40)[0x7f0ac126c970]
/usr/local/lib/libosgOcean.so(_ZN8osgOcean15FFTOceanSurface18getSurfaceHeightAtEffPN3osg5Vec3fE+0x145)[0x7f0ac12676d5]




Parameters for wave and top color are thought to runtime change? I need to 
perform some operation to achieve the runtime modification?

Best

Thank you!

Cheers,
Dario

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=56573#56573





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [osgOcean] Regulate the Ocean Reflection intensity.

2013-09-27 Thread Kim Bale
Hi Dario,

I would take a look inside the surface fragment shader and then tone down
the mix function that blends the reflection texture with the surface. It
should be pretty simple.

Regards,

Kim.


On 27 September 2013 17:37, Dario Minieri para...@cheapnet.it wrote:

 Hi,

 I'm looking to modify the amount of reflections intensity inside ocean.
 I'm using last trunk rev 258.

 I'm stuck into this piece of code inside OceanScene:


 Code:
 _reflectionMatrix = osg::Matrixf(  1,  0,  0,  0,
0,  1,  0,  0,
0,  0, -1,  0,
0,  0,  2 *
 _oceanScene-getOceanSurfaceHeight(),  1 );

 osg::ref_ptrosg::Texture2D reflectionTexture =
 _oceanScene-createTexture2D( _oceanScene-_reflectionTexSize, GL_RGBA );

 // clip everything below water line
 _reflectionCamera = _oceanScene-renderToTexturePass(
 reflectionTexture.get() );
 _reflectionCamera-setClearColor( osg::Vec4( 0.0, 0.0, 0.0, 0.0 )
 );
 _reflectionCamera-setComputeNearFarMode(
 osg::Camera::DO_NOT_COMPUTE_NEAR_FAR );
 _reflectionCamera-setCullMask( _oceanScene-_reflectionSceneMask
 );
 _reflectionCamera-setCullCallback( new
 CameraCullCallback(_oceanScene.get()) );
 _reflectionCamera-getOrCreateStateSet()-setMode(
 GL_CLIP_PLANE0+0, osg::StateAttribute::ON );
 _reflectionCamera-getOrCreateStateSet()-setMode( GL_CULL_FACE,
 osg::StateAttribute::OFF | osg::StateAttribute::OVERRIDE );

 _surfaceStateSet-setTextureAttributeAndModes(
 _oceanScene-_reflectionUnit, reflectionTexture.get(),
 osg::StateAttribute::ON );



 I think that I should operate on texture properties, maybe the shader but
 right now I'm not able to see a significative change on intensity
 reflection effect...Someone can suggest to me a way?

 Thank you!

 Cheers,
 Dario[/code]

 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=56514#56514





 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org