Re: [osg-users] [osgOcean] Culling and intersects with ocean and model...
Just to add a little: This covers a lot of the basics too, great set of tutorials that I recommend to everyone. http://www.ozone3d.net/tutorials/ http://www.ozone3d.net/tutorials/Regards, Kim. On 23 March 2011 01:37, Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com wrote: Hi Tim, I appreciate the comments. Up to this point I do not yet know what a shader does for a living... except that I presumed it shaded surfaces somehow. So... that will be my first step... I wouldn't have known that they were involved in cutting (culling) unwanted sections of objects, except that I also presume that while navigating over the vertices of an object, one could force their wishes upon that object while traversing a plane within it. You'll undoubtedly come across more accurate and complete descriptions, but to get you started, here is my way of explaining it. Shaders are essentially small programs that get run by the GPU once per (different types of items the GPU processes). So for starters there are vertex shaders (executed once per vertex) and fragment shaders (executed once per fragment). BTW, that last one is called pixel shader in D3D land, but in OpenGL we call it by the more accurate name fragment shader. A fragment is a pixel that has passed the z buffer test, and so is sure to be written to the framebuffer. There are other types now (geometry and tessellation shaders) but the most used are vertex and fragment shaders. GPUs started as a big, unprogrammable stack of state variables that controlled a fixed pipeline. Now more and more stages of the GPU's pipeline are becoming programmable, and the means to program them is to write shaders. Is a shader the right place to do this kind of job? Are there other places/techniques? Shaders were the easiest place I could think of. I could have derived from osgOcean's geometry class (MipmapGeometry I think) and modified the actual geometry in OSG each frame to cut the shape of the boat's hull in the ocean surface, or just flatten the waves' geometry in the area occupied by the hull. That actually might be the best way of getting the exact shape of the hull, because when doing things on the GPU you're a bit limited in what you can do, but on the CPU the only limit would be the amount of time you're willing to spend per frame to do the cutting. And... I'm sure you or others might suggest the ultimate shading tutorial... Ahh... I see there is an osgShaders example... perhaps I will find clues to misusing them there. Jason already sent you the link to lighthouse3d, I also used that one when I was learning. It will show you the basics of writing lighting and texturing shaders, but from there you have to use your imagination to see what else you can do with them. For instance, when you get to the Statements and Functions page ( http://www.lighthouse3d.com/opengl/glsl/index.php?statements) , you'll see a quick description of the discard keyword. This is what I used in my ocean surface fragment shader to cut the ocean surface. Essentially, what I had was four uniform vec3 variables defining the corners of the rectangle I wanted to cut, and I did a simple point-in-rectangle test to see if the current fragment was inside that rectangle (making sure to use world space coordinates for both the rectangle corners and the fragment's position), and if it was I discarded it. Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.dyndns-web.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] Problem DatabasePager, setTargetFrameRate and setMaximumNumOfObjectsToCompilePerFrame with osg 2.9.11
Hi Joaquin, On Tue, Mar 22, 2011 at 9:41 PM, Joaquin Maroto joaquin.mar...@upm.es wrote: In an old version of osg I called to these functions: setTargetFrameRate(); setMaximumNumOfObjectsToCompilePerFrame(); of the DatabasePager to control the maximum time that the simulation could take to make the dynamic load. The values I passed to this functions were smaller when I needed to load a lot of geometries to avoid cycles without them. Is it possible to have the same functionality with IncrementalCompileOperation? How can I do it? All this functionality has been movied to the osgUtil::IncrementalCompileOperation (ICO). You assign one of these to the viewer then the database pager will automatically use it. If you run the osgviewer example with the --ico option it will also automatically assign an ICO for you. Once you have an ICO assigned to the viewer you can set various parameters to control how conservative you want the incremental compiles to be. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLOD - Trying to understand climbing mem usage
Hi Robert, Sorry for being too vague. It's a data preparation + viewer app, but the problem arises during the data preparation. Some data sets do not present the symptoms whereas some others do... Here is a more detailed view of the problematic method, in pseudo-code: void function(Group parent, const string path) { If path is a directory osg::ref_ptrosg::Group group(new osg::Group); Foreach entry in the directory, do a recursive call: function(group, entry). write 'group' to disk, in 'groupFile' (somewhere out of the current directory structure) Generate a PagedLOD, to load 'groupFile' when below a given view distance (using group-getBound()) Add that PagedLOD to 'parent' unload the group (well, it's a local variable!) else if it's a 3D file Get the AABB of the 3D file (the file isn't loaded in memory) Generate a PagedLOD, to load the 3D file when below a given view distance (using AABB info) Add that PagedLOD to 'parent' } This makes memory rise very high and very quickly on a given dataset. This dataset is a hierarchical tree structure with at most 1000 3D files in each dir. What is strange is that the algorithm seems quite straightforward. I'm just going crazy! I'm pretty sure there is a stupid little thing around here that I didn't spot. Or is there some OSG internal mechanism I didn't deactivate? Tries: - As I told, I wrote (before the method runs) options = osgDB::Registry::instance()-getOptions(); options-setBuildKdTreesHint(osgDB::Options::DO_NOT_BUILD_KDTREES); options-setObjectCacheHint(osgDB::Options::CACHE_NONE); - I also tried adding databasePager.clear(); after writing the 'groupFile', but this doesn't change anything. Any idea? Many thanks. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - Robert Osfield robert.osfi...@gmail.com a écrit : Hi Sukender, You explanation of what you are doing in your app is way too light for us to be able to guess what might be amiss. Are you running the viewer? Is it just data preperation? I haven't got a clue. Robert. On Tue, Mar 22, 2011 at 5:42 PM, Sukender suky0...@free.fr wrote: Hi all, Here's something strange: - I create PageLODs that will load files on disk when needed - I create Groups of PagedLODs - I write those groups to disk (OSGB/T format). They thus contain only few data (just nodes and paths where data is). - I create a PagedLOD which loads this newly file on disk. The group is theorically unloaded after this. When repeating this, my memory usage climbs very high... but the groups should not be in memory... I wrote osgDB::Options * options = osgDB::Registry::instance()-getOptions(); options-setBuildKdTreesHint(osgDB::Options::DO_NOT_BUILD_KDTREES); options-setObjectCacheHint(osgDB::Options::CACHE_NONE); But this doesn't change anything. And of course I finally run out of memory. For info, small graphs behave normally in osgViewer (nodes load when approaching, memory usage rises, etc.). Any idea? Thanks. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ ___ 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] PagedLOD - Trying to understand climbing mem usage
Hi Sukender, Just a guess here, when you say Generate a PagedLOD, to load 'groupFile' do you call PagedLOD::addChild(Node *child, ) ? for the pageLOD will then hold the child in memory until PagedLOD::removeExpiredChildren() is called. Normally this is done in the frame loop (in updateSceneGraph()) but I think you're not in a frame loop (yet). Laurens. On 3/23/2011 10:19 AM, Sukender wrote: Hi Robert, Sorry for being too vague. It's a data preparation + viewer app, but the problem arises during the data preparation. Some data sets do not present the symptoms whereas some others do... Here is a more detailed view of the problematic method, in pseudo-code: void function(Group parent, const string path) { If path is a directory osg::ref_ptrosg::Group group(new osg::Group); Foreach entry in the directory, do a recursive call: function(group, entry). write 'group' to disk, in 'groupFile' (somewhere out of the current directory structure) Generate a PagedLOD, to load 'groupFile' when below a given view distance (using group-getBound()) Add that PagedLOD to 'parent' unload the group (well, it's a local variable!) else if it's a 3D file Get the AABB of the 3D file (the file isn't loaded in memory) Generate a PagedLOD, to load the 3D file when below a given view distance (using AABB info) Add that PagedLOD to 'parent' } This makes memory rise very high and very quickly on a given dataset. This dataset is a hierarchical tree structure with at most 1000 3D files in each dir. What is strange is that the algorithm seems quite straightforward. I'm just going crazy! I'm pretty sure there is a stupid little thing around here that I didn't spot. Or is there some OSG internal mechanism I didn't deactivate? Tries: - As I told, I wrote (before the method runs) options = osgDB::Registry::instance()-getOptions(); options-setBuildKdTreesHint(osgDB::Options::DO_NOT_BUILD_KDTREES); options-setObjectCacheHint(osgDB::Options::CACHE_NONE); - I also tried adding databasePager.clear(); after writing the 'groupFile', but this doesn't change anything. Any idea? Many thanks. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - Robert Osfieldrobert.osfi...@gmail.com a écrit : Hi Sukender, You explanation of what you are doing in your app is way too light for us to be able to guess what might be amiss. Are you running the viewer? Is it just data preperation? I haven't got a clue. Robert. On Tue, Mar 22, 2011 at 5:42 PM, Sukendersuky0...@free.fr wrote: Hi all, Here's something strange: - I create PageLODs that will load files on disk when needed - I create Groups of PagedLODs - I write those groups to disk (OSGB/T format). They thus contain only few data (just nodes and paths where data is). - I create a PagedLOD which loads this newly file on disk. The group is theorically unloaded after this. When repeating this, my memory usage climbs very high... but the groups should not be in memory... I wrote osgDB::Options * options = osgDB::Registry::instance()-getOptions(); options-setBuildKdTreesHint(osgDB::Options::DO_NOT_BUILD_KDTREES); options-setObjectCacheHint(osgDB::Options::CACHE_NONE); But this doesn't change anything. And of course I finally run out of memory. For info, small graphs behave normally in osgViewer (nodes load when approaching, memory usage rises, etc.). Any idea? Thanks. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Problem DatabasePager, setTargetFrameRate and setMaximumNumOfObjectsToCompilePerFrame with osg 2.9.11
Thanks a lot Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GLSL for non-rendering operation
Hi Simon, Am 23.03.2011 04:12, schrieb Simon Kolciter: Well, the problem is that the normal vertices are PER_VERTEX, not PER_PRIMITIVE. In Geometry shader, I only have access to the current primitive, not the whole mesh, right? In principle, you are right, the geometry shader can only access the current primitive, but there are new kinds of primitives that were introduced to give the geometry shader some neighbourhood on information. One of those is the new primitive type GL_TRIANGLES_ADJACENCY which will give you information about adjacent (via edges) triangles. I found a nice explanation at the beginning of http://prideout.net/blog/?p=54 I need to 1. calculate the normal vector of each face (triangle) and add it to the normal vectors of all 3 vertices 2. normalize the normal vector of each vertex (optional) Is there any way to access normal vector of each vertex in geometry shader? In that situation I would think that you need to use TRANSFORM_FEEDBACK to record the primitive normals to a buffer object on a first render pass (with rasterization disables) and then do the summing/ normalization on the second and final render pass. There does not seen to be a lot of support for TRANSFORM_FEEDBACK in OSG at the moment. The only thing i could find was osg::TransformFeedbackBufferBinding. There are some (non-OSG) examples for TRANSFORM_FEEDBACK at http://rastergrid.com/blog/tag/transform-feedback/ Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37819#37819 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Michel Lepert Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLOD - Trying to understand climbing mem usage
Hi Laurens, Thanks for the tip. But my function looks like: osg::ref_ptrosg::PagedLOD paged( new osg::PagedLOD ); paged-addChild(new osg::Node); paged-setFileName(1, pathTo3DFile); paged-setRange(0, dist, FLT_MAX); paged-setRange(1, 0, dist); I create an empty child at index 0, viewable from 'dist' to FLT_MAX. The second thing is not a child but a range+filename, viewable from 0 to 'dist. This seems correct to me. Thoughts? Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - Laurens Voerman l.voer...@rug.nl a écrit : Hi Sukender, Just a guess here, when you say Generate a PagedLOD, to load 'groupFile' do you call PagedLOD::addChild(Node *child, ) ? for the pageLOD will then hold the child in memory until PagedLOD::removeExpiredChildren() is called. Normally this is done in the frame loop (in updateSceneGraph()) but I think you're not in a frame loop (yet). Laurens. On 3/23/2011 10:19 AM, Sukender wrote: Hi Robert, Sorry for being too vague. It's a data preparation + viewer app, but the problem arises during the data preparation. Some data sets do not present the symptoms whereas some others do... Here is a more detailed view of the problematic method, in pseudo-code: void function(Group parent, const string path) { If path is a directory osg::ref_ptrosg::Group group(new osg::Group); Foreach entry in the directory, do a recursive call: function(group, entry). write 'group' to disk, in 'groupFile' (somewhere out of the current directory structure) Generate a PagedLOD, to load 'groupFile' when below a given view distance (using group-getBound()) Add that PagedLOD to 'parent' unload the group (well, it's a local variable!) else if it's a 3D file Get the AABB of the 3D file (the file isn't loaded in memory) Generate a PagedLOD, to load the 3D file when below a given view distance (using AABB info) Add that PagedLOD to 'parent' } This makes memory rise very high and very quickly on a given dataset. This dataset is a hierarchical tree structure with at most 1000 3D files in each dir. What is strange is that the algorithm seems quite straightforward. I'm just going crazy! I'm pretty sure there is a stupid little thing around here that I didn't spot. Or is there some OSG internal mechanism I didn't deactivate? Tries: - As I told, I wrote (before the method runs) options = osgDB::Registry::instance()-getOptions(); options-setBuildKdTreesHint(osgDB::Options::DO_NOT_BUILD_KDTREES); options-setObjectCacheHint(osgDB::Options::CACHE_NONE); - I also tried adding databasePager.clear(); after writing the 'groupFile', but this doesn't change anything. Any idea? Many thanks. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - Robert Osfieldrobert.osfi...@gmail.com a écrit : Hi Sukender, You explanation of what you are doing in your app is way too light for us to be able to guess what might be amiss. Are you running the viewer? Is it just data preperation? I haven't got a clue. Robert. On Tue, Mar 22, 2011 at 5:42 PM, Sukendersuky0...@free.fr wrote: Hi all, Here's something strange: - I create PageLODs that will load files on disk when needed - I create Groups of PagedLODs - I write those groups to disk (OSGB/T format). They thus contain only few data (just nodes and paths where data is). - I create a PagedLOD which loads this newly file on disk. The group is theorically unloaded after this. When repeating this, my memory usage climbs very high... but the groups should not be in memory... I wrote osgDB::Options * options = osgDB::Registry::instance()-getOptions(); options-setBuildKdTreesHint(osgDB::Options::DO_NOT_BUILD_KDTREES); options-setObjectCacheHint(osgDB::Options::CACHE_NONE); But this doesn't change anything. And of course I finally run out of memory. For info, small graphs behave normally in osgViewer (nodes load when approaching, memory usage rises, etc.). Any idea? Thanks. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org
Re: [osg-users] PagedLOD - Trying to understand climbing mem usage
Hi Sukender, Your code can't cause the problem I suggested, so it must be something else. I have no other suggestions to offer. Laurens. On 3/23/2011 11:12 AM, Sukender wrote: Hi Laurens, Thanks for the tip. But my function looks like: osg::ref_ptrosg::PagedLOD paged( new osg::PagedLOD ); paged-addChild(new osg::Node); paged-setFileName(1, pathTo3DFile); paged-setRange(0, dist, FLT_MAX); paged-setRange(1, 0, dist); I create an empty child at index 0, viewable from 'dist' to FLT_MAX. The second thing is not a child but a range+filename, viewable from 0 to 'dist. This seems correct to me. Thoughts? Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - Laurens Voermanl.voer...@rug.nl a écrit : Hi Sukender, Just a guess here, when you say Generate a PagedLOD, to load 'groupFile' do you call PagedLOD::addChild(Node *child, ) ? for the pageLOD will then hold the child in memory until PagedLOD::removeExpiredChildren() is called. Normally this is done in the frame loop (in updateSceneGraph()) but I think you're not in a frame loop (yet). Laurens. On 3/23/2011 10:19 AM, Sukender wrote: Hi Robert, Sorry for being too vague. It's a data preparation + viewer app, but the problem arises during the data preparation. Some data sets do not present the symptoms whereas some others do... Here is a more detailed view of the problematic method, in pseudo-code: void function(Group parent, const string path) { If path is a directory osg::ref_ptrosg::Group group(new osg::Group); Foreach entry in the directory, do a recursive call: function(group, entry). write 'group' to disk, in 'groupFile' (somewhere out of the current directory structure) Generate a PagedLOD, to load 'groupFile' when below a given view distance (using group-getBound()) Add that PagedLOD to 'parent' unload the group (well, it's a local variable!) else if it's a 3D file Get the AABB of the 3D file (the file isn't loaded in memory) Generate a PagedLOD, to load the 3D file when below a given view distance (using AABB info) Add that PagedLOD to 'parent' } This makes memory rise very high and very quickly on a given dataset. This dataset is a hierarchical tree structure with at most 1000 3D files in each dir. What is strange is that the algorithm seems quite straightforward. I'm just going crazy! I'm pretty sure there is a stupid little thing around here that I didn't spot. Or is there some OSG internal mechanism I didn't deactivate? Tries: - As I told, I wrote (before the method runs) options = osgDB::Registry::instance()-getOptions(); options-setBuildKdTreesHint(osgDB::Options::DO_NOT_BUILD_KDTREES); options-setObjectCacheHint(osgDB::Options::CACHE_NONE); - I also tried adding databasePager.clear(); after writing the 'groupFile', but this doesn't change anything. Any idea? Many thanks. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - Robert Osfieldrobert.osfi...@gmail.com a écrit : Hi Sukender, You explanation of what you are doing in your app is way too light for us to be able to guess what might be amiss. Are you running the viewer? Is it just data preperation? I haven't got a clue. Robert. On Tue, Mar 22, 2011 at 5:42 PM, Sukendersuky0...@free.fr wrote: Hi all, Here's something strange: - I create PageLODs that will load files on disk when needed - I create Groups of PagedLODs - I write those groups to disk (OSGB/T format). They thus contain only few data (just nodes and paths where data is). - I create a PagedLOD which loads this newly file on disk. The group is theorically unloaded after this. When repeating this, my memory usage climbs very high... but the groups should not be in memory... I wrote osgDB::Options * options = osgDB::Registry::instance()-getOptions(); options-setBuildKdTreesHint(osgDB::Options::DO_NOT_BUILD_KDTREES); options-setObjectCacheHint(osgDB::Options::CACHE_NONE); But this doesn't change anything. And of course I finally run out of memory. For info, small graphs behave normally in osgViewer (nodes load when approaching, memory usage rises, etc.). Any idea? Thanks. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list
Re: [osg-users] Camera control in osgvisual
Hi Torben I was trying to integrate CIGI to osgvisual. I could subclass extlink for cigi and data is receiving from host. Now I don't know how to connect the values to camera. I looked into VCL implementation but it just writes the data to a dataslot. But in CIGI case packet is received as a structure. So how to convert the structure to the slot. Please tell me. Once this is finished, I'll send you the full source for your review. Thanks Thank you! Cheers, Vijeesh -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37830#37830 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Taking osgQt::QWebViewImage mouse and key events
Hi, I think I found a bug in osgViewer: InteractiveImageHandler:: MousePosition. When it is called to see if the mouse position is on the object returns always false ... Code: bool InteractiveImageHandler::mousePosition(osgViewer::View* view, osg::NodeVisitor* nv, const osgGA::GUIEventAdapter ea, int x, int y) const { osgUtil::LineSegmentIntersector::Intersections intersections; bool foundIntersection = view==0 ? false : (nv==0 ? view-computeIntersections(ea.getX(), ea.getY(), intersections) : //view-computeIntersections(ea.getX(), ea.getY(), nv-getNodePath(), intersections)); computeIntersections(view, ea.getX(), ea.getY(), nv-getNodePath(), intersections)); if (foundIntersection) { If I change this code in this way works ... Code: bool foundIntersection = view==0 ? false : (nv==0 ? view-computeIntersections(ea.getX(), ea.getY(), intersections) : view-computeIntersections(ea.getX(), ea.getY(), nv-getNodePath(), intersections)); //computeIntersections(view, ea.getX(), ea.getY(), nv-getNodePath(), intersections)); Thank you! Cheers, Aitor -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37831#37831 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLOD - Trying to understand climbing mem usage
Hi Sukender, The DatabasePager only update correctly the timestamp of expired children if they are registered. After load a new PagedLOD with the fileName, it is registered automatically, but the level 0 PagedLOD is not registered because you created it manually. Since it is not registered, the databasepager doesn't update the timestamp for the expired children of this PagedLOD. So the children are not expired and they remain in memory. You have to call registerPagedLODs(rootNode)[1] after add the PagedLOD to the scenegraph or call this method with the PagedLOD of level 0 as parameter to force the DatabasePager to register it. For example: osg::ref_ptrosg::PagedLOD paged( new osg::PagedLOD ); paged-addChild(new osg::Node); paged-setFileName(1, pathTo3DFile); paged-setRange(0, dist, FLT_MAX); paged-setRange(1, 0, dist); viewer.getDatabasePager()-registerPagedLODs(paged.get()); We have the same issue in our application and calling this method works nice for us. Cheers, Maria. [1] OSG Reference to registerPagedLODs method: http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00163.html#2c20aad9d434a2a2d11b1c5d092d2e59 On Wed, Mar 23, 2011 at 11:54 AM, Laurens Voerman l.voer...@rug.nl wrote: Hi Sukender, Your code can't cause the problem I suggested, so it must be something else. I have no other suggestions to offer. Laurens. On 3/23/2011 11:12 AM, Sukender wrote: Hi Laurens, Thanks for the tip. But my function looks like: osg::ref_ptrosg::PagedLOD paged( new osg::PagedLOD ); paged-addChild(new osg::Node); paged-setFileName(1, pathTo3DFile); paged-setRange(0, dist, FLT_MAX); paged-setRange(1, 0, dist); I create an empty child at index 0, viewable from 'dist' to FLT_MAX. The second thing is not a child but a range+filename, viewable from 0 to 'dist. This seems correct to me. Thoughts? Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - Laurens Voermanl.voer...@rug.nl a écrit : Hi Sukender, Just a guess here, when you say Generate a PagedLOD, to load 'groupFile' do you call PagedLOD::addChild(Node *child, ) ? for the pageLOD will then hold the child in memory until PagedLOD::removeExpiredChildren() is called. Normally this is done in the frame loop (in updateSceneGraph()) but I think you're not in a frame loop (yet). Laurens. On 3/23/2011 10:19 AM, Sukender wrote: Hi Robert, Sorry for being too vague. It's a data preparation + viewer app, but the problem arises during the data preparation. Some data sets do not present the symptoms whereas some others do... Here is a more detailed view of the problematic method, in pseudo-code: void function(Group parent, const string path) { If path is a directory osg::ref_ptrosg::Group group(new osg::Group); Foreach entry in the directory, do a recursive call: function(group, entry). write 'group' to disk, in 'groupFile' (somewhere out of the current directory structure) Generate a PagedLOD, to load 'groupFile' when below a given view distance (using group-getBound()) Add that PagedLOD to 'parent' unload the group (well, it's a local variable!) else if it's a 3D file Get the AABB of the 3D file (the file isn't loaded in memory) Generate a PagedLOD, to load the 3D file when below a given view distance (using AABB info) Add that PagedLOD to 'parent' } This makes memory rise very high and very quickly on a given dataset. This dataset is a hierarchical tree structure with at most 1000 3D files in each dir. What is strange is that the algorithm seems quite straightforward. I'm just going crazy! I'm pretty sure there is a stupid little thing around here that I didn't spot. Or is there some OSG internal mechanism I didn't deactivate? Tries: - As I told, I wrote (before the method runs) options = osgDB::Registry::instance()-getOptions(); options-setBuildKdTreesHint(osgDB::Options::DO_NOT_BUILD_KDTREES); options-setObjectCacheHint(osgDB::Options::CACHE_NONE); - I also tried adding databasePager.clear(); after writing the 'groupFile', but this doesn't change anything. Any idea? Many thanks. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - Robert Osfieldrobert.osfi...@gmail.com a écrit : Hi Sukender, You explanation of what you are doing in your app is way too light for us to be able to guess what might be amiss. Are you running the viewer? Is it just data preperation? I haven't got a clue. Robert. On Tue, Mar 22, 2011 at 5:42 PM, Sukendersuky0...@free.fr wrote: Hi all, Here's something strange: - I create PageLODs that will load files on disk when needed - I create Groups of PagedLODs - I write those groups to disk (OSGB/T format). They thus contain only few data (just nodes and paths where data is). - I create a PagedLOD which loads this newly file on
Re: [osg-users] Camera control in osgvisual
Hi Vijeesh, these are great news! Your are right with subclassing extLink. Your are also right with your comments regarding extLinkVCL: It simple stores the values in the according dataSlots to make it available in the IG. I think my current solution of a central and IG wide list of dataslots for string or double values would not be good enough to fullfill all requirements. Can you tell me more about the CIGI structures? What does they have for content? Are these values like lat/lon, or are they also commands like add object on position etc? I think wo have to develop a more sophisticated solution for the data management inside the IG as my approach currently is. I'm happy that you decided to engange and to improve osgvisual to your needs, I'll do my best to support you. Some words to my roadmap: Since 3 days I'm working on a server upgrade which I use to host osgVisual (Maybe you noticed the slightly modified trac installation on osgvisual.org). These server maintainance is scheduled till friday. After that I will continue with my terrainModification. I made already some major progress and the technique basically works. I have to solve some bugs and have to implement a management class to allow live modification of VPB databases more convenient. I scheduled these terainModification work for additional three weeks. Parallel to that I will help you with the CIGI topic. After I have finished the terrain thing, I'll be available 100% for CIGI :) ... Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37833#37833 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLOD - Trying to understand climbing mem usage
Hi Maria, Yes, I saw your post about this, and tried this kind of solution. Unfortunately, the problem doesn't arise durung viewing but during data preparation. The viewer isn't realized yet, and the database paging functions are not being processed at this time. Registering to, or clearing the DatabasePager have no effect. Thanks anyway. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - María Ten mate...@gmail.com a écrit : Hi Sukender, The DatabasePager only update correctly the timestamp of expired children if they are registered. After load a new PagedLOD with the fileName, it is registered automatically, but the level 0 PagedLOD is not registered because you created it manually. Since it is not registered, the databasepager doesn't update the timestamp for the expired children of this PagedLOD. So the children are not expired and they remain in memory. You have to call registerPagedLODs(rootNode)[1] after add the PagedLOD to the scenegraph or call this method with the PagedLOD of level 0 as parameter to force the DatabasePager to register it. For example: osg::ref_ptrosg::PagedLOD paged( new osg::PagedLOD ); paged-addChild(new osg::Node); paged-setFileName(1, pathTo3DFile); paged-setRange(0, dist, FLT_MAX); paged-setRange(1, 0, dist); viewer.getDatabasePager()-registerPagedLODs(paged.get()); We have the same issue in our application and calling this method works nice for us. Cheers, Maria. [1] OSG Reference to registerPagedLODs method: http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00163.html#2c20aad9d434a2a2d11b1c5d092d2e59 On Wed, Mar 23, 2011 at 11:54 AM, Laurens Voerman l.voer...@rug.nl wrote: Hi Sukender, Your code can't cause the problem I suggested, so it must be something else. I have no other suggestions to offer. Laurens. On 3/23/2011 11:12 AM, Sukender wrote: Hi Laurens, Thanks for the tip. But my function looks like: osg::ref_ptrosg::PagedLOD paged( new osg::PagedLOD ); paged-addChild(new osg::Node); paged-setFileName(1, pathTo3DFile); paged-setRange(0, dist, FLT_MAX); paged-setRange(1, 0, dist); I create an empty child at index 0, viewable from 'dist' to FLT_MAX. The second thing is not a child but a range+filename, viewable from 0 to 'dist. This seems correct to me. Thoughts? Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - Laurens Voerman l.voer...@rug.nl a écrit : Hi Sukender, Just a guess here, when you say Generate a PagedLOD, to load 'groupFile' do you call PagedLOD::addChild(Node *child, ) ? for the pageLOD will then hold the child in memory until PagedLOD::removeExpiredChildren() is called. Normally this is done in the frame loop (in updateSceneGraph()) but I think you're not in a frame loop (yet). Laurens. On 3/23/2011 10:19 AM, Sukender wrote: Hi Robert, Sorry for being too vague. It's a data preparation + viewer app, but the problem arises during the data preparation. Some data sets do not present the symptoms whereas some others do... Here is a more detailed view of the problematic method, in pseudo-code: void function(Group parent, const string path) { If path is a directory osg::ref_ptrosg::Group group(new osg::Group); Foreach entry in the directory, do a recursive call: function(group, entry). write 'group' to disk, in 'groupFile' (somewhere out of the current directory structure) Generate a PagedLOD, to load 'groupFile' when below a given view distance (using group-getBound()) Add that PagedLOD to 'parent' unload the group (well, it's a local variable!) else if it's a 3D file Get the AABB of the 3D file (the file isn't loaded in memory) Generate a PagedLOD, to load the 3D file when below a given view distance (using AABB info) Add that PagedLOD to 'parent' } This makes memory rise very high and very quickly on a given dataset. This dataset is a hierarchical tree structure with at most 1000 3D files in each dir. What is strange is that the algorithm seems quite straightforward. I'm just going crazy! I'm pretty sure there is a stupid little thing around here that I didn't spot. Or is there some OSG internal mechanism I didn't deactivate? Tries: - As I told, I wrote (before the method runs) options = osgDB::Registry::instance()-getOptions(); options-setBuildKdTreesHint(osgDB::Options::DO_NOT_BUILD_KDTREES); options-setObjectCacheHint(osgDB::Options::CACHE_NONE); - I also tried adding databasePager.clear(); after writing the 'groupFile', but this doesn't change anything. Any idea? Many thanks. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - Robert Osfield robert.osfi...@gmail.com a écrit : Hi Sukender, You explanation of what you are doing in your app is way too light for us to be
Re: [osg-users] Taking osgQt::QWebViewImage mouse and key events
Hi Aitor, I can't make any sense of where the bug is supposed to lie, as just commenting one line out and another in just suggests the problem is elsewhere. I also don't know from your description how to reproduce the bug. If you think you have a bug fix please post them to osg-submissions as complete modified files, from there I can do a code review. Robert. On Wed, Mar 23, 2011 at 11:24 AM, Aitor Ardanza aitoralt...@terra.es wrote: Hi, I think I found a bug in osgViewer: InteractiveImageHandler:: MousePosition. When it is called to see if the mouse position is on the object returns always false ... Code: bool InteractiveImageHandler::mousePosition(osgViewer::View* view, osg::NodeVisitor* nv, const osgGA::GUIEventAdapter ea, int x, int y) const { osgUtil::LineSegmentIntersector::Intersections intersections; bool foundIntersection = view==0 ? false : (nv==0 ? view-computeIntersections(ea.getX(), ea.getY(), intersections) : //view-computeIntersections(ea.getX(), ea.getY(), nv-getNodePath(), intersections)); computeIntersections(view, ea.getX(), ea.getY(), nv-getNodePath(), intersections)); if (foundIntersection) { If I change this code in this way works ... Code: bool foundIntersection = view==0 ? false : (nv==0 ? view-computeIntersections(ea.getX(), ea.getY(), intersections) : view-computeIntersections(ea.getX(), ea.getY(), nv-getNodePath(), intersections)); //computeIntersections(view, ea.getX(), ea.getY(), nv-getNodePath(), intersections)); Thank you! Cheers, Aitor -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37831#37831 ___ 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 - Trying to understand climbing mem usage
Mmmm... if you got no more ideas, don't bother searching. This smells like there's a memory leak around here (in my code, I guess). I'll keep you informed. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - Sukender suky0...@free.fr a écrit : Hi Maria, Yes, I saw your post about this, and tried this kind of solution. Unfortunately, the problem doesn't arise durung viewing but during data preparation. The viewer isn't realized yet, and the database paging functions are not being processed at this time. Registering to, or clearing the DatabasePager have no effect. Thanks anyway. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - María Ten mate...@gmail.com a écrit : Hi Sukender, The DatabasePager only update correctly the timestamp of expired children if they are registered. After load a new PagedLOD with the fileName, it is registered automatically, but the level 0 PagedLOD is not registered because you created it manually. Since it is not registered, the databasepager doesn't update the timestamp for the expired children of this PagedLOD. So the children are not expired and they remain in memory. You have to call registerPagedLODs(rootNode)[1] after add the PagedLOD to the scenegraph or call this method with the PagedLOD of level 0 as parameter to force the DatabasePager to register it. For example: osg::ref_ptrosg::PagedLOD paged( new osg::PagedLOD ); paged-addChild(new osg::Node); paged-setFileName(1, pathTo3DFile); paged-setRange(0, dist, FLT_MAX); paged-setRange(1, 0, dist); viewer.getDatabasePager()-registerPagedLODs(paged.get()); We have the same issue in our application and calling this method works nice for us. Cheers, Maria. [1] OSG Reference to registerPagedLODs method: http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00163.html#2c20aad9d434a2a2d11b1c5d092d2e59 On Wed, Mar 23, 2011 at 11:54 AM, Laurens Voerman l.voer...@rug.nl wrote: Hi Sukender, Your code can't cause the problem I suggested, so it must be something else. I have no other suggestions to offer. Laurens. On 3/23/2011 11:12 AM, Sukender wrote: Hi Laurens, Thanks for the tip. But my function looks like: osg::ref_ptrosg::PagedLOD paged( new osg::PagedLOD ); paged-addChild(new osg::Node); paged-setFileName(1, pathTo3DFile); paged-setRange(0, dist, FLT_MAX); paged-setRange(1, 0, dist); I create an empty child at index 0, viewable from 'dist' to FLT_MAX. The second thing is not a child but a range+filename, viewable from 0 to 'dist. This seems correct to me. Thoughts? Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - Laurens Voerman l.voer...@rug.nl a écrit : Hi Sukender, Just a guess here, when you say Generate a PagedLOD, to load 'groupFile' do you call PagedLOD::addChild(Node *child, ) ? for the pageLOD will then hold the child in memory until PagedLOD::removeExpiredChildren() is called. Normally this is done in the frame loop (in updateSceneGraph()) but I think you're not in a frame loop (yet). Laurens. On 3/23/2011 10:19 AM, Sukender wrote: Hi Robert, Sorry for being too vague. It's a data preparation + viewer app, but the problem arises during the data preparation. Some data sets do not present the symptoms whereas some others do... Here is a more detailed view of the problematic method, in pseudo-code: void function(Group parent, const string path) { If path is a directory osg::ref_ptrosg::Group group(new osg::Group); Foreach entry in the directory, do a recursive call: function(group, entry). write 'group' to disk, in 'groupFile' (somewhere out of the current directory structure) Generate a PagedLOD, to load 'groupFile' when below a given view distance (using group-getBound()) Add that PagedLOD to 'parent' unload the group (well, it's a local variable!) else if it's a 3D file Get the AABB of the 3D file (the file isn't loaded in memory) Generate a PagedLOD, to load the 3D file when below a given view distance (using AABB info) Add that PagedLOD to 'parent' } This makes memory rise very high and very quickly on a given dataset. This dataset is a hierarchical tree structure with at most 1000 3D files in each dir. What is strange is that the algorithm seems quite straightforward. I'm just going crazy! I'm pretty sure there is a stupid little thing around here that I didn't spot. Or is there some OSG internal mechanism I didn't deactivate? Tries: - As I told, I wrote (before the method runs) options = osgDB::Registry::instance()-getOptions(); options-setBuildKdTreesHint(osgDB::Options::DO_NOT_BUILD_KDTREES); options-setObjectCacheHint(osgDB::Options::CACHE_NONE);
Re: [osg-users] Accessing Geometry user Data in Geometry / Vertex / Fragment Shader
Dear Mr. Hanson, Thanks for the quick reply. I was able to define the data as vertex attributes and access these attributes in the vertex shader. Things are up and running. Thanks once again. Regards Harash From: Chris 'Xenon' Hanson xe...@alphapixel.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Sent: Wed, March 23, 2011 1:39:18 AM Subject: Re: [osg-users] Accessing Geometry user Data in Geometry / Vertex / Fragment Shader On 3/22/2011 1:14 PM, Harash Sharma wrote: For one of the applications I working on, I need to attach some data to all the geometry nodes of the scenegraph. The data may be different for all the nodes. I need to use this data for some calculations during rendering. Is there a way to access this data in the geometry / vertex / fragment shaders. If the data is per-node, look at using Uniforms. If it is per-vertex, use vertex attributes. Harash Kumar Sharma -- Chris 'Xenon' Hanson, omo sanza lettere. Xenon@AlphaPixel.comhttp://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
Re: [osg-users] [osgPlugins] new-bee question on mdl and md2 samples
On 03/22/2011 10:53 PM, Jitrapon Tiachunpun wrote: Hi again, Thank you for your reply! I've tried to set the path to what you have suggested me. In my case, I set it to point at the hl2 root as you said.. well, apparently some models are successfully loaded with all textures correctly applied onto them. However, some still lack all the textures. I extracted every single files from the gcf file and leave them as they are arranged in the gcf (e.g. some models are located in models/Effects/models... etc. I'm pretty sure that their corresponding textures are also extracted, since I double-checked the texture names and such and they are located in materials folder exactly as they are in gcf file. Still, it doesn't find the textures.. I guess maybe the textures are located in another gcf files with the same name ? I don't know. That's possible. The Source engine uses a virtual filesystem scheme that essentially merges all of the .gcf files involved into a single filesystem. You might want to look through the other .gcf files you have to see if the missing materials/textures are there. I have a few more questions to bug you though =P : I guess this is a stupid question but, is it possible that an osg environment file able to load mdl models into them with all textures ? I'm having trouble parsing that question :-) Can you rephrase? And, is the plugin able to import simple animation information in the mdl file as well? Let's say I have a model that simply rotates forever (like a ball). (I have not tried this because I couldn't load this model in the osgviewer.) No, I wasn't able to get skinning or animations working in the time I had. All the data is there, and OSG should be capable of rendering it. It would just take some more work to dig the necessary information out of the files and convert it to the required OSG objects. It's fairly hard to do, though, because the file formats aren't really documented well. To get the information you need, you pretty much have to dig through the source code of the Source SDK and try to figure out how the various structures and data fit together. --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSG_GL3_AVAILABLE, builds fine, runs weird
Hi, I'm trying to have OSG run inside a GL3 core profile context. I have downloaded gl3.h from opengl.org and followed the instruction on this thread to properly configure cmake: http://forum.openscenegraph.org/viewtopic.php?t=4224 That is: OSG_GLU_AVAILABLE OFF OSG_GL1_AVAILABLE OFF OSG_GL2_AVAILABLE OFF OSG_GL3_AVAILABLE ON OSG_GLES1_AVAILABLE OFF OSG_GLES2_AVAILABLE OFF OSG_GL_DISPLAYLISTS_AVAILABLE OFF OSG_GL_MATRICES_AVAILABLE OFF OSG_GL_VERTEX_FUNCS_AVAILABLE OFF OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE OFF OSG_GL_FIXED_FUNCTION_AVAILABLE OFF OSG builds fine, but the samples are non-functional. Things go quite wrong really. Is GL 3.x effectively supported? Cheers, Fred -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37841#37841 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] Michael Platings
thank you very much for you help, i finally see my .fbx in the screen. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37842#37842 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Slow frame rate in release, gets fixed when viewing stats
Hi, I stumbled across a very weird problem. I have a pretty big scene and the frame rate is about 7 fps according to the stats. When I open the graph in the stats window I see the frame rate go up to 25 fps. If I remove the stats it goes back down to 7 again. This only happens when I run the release build from as a standalone application. If I run the release from visual studio (F5) I don't see this problem. Im using OSG 2.8.3. Any ideas what can be causing the problem? Thank you! Cheers, Ramy -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37843#37843 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] fbx animation
Hi, everybody: anyone know how to activate an animation. fbx? ... Thank you! Cheers, Josue -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37845#37845 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG_GL3_AVAILABLE, builds fine, runs weird
Hi Fred, The vast majority of examples rely upon the fixed function pipeline for their functionality so when you disable it via the GL3 path then this functionality is no longer available to the examples to use so will not produce the results you will be used to using. As things stand you should only enable GL3 on it's own if you don't intended to use any fixed function pipeline. In the future we plan on having a shader compisitor backend that generates the shaders that implement the fixed function pipeline for you. If you still want to the fixed function support and want GL3 features then simply compile the OSG via defaults and the OSG will at runtime enable the GL3, GL4 and extensions for you automatically. Robert. On Wed, Mar 23, 2011 at 3:52 PM, Fred Smith osgfo...@tevs.eu wrote: Hi, I'm trying to have OSG run inside a GL3 core profile context. I have downloaded gl3.h from opengl.org and followed the instruction on this thread to properly configure cmake: http://forum.openscenegraph.org/viewtopic.php?t=4224 That is: OSG_GLU_AVAILABLE OFF OSG_GL1_AVAILABLE OFF OSG_GL2_AVAILABLE OFF OSG_GL3_AVAILABLE ON OSG_GLES1_AVAILABLE OFF OSG_GLES2_AVAILABLE OFF OSG_GL_DISPLAYLISTS_AVAILABLE OFF OSG_GL_MATRICES_AVAILABLE OFF OSG_GL_VERTEX_FUNCS_AVAILABLE OFF OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE OFF OSG_GL_FIXED_FUNCTION_AVAILABLE OFF OSG builds fine, but the samples are non-functional. Things go quite wrong really. Is GL 3.x effectively supported? Cheers, Fred -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37841#37841 ___ 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] fbx animation
Hi Josue, take a look at osganimationviewer example. Mourad On Wed, Mar 23, 2011 at 5:48 PM, Josue Hernandez osgfo...@tevs.eu wrote: Hi, everybody: anyone know how to activate an animation. fbx? ... Thank you! Cheers, Josue -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37845#37845 ___ 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] GLSL for non-rendering operation
Ok, no access to the whole geometry in geometry shader. However, since you can access to gl_Position of every vertex for a given primitive, can't you also access gl_Normal of these vertices? Because that would actually suffice. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37848#37848 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GLSL for non-rendering operation
On 3/23/2011 1:37 PM, Simon Kolciter wrote: Ok, no access to the whole geometry in geometry shader. However, since you can access to gl_Position of every vertex for a given primitive, can't you also access gl_Normal of these vertices? Yes, I believe so. Because that would actually suffice. Try it and see. I don't see how you're going to do it myself, but if it works, great! -- 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
Re: [osg-users] GLSL for non-rendering operation
On 3/23/2011 3:37 PM, Simon Kolciter wrote: Ok, no access to the whole geometry in geometry shader. However, since you can access to gl_Position of every vertex for a given primitive, can't you also access gl_Normal of these vertices? Accessing gl_Normal only makes sense if you've provided the normals to GL/OSG along with the vertex positions. I thought you didn't have the normals (which is why you needed to calculate them in the first place). --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GLSL for non-rendering operation
Jason Daly: What if I assign a normal array to the OSG Geometry (setNormalArray) and only modify the values in geometry shader? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37851#37851 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PagedLOD - Trying to understand climbing mem usage
self_hang Downloaded a Windows leak detection utility trial (BoundsChecker, as Purify doesn't work with my app). Found a huge leak when using TinyXML++ (I naively thought reference counted structures behaved as osg::ref_ptr and osg::Referenced). /self_hang Sorry for this. *sigh* Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - Sukender suky0...@free.fr a écrit : Mmmm... if you got no more ideas, don't bother searching. This smells like there's a memory leak around here (in my code, I guess). I'll keep you informed. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - Sukender suky0...@free.fr a écrit : Hi Maria, Yes, I saw your post about this, and tried this kind of solution. Unfortunately, the problem doesn't arise durung viewing but during data preparation. The viewer isn't realized yet, and the database paging functions are not being processed at this time. Registering to, or clearing the DatabasePager have no effect. Thanks anyway. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - María Ten mate...@gmail.com a écrit : Hi Sukender, The DatabasePager only update correctly the timestamp of expired children if they are registered. After load a new PagedLOD with the fileName, it is registered automatically, but the level 0 PagedLOD is not registered because you created it manually. Since it is not registered, the databasepager doesn't update the timestamp for the expired children of this PagedLOD. So the children are not expired and they remain in memory. You have to call registerPagedLODs(rootNode)[1] after add the PagedLOD to the scenegraph or call this method with the PagedLOD of level 0 as parameter to force the DatabasePager to register it. For example: osg::ref_ptrosg::PagedLOD paged( new osg::PagedLOD ); paged-addChild(new osg::Node); paged-setFileName(1, pathTo3DFile); paged-setRange(0, dist, FLT_MAX); paged-setRange(1, 0, dist); viewer.getDatabasePager()-registerPagedLODs(paged.get()); We have the same issue in our application and calling this method works nice for us. Cheers, Maria. [1] OSG Reference to registerPagedLODs method: http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00163.html#2c20aad9d434a2a2d11b1c5d092d2e59 On Wed, Mar 23, 2011 at 11:54 AM, Laurens Voerman l.voer...@rug.nl wrote: Hi Sukender, Your code can't cause the problem I suggested, so it must be something else. I have no other suggestions to offer. Laurens. On 3/23/2011 11:12 AM, Sukender wrote: Hi Laurens, Thanks for the tip. But my function looks like: osg::ref_ptrosg::PagedLOD paged( new osg::PagedLOD ); paged-addChild(new osg::Node); paged-setFileName(1, pathTo3DFile); paged-setRange(0, dist, FLT_MAX); paged-setRange(1, 0, dist); I create an empty child at index 0, viewable from 'dist' to FLT_MAX. The second thing is not a child but a range+filename, viewable from 0 to 'dist. This seems correct to me. Thoughts? Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - Laurens Voerman l.voer...@rug.nl a écrit : Hi Sukender, Just a guess here, when you say Generate a PagedLOD, to load 'groupFile' do you call PagedLOD::addChild(Node *child, ) ? for the pageLOD will then hold the child in memory until PagedLOD::removeExpiredChildren() is called. Normally this is done in the frame loop (in updateSceneGraph()) but I think you're not in a frame loop (yet). Laurens. On 3/23/2011 10:19 AM, Sukender wrote: Hi Robert, Sorry for being too vague. It's a data preparation + viewer app, but the problem arises during the data preparation. Some data sets do not present the symptoms whereas some others do... Here is a more detailed view of the problematic method, in pseudo-code: void function(Group parent, const string path) { If path is a directory osg::ref_ptrosg::Group group(new osg::Group); Foreach entry in the directory, do a recursive call: function(group, entry). write 'group' to disk, in 'groupFile' (somewhere out of the current directory structure) Generate a PagedLOD, to load 'groupFile' when below a given view distance (using group-getBound()) Add that PagedLOD to 'parent' unload the group (well, it's a local variable!) else if it's a 3D file Get the AABB of the 3D file (the file isn't loaded in memory) Generate a PagedLOD, to load the 3D file when below a given view distance (using AABB info) Add that PagedLOD to 'parent' } This makes memory rise very high and very quickly on a
Re: [osg-users] [osgOcean] Culling and intersects with ocean and model...
J-S, KC, Jason Trez Cool... Thank you! An impressive start. I now have a kick in the butt to study up and now also have some nice links with what appears to be great information. Looks like a lot to absorb. I hope to first find a base technique to try for my baby-step and see where it takes me. I appreciate the layman's description of a shader... it makes it seems less ominous. It will take me a little bit to get the lingo into Tim language. So... I am bookmarked and ready... In the meantime I implemented the direct input and can now drive my boat around (full of water) with the joystick. Cheers, tim -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37853#37853 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] IVE Maximum File Size?
Just to close this out - I was not able to reproduce my earlier problems with large IVE files and things seem OK. Sorry about that. -John On Tue, Mar 1, 2011 at 1:02 AM, Robert Osfield robert.osfi...@gmail.comwrote: Hi John, I don't know of a reason why the .ive format should be size limited, everything is allocated dynamically on demand by the plugin. I haven't seen reports from the community w.r.t size issues with ive either, your experience is the first I've seen pop up. To investigate further try the sequences: 1) Write large model to .ive to result in a file exceed 1GB 2) Write same model to .osg 3) Load model into osgviewer to confirm that issue exists for this model. 4) Load model into osgviewer to confirm that issue does not happen. 5) use osgconv to convert the .ive model to second .osg file 6) Load .ive - .osg version of model into osgviewer, does it behave the same as the original .osg file, or the .ive? 7) Use a diff tool to compare the original .osg and the .ive-.osg version so see if anything has been lost in translation. Hopefully the above will give us a bit more information about the nature of the problem. Robert. On Tue, Mar 1, 2011 at 12:32 AM, John Kua j...@eecs.berkeley.edu wrote: Hi, We've been generating rather large IVE files which exceed 1GB in size and at some point when we attempt to open them in osgviewer, there's nothing there. However, if we write to the ASCII OSG format, we've been able to write larger files without problem. Is there some limitation in the IVE format? We're running OSG 2.8.3, compiled in 64-bit Windows on VS2008. -John ___ 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] Camera control in osgvisual
Hi Torben Cigi provides classes for various interfaces such as View control, Entity Control, HAT/HOT request etc. between host and IG. From Host you will set the values for these objects, pack it and send it through UDP using usual Windows/Linux sockets. From IG, you will receive the packet, unpack it and use it. For example the Viewcontrol class provides structure for controlling the main camera and some members of this class are : Xoffset, YOffset, ZOffset, pitch, roll, yaw etc. Basically it provides standard packet format for IG to Host communication so that It is easy to connect host to various IGs, cigibaseviewctrl.h gives the implementation of ViewControl structure. It doesn't interact with the IG implantation directly, or provides network implementation. I think this information helps you to understand about cigi. And for terrainModification, I just want to know this transformation is done only while rendering (real time) or it will be stored in to the database. I'm also eagerly waiting for your release of the terrainModification. I also want to work little more on database ( to understand more on scenegraph technology). So it will be grateful if you can assign some work to me also. I'm only a beginner to OSG Thank you! Cheers, Vijeesh -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37855#37855 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org