On Fri, Oct 26, 2012 at 3:57 PM, Glenn Waldron <[email protected]> wrote:

>
>
>>
> Right. So for multipass in general, you have a root node; then under that
> node there is one Group node per pass; then all these Group nodes share a
> common child (the geometry to render). Each per-pass Group node can hold a
> unique StateSet that assigns the proper texture, etc.
>

Very clever. Thanks for sharing


>
> Since you will also need to use the TexGen capabilities (discussed earlier
> in this thread) to generate the correct texture coordinates for each pass,
> you might use an osg::TexGenNode in place of the osg::Group. TexGen will
> generate the UV coordinates for you.
>

I don't think so, as I already have the UV coordinates. I calculate them
myself in order to allow for camera lens distortions and such. I think that
TexGen (EYE_LINEAR) mentioned previously assumes a plain pinhole camera
model without regarding effects from lens distortion.


> You might also look at the osgFX::Effect class. This is a framework for
> rendering a subgraph multiple times (multipass), using a separate StateSet
> for each pass (just what I described above) so it might be a good fit, or
> at least good reference material.
>

Sounds good, just the name (Effect) puzzles me. From looking at the
documentation it seems that actually a lot of effects such as outlines,
glow etc are done with that.

Best,
Christoph
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to