Re: [osg-users] [osgOcean] simple osgOcean code crushed
Hi, Kim, thank you for the quick reply. I suspect the DLL mismatch issue. So I copied the ocean example progrma with the dll together. it runs fine. then I copied that dll to my current project. Then I will have that crush issue. I even tried to rename that dll to make sure that the program is indeed using the dll I put in there. that is also positive: my program immediately complained about missing dlls. So what else can I check? do I need to put the fftss dll somewhere? I only compiled a 64bit release version of the dll too. Do I need to compile a debug version since I am running debug mode? Thank you! Cheers, Ruigang -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49711#49711 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg(terrain) krasches on a double delete
Hi Ola, Brad et. al, I have just checked in a fix, similar to Ola's suggested fix, with this fix I can't get Ola's modified osgterrain to crash and when the code had debugging code in place it showed that it was detected the problem TerrainTile's that were being deleted and correctly handled these. The code block of interest is now: { OpenThreads::ScopedLock lock(_mutex); for(TerrainTileSet::iterator itr = _updateTerrainTileSet.begin(); itr !=_updateTerrainTileSet.end(); ++itr) { // take a reference first to make sure that the referenceCount can be safely read without another thread decrementing it to zero. (*itr)->ref(); // only if referenceCount is 2 or more indicating there is still a reference held elsewhere is it safe to add it to list of tiles to be updated if ((*itr)->referenceCount()>1) tiles.push_back(*itr); // use unref_nodelete to avoid any issues when the *itr TerrainTile has been deleted by another thread while this for loop has been running. (*itr)->unref_nodelete(); } _updateTerrainTileSet.clear(); } Could you please try out the svn/trunk version of the OSG and let me know how you get on, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] simple osgOcean code crushed
Hi Ruigang, Are you sure you haven't got a DLL mismatch? It can often cause strange behaviour such as this. I haven't experienced this problem at all with osgOcean. Regards, Kim. On 31 August 2012 15:15, Ruigang Yang wrote: > Hi, > > I have received some existing code that uses osgOcean. > it has the following code segment: > > Code: > osg::ref_ptr oceanSurface = new > osgOcean::FFTOceanSurface(64, 256, 64, osg::Vec2f(1.1f,1.1f), 12.0f, > 1000.0f, 0.8f, 1e-8, true, 2.5, 10.f, 256 ); > oceanSurface->setWaveTopColor(osg::Vec3f( 0.6, 0.7, 0.7)); > > osg::ref_ptr oceanScene = new > osgOcean::OceanScene(oceanSurface.get()); > osg::ref_ptr scenetest = osgDB::readNodeFile("cessna.osg"); > oceanScene->addChild(scenetest); > > > It will crush in the call "addChild()" with the error: "unhandled > exception at 0x in ...exe: 0xc05: access violationg reading > location 0xf. Bascially, I can't add any child node to > oceneScene. > > Is there something missed in my code? > > I am able to compile and run the osgsample program. But it was unable to > find some of the ive files. > > I am new to OSG. any help is greatly appreciated. > > > Thank you! > > Cheers, > Ruigang > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=49707#49707 > > > > > > ___ > 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] RTT camera and nested camera
Thanks Sergey, that was what I feared. It will not be easy to get these rendertarget parameters at the nested camera level. I have searched for a way to 'copy' the render target from a camera in parent nodepath, but the Camera class does not seem to be taylored for that, I will probably use a visitor to propagate RTT parameters to nested cameras. Luc De : Sergey Polischuk A : OpenSceneGraph Users Date: 31/08/2012 16:04 Objet : Re: [osg-users] RTT camera and nested camera Envoyé par : osg-users-boun...@lists.openscenegraph.org Hi >During the traversal of a scene rendered through a RTT camera, how the nested cameras behave ? Same as usual, render to framebuffer by default. >Do they automatically acquire the RTT camera target ? Do I have to set up something ? Yes, you should specify rendertarget if you dont want to get result on framebuffer. You should explicitly attach same rtt to both your cameras. Cheers. 31.08.2012, 16:48, "Luc Frauciel" : Hi everybody, I'm stuck with a problem when trying to render to RTT camera. I want to render a scene to a RTT camera (the way osgposter does it). In my scene, I've got a osgephemeris SkyNode. To avoid culling problems, the skynode is rendered with it's own Camera ( see : http://osdir.com/ml/OpenSceneGraph-Users/2009-04/msg01170.html the suggestion of J-S Guay) While rendering directly to frame buffer my scene is ok : scene + skydome While rendering to a RTT camera, the objects below the Skydome camera are not rendered in the texture. I've tried to play with different parameters (render order etc...) but I don't understand how it work (or should work). During the traversal of a scene rendered through a RTT camera, how the nested cameras behave ? Do they automatically acquire the RTT camera target ? Do I have to set up something ? Luc = ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgOcean] simple osgOcean code crushed
Hi, I have received some existing code that uses osgOcean. it has the following code segment: Code: osg::ref_ptr oceanSurface = new osgOcean::FFTOceanSurface(64, 256, 64, osg::Vec2f(1.1f,1.1f), 12.0f, 1000.0f, 0.8f, 1e-8, true, 2.5, 10.f, 256 ); oceanSurface->setWaveTopColor(osg::Vec3f( 0.6, 0.7, 0.7)); osg::ref_ptr oceanScene = new osgOcean::OceanScene(oceanSurface.get()); osg::ref_ptr scenetest = osgDB::readNodeFile("cessna.osg"); oceanScene->addChild(scenetest); It will crush in the call "addChild()" with the error: "unhandled exception at 0x in ...exe: 0xc05: access violationg reading location 0xf. Bascially, I can't add any child node to oceneScene. Is there something missed in my code? I am able to compile and run the osgsample program. But it was unable to find some of the ive files. I am new to OSG. any help is greatly appreciated. Thank you! Cheers, Ruigang -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49707#49707 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Problem with DXT textures : osgconv works, nvtt does not ?
Hi, I try to compress all my model textures. The first try was using osgconv and the "--compressed-dxt3" option. This works well. The second try is made in my application code, using a node visitor which compress all textures to DXT3 using the nvtt plugin. In the second case, the files are correctly generated, can be opened with a DDS reader software but doesn't appears in osgviewer. If I replace all the .dds textures files of the second try with the files generated by osgconv, everything is working fine. Does anyone have experienced problems with nvtt plugin ? I've try with DXT1 / DXT5 compression, but the result is always the same : textures files seems to be valid (can be opened in any software) but are not displayed in osgviewer. Thank you! Cheers, Aurelien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49706#49706 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] RTT camera and nested camera
Hi>During the traversal of a scene rendered through a RTT camera, how the nested cameras behave ? Same as usual, render to framebuffer by default. >Do they automatically acquire the RTT camera target ? Do I have to set up something ? Yes, you should specify rendertarget if you dont want to get result on framebuffer.You should explicitly attach same rtt to both your cameras. Cheers.31.08.2012, 16:48, "Luc Frauciel" :Hi everybody,I'm stuck with a problem when trying to render to RTT camera.I want to render a scene to a RTT camera (the way osgposter does it).In my scene, I've got a osgephemeris SkyNode.To avoid culling problems, the skynode is rendered with it's own Camera ( see : http://osdir.com/ml/OpenSceneGraph-Users/2009-04/msg01170.html the suggestion of J-S Guay)While rendering directly to frame buffer my scene is ok : scene + skydomeWhile rendering to a RTT camera, the objects below the Skydome camera are not rendered in the texture.I've tried to play with different parameters (render order etc...) but I don't understand how it work (or should work).During the traversal of a scene rendered through a RTT camera, how the nested cameras behave ?Do they automatically acquire the RTT camera target ? Do I have to set up something ? Luc =___osg-users mailing listosg-users@lists.openscenegraph.orghttp://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] RTT camera and nested camera
Hi everybody, I'm stuck with a problem when trying to render to RTT camera. I want to render a scene to a RTT camera (the way osgposter does it). In my scene, I've got a osgephemeris SkyNode. To avoid culling problems, the skynode is rendered with it's own Camera ( see : http://osdir.com/ml/OpenSceneGraph-Users/2009-04/msg01170.html the suggestion of J-S Guay) While rendering directly to frame buffer my scene is ok : scene + skydome While rendering to a RTT camera, the objects below the Skydome camera are not rendered in the texture. I've tried to play with different parameters (render order etc...) but I don't understand how it work (or should work). During the traversal of a scene rendered through a RTT camera, how the nested cameras behave ? Do they automatically acquire the RTT camera target ? Do I have to set up something ? Luc ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] speeding up/slowing down animations
You can try to play clever tricks with animation:getStartTime() and setStartTime()Animation manager uses simulation time for update, so if you know this value either from viewer framestamp or some other source, you can calculate what start time you should set to get smooth transition from one animation speed to another, and even smoothly play animation backwards switching to PPONG animation play mode. Also there are TimelineAnimationManager, which have a lot of functionality with regard to controlling animation speed and direction (and also animation tracks blending), it easy to use and have a lot of useful features, but there are one drawback - it operates only on distinct animation keys without interpolating between them (at least it was this way when i used it last time), so animation will jitter if you dont have a lot of keyframes (like at least 30 keys per frame).Cheers.31.08.2012, 14:31, "Trajce Nikolov NICK" :Thanks Sergey,I just did it like this and it seam to work although the transition is not smooth from one to another scale. I was waiting for some like TimeScale or such. Anyway, any idea how to playback frame by frame forward/backward?Thanks a lotNickOn Fri, Aug 31, 2012 at 12:22 PM, Sergey Polischukwrote:Hi Nick There are setDuration method in osgAnimation::Animation interface. Using it you can rescale animation to any duration you want.i.e. to slowdown animation N times you can useanimation->computeDuration();animation->setDuration(animation->getDuration() * N); Cheers,Sergey.31.08.2012, 13:02, "Trajce Nikolov NICK" :Hi community,Lately I was doing something with animations (using osgAnimations). Any hints how to speed up/slow down animations (osgAnimation::Animation)Thanks a bunchNick___osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___osg-users mailing listosg-users@lists.openscenegraph.orghttp://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] speeding up/slowing down animations
Thanks Sergey, I just did it like this and it seam to work although the transition is not smooth from one to another scale. I was waiting for some like TimeScale or such. Anyway, any idea how to playback frame by frame forward/backward? Thanks a lot Nick On Fri, Aug 31, 2012 at 12:22 PM, Sergey Polischuk wrote: > Hi Nick > > There are setDuration method in osgAnimation::Animation interface. Using > it you can rescale animation to any duration you want. > i.e. to slowdown animation N times you can use > animation->computeDuration(); > animation->setDuration(animation->getDuration() * N); > > Cheers, > Sergey. > 31.08.2012, 13:02, "Trajce Nikolov NICK" < > trajce.nikolov.nick@gmail.com>: > > Hi community, > Lately I was doing something with animations (using osgAnimations). Any > hints how to speed up/slow down animations (osgAnimation::Animation) > Thanks a bunch > Nick > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] speeding up/slowing down animations
Hi Nick There are setDuration method in osgAnimation::Animation interface. Using it you can rescale animation to any duration you want.i.e. to slowdown animation N times you can useanimation->computeDuration();animation->setDuration(animation->getDuration() * N); Cheers,Sergey.31.08.2012, 13:02, "Trajce Nikolov NICK" :Hi community,Lately I was doing something with animations (using osgAnimations). Any hints how to speed up/slow down animations (osgAnimation::Animation)Thanks a bunchNick___osg-users mailing listosg-users@lists.openscenegraph.orghttp://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] speeding up/slowing down animations
Hi community, Lately I was doing something with animations (using osgAnimations). Any hints how to speed up/slow down animations (osgAnimation::Animation) Thanks a bunch Nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Help: is prerender camera regarded as slave camera during rendering traversal?
Hi Shuiying, On 30 August 2012 22:22, wang shuiying wrote: > Hello everyone, > > I would like to know where the prerender camera is rendered in OSG. All Camera in the OSG can prerender, it's just a case of setting the Camera::RenderOrder parameter to tell the rendering backend which cameras you want drawn in what order. Please note that you can use multiple Camera to create multiple prerender passes within one frame, in some scenes you might have hundreds active such as when doing impostors. > Is prerender camera regarded as slave camera during rendering traversal of > viewer? You can have a slave Camera in the Viewer that is used a prerendering camera or a Camera in the scene graph that is used a prerender camera. Cameras in the scene graph are treated almost exactly the same way as slave Camera, it's just high level things like threading and how the view and projection matrices are assigned per frame that differ. > Is there a way to directly render a prerender camera at any time I want ? > That is, not at a tempo of 60 Frame per second. Simply decorate a Camera in the scene graph with a Switch or Sequence node or use a NodeMask to toggle them on/off. For slave Camera in the viewer you can toggle them on/off by setting the NodeMask to 0. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org