[osg-users] position list
Hi, I just saw setPosition() from OSG Billboard, what is the _positionList for? why define multiple positions for a Billboard? For what could you use multiple Positions? Cheers, David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] seg fault with text-setText(mystring) called in NodeCallback
Hi Robert, i have tested you tip, but it in my case it seems not to work. I only call the setText() method via my NodeVisitor, also run the viewer in SingleThreaded mode, and set text-setDataVariance(osg::Object::DYNAMIC). what else could be wrong? David Hi David, Best guess would be that you are running the viewer multi-threaded (it's default if you have a multicore processor) and the update traversal to the text is occurring at the same time as the draw traversal that is reading. The solution is to tell the scene graph that you plan to dynamically update the text object so that it knows not to overlap the update/event and draw traversals. You can do this by using text-setDataVariance(osg::Object::DYNAMIC); Robert. On 10 January 2013 16:41, DavidHornung horn...@googlemail.com wrote: Hello, i have a seg fault because the osgText::Text::setText(std::string) is not thread-save. It appears from type to time Why get I this seg fault sometimes? I have the following setup class ObjectGroup : public osg::Group { ... ObjectGroup() { ... text = osgText::Text; this-addChild(text); this-setUpdateCallback(new ObjectNodeCallback); } //called from NodeCallback void updateText() { text-setText(myText); } private: osgText::Text text; std::String myText; ... }; class ObjectNodeCallback : public osg::NodeCallback { //override operator ()(osg::Node* node, osg::NodeVisitor* nv) { osg::ref_ptrObjectGroup obj = dynamic_castObjectGroup*(node); obj-updateText(); traverse(node, nv); } }; Cheers, David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] getting eye- up- and center-vector from viewer with trackballmanipulator
Hello, i am able to read my eye- up- and center-vector from my json config file an set this to homeposition from trackball manipulator. How Can I save/print the acutal values if i changes the view with the mouse? Cheers, David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] getting eye- up- and center-vector from viewer with trackballmanipulator
thank you, that was it ! Have you tried with viewer.getCamera()-getViewMatrixAsLookAt(eye, angle, up) ? Carlos On 10 January 2013 10:04, DavidHornung horn...@googlemail.com wrote: Hello, i am able to read my eye- up- and center-vector from my json config file an set this to homeposition from trackball manipulator. How Can I save/print the acutal values if i changes the view with the mouse? Cheers, David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Trackball Manipulator change FOV
Hello, please correct me if I should be false. With the trackball manipulator i can change the UpVector, the Position, and the Point the camera is looking at. Can I Also change the Perspective Projection Matrix, espacially the vertical FOV ? Thank you! David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] seg fault with text-setText(mystring) called in NodeCallback
Hello, i have a seg fault because the osgText::Text::setText(std::string) is not thread-save. It appears from type to time Why get I this seg fault sometimes? I have the following setup class ObjectGroup : public osg::Group { ... ObjectGroup() { ... text = osgText::Text; this-addChild(text); this-setUpdateCallback(new ObjectNodeCallback); } //called from NodeCallback void updateText() { text-setText(myText); } private: osgText::Text text; std::String myText; ... }; class ObjectNodeCallback : public osg::NodeCallback { //override operator ()(osg::Node* node, osg::NodeVisitor* nv) { osg::ref_ptrObjectGroup obj = dynamic_castObjectGroup*(node); obj-updateText(); traverse(node, nv); } }; Cheers, David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] combine TrackballManipulator and setViewMatrixAsLookAtsetProjectionMatrixAsPerspective
Hello, I set up the camera from my viewer with setViewMatrixAsLookAt(...) and setProjectionMatrixAsPerspective(...). If I add now a TrackballManipulator to the viewer, the Configuration from these camera disapperas. Is there a opportunity to set a start Value for the trackball camera? Cheers, David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] combine TrackballManipulator and setViewMatrixAsLookAtsetProjectionMatrixAsPerspective
Thank you, i didn't see that function how can I save / print the actual position of the TrackballManipulator? Do have I all free-grades (Freiheitsgrade) with the TrackballManipulator? Can I do the same like with setViewMatrixAsLookAt(...) and setProjectionMatrixAsPerspective(...) ? David. Hi David, On 9 January 2013 16:00, DavidHornung horn...@googlemail.com wrote: I set up the camera from my viewer with setViewMatrixAsLookAt(...) and setProjectionMatrixAsPerspective(...). If I add now a TrackballManipulator to the viewer, the Configuration from these camera disapperas. Is there a opportunity to set a start Value for the trackball camera? Use TrackballManipulator::setHomePosition() Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] mapping to video koordinate system
Hello, how can I map a rectangle in my osg world on a rectangle with the same size in a Video? The Video is behind the OSG Scene. Cheers, David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] transparent objects in front of video in camera node with POST RENDER
Hello, I implemented the example from the book OSG3 Cookbook where is described how to play a Video in background of a 3D Scene. There they used POST_RENDER to achieve the behind effekt. Is it so possible to use BLEND in this setup, so that a 3D Object is semitransparent to the Video ? Cheers, David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] mapping to video koordinate system
Hi, for example: I have a video of a football game, the teal camera always stays in its place and force the same point. Now I want to add a virtual football field on the one in the video. So how can i get the camera parameters the real camera had(unknown) for my virtual camera so that their views fit together? Which techniques are there? Hope now it is more clear Cheers, David Am 07.01.2013 15:43, schrieb Robert Osfield: Hi David, On 7 January 2013 11:21, DavidHornung horn...@googlemail.com wrote: how can I map a rectangle in my osg world on a rectangle with the same size in a Video? The Video is behind the OSG Scene. Probably solve this in a similar way to one would answer the generic question how long is a piece of string? The bottom line is we can't answer you question as it's too open ended. Is you OSG world a 3D one, an perspective or orthographic one? When you say rectangle in my OSG world, what exactly do you mean? What about the rectangle in the video, is the dimensions of the vedeo frame or a rectangle that is within the video image? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] transparent objects in front of video in camera node with POST RENDER
Hi, thank you for the tip, but now I have the Effekt that my transparent object is first transparent to the video and then gets its full color, like the color gets added each time David. Hi David, If you want to blend the 3D objects ontop of a background image/video then the best way would be to change the background Camera RenderOrder to PRE_RENDER and disable the clear of the colour buffer for the main Camera so that is doesn't overwrite the background. Robert. On 7 January 2013 13:37, DavidHornung horn...@googlemail.com wrote: Hello, I implemented the example from the book OSG3 Cookbook where is described how to play a Video in background of a 3D Scene. There they used POST_RENDER to achieve the behind effekt. Is it so possible to use BLEND in this setup, so that a 3D Object is semitransparent to the Video ? Cheers, David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] multiple POST RENDER cameras
Hello, i looked for HUD and how to implement them. I also want to play a video behind the 3D scene which could also be done with POST RENDER. Is is it possible to play Video as background image (like described in the two available OSG books) then post render the 3D Scene with POST_RENDER and after that render the semi-transaprent HUD (with texts etc) POST_RENDER ? Cheers, David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgmovie receive stream
Any Suggestions? is it possible to receive a network video stream ? Hello, is it possible to play a received stream with the ffmpeg osg plugin? Since it is possible to read from /dev/video0 it should, or? Cheers, David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgmovie receive stream
Hello, is it possible to play a received stream with the ffmpeg osg plugin? Since it is possible to read from /dev/video0 it should, or? Cheers, David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] gluDisk - how with OSG?
Hi, Thanks, that would be an solution, but a disk is defined to have a hole in the middle, how to get this? cheers, David Hi David, I don't know if it is the best solution, but you can use an osg::Drawable using an osg::Cylinder with low height as shape. Cheers, Carlos On 10 December 2012 08:46, DavidHornung horn...@googlemail.com wrote: Hello, in OpenGL i used gluDisk to drow a disk - how to do it in OSG cheers, David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] gluDisk - how with OSG?
Hello, in OpenGL i used gluDisk to drow a disk - how to do it in OSG cheers, David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] timestamp in movie
Thank you, i use ffmpeg, it is implemented. How to set the Video to this position? cheers, David Hi David, Am 07.12.12 09:53, schrieb DavidHornung: Currently I am playing around with example osgmovie how is it possible to get the timevalue of a video from the start of the video to now ? what about osg::ImageStream::getCurrentTime() ? May not be implemented by all movie-plugins. cheers, Stephan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] example osgmovie play videos example osgprerender does not
Hello, I compiled OpenSceneGraph-3.1.3 with ffmpeg-0.8 and as mentioned in the subject, the example osgmovie works but the osgprerender does not play any videos, just the flag with the model appears. I called === ./osgmovie -e ffmpeg ~/movie.avi === and === ./osgprerender -e ffmpeg PATH_TO_OSG_DATA/cessna.osg ~/movie.avi === my system is Debian, graphic card is nVidia GT 218 [GeForce 210] Cheers, David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgmovie seek/jump
Hello, I am playing around with the osgmovie with ffmpeg example and was not able to seek with '' or to increase/decrease the speed with ± in the osgmovie examle from version 3.0.1 from July. I would like to know if it is possible now to jump to a specific position of videofile by an exact time value ? Thank You, hornuda ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgmovie seek/jump
Hi Stephan, thank you for you advice, so is does it also depend on the module to get the actual position when playing a Video? btw: Is it possible to receive videostreams? which plugins support this? Cheers, David Hi David, Am 29.11.12 13:55, schrieb DavidHornung: I am playing around with the osgmovie with ffmpeg example and was not able to seek with '' or to increase/decrease the speed with ± in the osgmovie examle from version 3.0.1 from July. I would like to know if it is possible now to jump to a specific position of videofile by an exact time value ? This functionality depends on the used plugin. avfoundation/qtkit can seek to a specific time, or change the playback-speed. Don't know if the ffmpeg plugin can do this, have a look at the code ;-) cheers, Stephan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgmovie seek/jump
Hello, I am playing around with the osgmovie with ffmpeg example and was not able to seek with '' or to increase/decrease the speed with +/- in the osgmovie examle from version 3.0.1 from July. I would like to know if it is possible now to jump to a specific position of videofile by an exact time value ? Thank You David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org