Hello all,
I'm trying to implement reflection from object faces. I looked at the
osgprerendercubemap example, and when I change the reflector to anything
but the sphere, the reflection doesn't seem realistic. Is there anyway
besides ray tracing to implement that? How does cube map work?
Thank
Hi,
I am trying to understand what are these 'wavy' effect. It changes depending on
the camera position. Is it my texture that is beeing replicated for every
triangle on the terrain mesh ? or the material attached to it ?
Thank you!
Cheers,
Vinicius
--
Read this topic onlin
Hi all
Here comes my follow up. As you can see in the code snipped above, the clipping
plane of the refraction camera is looking in the opposite direction. Since the
clipping is done on the graphics card, and the primitives are still in world
coordinates, the refraction clipping plane has to b
Hi Daniel,
I'm afraid I don't have any ideas to what might be amiss.
In terms of clip plans/position state and how many clip planes you can have
active at any one time, I can provide some clarity.
For each osg::Camera that isn't set up as a nested render the OSG's
rendering backend sets up a Ren
Hello Daniel,
what kind of graphics card are you using? ATI/AMD? And are you using a vertex
shader for your terrain? I had a similiar problem with reflections in osgOcean.
The solution was to add the line "gl_ClipVertex = gl_ModelViewMatrix *
gl_Vertex;" to my vertex shader. On nVidia cards this
Hi all
I was unsuccesful with the ClipPlanes, so I decided to write a Vertex/Fragment
Shader pair that handles the clipping by doing a fragment abort upon testing
the vertex world height with a clipping height uniform.
Like this I was finally able get the control I wanted.
Thank you!
Cheers,
"Vinicius Nonnenmacher" writes:
> Hi,
>
> I am trying to understand what are these 'wavy' effect. It changes
> depending on the camera position. Is it my texture that is beeing
> replicated for every triangle on the terrain mesh ? or the material
> attached to it ?
Hi Vinicius, I think it is a te
Vinicius,
That looks like texture aliasing. Enable mipmapping by setting a
minification filter like so:
texture->setFilter(osg::Texture::MIN_FILTER,
osg::Texture::LINEAR_MIPMAP_LINEAR);
texture->setFilter(osg::Texture::MAG_FILTER, osg::Texture::LINEAR);
Good luck.
Glenn Waldron / osgEarth
On
Hi
environment->set(cubemap.get());
should be
environment->set(int(unit));
Cheers
27.03.2013, 18:45, "Andrea Martini" :
> Hi,
> i'm trying to apply a reflection effect on a sphere, using a cube map.
> I'm using as vertex shader dthe following :
>
> Code:
>
> #version 400 compatibili
Hi hybr(),
thank you. Now it works!
I have to change something to update the reflected image on camera moving ... i
have to check.
Thank you again.
Cheers,
Andrea
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=53349#53349
in vertex shader add line
ReflectDir = (osg_ViewMatrixInverse * vec4(ReflectDir,0)).xyz;
after
ReflectDir = reflect(eyeDir, normal);
27.03.2013, 20:27, "Andrea Martini" :
> Hi hybr(),
> thank you. Now it works!
>
> I have to change something to update the reflected image on camera
11 matches
Mail list logo