Re: [osg-users] Screeshots from multiple cameras/views

2010-06-25 Thread Ricky Flintoff
Tom Pearce wrote: Ricky, Based on the code you posted, you're taking a screenshot every frame - and from the same position, no less. You're creating the same matrix each time, and thus setting the view matrix to be identical each frame. Then you're doing file I/O that is the exact

Re: [osg-users] Screeshots from multiple cameras/views

2010-06-25 Thread Ricky Flintoff
Hi Robert, robertosfield wrote: Hi Ricky, On Tue, Jun 22, 2010 at 3:54 AM, Ricky Flintoff wrote: Thank you very very much for your suggestion! I actually ran into another problem with the code. I tend to get segmentation faults. My idea was to take multiple pictures as I changed

Re: [osg-users] Screeshots from multiple cameras/views

2010-06-22 Thread Robert Osfield
Hi Ricky, On Tue, Jun 22, 2010 at 3:54 AM, Ricky Flintoff rickyflint...@gmail.com wrote: Thank you very very much for your suggestion! I actually ran into another problem with the code. I tend to get segmentation faults. My idea was to take multiple pictures as I changed the position of my

Re: [osg-users] Screeshots from multiple cameras/views

2010-06-21 Thread Ricky Flintoff
Hi, As a solution, I decided to change the viewpoint of the camera and then take pictures as I change the viewpoint. However, with the code I have, it's really slow (cow rotates very slowly) Any suggestions or ways I can over come this problem? Code: //capture an image of the scenegraph

Re: [osg-users] Screeshots from multiple cameras/views

2010-06-21 Thread Robert Osfield
Hi Ricky, You are doing two things that are very expensive - reading back from GPU and writing to disk. You can help lower the cost of GPU read by using double buffer of PBO, and the cost of writng to disk by using a separate thread. Both topics aren't straight forward and pretty advanced

Re: [osg-users] Screeshots from multiple cameras/views

2010-06-21 Thread Ricky Flintoff
Hi, Thank you very very much for your suggestion! I actually ran into another problem with the code. I tend to get segmentation faults. My idea was to take multiple pictures as I changed the position of my camera. Any way I can get rid of these seg faults? Thank you! Cheers, Ricky

Re: [osg-users] Screeshots from multiple cameras/views

2010-06-21 Thread Tom Pearce
Ricky, Based on the code you posted, you're taking a screenshot every frame - and from the same position, no less. You're creating the same matrix each time, and thus setting the view matrix to be identical each frame. Then you're doing file I/O that is the exact same too. When I ran your