www.quadsoftware.com
FAQ  FAQ   Search  Search   Memberlist  Memberlist   Usergroups  Usergroups
Register  ::  Log in Log in to check your private messages


Post new topic  Reply to topic
 Multiple Camera support « View previous topic :: View next topic » 
Author Message
syedhs
PostPosted: Sun Aug 15, 2010 8:24 am    Post subject: Multiple Camera support Reply with quote



Joined: 10 Feb 2007
Posts: 11

My app currently has 3 cameras, and will soon be expanded to 5 Wink The problem is (I think you can guess what that is) the SDK source code only deals with one camera. How would you go about multiple camera?

I just started today and at first, I tried changing all reference to _ogre_camera in 'renderQueueStarted' to camera which was derived from the current viewport being rendered ie
Code:

Camera* camera = _scene_manager->getCurrentViewport()->getCamera

But it is not correct. I will still try to look around the code, but your assistance can be greatly of help especially if you know exactly which need to be changed...
Back to top
View user's profile Send private message
ALicu
PostPosted: Mon Aug 16, 2010 7:54 am    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

Hi,

Are you referring to Graphite support for Ogre3D? If so, Graphite can easily support multiple cameras. You will need to modify Ogre::Graphite class to support multiple cameras from Ogre (Ogre::Graphite is just an example how this integration can be done, you can extend it for your custom needs). Then just call iTerrainLib::ComputeVisibility and then iTerrainLib::Render for each camera. Graphite is low level library, so it doesn't have a camera support per se. You just have to use the engine specific camera support and provide Graphite with the proper frustum and camera position.

One thing that Graphite could have and it would help you in this, is the possibility to save the current visibility computation for later rendering. As it is now you will have to call ComputeVisibility and then immediately call Render to render it, you cannot interleave multiple compute visibility calls and then later render them separately.

Let me know if you can figure out how to deal with Graphite calls.

Regards,
Adrian L.
Back to top
View user's profile Send private message
syedhs
PostPosted: Mon Aug 16, 2010 4:25 pm    Post subject: Reply with quote



Joined: 10 Feb 2007
Posts: 11

Okay thanks. I am a little busy right now, but I will continue with this tomorrow - any update (or question) I will post back. Thanks again!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Based on a template by Dustin Baccetti
Powered by phpBB © 2001, 2005 phpBB Group