Hi,

On 06/12/2011 04:47, bart gallet wrote:
Hi Chris

Thanks for your reply.

Yeah, it definitely feels like an off-road excursion ;) Last time I
used OSG was when you still had to use Performer.

I am trying to simulate a bunch of autonomous systems/agents that use
cameras to control their actions (they can see each other, the
environment, etc.). Each agent runs on a separate thread, and needs
to render the scene according to its own point of view.

Must rendering happen in parallel, or just the processing by each agent?

I have three different rendering requirements:

1) Each agent must render their camera according to their POV at each
instant and simultaneously. This rendering must be performed
off-screen because their images are meant for processing by each
agent's control system and are thus not intended for human eyes. This
has not yet been implemented - I was planning on using a viewer in
each agent's thread that renders to a pBuffer.
You can consider FBOs and read back to CPU as well. Having many viewers means that you have a copy of all scene elements per agent. You can use a viewer with as many FBO cameras as you need, these can then share the scene elements. You can sync the generation of the FBO textures using a concurrent queue per agent.


2) General overview view Display (for human eyes only): Here I want
to render the scenery for general visualization where I can chose any
vantage point. I have this working, as a viewer in my main thread.

3) Agent view Display (for human eyes only): Here I want to select an
agent and see its camera feed. I was thinking of using one viewer
here and then when selecting an agent to see its POV, I would slave
the viewer's camera with the viewer in the agent's thread - it's here
where things are going wrong.
If you use FBOs you can just select the texture for the agent you want and place it as a texture on a quad in the main camera.


As you correctly inferred, I am a bit lost because I assumed that for
each agent's camera view I must instantiate a separate viewer and I
was doing this in each agent's thread.

If you have any good advice for me, I certainly would greatly
appreciate it!
One other thing you can try is force the viewer(s) to execute single threaded and see if it makes a difference.

rgds
jp



Cheers, bart

------------------ Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44226#44226





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


--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.

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

Reply via email to