Re: [osg-users] [osgPlugins] How to add Animations stored in Fbx to another Fbx model
Big Thanks, it was the mergeModel-accept(famv); which i was missing. Now this Problem is solved! Thank you! Cheers, Michael -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54552#54552 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] FBX Texture not loaded when loading more than 50 different Models
Hi, we encountered another Problem with Textures. If i add more than 50 different Models (500 Polygons each,different Textures) only the first ~30 get their Texture. The other are added correctly, just their Textures are missing. I tried manipulating the Texturepool without succes. How can we fix this Problem? Thank you! Cheers, Michael -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54553#54553 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] FBX Texture not loaded when loading more than 50 different Models
Hi Michael, On 12 June 2013 09:28, Michael Borst mich...@jborst.de wrote: we encountered another Problem with Textures. If i add more than 50 different Models (500 Polygons each,different Textures) only the first ~30 get their Texture. The other are added correctly, just their Textures are missing. I tried manipulating the Texturepool without succes. How can we fix this Problem? What to do will depend upon what the actual problem is. There isn't any way for us to know exactly what the problem with so few details. All we know is that load too many models on a unspecified OS, on an unspecified hardware and drivers and unspecified version of OpenGL and OSG, with a program that we know little about other than it uses the OSG. The process to work out what the problem is would be: Loaded each of the models individually. Do they all work correctly? When you load the models together do you get any OSG or OpenGL errors? How large are the models with imagery? What hardware and OS do you have? What version of the OSG and version of OpenGL are you targeting? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osg::Text setText - changing text during rendering
Hi, I have problems with changing text during rendering. I am trying to change the text in the update callback of the text node, but sometimes I get a crash (operator not incrementable) in the osg::osgText. Here is what I do in the update callback (Call the updateText() function on a different object): Code: void PiMeasurementGeomCallback::update( osg::NodeVisitor* nv, osg::Drawable* geom){ if(textDirty){ textDirty = false; PiMeasurement* mes = dynamic_castPiMeasurement*(measurementGroup.get()); if(!mes) return; mes-updateText(); }; }; and here is the updateText() function: Code: bool PiMeasurementLine::updateText(){ double length = (_endPoint-_startPoint).length(); length = vectorAlongVector(PiSolidComponent::getv3(_movePlane),(_endPoint-_startPoint)); if(length/2-(20*ratio) 12*ratio){ textGeom-setAlignment(osgText::TextBase::CENTER_BOTTOM ); }else{ textGeom-setAlignment(osgText::TextBase::CENTER_CENTER ); } char s[20]; sprintf(s,%.2f,length); osgText::String str = osgText::String(s); textGeom-setText(str); / if I comment out this, I get no crash but I have to change the text anyhow textGeom-setPosition(PiSolidComponent::getv3(_movePlane)*(length/2)); return true; } The textGeom is actually the object where the update callback is attached(the same as in geom parameter of the update function), What is the correct way to change the text of an osgText::Text geometry? Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54556#54556 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg::Text setText - changing text during rendering - What is the correct way to change the text in osgText::Text?
Hi, Have you set the datavariance of the text to dynamic? Cheers, Pjotr -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54557#54557 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg::Text setText - changing text during rendering
Hi Peter, If you are getting a crash then it's likely running the viewer multi-threaded (the default if you are on a multi-core machine) so that you are updating the text at the same time it's being used in the draw traversal. The way to resolve this is to do text-setDataVariance(osg::Object::DYNAMIC); as this tells the draw traversal that you plan to modify it the next frame is held back until all the dynamic objects have been dispatched to OpenGL. Robert. On 12 June 2013 11:40, Peter Bako osgfo...@tevs.eu wrote: Hi, I have problems with changing text during rendering. I am trying to change the text in the update callback of the text node, but sometimes I get a crash (operator not incrementable) in the osg::osgText. Here is what I do in the update callback (Call the updateText() function on a different object): Code: void PiMeasurementGeomCallback::update( osg::NodeVisitor* nv, osg::Drawable* geom){ if(textDirty){ textDirty = false; PiMeasurement* mes = dynamic_castPiMeasurement*(measurementGroup.get()); if(!mes) return; mes-updateText(); }; }; and here is the updateText() function: Code: bool PiMeasurementLine::updateText(){ double length = (_endPoint-_startPoint).length(); length = vectorAlongVector(PiSolidComponent::getv3(_movePlane),(_endPoint-_startPoint)); if(length/2-(20*ratio) 12*ratio){ textGeom-setAlignment(osgText::TextBase::CENTER_BOTTOM ); }else{ textGeom-setAlignment(osgText::TextBase::CENTER_CENTER ); } char s[20]; sprintf(s,%.2f,length); osgText::String str = osgText::String(s); textGeom-setText(str); / if I comment out this, I get no crash but I have to change the text anyhow textGeom-setPosition(PiSolidComponent::getv3(_movePlane)*(length/2)); return true; } The textGeom is actually the object where the update callback is attached(the same as in geom parameter of the update function), What is the correct way to change the text of an osgText::Text geometry? Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54556#54556 ___ 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] Qt5 integration first try
Hi, in reference to my submission here: http://forum.openscenegraph.org/viewtopic.php?p=54555#54555 as I said, I simply submitted Vitezslavs patch. I can certainly try to remove the extra hooks from the osg main classes. The moveToThread command must be called with the Qt widget and the Qt graphics thread before makeCurrent is called the first time. Another thing I just realized: The code will only work when CMake option BUILD_OPENTHREADS_WITH_QT is set! Otherwise the static_cast in GraphicsWindowQt::moveToThread will fail. How can I solve this? For multithreading to work with Qt5 it seems we need the render threads to be QThreads. Maybe add a flag to OpenThreads/Config and #ifdef against that? Thank you! Cheers, Martin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54560#54560 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Qt5 integration first try
Hi Martin, On 12 June 2013 13:22, Martin Scheffler osgfo...@tevs.eu wrote: in reference to my submission here: http://forum.openscenegraph.org/viewtopic.php?p=54555#54555 as I said, I simply submitted Vitezslavs patch. I can certainly try to remove the extra hooks from the osg main classes. The moveToThread command must be called with the Qt widget and the Qt graphics thread before makeCurrent is called the first time. What does moveToThread do? Is it a form of release context? Under Windows the GraphicsWindowWin32::releaseContext() is implemented with a wglMakeCurrent(_hdc, NULL) while X11 has glXMakeCurrent( _display, None, NULL ). The release context is used to make sure that a thread no longer retain a context as being current, allowing it to be made current in another thread. Another thing I just realized: The code will only work when CMake option BUILD_OPENTHREADS_WITH_QT is set! Otherwise the static_cast in GraphicsWindowQt::moveToThread will fail. How can I solve this? For multithreading to work with Qt5 it seems we need the render threads to be QThreads. Maybe add a flag to OpenThreads/Config and #ifdef against that? Oh the joy of a windowing toolkit trying to do everything... It rather does seem like a lot of hoops to jump through, and that we'd need to compile the OSG against Qt, not just osgQt to get things to work. Perhaps one way round would be for osgQt to provide it's own OpenThreads integration, or perhaps for osgViewer to allow the osg::GraphicThread threads to be provided in an more user definable way. Where I'd like to get to is have the core OSG usable directly and independently from Qt, and only osgQt and the Qt examples requiring Qt or a specific version of Qt. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg::Text setText - changing text during rendering - What is the correct way to change the text in osgText::Text?
Hello Robert and Pjotr. Actually, I was sure that the data variance is set to Dynamic. But now after a closer look I've found out that instead of text-setDataVariance(DYNAMIC); I wrote this-setDataVariance(DYNAMIC); Thanks to you I've found the problem! Have a nice day and thank you very much! Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54563#54563 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Deprecating vertex indices in osg::Geometry
Hi All, After brief foray back to do some client work and merging submissions I have returned to looking at the new cleaned up Geometry and a GeometryDeprecated fallback implementation. Currently I'm doing a experimental build of the OSG with GeometryNew now named Geometry, and the old Geometry renamed GeometryDeprecated. Most of the core OSG classes and plugins have ported across pretty easily, in many cases the code has now become simpler because there osg::Geometry now is also using fast paths and there are no indices to worry about. Sticking points will be the .osg, .ive and new serializers as they are all built around there been indices to read and write. I don't know yet how to tackle this so I'm going to try and get the rest of the OSG built against Geometry/GeometryDeprecated before returning to how to tackle the native OSG file formats. I'll keep you all updated on how things progress. Fingers crossed the bulk of the core OSG work related to these changes will be checked in this week. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Vec{2,3,4}{b,s,i,f,d,ub,us,ui} harmonisation
Hi Robert, Hi All About Vec{2,3,4]{b,s,i,ub,us,ub}, I think we need to do a code harmonisation of all this header to provide - operator + - * / += -= *= /= (value_type) - operator + - += -= (vec_type) - operator -() for signed type - componentMultiply, componentDivide - swizzle, this meen 256 possible functions for Vec4, 512 possible functions for xyzw and rgba combinaison - constructor like in GLSL : Vec4(Vec2, Vec2) or Vec4(float, Vec2, float) or Vec4(float, Vec3), - use of template thoughts ? David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Vec{2,3,4}{b,s,i,f,d,ub,us,ui} harmonisation
forgot [osg-users] in Object Hi Robert, Hi All About Vec{2,3,4]{b,s,i,ub,us,ub}, I think we need to do a code harmonisation of all this header to provide - operator + - * / += -= *= /= (value_type) - operator + - += -= (vec_type) - operator -() for signed type - componentMultiply, componentDivide - swizzle, this meen 256 possible functions for Vec4, 512 possible functions for xyzw and rgba combinaison - constructor like in GLSL : Vec4(Vec2, Vec2) or Vec4(float, Vec2, float) or Vec4(float, Vec3), - use of template thoughts ? David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Qt5 integration first try
Hi Martin, in reference to my submission here: http://forum.openscenegraph.org/viewtopic.php?p=54555#54555 as I said, I simply submitted Vitezslavs patch. I can certainly try to remove the extra hooks from the osg main classes. The moveToThread command must be called with the Qt widget and the Qt graphics thread before makeCurrent is called the first time. Maybe there is a way to achieve multithreaded rendering in a non-intrusive way by simply calling both new members (moveToThread and moveBack) from GraphicsWindowQt itself. We could overload GraphicsContext::setGraphicsThread and GraphicsContext::releaseContextImplementation with something like this: void GraphicsWindowQt::setGraphicsThread(osg::GraphicsThread* gt) { if (gt) { moveToThread(gt); } osgViewer::GraphicsWindow::setGraphicsThread(gt); } bool GraphicsWindowQt::releaseContextImplementation() { existing stuff here ... // move context back to main thread if (_widget-context()-thread() != qApp-thread()) { moveBack(); } return result; } Of course, setGraphicsThread should be made virtual if not already. Another thing I just realized: The code will only work when CMake option BUILD_OPENTHREADS_WITH_QT is set! Otherwise the static_cast in GraphicsWindowQt::moveToThread will fail. How can I solve this? For multithreading to work with Qt5 it seems we need the render threads to be QThreads. Maybe add a flag to OpenThreads/Config and #ifdef against that? Flag is ok ... or maybe we could add new api to OT, an api that can return string like qt, win32, pthreads, sproc, c++11... , benign but useful ... Robert Milharcic ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Vec{2,3,4}{b,s,i,f,d,ub,us,ui} harmonisation
Hi, I think this is a really interesting idea. Have a look here : http://glm.g-truc.net/ This library already implements a lot of glsl-like syntax. Before rewriting everything (that's not complex, but a lot of work) maybe we could make osg and glm work together ? Maybe adding to glm headers the needed methods to be compatible with osg code ? or copy-paste some code from glm to osg ? (license is MIT, so I think that's ok) Thank you! Cheers, Aurelien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54573#54573 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Vec{2,3,4}{b,s,i,f,d,ub,us,ui} harmonisation
Forgotten link from previous message : http://devmaster.net/forums/topic/10009-swizzle-operator-in-c/ = interesting ideas on how to implement developper friendly but asm efficient swizzle in C++ -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54574#54574 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] hello
http://www.jans.com.au/wsjgcsjia.php___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Vec{2,3,4}{b,s,i,f,d,ub,us,ui} harmonisation
Those implementations are truly ugly. 2013/6/13 Aurelien Albert aurelien.alb...@alyotech.fr Forgotten link from previous message : http://devmaster.net/forums/topic/10009-swizzle-operator-in-c/ = interesting ideas on how to implement developper friendly but asm efficient swizzle in C++ -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=54574#54574 ___ 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