how the kineme stereo patch can render the scene twice?

DanieleCiabba's picture

how the kineme stereo patch can render the scene twice?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

toneburst's picture
Re: how the kineme stereo patch can render the scene twice?

You can render more than one thing per-frame, behind the scenes. The Stereo Environment patch renders the geometry inside it once to an offscreen texture, then changes the viewport settings and renders to another texture. The two textures are then output to the two image output ports. If you think about it, that's what Quartz Composer is doing all the time. If you pass an image through a chain of effects, it applies one effect, then takes the result and applies the next, and so on, and it's only at the end of the chain that the final image is rendered to your screen.

I'm sure it's more complicated than that- I'm vague on the details myself, but that's the general idea.

a|x

gtoledo3's picture
Re: how the kineme stereo patch can render the scene twice?

I think that it executes both viewpoints simultaneously, not one then the other.

My understanding is that it executes each scene twice at the same time, and runs them both through what is analogous to the frustrum patch. It wouldn't quite be that one scene would be "normal" and the other would have modified viewport, both outputs have modified viewports.

Both output image ports on the stereo environment are live, whether or not both are being called on by a consumer patch; if a consumer calls for one side of the stereo environment to execute, then both ports become active (and "tool-tippable") in their output, not just one. I think in that way, layer order of l/r can not matter (which is good in this case), and everything can always look stereo/3d without timing getting out of whack or the image falling apart.

toneburst's picture
Re: how the kineme stereo patch can render the scene twice?

In OpenGL, you can't render more than one thing at a time, as far as I understand it. You have to render once, change settings, and render again. In terms of the per-frame output in QC, it's effectively rendering both views simultaneously, but in terms of what's going on behind the scenes, the two views are rendered consecutively. That's a gross oversimplification, but from my reading around OpenGL generally, that's how I think it works.

a|x