Re: [osg-users] Numerous [ Topic is awaiting approval ] Posts
Hi, I noticed Art by mail today, also encouraged people to participate in moderation. I'm trying to flush as many as possible posts waiting for approval, but since I'm not an OSG active user I cannot be enough active here to make it work as expected. Waiting for Art having some time to spend on this... Cheers, Vincent -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=58338#58338 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Requesting forum access and approval
Hi, Sorry, the moderation team approves the topics for each new users on their free time, and according to the holidays and personal time usage, sometimes moderation is very late. I'm trying to be more efficient... Cheers, Vincent -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52127#52127 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Node Callback never called
Hi, I'm currently having some troubles in my code that I didn't understand. Some help would be very apreciated : I have a nodeCallback to animate a shader. I set this callback as nodeCallback on a geode that is displayed, but the callback operator() is never called. I set the same callback as CullCallback on the same geode, now it works. Maybe this is something very simple, but after a day on this issue I'm getting mad. Thanks for your help. Regards, Vincent. -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Node Callback never called
Hi, Nice idea, but there is no other callback antwhere in the code, so i don't think so. thanks, Vincent. Le 23/08/2012 08:55, Stephan Huber a écrit : Hi, any chance there's another updatecallback attached to one of the geode's parents and it is missing a traverse(node, nv) ? cheers, Stephan Am 23.08.12 08:42, schrieb Vincent Bourdier: Hi, I'm currently having some troubles in my code that I didn't understand. Some help would be very apreciated : I have a nodeCallback to animate a shader. I set this callback as nodeCallback on a geode that is displayed, but the callback operator() is never called. I set the same callback as CullCallback on the same geode, now it works. Maybe this is something very simple, but after a day on this issue I'm getting mad. Thanks for your help. Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Node Callback never called
Hi, I don't think, there are mutiple camera, for HUD, but the graph is attached to the main one. Regards, Vincent. Le 23/08/2012 10:28, Sergey Polischuk a écrit : Hi iirc update traversals (and may be event traversals too) dont traverse subgraphs under nested cameras. Is it your case? Cheers. 23.08.2012, 11:09, Vincent Bourdier vincent.bourd...@gmail.com: Hi, Nice idea, but there is no other callback antwhere in the code, so i don't think so. thanks, Vincent. Le 23/08/2012 08:55, Stephan Huber a écrit : Hi, any chance there's another updatecallback attached to one of the geode's parents and it is missing a traverse(node, nv) ? cheers, Stephan Am 23.08.12 08:42, schrieb Vincent Bourdier: Hi, I'm currently having some troubles in my code that I didn't understand. Some help would be very apreciated : I have a nodeCallback to animate a shader. I set this callback as nodeCallback on a geode that is displayed, but the callback operator() is never called. I set the same callback as CullCallback on the same geode, now it works. Maybe this is something very simple, but after a day on this issue I'm getting mad. Thanks for your help. Regards, Vincent. ___ 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] Node Callback never called
Snippet There is not const, isn't it ? Snippet virtual void operator()(osg::Node* node, osg::NodeVisitor* nv); Vincent. Le 23/08/2012 14:30, Jeremy Moles a écrit : Is your method declared as const? I always forget that... On Aug 23, 2012 8:28 AM, Vincent Bourdier vincent.bourd...@gmail.com mailto:vincent.bourd...@gmail.com wrote: Hi, I don't think, there are mutiple camera, for HUD, but the graph is attached to the main one. Regards, Vincent. Le 23/08/2012 10:28, Sergey Polischuk a écrit : Hi iirc update traversals (and may be event traversals too) dont traverse subgraphs under nested cameras. Is it your case? Cheers. 23.08.2012, 11:09, Vincent Bourdier vincent.bourd...@gmail.com mailto:vincent.bourd...@gmail.com: Hi, Nice idea, but there is no other callback antwhere in the code, so i don't think so. thanks, Vincent. Le 23/08/2012 08:55, Stephan Huber a écrit : Hi, any chance there's another updatecallback attached to one of the geode's parents and it is missing a traverse(node, nv) ? cheers, Stephan Am 23.08.12 08:42, schrieb Vincent Bourdier: Hi, I'm currently having some troubles in my code that I didn't understand. Some help would be very apreciated : I have a nodeCallback to animate a shader. I set this callback as nodeCallback on a geode that is displayed, but the callback operator() is never called. I set the same callback as CullCallback on the same geode, now it works. Maybe this is something very simple, but after a day on this issue I'm getting mad. Thanks for your help. Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org mailto:osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org mailto: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] [forum] robotic arm problem
Hi, Please have a look in osg example, there is one about robot using transforms if I'm not wrong. Thank you! Cheers, Vincent -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49375#49375 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] robotic arm problem
Topic moved to General forum, OSG [Forum] section is to talk about the forum, not technical questions about OSG. Hi, I don't understand what I'm supposed to see on your picture. If the rotation is not good, mabe check the rotation center : the center 0,0,0 in he object coordinate frame. Thank you! Cheers, Vincent -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49381#49381 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Tree Rendering system based on OpenSceneGraph
Hi, Sorry I did not understood that this document was a final choice. I'm interested in L-Systems more in than tree generation, so I don't think it will be interesting to work together. Good luck. Cheers, Vincent -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=48705#48705 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Tree Rendering system based on OpenSceneGraph
Hi, I'm interested in procedural generation, more precisely in L-Systems (base system of fractals). I'd be interested to work on something like tree generation. I also have some LOD / pagedLOD experiences. Does this project is a personal one ? something industrial ? Regards, Vincent -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=48675#48675 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How do I calcuate angles between two points?
Hin Dan, Makerotate will compute a rotation from front vector P1 to front vector P2. You can decompose the Quat after if you need the angles. Regards, Vincent. Le 13/06/2012 17:29, dan marshal a écrit : Hi, My model is at point 2 and I want to rotate it to face Point 1. Point 1 = 30,30,30 Point 2 = 10, 10, 0 How can I calculate the respective angles between two locations? I am familiar with makeRotate and makeLookAt but need the respective angles... Thank you for help on this simple question. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=48282#48282 ___ 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] [ANN] Looking for forum moderators and administrators
Hi Art, I could be interested to be a moderator. I've already been administrator and moderator on little privates forums in French a few years ago, and I participate in osg user list/forum since 2008 and I've been one on the Rui Wang's OSG 3 Cookbook reviewer last year. I would be interested to try this a few months, and we'll see if I'm a good moderator. Regards, Vincent. Le 03/05/2012 19:34, Jordi Torres a écrit : Hi Art, I have added this announcement to the new website too. Hope it help to find somebody. Cheers. 2012/5/2 Art Tevs arti_t...@yahoo.de mailto:arti_t...@yahoo.de Dear OSG-Community, I am posting this thread in order to find suitable persons to be moderator and/or an administrator of the official OSG forum. What we need and expect for specific tasks: Moderator (3-5 positions): - check if new users do respect to our forum rules (i.e. name convention) - check and approve posts of new users (check for spam, ban usernames, kindly ask users to change names, etc.) - check for double posts and merge them together (it happens sometimes that threads are get separated and need to be merged again) - Usually it takes up-to max 30 minutes a day to moderate a forum. In best case, when there are more moderators, this time decreases of course Administrator (1-2 position): - important You must have already be seen in our community, so that we really know what expect from you. Or somebody of long term member can bail for you. - You must have experience with PHP and Unix environment. - You will get full access to forum's source code (on my servers) in order to hunt for bugs. Yeah, there are still bugs which need to be solved I hope to find somebody who can take over this tasks. Moderators are currently more important than an administrator. However due to the move of OSG webpage to the new system and a wish to combine all the subsystems (svn, joomla, forum, mailing list) into one, it would be great to have somebody who can make this happen :) Payment: No payment at all ladies and gentlemens, you do this for the sake of our community :) Contact: Please post your applications directly here to this thread. In this case we can learn you already before assigning you such a responsible position. If you want to stay anonym, then write me a PM (or better email) and I will try to discuss with senior community members about your application. Best regards Art -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47493#47493 ___ osg-users mailing list osg-users@lists.openscenegraph.org mailto:osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Jordi Torres Fabra gvSIG 3D blog http://gvsig3d.blogspot.com Instituto de Automática e Informática Industrial http://www.ai2.upv.es ___ 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] osgWidget performances
Hi Robert, Thanks for you help too. I'm very late on my osg posts but the mask were a good improvement, sufficient for now. But I'll keep in mind your suggestion for the future implementation. Thanks again everyone ! Regards, Vincent. Le 18/04/2012 10:13, Robert Osfield a écrit : Hi Vincent, On 18 April 2012 08:55, Vincent Bourdiervincent.bourd...@gmail.com wrote: The masks was a good idea, and there is a little bit improvement but not enough in my case... I'm still trying to make some improvement using them, but without the expected success. So if you have any other idea... please share it ! I'm not that familiar with osgWidget but change WindowManager.cpp to use a local IntersectionVisitor to traversal just the osgWidget subgraph rather than the whole scene graph this way the performance won't vary with the main scene graph. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgWidget performances
Hi, The masks was a good idea, and there is a little bit improvement but not enough in my case... I'm still trying to make some improvement using them, but without the expected success. So if you have any other idea... please share it ! Thanks. Regards, Vincent Le 16/04/2012 17:27, Kim Bale a écrit : Whilst I haven't used osgWidget, I know we had a similar performance issue with picking when we didn't use an appropriate node mask for picking so that only the pickable objects in the scene are considered. I wonder if osgWidget has implemented one in it's pick handler. Regards, Kim. On 16 April 2012 16:19, Vincent Bourdier vincent.bourd...@gmail.com mailto:vincent.bourd...@gmail.com wrote: Hi all, I'm currently trying to find a performance improvement in osgWidget due to some lag we have in our application : We use osgWidget to manage some things at runtime, but we realized that performances were dropping in big scenes. Using profiler co, I found that the osgWidget::WindowManager::pickAtXY function is very expensive in time... Here is my question : this method is called on every event, specially on mouse move and click, event if the mouse is not over Widgets... Is there any reason to make this ? Can this be improved, for example doing it only if the mouse is over the widgets, using a simple XY square test... Thanks for your answers. Regards, Vincent. -- ___ osg-users mailing list osg-users@lists.openscenegraph.org mailto: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] osgWidget performances
Nice idea, I'll look at this ASAP. Thanks! PS : other idea / tips are still appreciated :-) Regards, Vincent Le 16/04/2012 17:27, Kim Bale a écrit : Whilst I haven't used osgWidget, I know we had a similar performance issue with picking when we didn't use an appropriate node mask for picking so that only the pickable objects in the scene are considered. I wonder if osgWidget has implemented one in it's pick handler. Regards, Kim. On 16 April 2012 16:19, Vincent Bourdier vincent.bourd...@gmail.com mailto:vincent.bourd...@gmail.com wrote: Hi all, I'm currently trying to find a performance improvement in osgWidget due to some lag we have in our application : We use osgWidget to manage some things at runtime, but we realized that performances were dropping in big scenes. Using profiler co, I found that the osgWidget::WindowManager::pickAtXY function is very expensive in time... Here is my question : this method is called on every event, specially on mouse move and click, event if the mouse is not over Widgets... Is there any reason to make this ? Can this be improved, for example doing it only if the mouse is over the widgets, using a simple XY square test... Thanks for your answers. Regards, Vincent. -- ___ osg-users mailing list osg-users@lists.openscenegraph.org mailto: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] osgWidget performances
Hi all, I'm currently trying to find a performance improvement in osgWidget due to some lag we have in our application : We use osgWidget to manage some things at runtime, but we realized that performances were dropping in big scenes. Using profiler co, I found that the osgWidget::WindowManager::pickAtXY function is very expensive in time... Here is my question : this method is called on every event, specially on mouse move and click, event if the mouse is not over Widgets... Is there any reason to make this ? Can this be improved, for example doing it only if the mouse is over the widgets, using a simple XY square test... Thanks for your answers. Regards, Vincent. -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Retrobooster - OSG-based game
Very nice job ! I already tried to make an OSG based game, this was not so beautiful !! Regards, Vincent 2012/3/21 Terry Welsh mogu...@gmail.com Hi guys, Thanks for the kind words. Unfortunately, the little people cannot extinguish themselves. Life is hard for virtual fodder :( I wrote the particle system ages ago. At the time, osgParticle still had immediate mode code in it and I wanted some very different features and the ability to optimize the heck out of it, so I just did it from scratch. However, Farshid, I am using OSGExp for the models :) -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com ___ 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] [osgPlugins] Write animation to mpeg or other video format
Hi, Using osgDB::writeImageFile you can save an osg::Image to you hard drive, the format available will be depending on the plugins you have. To make this image, just use the viewer/camera to get the pixel buffer. Or simply use the screenCaptureHandler, you can find it in the examples, to obtain the base code to take screenshots. Regards, Vincent. Le 08/03/2012 17:33, Zachary Hilbun a écrit : Hi, I want to be able to animate a scene and then write the images to an image format such as mpeg or other format. Is this possible using OSG? If so, is there any documentation on how to do it or is this just one of those read the source code things? Thank you! Cheers, Zachary -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46108#46108 ___ 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] How do you manage multiple world matrices?
Hello, If you use that in relation with the pick handlers, you'll see that every intersector will return you the intersected node complete path, so there is no issue with multiple parents nodes. In other cases, managing nodes using the nodePath as reference is a solution too... Regards, Vincent. Le 20/02/2012 09:18, Martin Großer a écrit : Hello, When I get a scene graph and I want to do something with a geode in world coordinates, I have to use the world matrix of the geode (usually the matrizes of the parents). Now, the difficult part is a node can have several parents. I am not sure how I can manage this fact. How can I decide what the right path to the root node is? What is your experience with this possibility of node compositing. Would you ban multiple node references? I would be very grateful if someone can give me some useful tips. Cheers Martin ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Win32 Bitmap to osg Image
Hi all, Just a few word to conclude this issue : I had to swap the BGR to RGB colors by myselt, the following code was not enougth to make it : I would naively expect that either _image-setImage(width, height, 1, GL_RGB, GL_RGB, GL_UNSIGNED_BYTE, data, osg::Image::NO_DELETE); or _image-setImage(width, height, 1, GL_RGB, GL_BGR, GL_UNSIGNED_BYTE, data, osg::Image::NO_DELETE); Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Win32 Bitmap to osg Image
Hi Urich, Le 03/02/2012 05:41, Ulrich Hertlein a écrit : what errors/issues/non-results are you seeing? Black? Reversed colors? Crashes? The BGR become RGB without conversion, so the image is almost good, unless the color component that are swapped between red and blue. (As I understand it you want to use the Bitmap directly as an image (not save it and read it back) so I'm not sure where the plugin fits into the picture.) It was just to see how OSG manage this issue. First of all you don't need to do 'allocateImage' *AND* 'setImage'. 'allocateImage' allocates memory internally to osg::Image that can then be filled but I assume you already have a buffer that it should use, so 'setImage' would be enough. Yes, I'll remove the allocateImage call if it is not necessary, it was working well so I didn't change this piece of code... osg::Image::setImage is designed to allow the user to specify a buffer that osg::Image then uses (and manages, depending on the AllocationMode). When you're passing a buffer allocated by somebody else you may want to use AllocationMode::NO_DELETE, so that osg::Image does not delete/free it. Yes, thanks to this precision but I prefer the image to delete the content of the buffer in my implementation. Regarding the RGB vs BGR you only want to change the 'pixelFormat' parameter, not the 'internalTextureFormat'. I would naively expect that either _image-setImage(width, height, 1, GL_RGB, GL_RGB, GL_UNSIGNED_BYTE, data, osg::Image::NO_DELETE); or _image-setImage(width, height, 1, GL_RGB, GL_BGR, GL_UNSIGNED_BYTE, data, osg::Image::NO_DELETE); would do the trick. I'll try this but I don't think it would be so easy... even if it would be very interesting ! Thanks a lot for your help, I'll continue to analyze this. Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Win32 Bitmap to osg Image
Hi all, I'm currently trying to convert a bitmap image file to an osg::Image. I get my Bitmap from the win32 api making a screenshot, but as specified in the plugin bmp the internal format of the Bitmap is not RGB but BGR. Is there any way to directly use the BGR data buffer in a new osg::Image or do I need to swap from BGR to RGB ? I use this : /_texGrad-allocateImage(width, height, 1, GL_RGB, GL_UNSIGNED_BYTE); _texGrad-setImage(width, height, 1, GL_RGB, GL_RGB, GL_UNSIGNED_BYTE, data, osg::Image::USE_NEW_DELETE); / I tried to change the GL_RGB into GL_BGR without results... Any suggestion will be very useful. Thanks a lot. Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Distance point to geometry
Hi all, Looking in the archives I didn't get any interesting answer so here is the question : Is there any way using OSG to compute the distance between a graph and a point ? (not just with the vertices but also with edges and the triangles) I could implement my own visitor to traverse all element (vertex, ege and face) but I'm looking for something more optimized or more easy to do in a few days if possible... Thanks. Regards, Vincent. -- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Distance point to geometry
Hi Robert, Sorry if I was not clear : I'm just looking for a way to compute the smallest distance between a point and a geometry, not just a point to vertex distance, but also a point to edge or point to face (orthogonal projection). Due to the few days I have I think this won't be possible and safe... Thanks. Regards, Vincent. Le 16/01/2012 10:26, Robert Osfield a écrit : Hi Vincent, I'm not clear on what you are after, but I can say that there isn't anything close to resembling what you are talking about in the OSG so you'll need to roll your own visitor. Robert On 16 January 2012 08:36, Vincent Bourdiervincent.bourd...@gmail.com wrote: Hi all, Looking in the archives I didn't get any interesting answer so here is the question : Is there any way using OSG to compute the distance between a graph and a point ? (not just with the vertices but also with edges and the triangles) I could implement my own visitor to traverse all element (vertex, ege and face) but I'm looking for something more optimized or more easy to do in a few days if possible... Thanks. Regards, Vincent. -- ___ 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] Distance point to geometry
Hi Robert, Le 16/01/2012 10:53, Robert Osfield a écrit : You'd implement a NearestGeometryIntersector that holds a point that you test your osg::Geometry against, using a osg::TriangleFunctor like the LineSegmentIntersector would allow you to simply the work down to just a test of the point against a triangle. To make things efficient you'll need to build in testing against the bounding volumes against the point to decide whether it's contains any points that could be closer than the current closest distance detected. Thanks for the idea I'll will start with that. How could I implement the test against bounding volumes ? Because it is a visitor, the intersect method will be called on each drawable if I understand it well. Ho can I use the Intersector base to make a previous sort to keep only the nearest geometries or drawable base, before having the triangle functor traversing the datas ? Thanks. Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Distance point to geometry
Hi Robert, Thanks for you help. I think I can do something not so bad with that. Regards, Vincent. Le 16/01/2012 20:04, Robert Osfield a écrit : Hi Vincent, On 16 January 2012 14:55, Vincent Bourdiervincent.bourd...@gmail.com wrote: Thanks for the idea I'll will start with that. How could I implement the test against bounding volumes ? Have a look how src/osgUtil/InteresectionVisitor.cpp interacts with the osgUtil::Intersector that is assigned to it, and at the same time see how LineSegmentIntersectio/PolytopeIntersection etc implements the various functions that InversectionVisitor.cpp calls. Because it is a visitor, the intersect method will be called on each drawable if I understand it well. It does a bit more than that. The Intersection traversal has does intersections tests against bounding spheres, does reprojection of the intersector into the local coordinate frame beneath transforms. Ho can I use the Intersector base to make a previous sort to keep only the nearest geometries or drawable base, before having the triangle functor traversing the datas ? It's up to you how you want to manage this. Robert. ___ 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
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 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 mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] performance problems in OSG 2.8.2 tried LOD, Culling etc.
Hi, Did you had a look on the result of the simplifier ? I'm not OSG'simplifier master but sometimes simplifiers just cannot simplify more, so the results remains nearly the same. Maybe you could create your own simplified geometries for example a (colored) cube for a building (6 faces, even 5 if you don't need the lower one). You also can use fog to hide the far building and so avoid having to load them, or just use LOD with no child as lower detailed level geometry so nothing to cull and draw. These are just ideas, but I can ensure you that a 80MB ive file is not something heavy and OSG is certainly able to manage your scene. Hope it helps ! Regards, Vincent. 2011/9/21 Marcus Rabe film_foot...@yahoo.de Hi, Paul you are right I forgot to write the hole code for the LOD implementation, sorry. Code: osg::ref_ptrosg::Node lodLevel3 = originalGeode; osg::ref_ptrosg::Node lodLevel2 = dynamic_castosg::Node*( lodLevel3-clone( osg::CopyOp::DEEP_COPY_ALL ) ); osg::ref_ptrosg::Node lodLevel1 = dynamic_castosg::Node*( lodLevel3-clone( osg::CopyOp::DEEP_COPY_ALL ) ); osgUtil::Simplifier simplifier; simplifier.setSampleRatio( 0.5 ); lodLevel2-accept( simplifier ); simplifier.setSampleRatio( 0.1 ); lodLevel3-accept( simplifier ); osg::ref_ptrosg::LOD lodNode = new osg::LOD(); lodNode-addChild( lodLevel1.get(), 200.0f, 2.0f ); lodNode-addChild( lodLevel2.get(), 50.0f, 200.0f ); lodNode-addChild( lodLevel3.get(), 0.0f, 50.0f ); Sorry I am a complete OSG noob. I have no idea how a good scene graph has to look like. But I am going to use the seach function to find a solution in the forum. Thanks guys! -Marcus -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42922#42922 ___ 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] PolytopeIntersector usage
Hi Peter Le 08/09/2011 09:40, Peter Hrenka a écrit : The goal is to compute if a point is at less than a fixed distance from a node, and to my mind the intersection is the best way but maybe there is something more adapted ? I think that should be possible. I would recommend using a cube which contains the distance-sphere as the polytope and check the results from the PolytopeIntersector for the real (euclidian) distance. I would advise against trying to use a sphere-polytope since the intersector must check all polytope-planes in the innermost loop. I am trying with an octaedron (8 faces) to avoid having a complex structure (like a sphere) with too much faces, just to run some tests. I build the polytope a the point position (radius or the checked distance) and compute the intersection. If there is a least one result, I consider the point is near from the the model. There is no need to check the euclidian distance to my mind, isn't it ? Thanks for your help. Regards, Vincent ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PolytopeIntersector usage
Hi Peter, Yes this is a nice precision, the euclidian distance will be a second pass to check the intersected results. Thanks a lot :-) Regards, Vincent Le 08/09/2011 10:21, Peter Hrenka a écrit : Hi Vincent, Am 08.09.2011 10:00, schrieb Vincent Bourdier: Hi Peter Le 08/09/2011 09:40, Peter Hrenka a écrit : The goal is to compute if a point is at less than a fixed distance from a node, and to my mind the intersection is the best way but maybe there is something more adapted ? I think that should be possible. I would recommend using a cube which contains the distance-sphere as the polytope and check the results from the PolytopeIntersector for the real (euclidian) distance. I would advise against trying to use a sphere-polytope since the intersector must check all polytope-planes in the innermost loop. I am trying with an octaedron (8 faces) to avoid having a complex structure (like a sphere) with too much faces, just to run some tests. I build the polytope a the point position (radius or the checked distance) and compute the intersection. If there is a least one result, I consider the point is near from the the model. There is no need to check the euclidian distance to my mind, isn't it ? Well, it depends what you mean by distance... If the octahedron is good enough for you then you are done. But if you need to consider the exact (euclidian) distance then must choose your octahedron to contain the distance-sphere and check the results to eliminate the false-positives which lie in the octahedron but not in the sphere. Thanks for your help. Regards, Vincent Cheers, Peter ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Intersection of two lines
Hi, Using a simple system equation you should find it. Just google it... Regards, Vincent. Le 07/09/2011 11:32, Andreas Roth a écrit : Hi, this maybe a stupid and simple question. I have two lines and i want to calculate the intersection point of the two lines. For both lines is have a starting point and the direction. Is there a function to calculate the intersection point? Thank you! Cheers, Andreas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42478#42478 ___ 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] Delighted to announce OpenSceneGraph-3.0.0!
Thanks a lot for your work, it is a pleasure to have a very good library still living and with a lot of people concerned and interested. Regards, Vincent. Le 28/06/2011 12:03, Robert Osfield a écrit : I'm chuffed to bit to be able to announce the OpenSceneGraph-3.0.0 release, a release long in incubation but well worth the wait - it's faster, more stable, extends portability to embedded and mobile platforms and has heaps of new features and refinements. To grab the source head over to the download page: http://www.openscenegraph.org/projects/osg/wiki/Downloads Or Zip file containing source code : http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-3.0/source/OpenSceneGraph-3.0.0.zip Subversion tag : svn co http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-3.0.0 OpenSceneGraph The press release is rather muted really... considering just how big a step forward over 2.x series is, but he it is, feel free to suggest ways to sell the changes a little more flamboyantly: http://www.openscenegraph.org/projects/osg/wiki/News/Press/OSG3.0 What is amazing is how much 3.0.0 is a community effort, since the 2.8.0 release we've seen 91 new contributors provide new features, refinements, build and bug fixes, with a staggering total number of contributors standing at 464! I can't include thanks to them here, but all the contributors are listed up on our contributors page: http://www.openscenegraph.org/projects/osg/wiki/Support/Contributors/ThreePointZero If your are one of those contributors, or one of the unsung heroes that pitched in with testing you should feel proud to have been part of making 3.0.0 what it is today - the worlds most portable and feature rich scene graph technology. A big thank you to all that have helped, and to everyone have fun with the new release, I think it's pretty darn awesome :-) 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] Node callback without being included in the scenegraph
Hi, The update callback are called by a visitor (cullvisitor ?) so if the node is not in the scene graph you won't get any chance to have your callback traversed, and called. But you can call the updatevisitor (cullvisitor?) by yourself on a scenegraph you made if I'm not wrong. Hope this helps you Regards, Vincent Le 15/06/2011 15:56, Aitor Ardanza a écrit : Hi, I need to update a node that is not included in the scene graph. I define it as follows: Code: for... osg::Geode* geodeMorph = new osg::Geode ; geodeMorph-setName(animations[i].callName); geodeMorph-addDrawable( morphGeometrys[morphsCont]) ; geodeMorph-setUpdateCallback( new osgAnimation::UpdateMorph(animations[i].callName) ) ; grp-addChild(geodeMorph); ... morphsGrp-addChild(geodeMorph); morphsGrp-addChild(grp); morphsGrp-setUpdateCallback(m_morphManager); if(morphGeometry){ geom0-setSourceGeometry( morphGeometry); //modelNode-addChild( morphsGrp ) ; return true; } I only need to update morphGeometry, and I do it with the osg morphing animation system... but if I didn't include morphsGrp in scene, fails to call the callbacks... Is there any other way to do this? Thank you! Cheers, Aitor -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=40528#40528 ___ 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] lazy readNodeFile
Hi, Maybe the ReadNodeFileCallback can help you. It is used by the DatabasePager, so you can manage what is done for each readNodeFile call. Or maybe making your own node node as PagedLOD which load the file only when requested... Or playing with UpdateCallback... Sorry this is not a real answer but maybe it can help you. Regards, Vincent. Le 06/05/2011 09:45, Gianni Ambrosio a écrit : Hi All, I implemented a class that embeds an osg::Group. The real graphics for my object is loaded from a file with a readNodeFile() call and the resulting node is set as child of the osg:Group. Now I would like the readNodeFile() is called just when it is needed, that means when the viewer shows the object. Is there something ready in the osg libs to do so? Regards Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=39073#39073 ___ 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] osgDB ifstream / ofstream conflict
Hi, But what is the best solution ? I just have some hesitation to modify the linker settings instead of solving the problem for real... but if it is the best way... Regards, Vincent Le 29/04/2011 15:23, Frederic Bouvier a écrit : Hi, yes, adding /FORCE:MULTIPLE to the linker command line was the only workaround I found Regards, -Fred - Brad Christiansen a écrit : Hi, This seems to be the same / related to an issue raised some time ago with VS2010. When I build VirtualPlanetBuilder with VS2010 I get errors complaining about duplicate definitions of the stream destructors (cant remember the details of hand). The same code works without issue on non-windows platforms and all other VS compilers tried. As I don't have time to look into the issue I simply force the link to complete with multiply defined symbols. A quick search through my local OSG-users archive found the thread + message included bellow. Do a search through the archives around this topic and you should find all the details. Cheers, Brad Re: [osg-users] OT: VS2010 LNK2005 problem related to ostringstream Ok, I have localized the problem. For example, the class osgDB::fstream: class OSGDB_EXPORT fstream : public std::fstream { }; which just inherits from std:.fstream causes the symbols of std::fstream to be exposed into osgDB.dll This effectively means that It might cause problems for people linking against osgDB.dll later on. Same goes for inheriting from std::string, std::ostringstream etc. This must obviously be a bug, a very serious one in VS2010. We had a class derived from std::ostringstream, which exposed the symbols in the vtable for the class: namespace ns { class Notify : public std::ostringstream { }; } Using depends.exe to analyze the dll-file gives: const ns::Notify::`vftable'{for `std::basic_ostringstreamchar,struct std::char_traitschar,class std::allocatorchar '} My issue was reported to the msdn forum. Their first take was: Oh you use CMake, thats not our product :-) But in later threads, they tried to reproduce the problem without luck... So if you manage to reproduce this in a small example, go ahead and post it. We must make them aware of this problem. http://social.msdn.microsoft.com/Forums/en-US/vclanguage/thread/191de00a-53c9-4bd9-9cb6-e844eb224ca2 /Anders From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Vincent Bourdier Sent: Wednesday, 27 April 2011 11:47 PM To: osg user Subject: Re: [osg-users] osgDB ifstream / ofstream conflict Hi, Sorry to insist but I would appreciate any advices about this issue. Maybe I'm the only one who encountered it, but the patch I did is not so... clean to my mind... Thanks. Regards, Vincent. Le 21/04/2011 14:50, Vincent Bourdier a écrit : Hi all, I just found a fix after some tests, but it is not a fix I am proud of. I just added the close() method in osgDB/fstream implementation, so there is no conflict because my fstream implementation uses osgDB/fstream and not osgDB/fstream AND std::fstream. I will continue to investigate to be sure to understand why this occurs, but any advices or explanations are welcome. If my fix is accepted this could be a submission for OSG, eventually... Thanks. Regards, Vincent. Le 20/04/2011 14:54, Vincent Bourdier a écrit : Hi Mourad Thanks for your answer but I already checked that. TsLib_MDdNET2010 is a static lib but linked with /MD(d), like my application... Vincent. Le 20/04/2011 11:50, Mourad Boufarguine a écrit : Hi Vincent, On Mon, Apr 4, 2011 at 4:36 PM, Vincent Bourdier vincent.bourd...@gmail.com wrote: 2TsLib_MDdNET2010.lib(IwPoly.obj) : error LNK2005: public: void __thiscall std::basic_ifstreamchar,struct std::char_traitschar ::close(void) (?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in osgDBd.lib(osg65-osgDBd.dll) 2TsLib_MDdNET2010.lib(IwBrepData.obj) : error LNK2005: public: void __thiscall std::basic_ifstreamchar,struct std::char_traitschar ::close(void) (?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in osgDBd.lib(osg65-osgDBd.dll) It seems like a static/dynamic c++ runtime conflict. Check if osg and TsLib_MDdNET2010 are linked against the same type of c++ runtime (both with /MTd flag or both with /MDd flag) Mourad DISCLAIMER:--- This e-mail transmission and any documents, files and previous e-mail messages attached to it are private and confidential. They may contain proprietary or copyright material or information that is subject to legal professional privilege. They are for the use of the intended recipient only. Any unauthorised viewing, use, disclosure, copying, alteration, storage or distribution of, or reliance on, this message is strictly prohibited. No part may be reproduced, adapted
Re: [osg-users] osgDB ifstream / ofstream conflict
Hi, Sorry to insist but I would appreciate any advices about this issue. Maybe I'm the only one who encountered it, but the patch I did is not so... clean to my mind... Thanks. Regards, Vincent. Le 21/04/2011 14:50, Vincent Bourdier a écrit : Hi all, I just found a fix after some tests, but it is not a fix I am proud of. I just added the close() method in osgDB/fstream implementation, so there is no conflict because my fstream implementation uses osgDB/fstream and not osgDB/fstream AND std::fstream. I will continue to investigate to be sure to understand why this occurs, but any advices or explanations are welcome. If my fix is accepted this could be a submission for OSG, eventually... Thanks. Regards, Vincent. Le 20/04/2011 14:54, Vincent Bourdier a écrit : Hi Mourad Thanks for your answer but I already checked that. TsLib_MDdNET2010 is a static lib but linked with /MD(d), like my application... Vincent. Le 20/04/2011 11:50, Mourad Boufarguine a écrit : Hi Vincent, On Mon, Apr 4, 2011 at 4:36 PM, Vincent Bourdier vincent.bourd...@gmail.com mailto:vincent.bourd...@gmail.com wrote: 2TsLib_MDdNET2010.lib(IwPoly.obj) : error LNK2005: public: void __thiscall std::basic_ifstreamchar,struct std::char_traitschar ::close(void) (?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in osgDBd.lib(osg65-osgDBd.dll) 2TsLib_MDdNET2010.lib(IwBrepData.obj) : error LNK2005: public: void __thiscall std::basic_ifstreamchar,struct std::char_traitschar ::close(void) (?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in osgDBd.lib(osg65-osgDBd.dll) It seems like a static/dynamic c++ runtime conflict. Check if osg and TsLib_MDdNET2010 are linked against the same type of c++ runtime (both with /MTd flag or both with /MDd flag) Mourad ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgDB ifstream / ofstream conflict
Hi all, I just found a fix after some tests, but it is not a fix I am proud of. I just added the close() method in osgDB/fstream implementation, so there is no conflict because my fstream implementation uses osgDB/fstream and not osgDB/fstream AND std::fstream. I will continue to investigate to be sure to understand why this occurs, but any advices or explanations are welcome. If my fix is accepted this could be a submission for OSG, eventually... Thanks. Regards, Vincent. Le 20/04/2011 14:54, Vincent Bourdier a écrit : Hi Mourad Thanks for your answer but I already checked that. TsLib_MDdNET2010 is a static lib but linked with /MD(d), like my application... Vincent. Le 20/04/2011 11:50, Mourad Boufarguine a écrit : Hi Vincent, On Mon, Apr 4, 2011 at 4:36 PM, Vincent Bourdier vincent.bourd...@gmail.com mailto:vincent.bourd...@gmail.com wrote: 2TsLib_MDdNET2010.lib(IwPoly.obj) : error LNK2005: public: void __thiscall std::basic_ifstreamchar,struct std::char_traitschar ::close(void) (?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in osgDBd.lib(osg65-osgDBd.dll) 2TsLib_MDdNET2010.lib(IwBrepData.obj) : error LNK2005: public: void __thiscall std::basic_ifstreamchar,struct std::char_traitschar ::close(void) (?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in osgDBd.lib(osg65-osgDBd.dll) It seems like a static/dynamic c++ runtime conflict. Check if osg and TsLib_MDdNET2010 are linked against the same type of c++ runtime (both with /MTd flag or both with /MDd flag) Mourad ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgDB ifstream / ofstream conflict
Hi all, No advices or ideas ? Am I the only one this this issue Regards, Vincent Le 04/04/2011 17:36, Vincent Bourdier a écrit : Hi all, I've an issue concerning the std::ifstream in my application. I know that I need to use osgDB::ifstream instead of std::ifstream and I did everywhere in my code. But, my project links with an other lib than OSG, and this library is using std::ifstream and std::ofstream, and this results in thing like that (using VS2010 and OSG 2.8.3) : 2TsLib_MDdNET2010.lib(IwPoly.obj) : error LNK2005: public: void __thiscall std::basic_ifstreamchar,struct std::char_traitschar ::close(void) (?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in osgDBd.lib(osg65-osgDBd.dll) 2TsLib_MDdNET2010.lib(IwBrepData.obj) : error LNK2005: public: void __thiscall std::basic_ifstreamchar,struct std::char_traitschar ::close(void) (?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in osgDBd.lib(osg65-osgDBd.dll) Do you have any suggestion to fix this issue ? Thanks for your help, Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgDB ifstream / ofstream conflict
Hi Mourad Thanks for your answer but I already checked that. TsLib_MDdNET2010 is a static lib but linked with /MD(d), like my application... Vincent. Le 20/04/2011 11:50, Mourad Boufarguine a écrit : Hi Vincent, On Mon, Apr 4, 2011 at 4:36 PM, Vincent Bourdier vincent.bourd...@gmail.com mailto:vincent.bourd...@gmail.com wrote: 2TsLib_MDdNET2010.lib(IwPoly.obj) : error LNK2005: public: void __thiscall std::basic_ifstreamchar,struct std::char_traitschar ::close(void) (?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in osgDBd.lib(osg65-osgDBd.dll) 2TsLib_MDdNET2010.lib(IwBrepData.obj) : error LNK2005: public: void __thiscall std::basic_ifstreamchar,struct std::char_traitschar ::close(void) (?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in osgDBd.lib(osg65-osgDBd.dll) It seems like a static/dynamic c++ runtime conflict. Check if osg and TsLib_MDdNET2010 are linked against the same type of c++ runtime (both with /MTd flag or both with /MDd flag) Mourad ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph 2.8.4 stable release
Hi, Thanks for you work on this release, I really apreciate this and I'm going to use it in a few days :-) Regards, Vincent. Le 11/04/2011 20:43, Chris 'Xenon' Hanson a écrit : http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.8.4 We will need to go about the usual process of announcing this release, but I haven't had time to do that, or assemble binaries or anything. I'd love some help from others in getting together an announcement, and doing all the other steps necessary for finalizing the release. And then, we can discuss a 2.8.5 release with more significant changes migrated to it, if anyone is interested. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph-2.8.4-rc3 now tagged
Hi Chris Thanks for this release, I just build it on WinXP and VS2010. No errors, and the version number in the DLL file name is set :-) Just to be sure, is it expected that the DLL file name number is the same for OSG 2.8.3 and 2.8.4 ? Thanks, Regards, Vincent. Le 07/04/2011 04:43, Chris 'Xenon' Hanson a écrit : http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.8.4-rc3 This is intended to be the final 2.8.4. It now builds successfully on VS2010, and the ffmpeg changes Robert put in have been tested on Windows. We need testing on all platforms to call this one done. Please test and let us know your results. This won't get out until people step up and test. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG 2.8.4 VS2010 build problem DLL versioning
Hi all, Paul did some digging, and thinks that maybe this trunk patch: http://www.openscenegraph.org/projects/osg/changeset/11904 Might have been the fix for this. This appears to have been the work of Sukender and Wang Rui. I've copied them on this. Maybe they can tell us if this is the magic fairy dust we need in order to make 2.8.x build properly on VS2010. This patch seems to be too old and do not match the actual sources... (on 2.8.4 ) I was not able to apply it. Sorry but I'm not (yet) a CMake master so I can't create a patch myself. If anyone can help us fixing this ... Thanks. Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgDB ifstream / ofstream conflict
Hi all, I've an issue concerning the std::ifstream in my application. I know that I need to use osgDB::ifstream instead of std::ifstream and I did everywhere in my code. But, my project links with an other lib than OSG, and this library is using std::ifstream and std::ofstream, and this results in thing like that (using VS2010 and OSG 2.8.3) : 2TsLib_MDdNET2010.lib(IwPoly.obj) : error LNK2005: public: void __thiscall std::basic_ifstreamchar,struct std::char_traitschar ::close(void) (?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in osgDBd.lib(osg65-osgDBd.dll) 2TsLib_MDdNET2010.lib(IwBrepData.obj) : error LNK2005: public: void __thiscall std::basic_ifstreamchar,struct std::char_traitschar ::close(void) (?close@?$basic_ifstream@DU?$char_traits@D@std@@@std@@QAEXXZ) already defined in osgDBd.lib(osg65-osgDBd.dll) Do you have any suggestion to fix this issue ? Thanks for your help, Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] CMake - How to configure a library using OSG
Hi everybody, I'm working a library as a toolbox based on OSG. I'm trying to write a CMake configuration file. The file is working, OSG is found, but OSG needs two includes directories : D:\Codage\OSG_2.8.2\binaries\include; D:\Codage\OSG_2.8.2\sources\src\include; And Cmake generate a Visual Studio 2008 project with only the sources/src/include directory... so the project do not compil. How can I change that to have the good include directories ? I join my CmakeLists.txt configuration file, if it can help Thanks for your help. Regards, Vincent. cmake_minimum_required(VERSION 2.6) #set the name of the project SET(LIBRARYNAME Hud) #Déclaration du projet project(${LIBRARYNAME}) #Repertoire de sortie des compilations set(LIBRARY_OUTPUT_PATH lib) #inclusion d'OSG et OpenThreads FIND_PACKAGE(OpenThreads) FIND_PACKAGE(OpenSceneGraph 2.8.0 REQUIRED QUIET COMPONENTS osg osgDB osgUtil osgGA osgText osgFX osgViewer) #ajout des includes des libs dans les paths d'include include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS}) include_directories(${OPENTHREADS_INCLUDE_DIRS}) #Do not forget its own includes include_directories(src) #Génération de la liste des fichiers header file( GLOB_RECURSE header_source_files src/*.h ) #Génération de la liste des fichiers cpp file( GLOB_RECURSE cpp_source_files src/*.cpp ) #Déclaration de la lib add_library( ${LIBRARYNAME} SHARED ${cpp_source_files} ${header_source_files} ) #ajout des libs au linker target_link_libraries( ${LIBRARYNAME} ${OPENTHREADS_LIBRARIES} ${OPENSCENEGRAPH_LIBRARIES} ) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 2.8.4 RC1 tagged
Hi, OSG, example and most of the plugins compil well (I do not have all the required dependencies for all plugins) on VS2010 on win XP pro I'll try the RC2 now Vincent. Le 28/03/2011 22:29, Chris 'Xenon' Hanson a écrit : On 3/28/2011 2:27 PM, Paul Martz wrote: I'm just the svn commit monkey. Thanks should go to Chris. :-) I do even less. All I've had to do so far is TALK. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 2.8.4 RC2 tagged
Hi, I've compiled 2.8.4-RC2 on my winXP and VS2010. No errors. Good job :-) Vincent. Le 29/03/2011 05:18, Wang Rui a écrit : Hi Paul and Chris, I've tested 2.8.4-rc2 on my Windows XP and VisualStudio 2005. It built fine in both debug and release configurations. But when I tested the ffmpeg plugin with: # osgmovie sample.mov.ffmpeg It printed media information about the file correctly but didn't play it (with only a black screen). I'm not sure if this is a plugin issue or my own mistake at present. The latest version just works well, with the same environment and dependence. Thanks, Wang Rui 2011/3/29 Chris 'Xenon' Hansonxe...@alphapixel.com: On 3/28/2011 3:50 PM, Paul Martz wrote: I've tagged an RC2, which includes Robert's build fixes for the ffmpeg plugin: http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.8.4-rc2 Please, everyone who cares about this, grab and build this so we can have confidence it's done properly and solid and can call it complete. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ 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
Re: [osg-users] 2.8.4 RC2 tagged
Hi all, I just notice little thing that can be important : Until 2.8.3 the generated lib file were named with a version number (osg55-osg.dll for 2.8.1 osg65-osg.dll for 2.8.3) but with 2.8.4 the lib files are just named osg.dll, osgAnimation.dll, etc... Is this a real choice, a VS2010 consequence, or something forgotten ? Thanks. Regards, Vincent. Le 29/03/2011 05:18, Wang Rui a écrit : Hi Paul and Chris, I've tested 2.8.4-rc2 on my Windows XP and VisualStudio 2005. It built fine in both debug and release configurations. But when I tested the ffmpeg plugin with: # osgmovie sample.mov.ffmpeg It printed media information about the file correctly but didn't play it (with only a black screen). I'm not sure if this is a plugin issue or my own mistake at present. The latest version just works well, with the same environment and dependence. Thanks, Wang Rui 2011/3/29 Chris 'Xenon' Hansonxe...@alphapixel.com: On 3/28/2011 3:50 PM, Paul Martz wrote: I've tagged an RC2, which includes Robert's build fixes for the ffmpeg plugin: http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.8.4-rc2 Please, everyone who cares about this, grab and build this so we can have confidence it's done properly and solid and can call it complete. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ 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
Re: [osg-users] Download details: Microsoft Visual Studio 2010 Service Pack 1 (Installer)
Hi, So for this header issue, there is no planed change on 2.8.3 ? The only fix is to add the include by hand ? Thanks. Regard, Vincent. Le 17/03/2011 19:32, D.J. Caldwell a écrit : Sorry, everyone. I hit Send too fast before I could remember something else import to my experience. There were some minor changes discussed in the list about adding an include directive to a few header files. Try referring to http://groups.google.com/group/osg-users/browse_thread/thread/459e4bc93cc6922c/1fe07b41ff8b02de?lnk=gstq=iterator+build#1fe07b41ff8b02de http://groups.google.com/group/osg-users/browse_thread/thread/459e4bc93cc6922c/1fe07b41ff8b02de?lnk=gstq=iterator+build#1fe07b41ff8b02de for the details (subject line in that thread reads VS 2010 and OSG v2.8.3). This discusses how the iterator header is required in a few places under the VS2010 build of OSG 2.8.3. Good luck... D.J. On Thu, Mar 17, 2011 at 2:13 PM, D.J. Caldwell dlcaldwel...@gmail.com mailto:dlcaldwel...@gmail.com wrote: Hi, Chris. I have been using OSG 2.8.3 built as 64 bit shared libraries with VS2010 (no SP1) on 64 bit Windows 7 for several weeks now, with no real problems. Specifically with OSG, using CMake 2.8.3, I only had problems with the INSTALL target; it appears the .lib, .dll, and .exe files weren't where INSTALL was looking to copy from, so I had to move things manually to where INSTALL could find them. (There's probably been chatter on this, and I just missed it). I didn't suffer from the Hotfix issue that Qt 2.7.x calls out because I also use Qt in my app, and I built Qt first (so I got the hotfix). I won't go into the performance comments; you guys have pretty much covered all the bases. Hope this helps... D.J. On Thu, Mar 17, 2011 at 1:47 PM, Anders Backman ande...@cs.umu.se mailto:ande...@cs.umu.se wrote: I second the one about performance. I have a 4 Core Machine (8 with HT) with 6GB memory. Since I started using VS2010, I feel kidnapped by Microsoft. The Intellisense is extremely slow for larger projects. VS is an editor, but sometimes it feels like a CAD application, it commonly uses 700-800Mb, and it is locks up now and then. Reloading a solution with 30-some projects takes forever... So its not really a huge leap forward from VS2008, which feels like a Ferrari in comparison. Seems that they have merged the Word team with the VS2010 development team... VS2010, is more like Microsoft Word, but with a compiler. For day to day C++ development (not using .NET), its a pain...waiting for the circle most of the time. But the fonts are nicer :-) The one and only thing that really sticks out as a positive improvement is the performance profiler. Thats really really nice. Although it only works for 32bit apps :-( /A On Thu, Mar 17, 2011 at 6:29 PM, Paul Sherman psher...@drizzle.com mailto:psher...@drizzle.com wrote: Chris, I have not, as of yet, gotten around to building OSG with VS2010SP1, but in general I would say that if you are using VS2010, get the service pack. It fixes quite a few bugs and there are some drastic improvements in performance. The one woefully horrible piece of functionality is Go To Definition which is still pretty slow even after the one time, murderously slow database rebuild. I use 3rd party tools instead. Other than that, I think it is a good set of fixes. -Paul On 3/17/2011 10:09 AM, Chuck Seberino wrote: Chris, I haven't been impressed at all with VS2010. The IDE tends to crash quite a bit - annoying, but not the end of the world. I did have an issue with 64-bit builds, particularly with Qt-4.7.x. Seems that there were byte-alignment issues (http://support.microsoft.com/kb/2280741). After installing the hotfix everything seems OK, at least no problems that I could blame on the compiler :). I haven't tried SP1 yet. I even tried looking for a list of fixes, but it seems that MS doesn't want to publish them. So my suggestion - if there is nothing wrong with the current development setup, don't upgrade. The IDE is slower and buggier than ever. That being said, it is (finally) generating proper binaries in x64 with the hotfix. The last item I forgot to mention is that there are duplicate symbols between osgDB::fstream and std::fstream that require the /FORCE:MULTIPLE linker
Re: [osg-users] Download details: Microsoft Visual Studio 2010 Service Pack 1 (Installer)
Hi, So first of all why not just give a patch to apply, provided with the sources or on the download wiki page ? Regards, Vincent. Le 22/03/2011 16:14, Chris 'Xenon' Hanson a écrit : On 3/22/2011 7:42 AM, Vincent Bourdier wrote: So for this header issue, there is no planed change on 2.8.3 ? The only fix is to add the include by hand ? Thanks. We've been discussing a 2.8.3.1 binary-compatible release to include JUST this fix. But there's been very little feedback on whether anyone wants this or is willing to help get it out. Similarly a 2.8.4 has been proposed, but there doesn't seem to be a lot of community need or support for it, so it hasn't moved forward. Regard, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Database Pager behavior
Hi all, I just would like to understand the behavior of the database Pager when I get osg::notify(osg::INFO)DatabasePager::fileRquest(fileName) orphaned, resubmitting.std::endl; This code is in the DatabasePager::requestNodeFile(...) function, where the file is considered as orphaned when the ref_count equals 1. I understand why it is considered as orphaned due to its ref_count (1 means only the actual reference and no parents in the scene graph) but I don't understand how or when this can arrive... Can you help me ? Thanks. Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to setup osg with c++
What is the problem ? You should have a look on osg website to find installation help. Vincent. Le 18/01/2011 10:08, Tze Shyuan a écrit : Hi, I am new in using open scene graph, and i have problems is setting up osg with microsoft visual 2008 c++ express edition. can anyone help me up? Thank you! Cheers, shyuan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35722#35722 ___ 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] Osg and threads
Hi all, Currently working on a way to manage the memory efficiently, I would like to know what are the osg threads running ? I mean there are some threads in the databasePager, depending on the rendering threading mode there are threads for the render, the cull, or whatever... Did I miss something important ? What are the osg threads ? I would like to be able to make some king of pause on all treads to be able to allocate the whole available memory for the process without having some crash because a thread would be working (and so allocating memory) during this operation. Thanks for your help. Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Osg and threads
Hi Robert, First of all thanks for your answer, I didn't know about the Viewer::startThreading/stopThreading() and this sounds interesting I know that my request seems to be a very strange way to manage memory by pausing threads ... But I am not (completely) crazy. The datas amount I have to manage is the reason why I need to be sure, before loading a file, that I have enought memory including a fixed amount that I reserve for the rest of the code... so I need to saturate memory for a little while to be sure of the amount I can use, and for that I need to stop other threads to be sure they won't crash because of bad_alloc errors that are not managed. Thanks, I'll have a look at the things you gave to me. Regards, Vincent. Le 13/01/2011 11:32, Robert Osfield a écrit : Hi Vincent, The OSG threads that will run automatically are the DatabasePager when you have paged databases and any viewer threads. There is a viewer method for getting the threads. However, the threads are designed to be arbitrarily paused, you can start and stop the viewer threads via Viewer::startThreading/stopThreading() but this creates and destroys threads so not quite what you are after. However, I'm kinda perplexed how you think you might be managing memory more efficiently by pausing threads and doing stuff and then un pausing. I can't help but feel that you need to take a step back and work out what you mean by managing memory efficiently, there are lots of different ways of doing this, but given no information about what you mean and you actual motivation for this others like myself can't really point you in the right direction, the best I can say is from the sound of it you are currently looking in the wrong place. Robert. On Thu, Jan 13, 2011 at 8:14 AM, Vincent Bourdier vincent.bourd...@gmail.com wrote: Hi all, Currently working on a way to manage the memory efficiently, I would like to know what are the osg threads running ? I mean there are some threads in the databasePager, depending on the rendering threading mode there are threads for the render, the cull, or whatever... Did I miss something important ? What are the osg threads ? I would like to be able to make some king of pause on all treads to be able to allocate the whole available memory for the process without having some crash because a thread would be working (and so allocating memory) during this operation. Thanks for your help. Regards, Vincent. ___ 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] Osg and threads
Hi, I'm still having issues with that... I use a composite viewer with only one view. I tried to call startThreading/stopThreading() but it does nothing... I also tried getAllThreads(...) to get for each thread its thread ID, and it returns me only one thread with ID to 0... even if I know that there is 2 threads running for the rendering... I know I'm not supposed to disturb the rendering threads, but if I cannot get them there is no risk at all... Did I miss something ? Thanks. Regards, Vincent. Le 13/01/2011 11:49, Vincent Bourdier a écrit : Hi Robert, First of all thanks for your answer, I didn't know about the Viewer::startThreading/stopThreading() and this sounds interesting I know that my request seems to be a very strange way to manage memory by pausing threads ... But I am not (completely) crazy. The datas amount I have to manage is the reason why I need to be sure, before loading a file, that I have enought memory including a fixed amount that I reserve for the rest of the code... so I need to saturate memory for a little while to be sure of the amount I can use, and for that I need to stop other threads to be sure they won't crash because of bad_alloc errors that are not managed. Thanks, I'll have a look at the things you gave to me. Regards, Vincent. Le 13/01/2011 11:32, Robert Osfield a écrit : Hi Vincent, The OSG threads that will run automatically are the DatabasePager when you have paged databases and any viewer threads. There is a viewer method for getting the threads. However, the threads are designed to be arbitrarily paused, you can start and stop the viewer threads via Viewer::startThreading/stopThreading() but this creates and destroys threads so not quite what you are after. However, I'm kinda perplexed how you think you might be managing memory more efficiently by pausing threads and doing stuff and then un pausing. I can't help but feel that you need to take a step back and work out what you mean by managing memory efficiently, there are lots of different ways of doing this, but given no information about what you mean and you actual motivation for this others like myself can't really point you in the right direction, the best I can say is from the sound of it you are currently looking in the wrong place. Robert. On Thu, Jan 13, 2011 at 8:14 AM, Vincent Bourdier vincent.bourd...@gmail.com wrote: Hi all, Currently working on a way to manage the memory efficiently, I would like to know what are the osg threads running ? I mean there are some threads in the databasePager, depending on the rendering threading mode there are threads for the render, the cull, or whatever... Did I miss something important ? What are the osg threads ? I would like to be able to make some king of pause on all treads to be able to allocate the whole available memory for the process without having some crash because a thread would be working (and so allocating memory) during this operation. Thanks for your help. Regards, Vincent. ___ 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] LOD::setRange crash
2010/12/26, issam boughanmi amigof...@gmail.com: Hi, using delta3d 2.4 +osg 2.8.2 i have a pagedlod terrain built with vpb 0.9.10 (i think) and some other objects in my scene i have a crash in my application after switching to the debug mode the crash occur in this line Code: void LOD::setRange(unsigned int childNo, float min,float max) { if (childNo=_rangeList.size()) _rangeList.resize(childNo+1,MinMaxPair(min,min)); _rangeList[childNo].first=min; _rangeList[childNo].second=max; } of the lod.cpp file this happen when i load the pagedlod terrain what this mean ? before my application was unstable and i had crash sometime but now i have the crash every application load any help is welcome -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=35167#35167 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Envoyé avec mon mobile ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [ANN] New book published - OpenSceneGraph 3.0 Beginner's Guide
Congratulations ! I was interested in writing this book as Packt offered me, but it was too much work and I'm not an OSG master yet ... Now I'm very interested in reading it ! Vincent. Le 22/12/2010 14:04, Wang Rui a écrit : Hi all, After 6 months work, we would finally proudly announce a new OSG beginners book: OpenSceneGraph 3.0 Beginner's Guide, written by Wang Rui and Qian Xuelei, and published by Packt Publishing. This time we are writing totally in English and you could be free from the hard-to-read Chinese characters this time (except those in my country :-) The official website of this book is: https://www.packtpub.com/openscenegraph-3-0-beginners-guide/book And you may find it on Amazon: http://www.amazon.com/OpenSceneGraph-3-0-Beginners-Rui-Wang/dp/1849512825/ We'd like to first thank Don Burns and Robert Osfield for their creative efforts in giving birth to OpenSceneGraph, as well as thousands of members in the OSG core community, for their supports and contributions all the time. Thanks again to Robert Osfield, a pure open source enthusiast and father of a happy family, for his tremendous passion in leading the development the OSG project for so many years (since 1999). He also took time out of his busy schedule to write the foreword for this book. We must express our deep gratitude to Rakesh Shejwal, Usha Iyer, Leena Purkait, Priya Mukherji, and the entire Packt Publishing team for their talented work in producing yet another product, as well as Jean-Sébastien Guay and Cedric Pinson for reviewing the first drafts of the book and providing insightful feedback. We would like to acknowledge John F. Richardson and Marek Teichmann, who announced the book at the OpenSceneGraph BOF at SIGGRAPH 2010. We also offer special thanks to Zhanying Wei, Xuexia Chen, Shixing Yang, Peng Xiao, Qingliang Liu, Su Jiang, and a number of other people who contributed to the completion of this book in different ways. Finally, we owe the most sincere thanks to Paul Martz, who dedicates the first non-commercial book to OSG beginners all over the world and provides great help in supporting the publication of our past and current books. I will dedicate this book to his parents, Lihang Wang and Ximei Bao, and my lovely fiancée Qin Leng, for their patience and moral support during the entire writing. Hope this book could be a not too bad present for everyone who wants to learn OSG step by step, or just loves to find bugs flying around the book :-) Finger crossed to see if this would be usable for the community, and any suggestions and advices will be always appreciated. Cheers, and merry Christmas to everybody, Wang Rui ___ 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] change model dynamically
Hi Lucie, I think this is a simple C++ issue. First you create _model which is a pointer on a node. Then you make a new node and set _model to store its adress. Next, you load a new node and set _model to store it again. So the first thing is, you don't need to do _model = new osg::Node(); So now _model is a pointer to a memory area where model1.osg is loaded. Let's assume that you make something like view-setSceneData(_model). Now, the view root node, which is also a pointeur, contain the same adress than _model, where model1.osg is loaded. Last, when you load a new model and set _model to store this new adress, you are not modifying the viewer root node. You should do a viewer-setSceneData(osgDB::readNodeFile(model2.osg)); or maybe a group-replaceChild(_model,osgDB::readNodeFile(model2.osg)); Don't hesitate to take a piece of paper to draw some memory allocation and pointers to understand what is really done. I hope this will help you. Regards, Vincent. 2010/12/10 lucie lemonnier lucielemonn...@hotmail.fr Hi, I want to change the 3D model dynamically at the runtime. I have inatialize my node at : _model = new osg::Node(); _model = osgDB::readNodeFile(model1.osg); and when I do a particular action, I would like that the 3D model changes, I write this : _model = osgDB::readNodeFile(model2.osg); But it doesn't work! Would you have an idea? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34707#34707 ___ 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] create Geometry
Hi Alexander, How do you get CATIA geometries ? do you use an external library ? Thanks Regards, Vincent Le 22/11/2010 13:52, Alexander Moeller a écrit : That was exactly what i was looking for. My goal is to read CATIA-files and display them with OSG. Up to now i could use a library to read these files. I got a pointer to the root of this file back, but this pointer was not compatible to OSG. So i walked the hole tree down to the points and tried to rebuild the geometric object with OSG. For example: I have a plane with a hole defined by an inner and an outer loop. I want to rebuild it by creating two polygons and subtract one from another. Greetings Alexander -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33918#33918 ___ 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] create Geometry
Same thing here, the external libraries are not free and sometimes contains bugs/crash... If you would share any progress on how is it possible to manage CATIA file with only free libraries, I would be very grateful and interested in helping you. Regards, Vincent. Le 22/11/2010 14:07, Alexander Moeller a écrit : Yes, I do. But my company didn't want to use it any longer. So i'm looking for alternatives. Gruß Alexander -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33920#33920 ___ 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] Semi-transparency
Hi Lucie, You should have a look in osg examples, there is some piece of code where transparency is set. HUD example could be a good start. Here are the main steps : * set the material alpha value to 0.5 (for 50% tranparency) * set the render bin to transparent Hoping this could help you, Regards, Vincent. Le 10/11/2010 18:24, lucie lemonnier a écrit : Hi, How to render an imported model semi-transparent? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33670#33670 ___ 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] Better debug visualization in Visual Studio
Hi Manuel, I'll try it sooner to be sure, it could be nice to have some debug info rules for OSG classes that we can share. Thanks for the information Regards, Vincent. Le 25/10/2010 09:54, Manuel Garnier a écrit : Hi Vincent, I have to disagree with you : it works for me with VS 2008. I'm using VS2008 Professional Edition SP1. There is no official support on MSDN though. This may have been part of a recent update. Cheers, Manuel -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33040#33040 ___ 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] Better debug visualization in Visual Studio
Nice :-) Its works well on VS2008 SP1 Thanks for the tip Regards, Vincent. Le 25/10/2010 10:21, Vincent Bourdier a écrit : Hi Manuel, I'll try it sooner to be sure, it could be nice to have some debug info rules for OSG classes that we can share. Thanks for the information Regards, Vincent. Le 25/10/2010 09:54, Manuel Garnier a écrit : Hi Vincent, I have to disagree with you : it works for me with VS 2008. I'm using VS2008 Professional Edition SP1. There is no official support on MSDN though. This may have been part of a recent update. Cheers, Manuel -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33040#33040 ___ 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] Better debug visualization in Visual Studio
Hi, FYI, this is not compatible on VS2008 and previous versions. (I mean the _vcee_autoexp variable) For theses versions you have to edit the autoexp.dat file. Sorry I didn't tried already Vincent. Le 22/10/2010 10:35, Dženan Zukić a écrit : Hi, have you tried it? Opinions, experience? Cheers, Dženan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32971#32971 ___ 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] Update callbacks and LOD
Hi, To my mind there are two solutions : 1. You put your callback on the LOD child you want, so when the child will be hidden by a upper-detailed level child, the callback should not be traversed 2. in your callback you check if your node is still active, and if not, just do nothing. Hope this will help you. Regards, Vincent. Le 08/09/2010 14:20, Roman Grigoriev a écrit : Hi, I have LOD with 3 nodes and use updatecallback to Animate children, I setup updatecallback to my highest LOD, my when i switch to medium lod my update callback worked also. Is it possible to switch it off when my model switches to another LOD. my updatecallback class ModelNodeCallbackTower : public osg::NodeCallback { public: virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) { osg::MatrixTransform* mtx = dynamic_castosg::MatrixTransform*(node); if (mtx nv-getFrameStamp()) { std::cout!!!std::endl; } traverse(node, nv); } }; ... Thank you! Cheers, Roman -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31412#31412 ___ 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] 3D envelopes
Hi Robert, Sorry my question was not complete. By envelope I mean convex hull. BB and BS are too simple to approximate any 3D model to my mind. The convex is not necessary, just a hull could be fine. I'll be interested in every code/idea/suggestion about that. Thanks a lot. Regards, Vincent. Le 02/09/2010 16:45, Robert Osfield a écrit : HI Vincent, What do you mean by 3D envelope, it's rather an open ended all by itself. Convex hull? Bounding box? Bounding sphere? A pre-paid A4 envelope perfect for sending large pictures through the post? Robert. On Thu, Sep 2, 2010 at 3:12 PM, Vincent Bourdier vincent.bourd...@gmail.com wrote: Hi all, I am currently looking for a way to compute envelopes from 3D datas (Geometry, Groups, etc...) I saw that external lib could do it, but first of all I ask to all of you if someone did something for OSG that could help me. That would help me a lot in my work. Thanks for your help. Regards, Vincent. ___ 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] 3D envelopes
Hi all, I am currently looking for a way to compute envelopes from 3D datas (Geometry, Groups, etc...) I saw that external lib could do it, but first of all I ask to all of you if someone did something for OSG that could help me. That would help me a lot in my work. Thanks for your help. Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] LOD Culling issue
Hi Robert, Thanks a lot for this answer, I tried and this fix my issue :) Regards, Vincent. Le 16/07/2010 10:50, Robert Osfield a écrit : Hi Vincent, Do you mean that I have to initialize the Bounding Sphere of the PagedLOD node when I create it ? because I didn't found any special method in LOD or PagedLOD about that. You obviously didn't look hard enough... in the LOD header you'll find: /** Modes which control how the center of object should be determined when computing which child is active.*/ enum CenterMode { USE_BOUNDING_SPHERE_CENTER, USER_DEFINED_CENTER }; /** Set how the center of object should be determined when computing which child is active.*/ void setCenterMode(CenterMode mode) { _centerMode=mode; } /** Get how the center of object should be determined when computing which child is active.*/ CenterMode getCenterMode() const { return _centerMode; } /** Sets the object-space point which defines the center of the osg::LOD. center is affected by any transforms in the hierarchy above the osg::LOD.*/ inline void setCenter(const vec_type center) { _centerMode=USER_DEFINED_CENTER; _userDefinedCenter = center; } /** return the LOD center point. */ inline const vec_type getCenter() const { if (_centerMode==USER_DEFINED_CENTER) return _userDefinedCenter; else return getBound().center(); } /** Set the object-space reference radius of the volume enclosed by the LOD. * Used to determine the bounding sphere of the LOD in the absence of any children.*/ inline void setRadius(value_type radius) { _radius = radius; } /** Get the object-space radius of the volume enclosed by the LOD.*/ inline value_type getRadius() const { return _radius; } Use these user bounding sphere methods when your PagedLOD has all external children to make sure it has a relevant bounding sphere. 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] LOD Culling issue
Hi Robert, Thanks for your answer. Do you mean that I have to initialize the Bounding Sphere of the PagedLOD node when I create it ? because I didn't found any special method in LOD or PagedLOD about that. Thanks. Regards, Vincent. Le 10/07/2010 11:32, Robert Osfield a écrit : Hi Vincent, If a PagedLOD is not being visited then it'll likely be because it's being view frustum culled or culled by an LOD above it. Not setting up the bounding volume of the PagedLOD correctly would be a likely candidate for this happening inappropriately. Robert. On Fri, Jul 9, 2010 at 1:50 AM, Vincent Bourdier vincent.bourd...@gmail.com wrote: Hi all, Still having issues with PagedLOD..._ My scene is composed by PagedLOD only at start-up. All is good, the files are loaded and the geometry are displayed. But when, before launching the render loop, I add a little geometry (not a pagedLOD, just a simple little sphere) in my scene, PagedLOD do not Load. The database pager request List is empty. I need to move the camera very close to a LOD (knowing it position without seeing it) to launch the PagedLOD loading. It seems that the PagedLOD nodes are not visited byt the CullVisitor, so they can't request the load of their children. Any idea would be very appreciated because after 8h on this issue, I still have no idea of the problem... Thanks for your help. Regards, Vincent. ___ 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] LOD Culling issue
Hi all, Still having issues with PagedLOD... _ My scene is composed by PagedLOD only at start-up. All is good, the files are loaded and the geometry are displayed. But when, before launching the render loop, I add a little geometry (not a pagedLOD, just a simple little sphere) in my scene, PagedLOD do not Load. The database pager request List is empty. I need to move the camera very close to a LOD (knowing it position without seeing it) to launch the PagedLOD loading. It seems that the PagedLOD nodes are not visited byt the CullVisitor, so they can't request the load of their children. Any idea would be very appreciated because after 8h on this issue, I still have no idea of the problem... Thanks for your help. Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] nofity in two files from two differents applications
Hi all, I'm using the osg::notify logs, but in two applications(threads) in the same process. Each application uses the notify logs of osg that are redirected into a log file, but when one application run and the second is started, it redirect each logs into a new common file... I would like to keep each log into a separate file, but keeping the osg::notify usage. Do you have any idea or suggestion ? Thanks Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Noob question: how to change osg::Group to osg::Switch
Hi, You just have to create a new Switch, attach the geodes to it, and get the parent of the group to attach the switch and remove the group. Next just check that the geode only have one parent, but I think this would be enought Regards, Vincent. Le 17/06/2010 12:58, Roman Grigoriev a écrit : Hi, Sorry for noob question but maybe there is example how to change this scenegraph group -| |-geode |-geode to switch-| |-geode |-geode ... Thank you! Cheers, Roman -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29074#29074 ___ 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] Picking issue with PagedLOD
Hi all, I get a strange PagedLod behavior concerning LOD picking : Sometimes, at runtime, I modify the PagedLOD ranges to have the high level to be always loaded, whatever is the distance from camera. For that, I set range from [0,n][n,1e20] to [0,0][0,1e20]. The [0,0] range seems to be a value causing issues when the LOD geometry is picked. (a geometry between the camera and the LOD is not picked, as if its nodemask was not compatible with the one of the intersector) I set value to [0,0.001] to solve the issue. Is there any problem with the [0,0] range on a PagedLOD child ? I would like to notify you, maybe someone get this issue without finding the solution... Regards, Vincent ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Frame rate in OpenSceneGraph
Hi Lucie, The 60Hz frame rate limitation is due to the graphic-card pilot vertical synchronization. Disable the vertical Sync. and the Frame rate displayed will be the real one. Regards, Vincent. Le 20/05/2010 15:10, lucie lemonnier a écrit : Hi, I want to know if there is a limit in frame rate in OpenSceneGraph because when I run a simple application (ex : osgviewer cow.osg), the frame rate never exceeds 60 fps. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28063#28063 ___ 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] Follow a node in 3d scene
Hi, Have a look at osgGA::nodeTrackerManipulator for the camera following the node. And for the multiples camera, there are examples in OSG sources on how to manage that. Vincent. Le 19/05/2010 18:47, Sanat Talmaki a écrit : Hi, I am just learning osg and have been able to create a scene in which I have 2 objects that I can control via keyboard. I can change focus with which object I control using TAB key. My question is: If I want to follow one of the objects while it moves and also show the global scene through another camera, how do I get about doing this ? I looked at some of the example that come with the source code but didn't find it there. Any help would be greatly appreciated. Thanks -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28046#28046 ___ 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] Multiples handlers and double clic event
Hi all, Nobody have ever tried this stuff ? Thanks, Vincent. Le 07/05/2010 11:24, Vincent Bourdier a écrit : Hi all, Working with multiples handlers, I would like to get some advices on a way to catch a double-clic event, without having two Release events on an other handler... I really don't know how I can manage that ... Thanks. Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Multiples handlers and double clic event
Hi all, Working with multiples handlers, I would like to get some advices on a way to catch a double-clic event, without having two Release events on an other handler... I really don't know how I can manage that ... Thanks. Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Rapid clic event management
Hi all, Trying to make a little shoot game, I get the problem of the shoot event : a rapid clic is handled as a double clic... so juste one event is launched... How can I get each mouse event with no double-clic management ? Thanks. Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fwd: Re: Color array optimization
Hi, Le 07/04/2010 20:45, Jason Daly a écrit : Yes, BIND_PER_PRIMITIVE is bad. BIND_OVERALL is fine. I don't know of any Optimizer settings that do this, but it shouldn't be hard to write one. Just one last question ... Why does BIND_PER_PRIMITIVE is wrong ? what about BIND_PER_PRIMITIVESET ? Thanks. Regards, Vincent ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Fwd: Re: Color array optimization
Hi, Thanks for your answers, I just made it and it runs well. Regards, Vincent. Le 07/04/2010 20:45, Jason Daly a écrit : Ulrich Hertlein wrote: Hi Tim, On 7/04/10 15:12 , Tim Moore wrote: osg::Optimizer attempts to optimize for performance, not memory. The optimization you're proposing will have a negative impact on OpenGL performance. How do you figure? Vincent would like to replace BIND_PER_VERTEX colors with a BIND_OVERALL color where possible. That is a very common thing to do in OSG and is, as I understand it, well supported even in OpenGL 3.0+ and OpenGL ES 2.0. Looking at that again, I may have confused that with BIND_PER_PRIMITIVE. Yes, BIND_PER_PRIMITIVE is bad. BIND_OVERALL is fine. I don't know of any Optimizer settings that do this, but it shouldn't be hard to write one. --J ___ 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] PagedLOD
Hi Robert, I know that I am fighting with PagedLOD default behavior. The default behavior is very good in 80% of the use case, and for the last 20%, I just need to make PagedLOD nodes only manage the higher level, and if possible release the Low-level to save some memory... So with my actual code, the Low and the High level will be loaded in memory and the High level will be displayed. I just would like to make the Low level not beeing kept in memory (if possible) PagedLOD is designed to have keep the lowest level of detail nodes in memory and expiry the high level of details, and only expire the lower level of details once the high level ones have been removed. So the low level can expires ? I thought the lowest level never expire to keep at least one level to be displayed. Thanks for your help Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLOD
Hi Robert, Thanks for your answer, I understand that I'm not using PagedLOD for what they are made for... So I'll make some test by my side. Thanks. Regards, Vincent. Le 08/04/2010 11:14, Robert Osfield a écrit : Hi Vincent, I don't really know where to start as it does sound like to me you are trying to do something that I would see as inappropriate for a real-time application. It's like you're trying to re-direct a river back up a mountain and expecting it to flow back up-hill. Now if you really think what you are trying to do is sensible for you application and PagedLOD doesn't do this, then there is a point when you need to decide that you need to go it alone and role your own paging node, and your own database pager. There is nothing stopping you for implementing your own paging node and database pager, sure it's more work but then you'd have complete control. I can't really help you further on this journey. My advice would be to just use PagedLOD as it is, for me trying to expiry low level of detail nodes is a false economy and counter-productive to purse, but if you feel you need to do then so be it. Off you go. Robert. On Thu, Apr 8, 2010 at 10:02 AM, Vincent Bourdier vincent.bourd...@gmail.com wrote: I know that I am fighting with PagedLOD default behavior. The default behavior is very good in 80% of the use case, and for the last 20%, I just need to make PagedLOD nodes only manage the higher level, and if possible release the Low-level to save some memory... So with my actual code, the Low and the High level will be loaded in memory and the High level will be displayed. I just would like to make the Low level not beeing kept in memory (if possible) PagedLOD is designed to have keep the lowest level of detail nodes in memory and expiry the high level of details, and only expire the lower level of details once the high level ones have been removed. So the low level can expires ? I thought the lowest level never expire to keep at least one level to be displayed. Thanks for your help ___ 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] Add a color node in the scenegraph?
Hello, You should try just adding a material on each PAT. If I'm right, material will overpass the color of the geode... If anyone can confirm :-[ Regard, Vincent Le 07/04/2010 11:33, Benjamin GODIN a écrit : Hello, I have a scene with one object but represented many times. My graph is something like that : [Image: http://img576.imageshack.us/img576/1522/osg.png ] I want to give different colors to the different objects. The method I've found is setColor on a ShapeDrawable but that means I need to create many instances of this object. Is there any way I can add the color in the scene graph (as a node)? Thanks. :)[/img] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26507#26507 ___ 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] PagedLOD
Hi all, I'm currently working with a huge set of PagedLOD nodes and I would like to neutralize some of them, forcing the HIGH level to be loaded while I didn't tell him to restore the LOD previous state. My code is based on the rangeList : there is only 2 children (Low and High levels) and I modify the range list from [0 , 400] [400, 1e20] to [0 , 0] [0, 1e20] using a nodeVisitor traversion the PagedLOD nodes. But, there are still some Low level nodes visible in the scene... I would like to be sure they won't be loaded and that the High level will be. How can I do that ? Thanks. Regards, Vincent ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Color array optimization
Hi all, Looking for optimization I'm currently searching a color Array optimizer. Something modifying the color array and its binding when possible, of course without modifying the render of the geometry. Is there something like that ? I didn't found anything in the osgUtil::optimizer documentation. Thanks. Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Fwd: Re: Color array optimization
Hi Robert, The optimization I am currently working on is the good usage of binding. Some of our code generate color array with a color by vertex, even if the color is the same for each vertices... keeping only one color using the binding overall, we can obtain a considerable file size reduction. Thanks for your answer. Regards, Vincent. Le 06/04/2010 17:42, Robert Osfield a écrit : Hi Vincent, On Tue, Apr 6, 2010 at 8:31 AM, Vincent Bourdier vincent.bourd...@gmail.com wrote: Looking for optimization I'm currently searching a color Array optimizer. Something modifying the color array and its binding when possible, of course without modifying the render of the geometry. Is there something like that ? I didn't found anything in the osgUtil::optimizer documentation. There isn't a specific color array optimization. I'm rather curious about what you'd optimize about a colour array. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Tell the DatabasePager to not touch that frame rate
Hi, Just an idea... maybe the database pager thread priority is not set. Set it to a low priority can help the viewer maintain a better frame rate maybe... I'm also interested in this question. Regards, Vincent. Le 15/03/2010 12:15, Trajce (Nick) Nikolov a écrit : I want to join to this thread with similar experience on Windows. I am getting the same thing, where the frame rate goes to 2-3fps and then goes higher to some real time. No idea where it comes from. -Nick On Mon, Mar 15, 2010 at 1:03 PM, Adrian Lindberg osgfo...@tevs.eu mailto:osgfo...@tevs.eu wrote: So I've been getting in to OSG, much thanks to the help here on the mailing list/forum. But I'm having some issues with performance which I can't seem to pinpoint. I use extensive PagedLOD, in a similar way osgTerrain does it (using quad-trees). For me performance is the king and quality is secondary, so I want to have a frame rate that is at least 30 fps at all times (given some minimum requirements). When all LODs are loaded I get constant 60 fps which is due to the screen synch and when moving around I tend to get 20-30 fps due to loading. However, it is not uncommon that the fps dips completely and falls to sub 1 fps for a short while (up to a few seconds) and then resumes the 20-30 fps target. What I've tried so far is to set the setMaximumNumOfObjectsToCompilePerFrame to a very low value (1) and set the thread priority for the DatabasePager to low. I'm using VBO:s for vertex data and am currently running OSX 10.6 with OSG 2.9.6. For me it's vital to get rid of these dip, I'd much rather display low res data then getting drops. Profiling for me through Xcode seems to put the DatabasePager out of order so I can't really pinpoint why I'm getting these drops. Any ideas or suggestions? Cheers, Adrian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=25647#25647 ___ osg-users mailing list osg-users@lists.openscenegraph.org mailto: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] PagedLOD and child switch event
Hi everybody, I just ran some test on my pagedLOD based scene, and i found a behavior I never saw before : My pagedLOD nodes have a range based on 400 pixel size on screen to switch. I just saw that when I go far from the node, it switches with lower resolution node (as expected) but when I put my camera to it original position (before moving far) the swith to higher node is not done. I have to go near from it to see the switch to higher detailed node. I think this is normal behavior to avoid having the children switching again and again if we are around the 400px limit, but I would like to be sure... Thanks for your help. Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLod dataBasePager memory managment
Hi Robert, This is the memory management patch, without the callback. If you are interested in... use it. :-) Regards, Vincent. Le 19/02/2010 16:40, Vincent Bourdier a écrit : Hi Robert, osgcallback already implements a ReadFilecallback... so I don't know if it will be useful to make an example. If you want I can make a wiki page, but for that could you tell me were to put it ? Thanks. Regards, Vincent. Robert Osfield a écrit : Hi Vincent, On Fri, Feb 19, 2010 at 2:09 PM, Vincent Bourdier vincent.bourd...@gmail.com wrote: I implemented my own ReadFile callback, working well. Yay! :-) Would you (and osg) be interested in having it ? I can submitt in directly in osg src. It's probably a bit too domain specific to be part of the OSG, perhaps an example with it in would be good, or an example on the wiki so that if others want to use the same techniques then they could deploy. I implemented if for WIN32 only, so someone should implement the other version... For the moment, it uses psapi.lib ... not very portable but maybe someone can help be making it portable and without other dependencies. I don't even know was psapi.lib is... ;-) Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org __ Information from ESET NOD32 Antivirus, version of virus signature database 4880 (20100219) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com Index: include/osgDB/ReaderWriter === --- include/osgDB/ReaderWriter (revision 10288) +++ include/osgDB/ReaderWriter (working copy) @@ -208,6 +208,7 @@ FILE_LOADED, //! File successfully found, loaded, and converted into osg. FILE_LOADED_FROM_CACHE, //! File found in cache and returned. ERROR_IN_READING_FILE, //! File found, loaded, but an error was encountered during processing. + INSUFFICIENT_MEMORY_TO_LOAD, //! File found but not loaded because estimated memory usage is not enought FILE_REQUESTED //! Asyncronous file read has been requested, but returning immediatiely, keep polling plugin till file read has been completed. }; @@ -248,6 +249,7 @@ bool error() const { return _status==ERROR_IN_READING_FILE; } bool notHandled() const { return _status==FILE_NOT_HANDLED; } bool notFound() const { return _status==FILE_NOT_FOUND; } + bool notEnoughMemory() const { return _status==INSUFFICIENT_MEMORY_TO_LOAD; } protected: Index: src/osgDB/DatabasePager.cpp === --- src/osgDB/DatabasePager.cpp (revision 10288) +++ src/osgDB/DatabasePager.cpp (working copy) @@ -552,6 +552,7 @@ if (rr.validNode()) databaseRequest-_loadedModel = rr.getNode(); if (rr.error()) osg::notify(osg::WARN)Error in reading file databaseRequest-_fileName : rr.message() std::endl; + if (rr.notEnoughMemory()) osg::notify(osg::DEBUG_INFO)Not enought memory to load file databaseRequest-_fileName std::endl; if (databaseRequest-_loadedModel.valid() osgDB::containsServerAddress(databaseRequest-_fileName) Index: src/osgDB/ReadFile.cpp === --- src/osgDB/ReadFile.cpp (revision 10288) +++ src/osgDB/ReadFile.cpp (working copy) @@ -69,6 +69,7 @@ ReaderWriter::ReadResult rr = Registry::instance()-readNode(filename,options); if (rr.validNode()) return rr.takeNode(); if (rr.error()) notify(WARN) rr.message() std::endl; + if (rr.notEnoughMemory()) notify (DEBUG_INFO) Not enought memory to load file filename std::endl; return NULL; } ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLod dataBasePager memory managment
Hi Robert, I implemented my own ReadFile callback, working well. Would you (and osg) be interested in having it ? I can submitt in directly in osg src. I implemented if for WIN32 only, so someone should implement the other version... For the moment, it uses psapi.lib ... not very portable but maybe someone can help be making it portable and without other dependencies. Regards, Vincent. Robert Osfield a écrit : On Thu, Feb 4, 2010 at 4:23 PM, Vincent Bourdier vincent.bourd...@gmail.com wrote: What difference will it makes if I return FILE_LOADED or ERROR_IN_READING_FILE ? If you didn't load the file you shouldn't return a FILE_LOADED, so since with don't have an INSUFFICIENT_MEMORY_TO_LOAD (or similar) enum then the closest would be ERROR_IN_READING_FILE. So If I decrease this value, some PagedLod will be released ? It won't release any right away, but as the frames progress it'll work to get the max down to your specified target when it's possible. What difference with cameraLODScale ? The osg::Camera::setLODScale() just changes which children are selected in the view, it doesn't change the max number of PagedLOD target, but it will directly affect how many PagedLOD that will be active in any view. I just made a test increasing/decreasing this value and I saw the effect on PagedLod and memory. Yes, this is exactly how one would expect it to work. Robert. __ Information from ESET NOD32 Antivirus, version of virus signature database 4869 (20100215) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLod dataBasePager memory managment
Hi Robert, osgcallback already implements a ReadFilecallback... so I don't know if it will be useful to make an example. If you want I can make a wiki page, but for that could you tell me were to put it ? Thanks. Regards, Vincent. Robert Osfield a écrit : Hi Vincent, On Fri, Feb 19, 2010 at 2:09 PM, Vincent Bourdier vincent.bourd...@gmail.com wrote: I implemented my own ReadFile callback, working well. Yay! :-) Would you (and osg) be interested in having it ? I can submitt in directly in osg src. It's probably a bit too domain specific to be part of the OSG, perhaps an example with it in would be good, or an example on the wiki so that if others want to use the same techniques then they could deploy. I implemented if for WIN32 only, so someone should implement the other version... For the moment, it uses psapi.lib ... not very portable but maybe someone can help be making it portable and without other dependencies. I don't even know was psapi.lib is... ;-) Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org __ Information from ESET NOD32 Antivirus, version of virus signature database 4880 (20100219) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Access to vertices or bones after reading data in with osgDB::radNodeFile(s)
Hi Alexander, To acces vertices, you just have to get each osg::Geode (use visitors). In each geode there are drawables, that you cast into geometries or ShapeDrawables. Geometries give you acces to the VertexArray. Hope this helps. Regards, Vincent Alexander Martens a écrit : Hi, after searching into the Internet and all the available documentations, I wasn't able to solve the following problem: I read in an object file by the osgDB::readNodeFile method and an bvh file by the osgDB::readNodeFiles() method with the corresponding options. It's easy to visualize the data, but now I need access to the vertices, defined by the obj file, or the bones, defined by the bvh file. Is it possible? Can anyone tell me shortly how to do this? The background is that I have to implement linear blend skinning and therefore I need the access. The goal is that I animate the mesh imported from the object file corresponding to the animation of the bvh file. I would be really thankful! ... Thank you! Cheers, Alexander -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24288#24288 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org __ Information from ESET NOD32 Antivirus, version of virus signature database 4869 (20100215) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] PagedLod : how to change priority for some nodes
Hi all, Maybe my last question about PagedLod... I hope ;-) Starting my application, databasePager start to load thousand of PagedLod in my scene. In this list, I would like to make some PagedLods nodes being loaded before the rest of the scene. (because thousands of node take sometimes more than 1 or 2 min to load) How can I do that ? (Assuming it is possible...) Thank you. Regards, Vincent __ Information from ESET NOD32 Antivirus, version of virus signature database 4856 (20100210) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLod : how to change priority for some nodes
Hi Robert, Thanks for the tip, I'll try that. Regards, Vincent. Robert Osfield a écrit : Hi Vincent, PagedLOD has a prority offset and scale per child that allows you to modify the priority computed from the distance range. The PagedLOD methods of interest are: void setPriorityOffset(unsigned int childNo, float priorityOffset) { expandPerRangeDataTo(childNo); _perRangeDataList[childNo]._priorityOffset=priorityOffset; } float getPriorityOffset(unsigned int childNo) const { return _perRangeDataList[childNo]._priorityOffset; } unsigned int getNumPriorityOffsets() const { return _perRangeDataList.size(); } void setPriorityScale(unsigned int childNo, float priorityScale) { expandPerRangeDataTo(childNo); _perRangeDataList[childNo]._priorityScale=priorityScale; } float getPriorityScale(unsigned int childNo) const { return _perRangeDataList[childNo]._priorityScale; } unsigned int getNumPriorityScales() const { return _perRangeDataList.size(); } Robert. On Thu, Feb 11, 2010 at 9:30 AM, Vincent Bourdier vincent.bourd...@gmail.com wrote: Hi all, Maybe my last question about PagedLod... I hope ;-) Starting my application, databasePager start to load thousand of PagedLod in my scene. In this list, I would like to make some PagedLods nodes being loaded before the rest of the scene. (because thousands of node take sometimes more than 1 or 2 min to load) How can I do that ? (Assuming it is possible...) Thank you. Regards, Vincent __ Information from ESET NOD32 Antivirus, version of virus signature database 4856 (20100210) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org __ Information from ESET NOD32 Antivirus, version of virus signature database 4857 (20100211) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem with rotations using PositionAttitudeTransform
Hi Manuel, You use the osg::Quat(x,y,z,w) constructor, but your arguments are not in the good order. You may use osg::Quat(angle, osg::vec3d(x,y,z)) to be sure. Hope this can help you. Regards, Vincent. Manuel Garea a écrit : Hi, I'm trying to make some rotation of objects, but the results are not the desired I want to draw the coordinate axis. The following function draw an axis with the given rotation: Code: osg::PositionAttitudeTransform* createAxis(osg::Vec4f color, osg::Quat rotation){ osg::StateSet* axisStateSet = createColorStateSet(color); osg::Geode* axisGeode = new osg::Geode(); osg::Cylinder* axisCylinder = new osg::Cylinder(osg::Vec3(0.0f,0.0f,0.0f), 20, 5); osg::ShapeDrawable* axisDrawable = new osg::ShapeDrawable(axisCylinder); axisDrawable-setStateSet(axisStateSet); osg::PositionAttitudeTransform* axisTransform = new osg::PositionAttitudeTransform; axisTransform-setAttitude(rotation); axisGeode-addDrawable(axisDrawable); axisTransform-addChild(axisGeode); return axisTransform; } And the following function draw the 3 axis giving the rotations: Code: osg::Group* createCoordinatesAxis(){ osg::PositionAttitudeTransform* xTransform = createAxis(osg::Vec4f(1,0,0,1), osg::Quat(osg::DegreesToRadians(90.0), 0, 1, 0)); osg::PositionAttitudeTransform* yTransform = createAxis(osg::Vec4f(0,1,0,1), osg::Quat(osg::DegreesToRadians(90.0), 0, 0, 1)); osg::PositionAttitudeTransform* zTransform = createAxis(osg::Vec4f(0,0,1,1), osg::Quat(0, 1, 0, 0)); osg::Group* axisGroup = new osg::Group(); axisGroup-addChild(xTransform); axisGroup-addChild(yTransform); axisGroup-addChild(zTransform); return axisGroup; } The result is in the following image, but the axis (red, green and blue) are not turned 90 degrees!!! do someone know why??? Thank you! Cheers, Manuel[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24030#24030 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org __ Information from ESET NOD32 Antivirus, version of virus signature database 4858 (20100211) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Follow an object
Hi, Have a look on HUD example. this is a way to add geometries to the camera, and so this geometry is always visible in the screen, at the same place. Hope this helps. Regards, Vincent Tufan Taş a écrit : Hi, I am using a custom manipulator that translates and rotates the screen. I add a model as a node that is the base model and after that I add another model again as a node. I want this last added node to stay on screen while I rotate and translate the screen. In other words I want model to move with screen. How can I perform that action? Thank you! Cheers, Tufan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23900#23900 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org __ Information from ESET NOD32 Antivirus, version of virus signature database 4852 (20100209) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Follow an object
In osgHud example, some text is rendered front to the camera, whatever the camera position/orientation is. You can replace the text using 3D geometries and keeping the same behavior. If this is not what you are looking, give us more explanations... Vincent. Tufan Taş a écrit : Hi, I add geometries on the screen but when I use the manipulator to translate the scene I want that object to translate also. Like a a cockpit that ground and sky moves when rotate but the cockpit image stays on the scene. Thank you! Cheers, Tufan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23905#23905 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org __ Information from ESET NOD32 Antivirus, version of virus signature database 4852 (20100209) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgFX effects frame lag during render
Hi all, This a very strange and unexpected bug : Applying an osgFX::Scribe effect on a node, we can see a lag in the render : If you get each frame a screenshot you can see : *Frame #1* Action : no action Render : normal render of the node *Frame #2* Action : adding a osgFX::Scribe node as parent of the node to apply the effect (done in a callback on root node) Render : no node ! * Frame #3* Action : no action Render : node with applied effect. So during one frame, the node is not rendered at all... This is very embarrassing if you take a screenshot automatically in post-render of the frame where you apply the effect... Thanks for your help. Regards, Vincent __ Information from ESET NOD32 Antivirus, version of virus signature database 4854 (20100210) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgFX effects frame lag during render
Hi Robert, Thanks for the explanation. I don't have time to spend on that during the next weeks/months but maybe one day... Thanks. Regards, Vincent. Robert Osfield a écrit : HI Vincent, The frame lag is an unfortunate side effect to the way that osgFX doesn't know how to render itself until it's queried the OpenGL extensions/versions available. osgFX is rather old now and code do with a revamp that addresses this issues, but would need a form of up front extension checking that requires a valid graphics context, so it rather pushes the current decoupled design where the scene graph doesn't get involved with construction of contexts. Feel free to dive in and come up with a proposal. Robert. On Wed, Feb 10, 2010 at 3:07 PM, Vincent Bourdier vincent.bourd...@gmail.com wrote: Hi all, This a very strange and unexpected bug : Applying an osgFX::Scribe effect on a node, we can see a lag in the render : If you get each frame a screenshot you can see : *Frame #1* Action : no action Render : normal render of the node *Frame #2* Action : adding a osgFX::Scribe node as parent of the node to apply the effect (done in a callback on root node) Render : no node ! * Frame #3* Action : no action Render : node with applied effect. So during one frame, the node is not rendered at all... This is very embarrassing if you take a screenshot automatically in post-render of the frame where you apply the effect... Thanks for your help. Regards, Vincent __ Information from ESET NOD32 Antivirus, version of virus signature database 4854 (20100210) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org __ Information from ESET NOD32 Antivirus, version of virus signature database 4854 (20100210) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLod dataBasePager memory managment
Hi Robert, I implemented my own ReadFileCallback and this sound to be a good solution, but with some limits... This is the code : /if((_MaxAvailableMemoryInMBytes - Common::MemoryAnalyzer::getProcWorkingSetSize() - (sizeInMBytes*2.1)) 0 ) return osgDB::Registry::instance()-readNodeImplementation(filename,options); else { return osgDB::ReaderWriter::ReadResult::FILE_LOADED/*ERROR_IN_READING_FILE*/; }/ So when the file size in memory estimation exceed the free memory estimated, the load is not done. But this is the point : if I return /ERROR_IN_READING_FILE, /won't the file be added to a black list ? What about /FILE_LOADED /? I don't what error code return to make the file being loaded later, when some memory will been freed. Next, is there a way to force pagedLod to unload some nodes ? to implement a force unload to free a bit a memory. I'm using OSG 2.8.1 and I cannot use the last release... As the ReadFileCallback can be implemented, are there other possible personalization concerning the way to load/unload cached datas ? Thanks for your help. Regard, Vincent. Vincent Bourdier a écrit : Hi Robert, I am trying to implement a new ReadFileCallback. This callback will check the available memory, knowing the maximum allowed du to JVM usage (c++ engine in Java application), and if there is not enough memory the callback will not load the file. I just ran some test to estimate the required memory space for each ive size. For big ive files, the memory used seems to be around 2*ive file size. For little files (5Mo) this is very fluctuating ... there is not regularity (ratio from 1.8 to 5 ). Do you have any idea of how to estimate better the required memory space ? (only ive files as input datas) Thanks. Regards, Vincent. Robert Osfield a écrit : Hi Vincent, On Thu, Jan 14, 2010 at 5:50 PM, Vincent Bourdier vincent.bourd...@gmail.com wrote: I don't understand how this is working. If a pagedLod is required it will be loaded... but we can cap the number of lod... This sounds contradictory for me. The max number of PagedLOD is a target that it aims for, but if there are more PagedLOD required for rendering the current frame then the max will exceed this trarget, and only once the view changes to require less PagedLOD will the total number come down again. If you wanted the LOD control then you just implement this yourself using osgDB::Registry::ReadFileCallback that loads the tiles and then modifies PagedLOD that it loads that are higher than a certain resolution. Do you mean that using my own readFileCallback is not sufficient and I'll need to modify PagedLod sources too ? There is no need to modify any OSG sources to adjust the LOD ranges. The ReadFileCallback can do the actual loading of the subgraph and then catch the and modify the LOD ranges. Personally I'd go go using the Camera LODScale though, it's a much simpler tool. Robert. __ Information from ESET NOD32 Antivirus, version of virus signature database 4805 (20100125) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __ Information from ESET NOD32 Antivirus, version of virus signature database 4835 (20100204) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLod dataBasePager memory managment
Hi Robert Robert Osfield a écrit : So when the file size in memory estimation exceed the free memory estimated, the load is not done. But this is the point : if I return /ERROR_IN_READING_FILE, /won't the file be added to a black list ? What about /FILE_LOADED /? The OSG doesn't provide any blacklisting capability so it's something you'll have to implement yourself in your read callback. Sorry I was not enough precise in my explanations : I don't want any blacklist, I was asking if OSG gets one. So it is perfect for me that no file will be blacklisted. I was asking what error code should I return to make DatabasePager consider the file in not available, but if a new request is done later (when some memory has been released) its will try again. What difference will it makes if I return FILE_LOADED or ERROR_IN_READING_FILE ? Next, is there a way to force pagedLod to unload some nodes ? to implement a force unload to free a bit a memory. I'm using OSG 2.8.1 and I cannot use the last release... As the ReadFileCallback can be implemented, are there other possible personalization concerning the way to load/unload cached datas ? The DatabasePager now defaults to using a MaxPagedLOD scheme where it expires currently unused PageLOD children on demand, so that as lots of new PagedLOD come in to view ones that aren't in the view are deleted keeping a roughly constant load. You can adjust the target MaxPagedLOD in your app via the OSG_MAX_PAGED_LOD env var or the DatabasePager::setTargetMaximumNumberOfPageLOD(value). Please note this is a target that will be exceeded is more PagedLOD's are required for a single frame, so the view will not ever be constrained by the MaxPagedLOD target, once the high loaded view is moved away from the PagedLOD numbers will drop back down to the target. Robert. So If I decrease this value, some PagedLod will be released ? What difference with cameraLODScale ? I just made a test increasing/decreasing this value and I saw the effect on PagedLod and memory. Thanks for your answers. Regards, Vincent. __ Information from ESET NOD32 Antivirus, version of virus signature database 4835 (20100204) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org