On 22. Jul 2011, at 16:16, Michael Pope [via Software] wrote:
> Aside from the fact that the clip planes are hardcoded to -1,1, I suppose
> that is sort of what I want.
Then use getScreenFrustum, modify it and apply it yourself.
> Again, I'm very new to this and Equalizer has a bit of learning curve. The
> problem I'm facing is that my engine allows the user to animate the FOV and
> clip planes of the camera (frustum) as well as toggle betwixt ortho and
> perspective projections on a whim (the engine can compose multiple scenes.
> These scenes may use a heterogeneous mix of ortho and perspective cameras).
This only makes sense on planar projections, i.e., Desktop windows and display
walls. As said, use the View's frustum to override the underlying
canvas/segment frustum.
> I've figured out how to adjust ortho matrix using the config file - using the
> wall's bottom_left, top_left, bottom_right vectors. Of course, this then
> leads to a ridiculously large frustum when switching over to a perspective
> projection.
If you use Channel::getOrtho and getPerspective, the frustum is the same for
object lying in the focal plane. I suggest reading
http://www.equalizergraphics.com/documents/design/immersive.html. An ortho
frustum is calculated by Eq to have the size of the focal plane.
> Again, I may be approaching this all wrong and/or it may not be possible. For
> now, I can live with not being able to modify the FOV for perspective
> projections on the fly (i.e. it is set in the config file and that's it).
> What I really need to be able to do is toggle betwixt ortho and perspective.
See Channel::useOrtho() and the 'o' key command in eqPly:
* Select perspective or orthographic rendering.
*
* Influences the behaviour of getFrustum, getHeadTransform and the
* corresponding apply methods in eq::Channel. Intended to be
* overwritten by the implementation to select orthographic rendering.
Furthermore you probably want to do view->setWall() from the application's
event handling.
> Would this be done using multiple layouts? That way, when the user puts the
> camera in perspective mode I would switch over to the perspective layout?
Your call. It's per channel, so typically you would implement it as a global or
per-view flag.
Cheers,
Stefan.
--
View this message in context:
http://software.1713.n2.nabble.com/Modifying-a-channels-view-frustum-tp6604275p6610872.html
Sent from the Equalizer - Parallel Rendering mailing list archive at Nabble.com.
_______________________________________________
eq-dev mailing list
[email protected]
http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com