Re: [osg-users] snapshot with fixed size

2014-04-18 Thread xbee

Le 18/04/2014 18:53, Robert Osfield a écrit :

HI Fabrice,

On 18 April 2014 17:14, F Lallauret
fabrice.lallau...@fr.thalesgroup.com wrote:

I've used the main camera (viewer camera) as a RTT camera for the scene rendering and I 
display it on a quad geometry with a second HUD camera. Then, I've added a 
shader on quad geode. Is it clear enough? (English isn't my native langage :))

This setup does make it a bit more awkward to just drop in a new
Camera to drop in a screen shot at an arbitrary size.  What you'll
need to do is replicate the RTT and HUD Camera's for the purpose of
the screenshot and have both these Camera's togged on/off.

Robert.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



I'll give it a try with this solution, thank you again.
Fabrice

--
My personnal (french) Websites: http://www.xbee.net
and http://thehive.xbee.net


---
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce 
que la protection avast! Antivirus est active.
http://www.avast.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] snapshot with fixed size

2014-04-16 Thread xbee

Le 16/04/2014 18:42, Peter Bako a écrit :

Hello Flallaur.

Try to use the osgPoster example. It can create screenshots with any size. I was recently 
doing a very similar thing and osgPoster helped me much. I don't know how will it act 
with your night vision but I would definitely give it a try.



Thanks for your response Peter.
So I need to create another viewer for that, I had hoped to use a second 
buffer RTT or something similar but I did not succeed to get a correct 
size or a valid postprocessed image. I will have a look to osgPoster ...


Regards


--
My personnal (french) Websites: http://www.xbee.net
and http://thehive.xbee.net


---
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce 
que la protection avast! Antivirus est active.
http://www.avast.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] update callback with multiple node path

2011-11-19 Thread xbee

Le 18/11/2011 10:21, Vincent Bourdier a écrit :

Hi,

The update callback is done to be updated each frame in the traverse() 
method.

Rewriting it is necessary to update it.
So add a callback on the decorator and update it in traverse() method.

Regards,
Vincent

Hi Vincent,
I've already rewrited the traverse function of my decorator to allow the 
updating of my shader but I don't understand why the update callback 
isn't called automatically.
If the node1 has only one parent, the decorator node, the update 
callback works but if the node1 has two parents, the root and the 
decorator nodes, the update callback isn't called. Why ?


Regards

Fabrice



Le 18/11/2011 09:39, xbee a écrit :

Hi all,
I'm trying to make blinking a part of my scene by adding a 
decorator node (a group node with a shader) like this:


Original graph

 root

  |
   _ _

   | |

node1   node2


decorated graph

 root

  |
   _  _   _

   |  |   |
 deco | node2
 \|
  node1


So I add a deco node to the graph and add the node1 as child of deco 
node.
Everything seems ok, my node1 is colored as needed by when I try to 
animate the decorator (add an update callback to the uniform , to the 
stateset or to the group node with a color change) nothing is 
updated, the callback isn't called.
So, is there some restrictions on the update callback call ? A way to 
force the update ?  Currently, I've found a workaround by rewriting 
the traverse function in my decorator node, but I am not very happy 
with this solution.



Fabrice





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] update callback with multiple node path

2011-11-18 Thread xbee

Hi all,
I'm trying to make blinking a part of my scene by adding a decorator 
node (a group node with a shader) like this:


Original graph

 root

  |
   _ _

   | |

node1   node2


decorated graph

 root

  |
   _  _   _

   |  |   |
 deco | node2
 \|
  node1


So I add a deco node to the graph and add the node1 as child of deco node.
Everything seems ok, my node1 is colored as needed by when I try to 
animate the decorator (add an update callback to the uniform , to the 
stateset or to the group node with a color change) nothing is updated, 
the callback isn't called.
So, is there some restrictions on the update callback call ? A way to 
force the update ?  Currently, I've found a workaround by rewriting the 
traverse function in my decorator node, but I am not very happy with 
this solution.



Fabrice




___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Off-screen rendering

2008-04-28 Thread xbee
nicolas peña a écrit :
 This sound like if your hardware / driver does not support pbuffers,
 I have used similar  code in the past and it worked for me.

 Cheers,

   Nicolas

 2008/4/28 Tessier, Philip [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED]:


I've the same issue if I don't create a viewer before. With this 
technique, we need a viewer and we have a blink on the screen when the 
snapshot is done :(

Cheers


-- 
_
   /_/_  .'''.
=O(X ...' `.
   \_\  `..'''
  `..'
Power corrupts. PowerPoint corrupts absolutely.
My personnal (french) Websites: http://www.xbee.net
and http://www.french-comics-zone.fr.st 

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Off-screen rendering

2008-04-27 Thread xbee
Tessier, Philip a écrit :
 My attempt to use createGraphicsContext() to create an off-screen
 rendering context is failing.  (It's returning NULL.)

 I'm using Win32.

 What am I missing?

 I have added the following to my code:
 osg::GraphicsContext * GetOffscreenGraphicsContext(
   unsigned a_tex_width,
   unsigned a_tex_height
   )
 {
   osg::ref_ptrosg::GraphicsContext::Traits traits=new
 osg::GraphicsContext::Traits;

   traits-width = a_tex_width;
   traits-height = a_tex_height;
 //traits-doubleBuffer = true;
   traits-pbuffer = true;

   osg::ref_ptrosg::GraphicsContext
 gc=osg::GraphicsContext::createGraphicsContext(traits.get());
   // TODO: Above returning NULL!

   return gc.get();
 }

 with the following to hook it in:
   // Setup camera for off-screen rendering.
   osg::ref_ptrosg::GraphicsContext gc=
 GetOffscreenGraphicsContext( tex_width, tex_height);
   camera-setGraphicsContext(gc.get());

 Thanks,
 Phil
   

Hi,
Found any solution ? I've the same problem, I have a previous solution 
with Producer but I want to port my snapshot application to 2.4 release 
and I can't save any image without a viewer. Anyone have a solution ?

Thanks

-- 
_
   /_/_  .'''.
=O(X ...' `.
   \_\  `..'''
  `..'
Power corrupts. PowerPoint corrupts absolutely.
My personnal (french) Websites: http://www.xbee.net
and http://www.french-comics-zone.fr.st 

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org