Re: [osg-users] [build] How to properly use the OSG_GL3_AVAILABLE CMake option?
Hi John, I haven't tried GL3 yet - this work was done by Paul Martz, but I did the GLES work which served as ground work for the GL3 support so I'll have bash at an answer: On Mon, Nov 23, 2009 at 10:58 PM, John Price john.pric...@gmail.com wrote: My nVidia graphics driver supports GL 3.2. So I enabled OSG_GL3_AVAILABLE and got hundreds of errors about gl3.h. I downloaded gl3.h from OpenGL.org and placed it where it would be found, and got hundreds of new errors. I know I am doing something wrong and was wondering if someone would be kind enough to provide a quick tutorial. I don't need complete newbie instructions, just the necessary steps to compile OSG with gl3. My guess is the the GL compile errors are down to you not disabling the the build of the GL1/GL2 features at the same time as enable the GL3 build as the GL3 header doesn't contain these features. Using ccmake/CMakeStup you can adjust the following entries (mostly setting them all to OFF) : 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 This is obviously a bit of pain right now, but my plan is to do some further work on the CMake scripts to set all this automatically depending upon your GL target. I haven't tackled this up to now as getting the code base portable across all these targets has been my priority. FYI, you can actually simulate what it's like just having GL3.2 or GLES 2 by disabling these features even when building against GL2. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Move write cache file from databasepager.cpp to curl?
hi, all I want to move write cache file from databasepager.cpp to curl. Maybe it is better. for example: There are some files on server: 1.ive image1.dds image2.dds. Image1.dds and image2.dds were used by 1.ive. when downloading, 1.ive is ok, image1.ddsis failed, image2.dds is ok. when we using writeNodeFile for 1.ive, the result will be wrong. But if weuse curl to write stream indirectly, the result will be ok. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Export osgAnimation callbacks into osg files
Hi Peter, In order to be able to write your callback in .osg file you have to declare method to write it. see in src/osgPlugins/osgAnimation/ReaderWriter.cpp If you dont declare those method, osg will not be able to read/write your class because it does not know them. Cheers, Cedric -- +33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net http://www.plopbyte.net On Wed, 2009-10-14 at 17:57 +, Peter Wrobrl wrote: Hi, and thanks for your fast answer. To reconstruct my problem I take the osgAnimationNode Example and tweak its main, so that it writes an osg file instead of creating the viewer ( Attachment ). When I open the osg file with an text editor, the UpdeteCallbacks are empty, and the file crashes the osganimationviewer with the error message: no osgAnimation::AnimationManagerBase found in the subgraph, no animations available Files that I export from Blender do have osgAnimation::BasicAnimationManager and keyframe data in the UpdateCallback Block. I think the problem is, that in my case AnimtkUpdateCallback should be derived from osgAnimation::BasicAnimationManager insted of osg::NodeCallback, but I don't get it to work. Could you tweak this file so that it works ? That would be a great help, thx. Cheers, searching for Pivot of my Soul, PP !!! ( - ParticlePeter ) -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18273#18273 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org signature.asc Description: This is a digitally signed message part ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] CompositeViewer context cleanup and missing textures
Hi all, I've run into the classic missing textures problem when stopping and restarting a compositeviewer multiple times in the same app. From previous threads on this problem it seems to be context cleanup/GL object cleanup that does not get done properly, but I'm just using the normal CompositeViewer and not messing with contexts/windows/sceneviews myself, so I thought the cleanup would be handled correctly. Attached a very slightly modified compositeviewer example. All it does is create/destruct the compositeviewer 5 times. When the viewer is created for the second time, all my textures are gone (just run without any arguments). Can anyone confirm the missing textures? Any hints as to what else needs to be done to make sure everything is cleared/flushed correctly? thanks jp -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. manytimes.tgz Description: application/compressed-tar ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] NewB questions about osg
Hi Priyank, see the answers below: Priyank Jain writes: Hi, I just started using openScenegraph and it has been pretty smooth for me till now. I am making a simple racquet-ball game for my VR class (using a CAVE system). I have some basic questions to ask.. 1. What coordinate system does OSG follow ? Right handed, I presume ? Also, x points to East ? Y up or into the screen ? I couldn't find the thumb diagram on the website. Can you guys please refer me to the right convention or link ? Right handed with Z axis for the up axis. Of course you can change this at will by changing your camera orientation. 2. How do I generate Bounding box/ bounding sphere for a given box/ sphere geometry? Can this information be embedded in the model and extracted using any of the plugins ? Those entities are already computed since OSG needs them for culling purposes. You can get the bounding sphere of any node with osg::Node::getBound() http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00431.html#1467f2ad703474ad37a236f87dee1f3a and the bounding box of any geode with osg::Geode::getBoundingBox(): http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00265.html#2fd21a35d6160f8210ea825105670037 3. Is there something pre-defined for collision detection-resolution wrt Bounding box and bounding sphere in osg ? Check the methods for osg::BoundingBox and osg::BoundingSphere: you can test them for intersections or even convert a osg::BoundingBox to an osg::BoundingSphere and then make your intersection test. Regards, -- Alberto ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Question about osgManipulator::GridConstraint
Hi, now i tested it with the old command manager but it didnt work is there a bug in GridConstraint? I need a snapping to given points Can anybody help me? Code: osgManipulator::GridConstraint *con = new osgManipulator::GridConstraint( *root , osg::Vec3(0,0,0), osg::Vec3(1.1,1.1,1.1 ) ) ; float scale = scene-getBound().radius() * 1.6; dragger-setMatrix(osg::Matrix::scale(scale, scale, scale) * osg::Matrix::translate(scene-getBound().center())); cmdMgr-connect(*dragger, *selection); cmdMgr-connect(*dragger, *con); Thank you! Cheers, Matthias -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20209#20209 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Frame Count/Threading Models
Hi Paul, On Mon, Nov 23, 2009 at 8:35 PM, paul1...@yahoo.com wrote: Any help would be appreciated. How do I get a valid graphics context in a Pre Draw Callback so I can call glXQueryFrameCountNV()? You will always have a valid graphics context during a initial, pre or post or final draw callback as they are only every called from a graphics thread with a context current. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] help me with osg::Imagestream and osg::Image
Hi Ivan, Please us the osgmove that comes with the version of the OSG you are compiling against. Robert. On Tue, Nov 24, 2009 at 5:45 AM, Ivan Salguero r_kenshin...@hotmail.com wrote: Hi, I tried compile osgmovie and I have problems with that classes because i have 3 errors say me getFrameRate isn't member of osg::Imagestream and getPixelAspecRatio isn't member of osg::Image. so what happened somebody have any idea because i download that classes of osg page and replace the oldest i use osg 2.8.0 and visualStudio 2008 please some help ... Thank you! Cheers, Ivan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20199#20199 ___ 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] NewB questions about osg
Hi, I just started using openScenegraph and it has been pretty smooth for me till now. I am making a simple racquet-ball game for my VR class (using a CAVE system). I have some basic questions to ask.. 1. What coordinate system does OSG follow ? Right handed, I presume ? Also, x points to East ? Y up or into the screen ? I couldn't find the thumb diagram on the website. Can you guys please refer me to the right convention or link ? 2. How do I generate Bounding box/ bounding sphere for a given box/ sphere geometry? Can this information be embedded in the model and extracted using any of the plugins ? 3. Is there something pre-defined for collision detection-resolution wrt Bounding box and bounding sphere in osg ? I am exploring ways to handle the collision between the wall and the ball and not sure if there are things already built-in open scenegraph that I can use or do I have to write code to handle that ? I'd appreciate any help. Thank you! /Priyank -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20198#20198 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Height fields implementation
HI Janna, On Mon, Nov 23, 2009 at 3:05 PM, Janna Terde brja...@gmail.com wrote: The other goal is to make an interactive editing of the height field so we can change the layout of the terrain on fly. However when I used Height Field class and alternated the values of the height with setHeight() functionality, the performance was very slow. For interactively modifying heights you'll need to think about how often you are modifying the heights. Even osgTerrain::GeometryTechnique would need to re-initialize it's internal geometry when you modify the terrain, so you'd see a performance hit just as you would for using ShapeDrawable. What osgTerrain does give you is the ability to abstract away the implementation of how you do the rendering, the GeometryTechnique is just the first of the TerrainTechniques that I have envisaged for osgTerrain. It's possible to implement your own TerrainTechnique that works efficiently for you own needs - and if this is dynamic update then the using a vertex shader and a vertex texture (made up of the HieghtField) would be the most efficient way to tackle the task. You could also just write your own shaders and use a straight osg::Geometry as well. The osgshaderterrain shows a height field being used as a texture in this way. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] osgOcean also rendering with osgParticle?
Erik, Tian et al. I committed some changes to the trunk last night that allow transparencies, and thus particle systems to work with the glare and depth of field effects (http://code.google.com/p/osgocean/source/detail?r=183). If you could test this functionality I would be grateful, it works fine on my machine, but I only tested it with a transparent quad and not particle systems but it appears Tian is having issues with the Multiple render target support. Color buffer writes are now done to gl_FragData[0] and luminance/depth writes to gl_FragData[1]. You can see these changes in the water, terrain and default shaders. Let me know how you get on. Kim. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Refactoring DatabasePagerNeedToRemovestringflagging technique
HI Wojtek, On Mon, Nov 23, 2009 at 5:22 PM, Wojciech Lewandowski lewandow...@ai.com.pl wrote: Our case is following: We mostly have to update camera position and some objects around camera. And ocassionaly we reposition a camera to new location in the world. We are doing our intersections in update traversal. I assume its allowed to use IntersectVisitor in update and load new tiles then. We load many objects in update traversal. The crucial part you don't talk about is the performance constraints. Can you pause a frame for hundreds of milliseseconds while the required high res tiles are pulled in off disk? Or are you trying to stick with a solid 60Hz? Loading any tiles in the update phase is not possible if you want to keep to a solid 60Hz. And believe it or not but our scheme was working. Cache kept nodes bit longer than DatabasePager wanted, but not used tiles were eventually freed. I know it did work, because we made quick dirty fix by renaming NeedToRemove nodes to empty string name when fetching PagedLODs back to activePageLOD list from cache (described in Pawel Ksiezopolski post I mentioned earlier). Unfortuantely this fix was not appropriate as elegant submission. Sharing loaded PageLOD tiles through cache was actually working as some preload for DatabasePager. DatabasePager still could load whatever it wanted. I think something that might provide a work around such as replacing theNeedToRemove is just a work around it's very unlikely to be a solution of trying to use the DatabasePager beyond it's current design assumptions. Using a cache to prevent a subgraph from being deleted defeats the load balancing that the DatabasePager will be attempting to do, so it's a dangerous thing to do - it's a recipe for relentless growth in memory usage. Well yes, but in our case PagedLOD usage timeframe should be extended to period when the tiles were used for intersections and cache maybe in bit hacky way provided this prolonged life time. And use of cache is not direct cause of leaks becaus osgDB cache is freed when node ref_count reaches zero so when DatabasePager IntersectionVisitor stopped using the tile it was effectively removed from the cache as well. Memory leaks were the result of extra NeedToRemove nodes that appeared in activePageLOD lists when some nodes were resurected from Cache because camera moved over them again. I know its sophistry, but in some way, it was more effective than native DatabasePager management because it loaded nodes in no time while DatabasePager would have to load them from disk in this case ;-). I can't understand why you want to do what you are trying to do, but it still doesn't change the fact that DatabasePager hasn't been designed with this in mind. We can certainly look to take this into account in another rev of DatabasePager. As a general note a good OS will actually cache file accesses, especially if you don't overload virtual memory/swap space too much so the cost of reloading a tile might not be quite as expensive as you think... I know that when I benchmark under Linux I have the file cache makes a huge difference, so I can to be careful about running test apps in sequence. Well I thought that if PagedLOD class is public and offers public interface and methods we could use it as long as we do not hit compiler errors. Perhaps different set of classes should be created for use in more VPB specific closed way. I don't think this is a VPB database specific issue. The problem you are trying to solve is really to do with trying to juggle user manage caching with how the DatabasePager manages expiry. When I get on to reviewing the multiple viewpoint issue with DatabasePager I'll have a think about the consequences of users caching subgraphs Robert. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Wake effects?
Hi Tian, Last night I committed the changes that permit alpha tranparencies to be used in conjunction with the glare and depth of field effects. This required the use of multiple render targets ( http://code.google.com/p/osgocean/source/detail?r=183 ) and some changes to some of the shaders. It looks like that's used up the maximum varying attributes of your card and also possibly your card doesn't support MRTs. What graphics card are you using? Could you set the notify level to osg::notifylevel::info and dump the contents to file so I can see exactly what the problem is? Cheers. Kim. 2009/11/24 Tian Ma tianxiao...@foxmail.com: Hi Kim, I update the source code from SVN today and generate the new ocean project. When run the example, some errors emerge. The error image is as follow link: http://storage.openlab.net.cn/forums/2009-11-24/1981569/%e9%94%99%e8%af%af.JPG Something wrong with the water.frag? Thank you! Cheers, Tian Kim Bale wrote: Hello Erik, Sorry I missed your post yesterday. There isn't really any support for wakes on the sea surface at the moment, although it's definitely something that needs addressing. However, I just had a submission which uses the depth buffer to add breaking foam to the shoreline. This does sort for work for other objects on sea, like ships, but it doesn't look very pretty at the moment. You're more than welcome to have a play with the effect and see if you can do anything with it. From what I understand what you'd need to do is add a sort of sloped geometry which tracks you your boat, that would get picked up in the depth buffer and the same foam texture used on the wave crests is applied to it. It's been checked into the trunk, but like I say it needs a little work. There was a discussion about it here: http://thread.gmane.org/gmane.comp.graphics.openscenegraph.cvs/6252 Cheers. Kim. 2009/11/18 Erik Johnson : Hi, I thought this would have come up before, but does anyone have suggestions how to render a boat's wake? Using osgParticle provides an ok solution, but falls apart rapidly if the ocean waves are too large (the particles go underwater). Would be cool to leverage the same texturing effects as the wave crest foam stuff - just not sure how. :) Thanks for any suggestions, Erik -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19849#19849 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20196#20196 ___ 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] Move write cache file from databasepager.cpp to curl?
Hi Xlll? Lilinx? Could you please sign with your name so we don't have to guess who we are addressing. On Tue, Nov 24, 2009 at 10:01 AM, xll lil...@21cn.com wrote: hi, all I want to move write cache file from databasepager.cpp to curl. Maybe it is better. The DatabasePager now uses osgDB::FileCache to manage the local file cache. The DatabasePager has to know about the FileCache as it has to decide which database thread to use to read it - as it needs to avoid using the http database thread for reading local tiles as doing so stalls paging unnecessarily. for example: There are some files on server: 1.ive image1.dds image2.dds. Image1.dds and image2.dds were used by 1.ive. when downloading, 1.ive is ok, image1.dds is failed, image2.dds is ok. when we using writeNodeFile for 1.ive, the result will be wrong. But if we use curl to write stream indirectly, the result will be ok. I'm afraid I can't work out what the issue is here. Could you explain why the result will be wrong, and how use of curl to write the stream would solve anything. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CompositeViewer context cleanup and missing textures
Hi J.P, The typical problem is that the scene graph has been set up to unref texture images after apply so when it comes to reloading the texture images there aren't the to download. Robert. On Tue, Nov 24, 2009 at 9:17 AM, J.P. Delport jpdelp...@csir.co.za wrote: Hi all, I've run into the classic missing textures problem when stopping and restarting a compositeviewer multiple times in the same app. From previous threads on this problem it seems to be context cleanup/GL object cleanup that does not get done properly, but I'm just using the normal CompositeViewer and not messing with contexts/windows/sceneviews myself, so I thought the cleanup would be handled correctly. Attached a very slightly modified compositeviewer example. All it does is create/destruct the compositeviewer 5 times. When the viewer is created for the second time, all my textures are gone (just run without any arguments). Can anyone confirm the missing textures? Any hints as to what else needs to be done to make sure everything is cleared/flushed correctly? thanks jp -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ 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] Question about osgManipulator::GridConstraint
Hi Matthias, I'm afraid I don't understand, nor have personally tested this part of osgManipulator. What you are seeing could well be a bug. Unfortunately the original author of osgManipulator is no longer active on osg-users so probably isn't around to ask. Could you recreate the problem with osgmanipulator example? Robert. On Tue, Nov 24, 2009 at 11:10 AM, Matthias Asselborn matthias.asselb...@gmx.de wrote: Hi, now i tested it with the old command manager but it didnt work is there a bug in GridConstraint? I need a snapping to given points Can anybody help me? Code: osgManipulator::GridConstraint *con = new osgManipulator::GridConstraint( *root , osg::Vec3(0,0,0), osg::Vec3(1.1,1.1,1.1 ) ) ; float scale = scene-getBound().radius() * 1.6; dragger-setMatrix(osg::Matrix::scale(scale, scale, scale) * osg::Matrix::translate(scene-getBound().center())); cmdMgr-connect(*dragger, *selection); cmdMgr-connect(*dragger, *con); Thank you! Cheers, Matthias -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20209#20209 ___ 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] [osgOcean] osgOcean also rendering with osgParticle?
Hi Kim: It is really my honor to test the new Version. The follow links are my test effect on my own computer: 1.We can see that: the sharp white around the boat is still there, although the around water looks transparent. http://storage.openlab.net.cn/forums/2009-11-24/1981569/boat.JPG 2. When I look up to the boat under the ocean, the boat's color seems abnormal( purple ). http://storage.openlab.net.cn/forums/2009-11-24/1981569/down_up.JPG 3.The foams around the island gone, and the water is just transparent around the shore. http://storage.openlab.net.cn/forums/2009-11-24/1981569/foam.JPG I will test the particle effect tomorrow morning on my work computer. Cheers, MT Kim Bale wrote: Erik, Tian et al. I committed some changes to the trunk last night that allow transparencies, and thus particle systems to work with the glare and depth of field effects (http://code.google.com/p/osgocean/source/detail?r=183). If you could test this functionality I would be grateful, it works fine on my machine, but I only tested it with a transparent quad and not particle systems but it appears Tian is having issues with the Multiple render target support. Color buffer writes are now done to gl_FragData[0] and luminance/depth writes to gl_FragData[1]. You can see these changes in the water, terrain and default shaders. Let me know how you get on. Kim. ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20227#20227 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] TriStripVisitor issue
Hi Emmanuel, Robert, I think most of the points have already been covered by you two guys, so I won't come back on them. I'll however pick up on the fact that OSG is using a very old TriStripper release (1.00 Beta 5). I'd heavily recommend updating to 1.10 B5. Compared to 1.00 B5, there have been a lot of bug fixes (the most important being segmentation faults and invalid iterators fixes) plus speed improvements (10% to 50% faster depending on the platform). See the changelog for the full details. I'd recommend updating OSG with the latest version. As the author of TriStripper, I'm guilty of not doing it myself. I sincerely apologize for it. But as I'm currently responsible for managing the next release of our product, I don't have time to do it in the near future. Roberts, note that if no-one has volunteered after a few weeks, just give me some serious whipping and force me to do it. Regards, Tanguy -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: 23 November 2009 2:30 PM To: OpenSceneGraph Users Subject: Re: [osg-users] TriStripVisitor issue Hi Manu, The TriStripVisitor shouldn't change anything in the data apart form re-organize it. Adding in tolerances to the vertex comparisons would require the vertex data to modified to collapse adjacent vertices's onto the same position in space. Would could add such functionality as an extra pass to TriStripVisitor, but the default would have to be not to do this. Personally I'd suggest having a separate visitor do this operation of collapsing nearby vertices on to one another, and then pre-process the data before tri-stripping it. Robert. On Mon, Nov 23, 2009 at 2:25 PM, Emmanuel Roche roche.emman...@gmail.com wrote: Okay, more details on this: the problem comes from the helper structure VertexAttribComparitor in the function VertexAttribComparitor::compare(unsigned int lhs, unsigned int rhs) we call the template array compare(unsigned int lhs, unsigned int rhs) function, and there we just use regular comparisons: virtual int compare(unsigned int lhs,unsigned int rhs) const { const T elem_lhs = (*this)[lhs]; const T elem_rhs = (*this)[rhs]; if (elem_lhselem_rhs) return -1; if (elem_rhselem_lhs) return 1; return 0; } here we don't take any precision into account at all... whereas my vertices are given in meter units and may have a little resolution of about 0.1 millimeter ! So this implementation won't fit for my needs (and I think there is an high chance it may not fit the needs for many other people no ?) maybe we should add a precision parameter at some point, but for now I just don't have the time to deal with this properly :-) Cheers, Manu. 2009/11/23 Emmanuel Roche roche.emman...@gmail.com Hi Robert, Actually, I've noticed that the problem doesn't come from the underlying tristripper library: instead, it seems that the indice array generated from my vertices is incorrect: I suspect that the comparison function to find if too vertices are the same or not is too precise in my case. Do you have a clear idea where this is done ? (otherwise, I will just read more code and find it...) cheers, Manu. 2009/11/23 Emmanuel Roche roche.emman...@gmail.com Actually, I also noticed that OSG v2.8.1 uses version 1.0 of the tristripper library. As I'm quite in an hurry, I think I will re-implement my own tristripvisitor with the latest version of tristripper and check if this makes a difference. Will let you know what's the result of this test. But I believe this could really be a generic issue (it happens with all the models I tested) and thus would mean many people are currently using not so well tri-stripped geometries if they use this optimiser feature ! (it is the case for instance in the OSGExp export plugin for 3DS max as I've noticed this issue there for the first time). regards, Manu. 2009/11/23 Robert Osfield robert.osfi...@gmail.com Hi Manu, If the tristripper doesn't connect the triangles together well then it can result on few tristrips and lots of unconnected traingles that it has to put into a single list of triangles to avoid lots of separate primitive calls. As to why your model is not being stripped well I can't say. We've used 3rd party code to do the tri-stripping so I'm not best placed to answer the low level questions, but... the original author of the cdoe Tanguy Fautre is now an OSG user and I believe still on the list so perhaps he'll be able to chip in ;-) Robert. On Mon, Nov 23, 2009 at 11:08 AM, Emmanuel Roche roche.emman...@gmail.com wrote: Hi everyone, I have a strange problem with the TryStripVisitor: When I use it on a model (with about 6000 triangles, described as TRIANGLES [thus using 18000 vertices]) I get trip strip
Re: [osg-users] [osgOcean] Wake effects?
Hi Kim: This errors occurs on the computer in my office. I think the card is a little old:( Beacause it is night here, I will do what you advised tomorrow morning. Thank you! Cheers, MT Kim Bale wrote: Hi Tian, Last night I committed the changes that permit alpha tranparencies to be used in conjunction with the glare and depth of field effects. This required the use of multiple render targets ( http://code.google.com/p/osgocean/source/detail?r=183 ) and some changes to some of the shaders. It looks like that's used up the maximum varying attributes of your card and also possibly your card doesn't support MRTs. What graphics card are you using? Could you set the notify level to osg::notifylevel::info and dump the contents to file so I can see exactly what the problem is? Cheers. Kim. 2009/11/24 Tian Ma : Hi Kim, I update the source code from SVN today and generate the new ocean project. When run the example, some errors emerge. The error image is as follow link: http://storage.openlab.net.cn/forums/2009-11-24/1981569/%e9%94%99%e8%af%af.JPG Something wrong with the water.frag? Thank you! Cheers, Tian Kim Bale wrote: Hello Erik, Sorry I missed your post yesterday. There isn't really any support for wakes on the sea surface at the moment, although it's definitely something that needs addressing. However, I just had a submission which uses the depth buffer to add breaking foam to the shoreline. This does sort for work for other objects on sea, like ships, but it doesn't look very pretty at the moment. You're more than welcome to have a play with the effect and see if you can do anything with it. From what I understand what you'd need to do is add a sort of sloped geometry which tracks you your boat, that would get picked up in the depth buffer and the same foam texture used on the wave crests is applied to it. It's been checked into the trunk, but like I say it needs a little work. There was a discussion about it here: http://thread.gmane.org/gmane.comp.graphics.openscenegraph.cvs/6252 Cheers. Kim. 2009/11/18 Erik Johnson : Hi, I thought this would have come up before, but does anyone have suggestions how to render a boat's wake? Using osgParticle provides an ok solution, but falls apart rapidly if the ocean waves are too large (the particles go underwater). Would be cool to leverage the same texturing effects as the wave crest foam stuff - just not sure how. :) Thanks for any suggestions, Erik -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19849#19849 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20196#20196 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20229#20229 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] 3D model material display error!
Hi Kim: No, I am not. But the model was under a pisitionAttitudeNode, and I just make the model -1 meter down. Does it matter? When go near the model, the reflection will be more and more cmoplete and looks like many triangle reflections combined together. The picture is as follow link: http://storage.openlab.net.cn/forums/2009-11-19/1981569/%e5%80%92%e5%bd%b1%e9%97%ae%e9%a2%98.jpg Cheers, MT Kim Bale wrote: Are you using a matrix transform above OceanScene to alter the sea level? K. 2009/11/19 Tian Ma : Hi Kim: I just give the picture's URL link below: http://storage.openlab.net.cn/forums/2009-11-19/1981569/%e5%80%92%e5%bd%b1%e9%97%ae%e9%a2%98.jpg Cheers, MT Kim Bale wrote: There's no attachment at all now :( K. 2009/11/19 Tian Ma : Hi Kim, I have amended the attachment problem. Can you see the picture clearly now? Cheers, MT Kim Bale wrote: Hi Tian, I can't really see what's wrong from the attached picture, it kind of looks like a dirty blue splodge... K. 2009/11/19 Tian Ma : Hi Kim, When add my own island model to the oceanscene and of cource nodemask and shaders have been set to the model, I found that the reflection of the model on the ocean surface is not complete. Will you please tell me what caused this problem? And coule the problem be solved? Thank you! Cheers, Tian[/img] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19879#19879 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19896#19896 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19901#19901 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20230#20230 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] TriStripVisitor issue
Hi Tanguy, Thanks for chipping in. Could you point me at the latest rev your tri-stripper code. One thing we will need to do is report your tri-stripping code to all the compilers/platform that the OSG users put it through, as we've had to merge quite a few build fixes over the years. For the OpenGL ES port I also had to remove the use of throw/catch from the tristripper code. It would be good to roll these changes back into your tri-stripper code. Good luck with your release, Robert. On Tue, Nov 24, 2009 at 11:52 AM, Tanguy Fautre tang...@aristechnologies.com wrote: Hi Emmanuel, Robert, I think most of the points have already been covered by you two guys, so I won't come back on them. I'll however pick up on the fact that OSG is using a very old TriStripper release (1.00 Beta 5). I'd heavily recommend updating to 1.10 B5. Compared to 1.00 B5, there have been a lot of bug fixes (the most important being segmentation faults and invalid iterators fixes) plus speed improvements (10% to 50% faster depending on the platform). See the changelog for the full details. I'd recommend updating OSG with the latest version. As the author of TriStripper, I'm guilty of not doing it myself. I sincerely apologize for it. But as I'm currently responsible for managing the next release of our product, I don't have time to do it in the near future. Roberts, note that if no-one has volunteered after a few weeks, just give me some serious whipping and force me to do it. Regards, Tanguy -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: 23 November 2009 2:30 PM To: OpenSceneGraph Users Subject: Re: [osg-users] TriStripVisitor issue Hi Manu, The TriStripVisitor shouldn't change anything in the data apart form re-organize it. Adding in tolerances to the vertex comparisons would require the vertex data to modified to collapse adjacent vertices's onto the same position in space. Would could add such functionality as an extra pass to TriStripVisitor, but the default would have to be not to do this. Personally I'd suggest having a separate visitor do this operation of collapsing nearby vertices on to one another, and then pre-process the data before tri-stripping it. Robert. On Mon, Nov 23, 2009 at 2:25 PM, Emmanuel Roche roche.emman...@gmail.com wrote: Okay, more details on this: the problem comes from the helper structure VertexAttribComparitor in the function VertexAttribComparitor::compare(unsigned int lhs, unsigned int rhs) we call the template array compare(unsigned int lhs, unsigned int rhs) function, and there we just use regular comparisons: virtual int compare(unsigned int lhs,unsigned int rhs) const { const T elem_lhs = (*this)[lhs]; const T elem_rhs = (*this)[rhs]; if (elem_lhselem_rhs) return -1; if (elem_rhselem_lhs) return 1; return 0; } here we don't take any precision into account at all... whereas my vertices are given in meter units and may have a little resolution of about 0.1 millimeter ! So this implementation won't fit for my needs (and I think there is an high chance it may not fit the needs for many other people no ?) maybe we should add a precision parameter at some point, but for now I just don't have the time to deal with this properly :-) Cheers, Manu. 2009/11/23 Emmanuel Roche roche.emman...@gmail.com Hi Robert, Actually, I've noticed that the problem doesn't come from the underlying tristripper library: instead, it seems that the indice array generated from my vertices is incorrect: I suspect that the comparison function to find if too vertices are the same or not is too precise in my case. Do you have a clear idea where this is done ? (otherwise, I will just read more code and find it...) cheers, Manu. 2009/11/23 Emmanuel Roche roche.emman...@gmail.com Actually, I also noticed that OSG v2.8.1 uses version 1.0 of the tristripper library. As I'm quite in an hurry, I think I will re-implement my own tristripvisitor with the latest version of tristripper and check if this makes a difference. Will let you know what's the result of this test. But I believe this could really be a generic issue (it happens with all the models I tested) and thus would mean many people are currently using not so well tri-stripped geometries if they use this optimiser feature ! (it is the case for instance in the OSGExp export plugin for 3DS max as I've noticed this issue there for the first time). regards, Manu. 2009/11/23 Robert Osfield robert.osfi...@gmail.com Hi Manu, If the tristripper doesn't connect the triangles together well then it can result on few tristrips and lots of unconnected traingles that it has to put into a single list of triangles to avoid lots of separate primitive
Re: [osg-users] Question about osgManipulator::GridConstraint
Thank you very much Robert for this reply! here is the whole code ive modified the method addDraggerToScene Code: /* OpenSceneGraph example, osgmanipulator. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the Software), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include osgDB/ReadFile #include osgUtil/Optimizer #include osgViewer/Viewer #include osg/CoordinateSystemNode #include osgText/Text #include osgManipulator/TabBoxDragger #include osgManipulator/TabBoxTrackballDragger #include osgManipulator/TabPlaneDragger #include osgManipulator/TabPlaneTrackballDragger #include osgManipulator/TrackballDragger #include osgManipulator/Translate1DDragger #include osgManipulator/Translate2DDragger #include osgManipulator/TranslateAxisDragger #include osg/ShapeDrawable #include osg/MatrixTransform #include osg/Geometry #include osg/Material #include iostream osgManipulator::Dragger* createDragger(const std::string name) { osgManipulator::Dragger* dragger = 0; if (TabPlaneDragger == name) { osgManipulator::TabPlaneDragger* d = new osgManipulator::TabPlaneDragger(); d-setupDefaultGeometry(); dragger = d; } else if (TabPlaneTrackballDragger == name) { osgManipulator::TabPlaneTrackballDragger* d = new osgManipulator::TabPlaneTrackballDragger(); d-setupDefaultGeometry(); dragger = d; } else if (TabBoxTrackballDragger == name) { osgManipulator::TabBoxTrackballDragger* d = new osgManipulator::TabBoxTrackballDragger(); d-setupDefaultGeometry(); dragger = d; } else if (TrackballDragger == name) { osgManipulator::TrackballDragger* d = new osgManipulator::TrackballDragger(); d-setupDefaultGeometry(); dragger = d; } else if (Translate1DDragger == name) { osgManipulator::Translate1DDragger* d = new osgManipulator::Translate1DDragger(); d-setupDefaultGeometry(); dragger = d; } else if (Translate2DDragger == name) { osgManipulator::Translate2DDragger* d = new osgManipulator::Translate2DDragger(); d-setupDefaultGeometry(); dragger = d; } else if (TranslateAxisDragger == name) { osgManipulator::TranslateAxisDragger* d = new osgManipulator::TranslateAxisDragger(); d-setupDefaultGeometry(); dragger = d; } else { osgManipulator::TabBoxDragger* d = new osgManipulator::TabBoxDragger(); d-setupDefaultGeometry(); dragger = d; } return dragger; } osg::Node* addDraggerToScene(osg::Node* scene, const std::string name) { scene-getOrCreateStateSet()-setMode(GL_NORMALIZE, osg::StateAttribute::ON); osg::MatrixTransform* selection = new osg::MatrixTransform; selection-addChild(scene); osgManipulator::Dragger* dragger = createDragger(name); osg::Group* root = new osg::Group; root-addChild(dragger); root-addChild(selection); float scale = scene-getBound().radius() * 1.6; dragger-setMatrix(osg::Matrix::scale(scale, scale, scale) * osg::Matrix::translate(scene-getBound().center())); osgManipulator::GridConstraint *con = new osgManipulator::GridConstraint( *selection , osg::Vec3(0,0,0), osg::Vec3(30,30,30 ) ) ; osg::ref_ptrosgManipulator::TabBoxDragger m_pManipulator = new osgManipulator::TabBoxDragger; m_pManipulator-addConstraint( con); dragger-addConstraint(con); dragger-addTransformUpdating(selection); // we want the dragger to handle it's own events automatically dragger-setHandleEvents(true); // if we don't set an activation key or mod mask then any mouse click on // the dragger will activate it, however if do define either of ActivationModKeyMask or
Re: [osg-users] How can I get last frame time inn order to create indepent FPS aniamtions?
Good idea, as expected, it works perfectly. But I'm curious, do you know why old my approach does not work? (calculate frame time, is it because of threads?) Thanks. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20234#20234 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Question about osgManipulator::GridConstraint
Hi Matthias, Could you provide the modified file as an attachment rather than inline as the later breaks the indentation/word wrap. Cheers, Robert. On Tue, Nov 24, 2009 at 12:29 PM, Matthias Asselborn matthias.asselb...@gmx.de wrote: Thank you very much Robert for this reply! here is the whole code ive modified the method addDraggerToScene Code: /* OpenSceneGraph example, osgmanipulator. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the Software), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ #include osgDB/ReadFile #include osgUtil/Optimizer #include osgViewer/Viewer #include osg/CoordinateSystemNode #include osgText/Text #include osgManipulator/TabBoxDragger #include osgManipulator/TabBoxTrackballDragger #include osgManipulator/TabPlaneDragger #include osgManipulator/TabPlaneTrackballDragger #include osgManipulator/TrackballDragger #include osgManipulator/Translate1DDragger #include osgManipulator/Translate2DDragger #include osgManipulator/TranslateAxisDragger #include osg/ShapeDrawable #include osg/MatrixTransform #include osg/Geometry #include osg/Material #include iostream osgManipulator::Dragger* createDragger(const std::string name) { osgManipulator::Dragger* dragger = 0; if (TabPlaneDragger == name) { osgManipulator::TabPlaneDragger* d = new osgManipulator::TabPlaneDragger(); d-setupDefaultGeometry(); dragger = d; } else if (TabPlaneTrackballDragger == name) { osgManipulator::TabPlaneTrackballDragger* d = new osgManipulator::TabPlaneTrackballDragger(); d-setupDefaultGeometry(); dragger = d; } else if (TabBoxTrackballDragger == name) { osgManipulator::TabBoxTrackballDragger* d = new osgManipulator::TabBoxTrackballDragger(); d-setupDefaultGeometry(); dragger = d; } else if (TrackballDragger == name) { osgManipulator::TrackballDragger* d = new osgManipulator::TrackballDragger(); d-setupDefaultGeometry(); dragger = d; } else if (Translate1DDragger == name) { osgManipulator::Translate1DDragger* d = new osgManipulator::Translate1DDragger(); d-setupDefaultGeometry(); dragger = d; } else if (Translate2DDragger == name) { osgManipulator::Translate2DDragger* d = new osgManipulator::Translate2DDragger(); d-setupDefaultGeometry(); dragger = d; } else if (TranslateAxisDragger == name) { osgManipulator::TranslateAxisDragger* d = new osgManipulator::TranslateAxisDragger(); d-setupDefaultGeometry(); dragger = d; } else { osgManipulator::TabBoxDragger* d = new osgManipulator::TabBoxDragger(); d-setupDefaultGeometry(); dragger = d; } return dragger; } osg::Node* addDraggerToScene(osg::Node* scene, const std::string name) { scene-getOrCreateStateSet()-setMode(GL_NORMALIZE, osg::StateAttribute::ON); osg::MatrixTransform* selection = new osg::MatrixTransform; selection-addChild(scene); osgManipulator::Dragger* dragger = createDragger(name); osg::Group* root = new osg::Group; root-addChild(dragger); root-addChild(selection); float scale = scene-getBound().radius() * 1.6; dragger-setMatrix(osg::Matrix::scale(scale, scale, scale) * osg::Matrix::translate(scene-getBound().center())); osgManipulator::GridConstraint *con = new osgManipulator::GridConstraint( *selection , osg::Vec3(0,0,0), osg::Vec3(30,30,30 ) ) ; osg::ref_ptrosgManipulator::TabBoxDragger m_pManipulator = new osgManipulator::TabBoxDragger; m_pManipulator-addConstraint( con); dragger-addConstraint(con);
Re: [osg-users] CompositeViewer context cleanup and missing textures
Hi J.P. I'm still knee deep in merging submissions so can't yet go off reviewing user code. In principle it is possible to mange open and closing viewers. I can point you in the right direction but have to let you get on with it otherwise. Robert. On Tue, Nov 24, 2009 at 12:32 PM, J.P. Delport jpdelp...@csir.co.za wrote: Hi Robert, Robert Osfield wrote: Hi J.P, The typical problem is that the scene graph has been set up to unref texture images after apply so when it comes to reloading the texture images there aren't the to download. should this still happen when I'm completely reloading a scene after the viewer and scene have been deleted completely? It seems that OSG thinks there is still a valid texture it can use after I've deleted the scene and CompositeViewer. Running the attached e.g.: ./test cow.osg Constructing PixelBufferObject for image=0x9547928 _maxTexturePoolSize=0 _maxBufferObjectPoolSize=0 Created new TextureObject, _numOfTextureObjects 1 Created new TextureObject, _numOfTextureObjects 1 now I click the X on the window and the app deletes the scene and viewer and creates them anew: _maxTexturePoolSize=0 _maxBufferObjectPoolSize=0 Reusing orhpahned TextureObject, _numOfTextureObjects=1 Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,) Reusing orhpahned TextureObject, _numOfTextureObjects=1 Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,) So it tries to reuse something that's not there? How can I convince OSG to drop all caches/buffers/GL objects? jp Robert. On Tue, Nov 24, 2009 at 9:17 AM, J.P. Delport jpdelp...@csir.co.za wrote: Hi all, I've run into the classic missing textures problem when stopping and restarting a compositeviewer multiple times in the same app. From previous threads on this problem it seems to be context cleanup/GL object cleanup that does not get done properly, but I'm just using the normal CompositeViewer and not messing with contexts/windows/sceneviews myself, so I thought the cleanup would be handled correctly. Attached a very slightly modified compositeviewer example. All it does is create/destruct the compositeviewer 5 times. When the viewer is created for the second time, all my textures are gone (just run without any arguments). Can anyone confirm the missing textures? Any hints as to what else needs to be done to make sure everything is cleared/flushed correctly? thanks jp -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ 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 -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ 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] Refactoring DatabasePagerNeedToRemovestringflaggingtechnique
HI Wojtek, The crucial part you don't talk about is the performance constraints. Can you pause a frame for hundreds of milliseseconds while the required high res tiles are pulled in off disk? Or are you trying to stick with a solid 60Hz? Loading any tiles in the update phase is not possible if you want to keep to a solid 60Hz. You are right, we do not keep 60 hz then. But its rare case, we prepared our ReadCacheCalback to wait for highest level of detail only when camera is repositioned by more than some margin distance. There is an assumption that warp move will not keep decent LOD anyway, so then we trade hz for qualtiy, and force HIGHEST_LEVEL_OF_DETAIL to properly compute initial elevations and preload highest level of detail for camera neighbourhood. Once the camera is moved and new initial conditions are met we switch back to highest avaialable PageLOD because we are sure that preloaded tiles will be fairly high level and Paging will offer fairly good continuous intersection results that will fit into our wiggle room. This is actualy a hybrid approach but I have not mentioned it because it would complicate things even more. I think something that might provide a work around such as replacing theNeedToRemove is just a work around it's very unlikely to be a solution of trying to use the DatabasePager beyond it's current design assumptions. I agree, but such replacement of original name seems like similar trick to me, thats why I proposed to get rid of the cause completely. This is what this thread is about, isn't it ? Memory leaks were the result of extra NeedToRemove nodes that appeared in activePageLOD lists when some nodes were resurected from Cache because camera moved over them again. I know its sophistry, but in some way, it was more effective than native DatabasePager management because it loaded nodes in no time while DatabasePager would have to load them from disk in this case ;-). I can't understand why you want to do what you are trying to do, but it still doesn't change the fact that DatabasePager hasn't been designed with this in mind. We can certainly look to take this into account in another rev of DatabasePager. Thank You. As a general note a good OS will actually cache file accesses, especially if you don't overload virtual memory/swap space too much so the cost of reloading a tile might not be quite as expensive as you think... I know that when I benchmark under Linux I have the file cache makes a huge difference, so I can to be careful about running test apps in sequence. True. On the other hand, with large datasets like Paged 400 GB database constantly moving back and forth this genaral cache may have much worse hit ratio then application cache tuned for the particular usage patterns. With OS cache the terrain LOD switching was still more distracting than when we turned on both OSG caches. Well I thought that if PagedLOD class is public and offers public interface and methods we could use it as long as we do not hit compiler errors. Perhaps different set of classes should be created for use in more VPB specific closed way. I don't think this is a VPB database specific issue. The problem you are trying to solve is really to do with trying to juggle user manage caching with how the DatabasePager manages expiry. Maybe I am. But additionally I also want to stress the fact: that if some node is no longer present in current viewer scenegraph, it does not exactly mean its no longer used. And assumption that DatabasePager can do anything with such node, is at least a dangerous practice to me. When I get on to reviewing the multiple viewpoint issue with DatabasePager I'll have a think about the consequences of users caching subgraphs. Thank You. Does it mean I should try to prepare the proposed submission or not ? Wojtek ___ 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] NewB questions about osg
Hi If you have not done so I would recommend grabbing the PDF from http://www.osgbooks.com/ especially http://www.osgbooks.com/books/osg_qs.html they are free in PDF form, the Quick start guide will answer many of the basic newbie questions Also check out the over 140+ examples that come with OSG's source and see http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/Examp les http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides http://www.openscenegraph.org/projects/osg/wiki/Support/FAQ http://www.vis-sim.com/osg/index.htm Also check mail archives as many basic question have been answered many time See http://www.mail-archive.com/osg-users@lists.openscenegraph.org/ 1) Y is North is 0.0 Y+ into the Screen, X is East X+ to right, and Z is UP 2) All nodes have automatically calculated Bounding spheres ( when you add children), Drawables / Geometry have bounding boxes 3) Basic collision detection Is done with line segments, if you want geometry to geometry the you may need to write your own or find a tool kit that's out there Gordon Tomlinson Product Manager 3d Technology Overwatch(r) An Operating Unit of Textron Systems -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Priyank Jain Sent: Tuesday, November 24, 2009 12:18 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] NewB questions about osg Hi, I just started using openScenegraph and it has been pretty smooth for me till now. I am making a simple racquet-ball game for my VR class (using a CAVE system). I have some basic questions to ask.. 1. What coordinate system does OSG follow ? Right handed, I presume ? Also, x points to East ? Y up or into the screen ? I couldn't find the thumb diagram on the website. Can you guys please refer me to the right convention or link ? 2. How do I generate Bounding box/ bounding sphere for a given box/ sphere geometry? Can this information be embedded in the model and extracted using any of the plugins ? 3. Is there something pre-defined for collision detection-resolution wrt Bounding box and bounding sphere in osg ? I am exploring ways to handle the collision between the wall and the ball and not sure if there are things already built-in open scenegraph that I can use or do I have to write code to handle that ? I'd appreciate any help. Thank you! /Priyank -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20198#20198 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CompositeViewer context cleanup and missing textures
Hi, Robert Osfield wrote: Hi J.P. I'm still knee deep in merging submissions so can't yet go off reviewing user code. In principle it is possible to mange open and closing viewers. I can point you in the right direction but have to let you get on with it otherwise. I understand, I'll try search for cleanup code, just not sure where to start. Anyone else? jp Robert. On Tue, Nov 24, 2009 at 12:32 PM, J.P. Delport jpdelp...@csir.co.za wrote: Hi Robert, Robert Osfield wrote: Hi J.P, The typical problem is that the scene graph has been set up to unref texture images after apply so when it comes to reloading the texture images there aren't the to download. should this still happen when I'm completely reloading a scene after the viewer and scene have been deleted completely? It seems that OSG thinks there is still a valid texture it can use after I've deleted the scene and CompositeViewer. Running the attached e.g.: ./test cow.osg Constructing PixelBufferObject for image=0x9547928 _maxTexturePoolSize=0 _maxBufferObjectPoolSize=0 Created new TextureObject, _numOfTextureObjects 1 Created new TextureObject, _numOfTextureObjects 1 now I click the X on the window and the app deletes the scene and viewer and creates them anew: _maxTexturePoolSize=0 _maxBufferObjectPoolSize=0 Reusing orhpahned TextureObject, _numOfTextureObjects=1 Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,) Reusing orhpahned TextureObject, _numOfTextureObjects=1 Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,) So it tries to reuse something that's not there? How can I convince OSG to drop all caches/buffers/GL objects? jp Robert. On Tue, Nov 24, 2009 at 9:17 AM, J.P. Delport jpdelp...@csir.co.za wrote: Hi all, I've run into the classic missing textures problem when stopping and restarting a compositeviewer multiple times in the same app. From previous threads on this problem it seems to be context cleanup/GL object cleanup that does not get done properly, but I'm just using the normal CompositeViewer and not messing with contexts/windows/sceneviews myself, so I thought the cleanup would be handled correctly. Attached a very slightly modified compositeviewer example. All it does is create/destruct the compositeviewer 5 times. When the viewer is created for the second time, all my textures are gone (just run without any arguments). Can anyone confirm the missing textures? Any hints as to what else needs to be done to make sure everything is cleared/flushed correctly? thanks jp -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ 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 -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ 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 -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Refactoring DatabasePagerNeedToRemovestringflaggingtechnique
Hi Wojtek, On Tue, Nov 24, 2009 at 1:33 PM, Wojciech Lewandowski lewandow...@ai.com.pl wrote: When I get on to reviewing the multiple viewpoint issue with DatabasePager I'll have a think about the consequences of users caching subgraphs. Thank You. Does it mean I should try to prepare the proposed submission or not ? You can submit changes, I can always just use these as another point of information when doing my investigation even if the code doesn't make it into svn/trunk. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] heightfield change height crashes
Hello Thomas, i only have set -setDataVariance(osg::Object::DYNAMIC); to the geode, now i also have set it to the shapeDrawable. Should i apply it only to the shapeDrawable or to both? Data variance only has an effect on subclasses of osg::Drawable and on osg::StateSet (at run time - it has an effect on other nodes for the osg::Optimizer if you use that, but at run time it only effects drawables and statesets). After this change it draws the first point of my setHeight() changes, any following setHeight() call doesnt paint anything? If i use -dirtyDisplayList(); on the shapeDrawable directly after calling setHeight() crashes the application. But you didn't answer the other question, do you call it in the update phase? If you don't pay attention to when you call it, you might be calling it during the cull phase while OSG is trying to draw your height field, so one thread will be trying to draw it while another will be trying to update it and it will crash. For the changes in height to be visible, either you need to disable display lists completely (setUseDisplayList(false)) or you need to dirty the display list (dirtyDisplayList()). There's no getting around that, if you don't do one of those two things then the old display list will still be used and you won't see any changes you make using setHeight()... Makes sense doesn't it? For a relatively small height field, the general recommendation is that if you're going to be changing the heights often (say more often than once per second), you should disable display lists completely, or else you'll be spending too much time updating them. But if you're going to be changing the heights less often, then you should keep display lists enabled and call dirtyDisplayList() (from the update phase! say in an update callback on your geode). But for large height fields, you should probably disable display lists in any case, and perhaps even enable VBOs, if you're using a pretty recent video card, it will be more efficient that way. Anyways, try the different alternatives out and see for yourself. Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CompositeViewer context cleanup and missing textures
Hi Robert, it seems to be something broken on context destruction with the new texture pool. The orphaned list does not seem to be cleared properly. A texture is used from the orphaned list even though the context it belonged to had been destroyed earlier. When libosg is compiled with #define USE_NEW_TEXTURE_POOL 1 commented out, the example works as expected. regards jp J.P. Delport wrote: Hi, Robert Osfield wrote: Hi J.P. I'm still knee deep in merging submissions so can't yet go off reviewing user code. In principle it is possible to mange open and closing viewers. I can point you in the right direction but have to let you get on with it otherwise. I understand, I'll try search for cleanup code, just not sure where to start. Anyone else? jp Robert. On Tue, Nov 24, 2009 at 12:32 PM, J.P. Delport jpdelp...@csir.co.za wrote: Hi Robert, Robert Osfield wrote: Hi J.P, The typical problem is that the scene graph has been set up to unref texture images after apply so when it comes to reloading the texture images there aren't the to download. should this still happen when I'm completely reloading a scene after the viewer and scene have been deleted completely? It seems that OSG thinks there is still a valid texture it can use after I've deleted the scene and CompositeViewer. Running the attached e.g.: ./test cow.osg Constructing PixelBufferObject for image=0x9547928 _maxTexturePoolSize=0 _maxBufferObjectPoolSize=0 Created new TextureObject, _numOfTextureObjects 1 Created new TextureObject, _numOfTextureObjects 1 now I click the X on the window and the app deletes the scene and viewer and creates them anew: _maxTexturePoolSize=0 _maxBufferObjectPoolSize=0 Reusing orhpahned TextureObject, _numOfTextureObjects=1 Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,) Reusing orhpahned TextureObject, _numOfTextureObjects=1 Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,) So it tries to reuse something that's not there? How can I convince OSG to drop all caches/buffers/GL objects? jp Robert. On Tue, Nov 24, 2009 at 9:17 AM, J.P. Delport jpdelp...@csir.co.za wrote: Hi all, I've run into the classic missing textures problem when stopping and restarting a compositeviewer multiple times in the same app. From previous threads on this problem it seems to be context cleanup/GL object cleanup that does not get done properly, but I'm just using the normal CompositeViewer and not messing with contexts/windows/sceneviews myself, so I thought the cleanup would be handled correctly. Attached a very slightly modified compositeviewer example. All it does is create/destruct the compositeviewer 5 times. When the viewer is created for the second time, all my textures are gone (just run without any arguments). Can anyone confirm the missing textures? Any hints as to what else needs to be done to make sure everything is cleared/flushed correctly? thanks jp -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ 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 -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ 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 -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing
Re: [osg-users] CompositeViewer context cleanup and missing textures
Hi J.P., Can anyone confirm the missing textures? Any hints as to what else needs to be done to make sure everything is cleared/flushed correctly? We've been doing something similar to this for a while now and it's worked for us, what I'm wondering is whether the recent changes to texture buffering and such would have broken this (i.e. if something that needs to be cleaned up and was before now isn't). Our own app still uses OSG 2.6 so I wouldn't have seen this. I haven't had a chance to check your code yet, give me a few minutes and I'll check if there's anything amiss that I can see. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Does anybody know how to include OSGViewer using MFC?
Hi. I have the example but, with this example I can`t open any kind of OSG files. There may have been some problems on the example. That`s why I`m finding a new example of MFC OSGViewer which can be builded. Thank you for your reply. :D -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20251#20251 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CompositeViewer context cleanup and missing textures
Hi J-S, Jean-Sébastien Guay wrote: Hi J.P., Can anyone confirm the missing textures? Any hints as to what else needs to be done to make sure everything is cleared/flushed correctly? We've been doing something similar to this for a while now and it's worked for us, what I'm wondering is whether the recent changes to texture buffering and such would have broken this (i.e. if something that needs to be cleaned up and was before now isn't). I think your hunch is correct. I've just tried with the old texture manager and the textures were loaded OK on the second viewer instance. jp Our own app still uses OSG 2.6 so I wouldn't have seen this. I haven't had a chance to check your code yet, give me a few minutes and I'll check if there's anything amiss that I can see. J-S -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CompositeViewer context cleanup and missing textures
Hi again, I haven't had a chance to check your code yet, give me a few minutes and I'll check if there's anything amiss that I can see. I'm sorry to say I can't repro here on Windows Vista, VC++ 2005 on SVN head. But it seems that you've pinned it down to the texture pool as I thought, though it would seem to be OS specific? A bit weird. Sorry I couldn't help more. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CompositeViewer context cleanup and missing textures
Hello J.P., I see it's a good thing this thread got my attention! I have similar missing texture issues in another application that creates and deletes window contexts applied to viewer slaves (also created and deleted dynamically). Here's the way we create our textures: osg::ref_ptrosg::Texture2D lTex = new osg::Texture2D; lTex-setDataVariance(osg::Object::DYNAMIC); // load an image by reading a file: CString lIconFileName = (...)TextureFilename + .png; osg::Image* lIconImage = osgDB::readImageFile(lIconFileName.GetBuffer()); // Assign the texture to the image we read from file: lTex-setImage(lIconImage); // Make sure the texture is not unreferenced in memory after it's applied in GL states lTex-setUnRefImageDataAfterApply(false); Unfortunately, my understanding of OpenGL is relatively limited but I know this last line of code is crucial for dynamical views handling to maintain the texture in user memory for later access. However, even with this, it happens sometimes that the texture disappear after a few create and delete views operations (sometimes, the textures is on a view but not on another!). It happens most of the time with objects loaded from file. Since we don't have direct access to the textures, we can't make the call to setUnRefImageDataAfterApply(). Would there be another way? Now, as for the modified CompositeViewer example, I tried it on Windows Vista and it simply crashes the first time I hit ESC or the X button. In fact, the problem occurs during the second call to viewer.run(). First, I simply tried to add a sleep before the viewer's deletion to wait for potential asynchronous cleanup stuff after the call to the viewer's run() method but it didn't work. Then, I did a little debug job to find out that the second time the viewer is created, the application crashes during the rendering traversal of the first call to frame() in the run thread loop. More precisely the application crashes in osgUtil::ScreneView::init() the first time the cull_draw operation is launched. Here's the call stack: ntdll.dll!778f9a94() [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] ntdll.dll!778f92c4() kernel32.dll!76a5e87b() nvoglv32.dll!69638b8f() nvoglv32.dll!695a15d0() osg55-osgd.dll!osg::getGLVersionNumber() Line 48 + 0xd bytes C++ osg55-osgd.dll!osg::isGLExtensionOrVersionSupported(unsigned int contextID=0, const char * extension=0x5ac7a277, float requiredGLVersion=3.4028235e+038) Line 82 + 0x5 bytes C++ osg55-osgd.dll!osg::isGLExtensionSupported(unsigned int contextID=0, const char * extension=0x5ac7a277) Line 73 + 0x17 bytes C++ osg55-osgUtild.dll!osgUtil::SceneView::init() Line 312 + 0x2d bytes C++ osg55-osgUtild.dll!osgUtil::SceneView::draw() Line 1026 + 0x1d bytes C++ osg55-osgViewerd.dll!osgViewer::Renderer::cull_draw() Line 588 + 0xf bytes C++ osg55-osgViewerd.dll!osgViewer::Renderer::operator()(osg::GraphicsContext * context=0x023591b0) Line 689 + 0xf bytes C++ osg55-osgd.dll!osg::GraphicsContext::runOperations() Line 688 + 0x33 bytes C++ osg55-osgViewerd.dll!osgViewer::ViewerBase::renderingTraversals() Line 772 + 0x15 bytesC++ osg55-osgViewerd.dll!osgViewer::ViewerBase::frame(double simulationTime=1.7976931348623157e+308) Line 609 + 0xf bytes C++ osg55-osgViewerd.dll!osgViewer::ViewerBase::run() Line 581 + 0x1b bytesC++ osg55-osgViewerd.dll!osgViewer::CompositeViewer::run() Line 233 C++ osgcompositeviewerd.exe!main(int argc=3, char * * argv=0x02330ed8) Line 311 + 0xf bytesC++ osgcompositeviewerd.exe!__tmainCRTStartup() Line 582 + 0x19 bytes C osgcompositeviewerd.exe!mainCRTStartup() Line 399 C kernel32.dll!76a94911() ntdll.dll!778de4b6() ntdll.dll!778de489() I forced the single thread mode (the only thing on the command line was the filename of my 3D model). By the way, is there a better solution to wait for the viewer completion after the run() method? What OS are you using? Maybe I should try on XP to see if it does the same thing. Hope we can help each other! Cheers, Frederic Drolet, M. Sc. Computing Solutions and Experimentations | Solutions informatiques et expérimentations Systems of Systems | Systèmes de systèmes DRDC Valcartier | RDDC Valcartier 2459, boul. Pie-XI North Quebec, Quebec G3J 1X5 CANADA Phone | Téléphone: (418) 844-4000 ext : 4820 Fax | Télécopieur: (418) 844-4538 E-mail | Courriel: frederic.dro...@drdc-rddc.gc.ca Web : www.valcartier.drdc-rddc.gc.ca -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport Sent:
[osg-users] Texture loading problem
Hi, My first actual post here:). Just started to learn OSG and I have a scene that I load into OSG and everything runs fine. But after loading the scene the 2nd time the textures won't load. Everything is white. Please let me know if you need more info. Anyone else experienced this problem or someone can help me regarding this problem? ... Thank you! Cheers, Aydin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20253#20253 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CompositeViewer context cleanup and missing textures
Hi J-S, Jean-Sébastien Guay wrote: Hi again, I haven't had a chance to check your code yet, give me a few minutes and I'll check if there's anything amiss that I can see. I'm sorry to say I can't repro here on Windows Vista, VC++ 2005 on SVN head. But it seems that you've pinned it down to the texture pool as I thought, though it would seem to be OS specific? A bit weird. maybe I've missed an update in the last week, will try the latest SVN. Sorry I couldn't help more. Thanks for testing. jp J-S -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Texture loading problem
Hello Aydin, See current thread CompositeViewer context cleanup and missing textures for real-time solution! Cheers, Frederic Drolet, M. Sc. Computing Solutions and Experimentations | Solutions informatiques et expérimentations Systems of Systems | Systèmes de systèmes DRDC Valcartier | RDDC Valcartier 2459, boul. Pie-XI North Quebec, Quebec G3J 1X5 CANADA Phone | Téléphone: (418) 844-4000 ext : 4820 Fax | Télécopieur: (418) 844-4538 E-mail | Courriel: frederic.dro...@drdc-rddc.gc.ca Web : www.valcartier.drdc-rddc.gc.ca -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Aydin Uluc Sent: November-24-09 9:50 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Texture loading problem Hi, My first actual post here:). Just started to learn OSG and I have a scene that I load into OSG and everything runs fine. But after loading the scene the 2nd time the textures won't load. Everything is white. Please let me know if you need more info. Anyone else experienced this problem or someone can help me regarding this problem? ... Thank you! Cheers, Aydin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20253#20253 ___ 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] TriStripVisitor issue
Hi Robert, http://users.telenet.be/tfautre/softdev/tristripper/ The latest revision is 1.10, Beta 5 (09/06/2005). Don't let the Beta name scare you, it's actually probably the most stable release due to several bug fixes. http://users.telenet.be/tfautre/softdev/tristripper/tristripper-1.1.0-be ta-5.zip I suggest you spend a few minutes reading all the interface/feature changes that were incorporated into the 1.10 release (they're detailed on the TriStripper main page). The portability of the TriStripper lib has improved significantly in the latest releases. I'm hoping you won't have to make as many modifications as you had to in the past (I think the throw/catch is gone). After a quick look at the header, I've noticed protections against min/max macros that will cause a hard failure when those are detected (which you probably want to avoid in a library such as OSG). Thinking about it now, this is a bit harsh as I've learned since now how to avoid macro expansion. For example, replacing const size_t Overlap = std::min(PossibleOverlap, size()); by const size_t Overlap = (std::min)(PossibleOverlap, size()); will avoid the macro replacement and use the std function instead. Keep me posted on how it goes and I'll look into syncing the TriStripper code with the OSG modifications. Tanguy -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: 24 November 2009 12:13 PM To: OpenSceneGraph Users Subject: Re: [osg-users] TriStripVisitor issue Hi Tanguy, Thanks for chipping in. Could you point me at the latest rev your tri-stripper code. One thing we will need to do is report your tri-stripping code to all the compilers/platform that the OSG users put it through, as we've had to merge quite a few build fixes over the years. For the OpenGL ES port I also had to remove the use of throw/catch from the tristripper code. It would be good to roll these changes back into your tri-stripper code. Good luck with your release, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Texture loading problem
Hi, Wow that is what I call a fast reply:) Thanks and checking out immediately ... Thank you! Cheers, Aydin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20260#20260 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CompositeViewer context cleanup and missing textures
Hi Frederic, Since we don't have direct access to the textures, we can't make the call to setUnRefImageDataAfterApply(). Would there be another way? You can run a visitor to get to the textures and turn this setting off. You can either make your own, or use osgUtil::Optimizer::TextureVisitor like this: osg::Node* node = osgDB::readNodeFile(...); osgUtil::Optimizer::TextureVisitor tv(true, false, false, false, false, false); node-accept(tv); (the arguments to TextureVisitor's constructor are changeAutoUnRef, valueAutoUnRef, and the rest all false so nothing else is changed.) Now, as for the modified CompositeViewer example, I tried it on Windows Vista and it simply crashes the first time I hit ESC or the X button. Strange, I tried it on Vista as well and I didn't have any problem. I notice you're using the stable version of OSG (osg55 = OSG 2.8, the current SVN trunk is at 62), so perhaps something was fixed that affects this, and it would not crash for you in a more recent version. Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CompositeViewer context cleanup and missing textures
Hi Frederic, Drolet, Frederic wrote: Hello J.P., I see it's a good thing this thread got my attention! I have similar missing texture issues in another application that creates and deletes window contexts applied to viewer slaves (also created and deleted dynamically). Here's the way we create our textures: osg::ref_ptrosg::Texture2D lTex = new osg::Texture2D; lTex-setDataVariance(osg::Object::DYNAMIC); // load an image by reading a file: CString lIconFileName = (...)TextureFilename + .png; osg::Image* lIconImage = osgDB::readImageFile(lIconFileName.GetBuffer()); // Assign the texture to the image we read from file: lTex-setImage(lIconImage); // Make sure the texture is not unreferenced in memory after it's applied in GL states lTex-setUnRefImageDataAfterApply(false); Unfortunately, my understanding of OpenGL is relatively limited but I know this last line of code is crucial for dynamical views handling to maintain the texture in user memory for later access. However, even with this, it happens sometimes that the texture disappear after a few create and delete views operations (sometimes, the textures is on a view but not on another!). It happens most of the time with objects loaded from file. Since we don't have direct access to the textures, we can't make the call to setUnRefImageDataAfterApply(). Would there be another way? I'm not sure, but I think only the DB pager, optimiser and some plugins switch automatically to auto unref. Maybe try disabling the optimiser. Now, as for the modified CompositeViewer example, I tried it on Windows Vista and it simply crashes the first time I hit ESC or the X button. In fact, the problem occurs during the second call to viewer.run(). First, I simply tried to add a sleep before the viewer's deletion to wait for potential asynchronous cleanup stuff after the call to the viewer's run() method but it didn't work. What version of OSG? Then, I did a little debug job to find out that the second time the viewer is created, the application crashes during the rendering traversal of the first call to frame() in the run thread loop. More precisely the application crashes in osgUtil::ScreneView::init() the first time the cull_draw operation is launched. Here's the call stack: ntdll.dll!778f9a94() [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] ntdll.dll!778f92c4() kernel32.dll!76a5e87b() nvoglv32.dll!69638b8f() nvoglv32.dll!695a15d0() osg55-osgd.dll!osg::getGLVersionNumber() Line 48 + 0xd bytes C++ osg55-osgd.dll!osg::isGLExtensionOrVersionSupported(unsigned int contextID=0, const char * extension=0x5ac7a277, float requiredGLVersion=3.4028235e+038) Line 82 + 0x5 bytes C++ osg55-osgd.dll!osg::isGLExtensionSupported(unsigned int contextID=0, const char * extension=0x5ac7a277) Line 73 + 0x17 bytes C++ osg55-osgUtild.dll!osgUtil::SceneView::init() Line 312 + 0x2d bytes C++ osg55-osgUtild.dll!osgUtil::SceneView::draw() Line 1026 + 0x1d bytes C++ osg55-osgViewerd.dll!osgViewer::Renderer::cull_draw() Line 588 + 0xf bytes C++ osg55-osgViewerd.dll!osgViewer::Renderer::operator()(osg::GraphicsContext * context=0x023591b0) Line 689 + 0xf bytes C++ osg55-osgd.dll!osg::GraphicsContext::runOperations() Line 688 + 0x33 bytes C++ osg55-osgViewerd.dll!osgViewer::ViewerBase::renderingTraversals() Line 772 + 0x15 bytes C++ osg55-osgViewerd.dll!osgViewer::ViewerBase::frame(double simulationTime=1.7976931348623157e+308) Line 609 + 0xf bytes C++ osg55-osgViewerd.dll!osgViewer::ViewerBase::run() Line 581 + 0x1b bytes C++ osg55-osgViewerd.dll!osgViewer::CompositeViewer::run() Line 233C++ osgcompositeviewerd.exe!main(int argc=3, char * * argv=0x02330ed8) Line 311 + 0xf bytes C++ osgcompositeviewerd.exe!__tmainCRTStartup() Line 582 + 0x19 bytes C osgcompositeviewerd.exe!mainCRTStartup() Line 399 C kernel32.dll!76a94911() ntdll.dll!778de4b6() ntdll.dll!778de489() I forced the single thread mode (the only thing on the command line was the filename of my 3D model). By the way, is there a better solution to wait for the viewer completion after the run() method? When run completes I would hope it's done, I don't know of other ways. What OS are you using? Maybe I should try on XP to see if it does the same thing. J-S tried on Vista and it worked with latest OSG svn. I'm on Debian Sid 32-bit. jp Hope we can help each other! Cheers, Frederic Drolet, M. Sc. Computing Solutions and Experimentations | Solutions informatiques et expérimentations Systems of Systems | Systèmes de systèmes DRDC Valcartier | RDDC Valcartier 2459, boul. Pie-XI North Quebec, Quebec G3J 1X5 CANADA Phone | Téléphone: (418) 844-4000 ext : 4820 Fax | Télécopieur: (418) 844-4538 E-mail | Courriel: frederic.dro...@drdc-rddc.gc.ca Web : www.valcartier.drdc-rddc.gc.ca -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. Delport Sent:
Re: [osg-users] CompositeViewer context cleanup and missing textures
Hi J-S, J.P. Delport wrote: Hi J-S, Jean-Sébastien Guay wrote: Hi again, I haven't had a chance to check your code yet, give me a few minutes and I'll check if there's anything amiss that I can see. I'm sorry to say I can't repro here on Windows Vista, VC++ 2005 on SVN head. But it seems that you've pinned it down to the texture pool as I thought, though it would seem to be OS specific? A bit weird. maybe I've missed an update in the last week, will try the latest SVN. Latest SVN indeed works as expected. I must have been using a dud version from somewhere in svn land. Sorry for the noise folks... move right along... nothing to see here... Sorry I couldn't help more. Someone saying: Hey, it works for me is enough sometimes. thanks jp -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CompositeViewer context cleanup and missing textures
Hi J.P, On Tue, Nov 24, 2009 at 3:32 PM, J.P. Delport jpdelp...@csir.co.za wrote: Latest SVN indeed works as expected. I must have been using a dud version from somewhere in svn land. Sorry for the noise folks... move right along... nothing to see here... Does this mean that there isn't a bug to look into? Can I now safely ignore this thread? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CompositeViewer context cleanup and missing textures
Hi Robert, J.P. Delport wrote: Hi Robert, it seems to be something broken on context destruction with the new texture pool. The orphaned list does not seem to be cleared properly. A texture is used from the orphaned list even though the context it belonged to had been destroyed earlier. When libosg is compiled with #define USE_NEW_TEXTURE_POOL 1 commented out, the example works as expected. Latest svn also works, so you've already fixed what I tried to describe above. That'll teach me to update before I go bug hunting. rgds jp regards jp J.P. Delport wrote: Hi, Robert Osfield wrote: Hi J.P. I'm still knee deep in merging submissions so can't yet go off reviewing user code. In principle it is possible to mange open and closing viewers. I can point you in the right direction but have to let you get on with it otherwise. I understand, I'll try search for cleanup code, just not sure where to start. Anyone else? jp Robert. On Tue, Nov 24, 2009 at 12:32 PM, J.P. Delport jpdelp...@csir.co.za wrote: Hi Robert, Robert Osfield wrote: Hi J.P, The typical problem is that the scene graph has been set up to unref texture images after apply so when it comes to reloading the texture images there aren't the to download. should this still happen when I'm completely reloading a scene after the viewer and scene have been deleted completely? It seems that OSG thinks there is still a valid texture it can use after I've deleted the scene and CompositeViewer. Running the attached e.g.: ./test cow.osg Constructing PixelBufferObject for image=0x9547928 _maxTexturePoolSize=0 _maxBufferObjectPoolSize=0 Created new TextureObject, _numOfTextureObjects 1 Created new TextureObject, _numOfTextureObjects 1 now I click the X on the window and the app deletes the scene and viewer and creates them anew: _maxTexturePoolSize=0 _maxBufferObjectPoolSize=0 Reusing orhpahned TextureObject, _numOfTextureObjects=1 Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,) Reusing orhpahned TextureObject, _numOfTextureObjects=1 Warning: detected OpenGL error 'invalid value' after RenderBin::draw(,) So it tries to reuse something that's not there? How can I convince OSG to drop all caches/buffers/GL objects? jp Robert. On Tue, Nov 24, 2009 at 9:17 AM, J.P. Delport jpdelp...@csir.co.za wrote: Hi all, I've run into the classic missing textures problem when stopping and restarting a compositeviewer multiple times in the same app. From previous threads on this problem it seems to be context cleanup/GL object cleanup that does not get done properly, but I'm just using the normal CompositeViewer and not messing with contexts/windows/sceneviews myself, so I thought the cleanup would be handled correctly. Attached a very slightly modified compositeviewer example. All it does is create/destruct the compositeviewer 5 times. When the viewer is created for the second time, all my textures are gone (just run without any arguments). Can anyone confirm the missing textures? Any hints as to what else needs to be done to make sure everything is cleared/flushed correctly? thanks jp -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ 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 -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ 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 -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and
Re: [osg-users] CompositeViewer context cleanup and missing textures
Hi Frederic, Some more fun in perspective! At least, I'll try the texture pool solution in the latest SVN build to see if it helps. I think that's what's most susceptible to work. Even stable releases can have bugs. So I really suspect that you're hitting a bug that's fixed in SVN. As I said, I run the example on Windows Vista without crashes (I tried multiple times without problems) and I run an nVidia card as well (9800GTX+) with semi-recent drivers. Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CompositeViewer context cleanup and missing textures
Hi Robert, Robert Osfield wrote: Hi J.P, On Tue, Nov 24, 2009 at 3:32 PM, J.P. Delport jpdelp...@csir.co.za wrote: Latest SVN indeed works as expected. I must have been using a dud version from somewhere in svn land. Sorry for the noise folks... move right along... nothing to see here... Does this mean that there isn't a bug to look into? Can I now safely ignore this thread? this is what I hoped, but no. I just now reran the example I attached with terrain as the parameter instead of cow.osg and now it again fails on the second viewer being created. The textures of the particles are OK, but textures on the terrain are missing. When zooming into terrain, the newly loaded textures are OK. I've again tried by commenting out #define USE_NEW_TEXTURE_POOL 1 and then the terrain is also fine on the second run. So it seems it's not finished yet, sorry... jp Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CompositeViewer context cleanup and missing textures
Hi J-S, Jean-Sébastien Guay wrote: Hi again, I haven't had a chance to check your code yet, give me a few minutes and I'll check if there's anything amiss that I can see. I'm sorry to say I can't repro here on Windows Vista, VC++ 2005 on SVN head. But it seems that you've pinned it down to the texture pool as I thought, though it would seem to be OS specific? A bit weird. Sorry I couldn't help more. can you try with terrain as the parameter to the test app. For me this still fails on the second creation of the viewer. When zooming into the terrain the newly loaded textures are OK though. jp J-S -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] TriStripVisitor issue
Hi Robert, I'll do these modifications and check them tonight when I'm back home. To speed things up (and because we're going to backport OSG changes), I'm not going to do a full release on TriStripper website yet; instead I'll send you a zip containing the updated version. Cheers, Tanguy -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: 24 November 2009 3:33 PM To: OpenSceneGraph Users Subject: Re: [osg-users] TriStripVisitor issue Hi Tanguy, On Tue, Nov 24, 2009 at 2:55 PM, Tanguy Fautre tang...@aristechnologies.com wrote: http://users.telenet.be/tfautre/softdev/tristripper/ Thanks the link and explanation. After a quick look at the header, I've noticed protections against min/max macros that will cause a hard failure when those are detected (which you probably want to avoid in a library such as OSG). Thinking about it now, this is a bit harsh as I've learned since now how to avoid macro expansion. For example, replacing const size_t Overlap = std::min(PossibleOverlap, size()); by const size_t Overlap = (std::min)(PossibleOverlap, size()); will avoid the macro replacement and use the std function instead. Is there any chance you can max this fix the TriStripper before I take a copy and merge it with the OSG? Cheers, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] TriStripVisitor issue
On Tue, Nov 24, 2009 at 4:59 PM, Tanguy Fautre tang...@aristechnologies.com wrote: I'll do these modifications and check them tonight when I'm back home. To speed things up (and because we're going to backport OSG changes), I'm not going to do a full release on TriStripper website yet; instead I'll send you a zip containing the updated version. Thanks, just send me the zip file and should be get on to do a review/merge tomorrow. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Databasepager + multiple views + different camera positions = memory leak?
Hi Sergey et. al, I'm finally getting back ontop of my submissions backlog and will be allotting time this week to investigating outstanding issues. The DatabasePager issue being one of them. The first step for me is recreating the issue so I've got your main.cpp example up and compiling under my system, and tested it out against the VPB built example database up on osg-users: http://www.openscenegraph.org/data/earth_bayarea/earth.ive I've also integrated Michael Bach Jensen's suggested custom MyPager to keep tabs on memory growth. I'll add more stats to this as well. My thought is that it'd be worth using this code as a basis for a new OSG example that can be used as testbed for reproducing, debugging and then an ongoing unit test. Are you happy for the code to be used/open sourced in this way? My second thought is that we'll need to use a common database or set of databases and record camera paths for each of the windows to force the same conditions so that we can measure before and after results as we adjust values/algorithms/fix bugs. Are you able to reproduce the problem with the above database? The issues with TXP databases will also need a TXP database. Ideally also so expertise from TerraPage guys if any are left as the code base is primarily written by them. I know a lot of them lots jobs when the various buyouts happened so I know if there is anybody else left to help out. Is there anybody out there on support? Robert. On Mon, Oct 19, 2009 at 3:28 PM, sergey leontyev sleon...@ist.ucf.edu wrote: I have created an example for the memory growth problem. If you have a chance can you please run it with the following command arguments : -3, where is your database main txp file. It creates 3 views. In order to trigger the memory growth problem. First get closer to the terrain slowly ( so it appears) for lets say 2 bottom views. Tilt the camera so it looks down at the terrain. Dont do anything else and watch the memory growth. If memory usage is not growing, try to navigate camera to different places and zoom out further. Thank you! Cheers, sergey -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18396#18396 ___ 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] [build] How to properly use the OSG_GL3_AVAILABLE CMake option?
Hi Robert, Thank you again for taking the time to reply. Your assumptions were correct, I had not turned off the other GL options. I am planning to play with gl3 a little, there must be some advantages to using it. But it also seems at first glance that one might be giving up some optimizations in OSG by not using gl1 and gl2. I am curious if it might be useful to create a gl3 compatibility context to take advantage of existing optimizations. I have to admit that I have found only bits and pieces of useful information on gl3 even though it appears to be at rev. 3.2. My assumptions about a compatibility context could be completely off. If you or Paul Martz have found a source of useful information about gl3 I would be very appreciative if you could share it with me and the OSG community. In the mean time I will begin the learning curve by doing. Thank you! Cheers, John -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20282#20282 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] IntersectVisitor does not recognize Nodes on different Projection
Hi, I've got a loaded model which is a child of the root. the second child of the root node is a ortho2d projection, which i use for the GUI. Now i've taken the example osgkeyboardmouse from the osg site and my problem is that it only catches intersections with the loaded model. Not with the Goedes which are at the Ortho2D ProjectionMatrix. double w(.05), h(.05); osgUtil::PolytopeIntersector* picker = new osgUtil::PolytopeIntersector( osgUtil::Intersector::PROJECTION, x-w, y-h, x+w, y+h); osgUtil::IntersectionVisitor iv(picker); viewer-getCamera()-accept(iv); this is how i configured the Visitor. I've tried to change the Intersector into a osg::Intersector::WINDOW. ut then absolutely nothing happens anymore. Thanks in advance. Cheers, Thorsten -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20283#20283 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] osgOcean also rendering with osgParticle?
Hi Kim, Rendering osgParticles with osgOcean *kinda* works now with r183, except for three issues I see: 1) It seems the alpha of the particles get's dropped when the particles are in the reflection of the sun. 2) The particles themselves, seem to be darker than usual (like the polygon color turned gray) 3) The underwater scene is now rendering neon-like colors (need effect, but probably not desired!) Let me know if I can be of more help! Thanks, -Erik -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20284#20284 Attachments: http://forum.openscenegraph.org//files/water_2009_11_24t09_33_49_188.jpg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgPlugins] osganimation plugin and static linking
Hi there, Well, I ended up making it work ! As a matter of fact, it came to me all of a sudden that I could directly embed the osganimation plugin source code into my project. And as the plugin is only one single source file (ReaderWriter.cpp), it was not a big deal... Anyways, all is working now, and I hope that I can move forward quick. Cheers, Stratboy61 -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20287#20287 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Rotation about Arbitrary Axis: Please help...
Hi all, I'm having fun learning about rotation about an arbitrary axis and it's not working as I expected it to at all. I am using the code from the Trackball manipulator to construct a local origin at a point that is actually @ the edge of my earth sphere. It goes like this: osg::Vec3d Up(0,0,1); osg::Vec3d focalPt(x,y,z); osg::Vec3d x_axis = Up ^ focalPt; // up cross focal should give x-axis? osg::Vec3d y_axis = x_axis ^ focalPt;// should be y-axis?? osg::Vec3d z_axis = x_axis ^ y_axis; I can construct the x-axis w/o a prob and I can rotate about it - though it LOOKS LIKE A PITCH that I am actually performing and not a ROLL. This behavior is very strange to me. :( To actually perform the rotate, I do the following: osg::Quat q(AngleOfRotation, x_axis); osg::Matrixd mtxd = osg::Matrixd::rotate(q) * OriginalPositionMatrixd; The mtxd computed is the correct rotation about the x-axis but, again, it appears to be a PITCH instead of a ROLL. OriginalPositionMatrixd is computed as follows: osg::Vec3d ov3d = s_paxNode-getPosition(); osg::Quat q= s_paxNode-getAttitude(); osg::Matrixd mtxdR; mtxdR.makeRotate(q); osg::Matrixd mtxdT; mtxdT.makeTranslate(ov3d); osg::Matrixd OriginalPositionMatrixd = mtxdR * mtxdT; //order matters MY PROBLEM: when I attempt to rotate about y-axis or z-axis which I think are local to the focalPt, the rotation is totally wrong. It rotates in an completely unexpected way. Would someone please explain to me how to properly construct a local origin at my focal point so that I can rotate my model, which is at that point, around the local x,y and z axes? I am on the surface of the Earth, too, and I want to actually rotate my model about it's z-axis so as to change the azimuth the model is facing. Note: whether the axes are normalized or not seems to make no difference though I think that that should make a difference. ... Thank you very much! Cheers, Allen -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20288#20288 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] 3D model material display error!
Hi Tian, Sorry about the late reply on this, I must have got distracted and forgot to reply. But the model was under a pisitionAttitudeNode, and I just make the model -1 meter down. Does it matter? No that shouldn't matter, transforming the ocean surface itself may cause problems though. It's possible that one side of the model is being culled in the reflection and you're seeing the inside of the model. I just added an override to the reflection camera that should force face culling to off when it's passing through the reflection camera (http://code.google.com/p/osgocean/source/detail?r=184). This might fix the problem, could you try updating from the trunk and see if the issue is resolved? Cheers. K. 2009/11/24 Tian Ma tianxiao...@foxmail.com: Hi Kim: No, I am not. But the model was under a pisitionAttitudeNode, and I just make the model -1 meter down. Does it matter? When go near the model, the reflection will be more and more cmoplete and looks like many triangle reflections combined together. The picture is as follow link: http://storage.openlab.net.cn/forums/2009-11-19/1981569/%e5%80%92%e5%bd%b1%e9%97%ae%e9%a2%98.jpg Cheers, MT Kim Bale wrote: Are you using a matrix transform above OceanScene to alter the sea level? K. 2009/11/19 Tian Ma : Hi Kim: I just give the picture's URL link below: http://storage.openlab.net.cn/forums/2009-11-19/1981569/%e5%80%92%e5%bd%b1%e9%97%ae%e9%a2%98.jpg Cheers, MT Kim Bale wrote: There's no attachment at all now :( K. 2009/11/19 Tian Ma : Hi Kim, I have amended the attachment problem. Can you see the picture clearly now? Cheers, MT Kim Bale wrote: Hi Tian, I can't really see what's wrong from the attached picture, it kind of looks like a dirty blue splodge... K. 2009/11/19 Tian Ma : Hi Kim, When add my own island model to the oceanscene and of cource nodemask and shaders have been set to the model, I found that the reflection of the model on the ocean surface is not complete. Will you please tell me what caused this problem? And coule the problem be solved? Thank you! Cheers, Tian[/img] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19879#19879 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19896#19896 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19901#19901 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20230#20230 ___ 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] broken osgconv.exe
Yes, I think I resolved finding the 3rdparty dependencies. But for some reason, the osgdb_xxx pluggins listed in the last e-mail: osgdb_gz osgdb_curl osgdb_ive osgdb_png osgdb_tiff osgdb_tiffd dependencywalker shows that these pluggin dlls are still looking for MSVCR80.DLL *and* MSVCR90.DLL And the other pluggins can't find MSVCR90.DLL. bizarre. thanks, t Well, I tried dependencywalker.com and opened up the pluggins. On Mon, Nov 23, 2009 at 7:24 PM, Mourad Boufarguine mourad.boufargu...@gmail.com wrote: Hi Ted, You can use the Dependency Walker (http://www.dependencywalker.com/) to check the version number of the runtime, the dependencies were compiled against. I just tried it with the zlib and png dlls contained in VisualStudio 9 (2008) SP1 prebuild dependencies ( http://www.openscenegraph.org/projects/osg/wiki/Downloads/Dependencies), and I found that the release versions were compiled with the 9.0.30729 runtime, which is actually 2008 SP1. The debug version, though, was compiled with the 9.0.21022 runtime , which is the 2008 runtime. The zlib is used in both ive and gz plugins. I don't see how you get the message about the 2005 runtime dependency. Double check in the output window of VS that the zlib and png dlls that are actually loaded are the good ones. Regards, Mourad On Tue, Nov 24, 2009 at 1:21 AM, ted morris ted.mor...@gmail.com wrote: credist_x86 VisualStudio 2005 (v8) runtimes ___ 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] VBO's - lifetime.
Hello, When a node with VBO's enabled outlives the lifetime of it's renderer, I get an access violation in GLBufferObjectSet::orphan when I try to destroy the node. I tried to write down the scenario: using namespace osg; ref_ptrNode node(new Node); ref_ptrGeometry geom(new osg::Geometry); // ... fill geom geom-setUseVertexBufferObjects(true); node-addDrawable(geom.get()); { ref_ptrosgViewer::Viewer viewer(new osgViewer::Viewer()); viewer-setSceneData(node); viewer-frame(); // render for a while viewer = NULL; // The viewer is destroyed here } node = NULL; // This gives the access violation. Now if I don't set geom-setUseVertexBufferObjects(true); everything works fine. Do you still need a valid render context or a valid viewer to be able to clean up the VBO's? Nico ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] osgOcean also rendering with osgParticle?
Hi Erik, Tian, Thanks to you both for testing. 1.We can see that: the sharp white around the boat is still there, although the around water looks transparent. Yes that's still an issue I didn't attempt to fix that one I'm afraid.. it will need some thought. 3.The foams around the island gone, and the water is just transparent around the shore. Since the shoreline foam is still a work in progress I put a hash define around it in the water.frag to block out the code until I can resolve the problems with it. 2. When I look up to the boat under the ocean, the boat's color seems abnormal( purple ). 3) The underwater scene is now rendering neon-like colors (need effect, but probably not desired!) Seemed to have missed this because I only tested against the external shaders, but it highlighted a dormant bug, so well spotted. I rather liked the underwater disco lights tbh, but sadly not everyone will :). This has now been resolved (http://code.google.com/p/osgocean/source/detail?r=185). 1) It seems the alpha of the particles get's dropped when the particles are in the reflection of the sun. Could you post a screen shot? It's hard to tell what you mean exactly. 2) The particles themselves, seem to be darker than usual (like the polygon color turned gray) I assume this is because you've added the psystem as a child of OceanScene and thus the default shader will be applied to them, which will force lighting on them. Make a quick edit of the default shader and bind it to your particle system replacing the line: final_color = lighting( textureColor ); with final_color = textureColor; They should lighten up again. You might also want to remove the fogging etc depending on preference. Regards, Kim. 2009/11/24 Erik Johnson r.erik.john...@gmail.com: Hi Kim, Rendering osgParticles with osgOcean *kinda* works now with r183, except for three issues I see: 1) It seems the alpha of the particles get's dropped when the particles are in the reflection of the sun. 2) The particles themselves, seem to be darker than usual (like the polygon color turned gray) 3) The underwater scene is now rendering neon-like colors (need effect, but probably not desired!) Let me know if I can be of more help! Thanks, -Erik -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20284#20284 Attachments: http://forum.openscenegraph.org//files/water_2009_11_24t09_33_49_188.jpg ___ 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] Height fields implementation
Hi Chris and Robert, Thank you very much for your replies! For now I think I will postpone using VPB. I will have a lot of different types of data and would need to see how to go around processing it into one standard. Currently I am subdividing my height map into smaller ones and rendering several separate HeightFields. This at least gives me fast geometry update. However I believe that using plain HeightFields is not good. But since I got the problems with the TerrainTile/HeightFieldLayer as I mentioned before I have no choice. Robert, if you have any idea why do I have these problems (see in my previous post) I will be very happy to hear your suggestions! I am thinking eventually to look into vertex shader option as it might be the fastest one. Currently I am implementing a prototype version to see how fast/slow things can get. I want to say thanks again for your help! This forum is a great support for osg users, especially new ones! Cheers, Janna -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20297#20297 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Height fields implementation
Janna Terde wrote: For now I think I will postpone using VPB. I will have a lot of different types of data and would need to see how to go around processing it into one standard. VPB supports a lot of different data formats. You're ignoring a solid and well-defined asset pipeline here. VPB is sort of the de-facto intended way to get large amounts of heighfield data into OSG and running at high framerates. When you decide to go off-track and roll-it-yourself you are losing all of the expertise built into VPB over time. Now, you yourself need to have all that expertise that Robert embedded into VPB, and obviously you don't have that expertise. And, not to speak for Robert, but I expect his answer will be something along the lines of I put all that expertise into VPB so I wouldn't have to keep answering peoples questions about heightfields individually. ;) Currently I am subdividing my height map into smaller ones and rendering several separate HeightFields. This at least gives me fast geometry update. However I believe that using plain HeightFields is not good. But since I got the problems with the TerrainTile/HeightFieldLayer as I mentioned before I have no choice. One thing to do would be to build a trivial .OSG database from a test dataset using VPB, then compare it to a .osg-saved version of the scenegraph you hand-rolled to see what VPB is doing differently from you that might perhaps make its TerrainTile/HeightFieldLayer objects work where yours do not. The .osg format is ASCII, so it's easy to examine and diff. I am thinking eventually to look into vertex shader option as it might be the fastest one. Currently I am implementing a prototype version to see how fast/slow things can get. Even with the vertex shader, you will still need to get the modified vertex-Z data down the pipeline to the GPU. How do you plan to do that? Shoving a big bite of anything down the pipe is likely to cause bottlenecks, but there are techniques for minimizing the impact of this whether you are using standard vertices or a dynamic vertex-shader. Cheers, Janna -- Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com PixelSense Landsat processing now available! http://www.alphapixel.com/demos/ 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] Disabling culling for a geode
Hi, Is there a way to disable culling for a geode. Essentially, I want the geode render every frame - usefull for skyboxes and skydomes. I tried calling setCullingActive(false) but that does not work. The only way I was able to make it work, so far, is by setting the Geometry::setInitialBound(...) to something very big. But that seems odd to me. Is there a better way that I am not aware of? Thanks, -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20300#20300 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] picture in picture...
All, This is probably a silly question but what's the best way to do a picture in picture using CompositeViewer? Right now I have multiple views added to my viewer and I want to have control as to which one gets rendered on top of the others in the main viewer window. Thanx, -Shayne smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How can I create a osgViewer windowed?
Hi all! osgViewer starts always in full screen mode. How can I tell it I would like a window or windowed app? Thanks a lot. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20302#20302 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How can I create a osgViewer windowed?
view-setUpViewInWindow()... -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ricardo Ruiz Sent: Tuesday, November 24, 2009 4:32 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] How can I create a osgViewer windowed? Hi all! osgViewer starts always in full screen mode. How can I tell it I would like a window or windowed app? Thanks a lot. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20302#20302 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How can I create a osgViewer windowed?
Sorry...I had suggested doing it programmatically...:( If you do osgviewer --help-all, I'm sure it will show you how to do it from the command line... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tueller,Shayne R Civ USAF AFMC 519 SMXS/MXDEC Sent: Tuesday, November 24, 2009 4:35 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] How can I create a osgViewer windowed? view-setUpViewInWindow()... -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ricardo Ruiz Sent: Tuesday, November 24, 2009 4:32 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] How can I create a osgViewer windowed? Hi all! osgViewer starts always in full screen mode. How can I tell it I would like a window or windowed app? Thanks a lot. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20302#20302 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How can I create a osgViewer windowed?
Wonderful! Thanks a lot. BTW, is there any way to automatically center that window? or get screen size and window size? Just to let my window nicer. (from OSG, not from Win32 API) Thanks Tueller. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20305#20305 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] 3D model material display error!
Hi Kim: Oh, great!! That fix the problem! Thank you for your quick work! Cheers, Tian Kim Bale wrote: Hi Tian, Sorry about the late reply on this, I must have got distracted and forgot to reply. But the model was under a pisitionAttitudeNode, and I just make the model -1 meter down. Does it matter? No that shouldn't matter, transforming the ocean surface itself may cause problems though. It's possible that one side of the model is being culled in the reflection and you're seeing the inside of the model. I just added an override to the reflection camera that should force face culling to off when it's passing through the reflection camera (http://code.google.com/p/osgocean/source/detail?r=184). This might fix the problem, could you try updating from the trunk and see if the issue is resolved? Cheers. K. 2009/11/24 Tian Ma : Hi Kim: No, I am not. But the model was under a pisitionAttitudeNode, and I just make the model -1 meter down. Does it matter? When go near the model, the reflection will be more and more cmoplete and looks like many triangle reflections combined together. The picture is as follow link: http://storage.openlab.net.cn/forums/2009-11-19/1981569/%e5%80%92%e5%bd%b1%e9%97%ae%e9%a2%98.jpg Cheers, MT Kim Bale wrote: Are you using a matrix transform above OceanScene to alter the sea level? K. 2009/11/19 Tian Ma : Hi Kim: I just give the picture's URL link below: http://storage.openlab.net.cn/forums/2009-11-19/1981569/%e5%80%92%e5%bd%b1%e9%97%ae%e9%a2%98.jpg Cheers, MT Kim Bale wrote: There's no attachment at all now :( K. 2009/11/19 Tian Ma : Hi Kim, I have amended the attachment problem. Can you see the picture clearly now? Cheers, MT Kim Bale wrote: Hi Tian, I can't really see what's wrong from the attached picture, it kind of looks like a dirty blue splodge... K. 2009/11/19 Tian Ma : Hi Kim, When add my own island model to the oceanscene and of cource nodemask and shaders have been set to the model, I found that the reflection of the model on the ocean surface is not complete. Will you please tell me what caused this problem? And coule the problem be solved? Thank you! Cheers, Tian[/img] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19879#19879 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19896#19896 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19901#19901 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20230#20230 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Wake effects?
Hi Kim: My graphics card is 'NVIDIA GeForce 7300 LE'. The version number = r181 could work normally on this card. And since r182 to 185, the error emerged. Cheers, Tian Kim Bale wrote: Hi Tian, Last night I committed the changes that permit alpha tranparencies to be used in conjunction with the glare and depth of field effects. This required the use of multiple render targets ( http://code.google.com/p/osgocean/source/detail?r=183 ) and some changes to some of the shaders. It looks like that's used up the maximum varying attributes of your card and also possibly your card doesn't support MRTs. What graphics card are you using? Could you set the notify level to osg::notifylevel::info and dump the contents to file so I can see exactly what the problem is? Cheers. Kim. 2009/11/24 Tian Ma : Hi Kim, I update the source code from SVN today and generate the new ocean project. When run the example, some errors emerge. The error image is as follow link: http://storage.openlab.net.cn/forums/2009-11-24/1981569/%e9%94%99%e8%af%af.JPG Something wrong with the water.frag? Thank you! Cheers, Tian Kim Bale wrote: Hello Erik, Sorry I missed your post yesterday. There isn't really any support for wakes on the sea surface at the moment, although it's definitely something that needs addressing. However, I just had a submission which uses the depth buffer to add breaking foam to the shoreline. This does sort for work for other objects on sea, like ships, but it doesn't look very pretty at the moment. You're more than welcome to have a play with the effect and see if you can do anything with it. From what I understand what you'd need to do is add a sort of sloped geometry which tracks you your boat, that would get picked up in the depth buffer and the same foam texture used on the wave crests is applied to it. It's been checked into the trunk, but like I say it needs a little work. There was a discussion about it here: http://thread.gmane.org/gmane.comp.graphics.openscenegraph.cvs/6252 Cheers. Kim. 2009/11/18 Erik Johnson : Hi, I thought this would have come up before, but does anyone have suggestions how to render a boat's wake? Using osgParticle provides an ok solution, but falls apart rapidly if the ocean waves are too large (the particles go underwater). Would be cool to leverage the same texturing effects as the wave crest foam stuff - just not sure how. :) Thanks for any suggestions, Erik -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=19849#19849 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20196#20196 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20309#20309 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Missing ShapeDrawables in .obj export
I have a scene that has some primitive shapes in it created with ShapeDrawables. When i save the scene to a .obj file using osgDB::writeNodeFile() the ShapeDrawables don't show up in the file, but the floor plane i created with simple geometry does. If i save it to a .osg file instead, then everything is in in the file. I get the same results if i use osgconv to convert my .osg file into a .obj. Note: i am viewing the exported files with osgviewer. And i am using OSG version 2.6. Any clue on why this is or how to get around it? Thanks, -Ben ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] Error during compiling VirtualPlanetBuilder
Hi, how did you solve the problem of the compiler errors? I also still get them! Thank you! Cheers, Hartwig -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=20313#20313 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org