Hi Allen,
On Sun, 2005-07-24 at 15:17 -0500, Allen Bierbaum wrote:
> I have ran into an interesting little problem/bug/annoyance.
>
> I am writing some code where I need to render the same scene multiple
> times. The first time I just need the z-buffer of the scene and then
> next time I need the entire scene as "normal". Trying to be a little
> intelligent about this it was suggested to me that I should rendering
> the first copy of the scene with materials "dis-abled" by using a
> material group at the top of the scene with an empty material. (this
> should make the render action just render the geometry without an
> materials).
OK.
> Well, this did not work out so well.
>
> The path I decided to take for this was to just take my normal scene
> root and then add a new material group as a parent. In the first pass I
> would render the scene using the material group parent. Then the next
> pass I would manually tell the viewport to use the normal scene root.
>
> Well, anyway, I didn't get far. It seems that there is a bug so that
> even if you are rendering for the normal scene root but it has a parent
> that is a material group, the scene does not get rendered. For example,
> if you add the following code at the end of the 10loading.cpp tutorial,
> you will get a black screen. (this probably works in a number of other
> tutorials too).
...
>
> Anyone have an idea why this happens?
Yup. The problem is that there can be only one parent, and the SSM needs
to add the headlight and some other helper Nodes to the graph, so it
attaches the root you give it to this internal root.
Now when you attach that Node to another Node it gets disconnected from
the internal SSM root and therefore is not rendered any more.
You will have to add it to your MGroup for rendering for the first pass,
and disconnect it (and make it the root) for the other passes.
That's just a side effect of using the SSM, if you manage the viewport's
graph yourself you can do it.
Hope it helps
Dirk
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users