[osg-users] Mirror transformation

Robert Osfield robert.osfield at gmail.com
Thu Sep 14 00:41:38 PDT 2017


Hi Ale,

On 13 September 2017 at 16:51, Ale Maro <sasha71 at teletu.it> wrote:

> I use this scene graph structure to set some standard rendering features
> to scene objects... so it is not easy to change it for me.
> Anyway I tried to export the scene in osg format and change manually all
> groups that can give problems (clipnode, outline, shadow) to simple "Group".
> After loading the modified file with osgviewer the result is the same the
> object is black.
> I see now that moving the object (so light intersect the object with a
> different angle) the object is still dark but I can see the interior
> material (instead of exterior one)
>
> So I guess if the solution is to reverse vertices, normals and primitive
> set or do you expect it works just using transformations?
>

I can only speculate on what the problem you are having is, it's really
open ended as you've put together some many different effects.  You can see
things first hand and are best place to work this out.  It could be
lighting, it could be back face culling, it could be an interaction with
the depth texture or shaders.

With convoluted combinations like these I generally find it's best to take
a big step back and try to work out what effects you are trying to achieve
and then work out what technique is most appropriate rather than try to fix
and convoluted and possibly misguided approach.

I expect the best solution for your applicaton is not to combine
ClipNode/osgShadow and osgFX all together, but to come up with your own
custom shader and multipass approach.  This might require a bit more intial
understanding of shaders and rendering techniques but will provide much
greater flexibility, performance and maintainability long term.

Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170914/7537ea3f/attachment.htm>


More information about the osg-users mailing list