Re: [osg-users] NodeTrackerManipulator how to
Hi Allen, see osgplanets example to have a implementation of the nodeTrackerManipulator. Hope this can help. Regards, Vincent. 2009/6/18 Allen Saucier allen.sauc...@itt.com Hi, I am trying to use the nodetrackermanipulator and I am certainly doing something wrong. Does anyone know of an example on how to use this class? Here is the code that I am using to setup a node tracker manipulator to follow a node. But I can not even get the tracker to follow the node. If you know, could someone tell me what I'm missing? osgGA::NodeTrackerManipulator::TrackerMode trackerMode = osgGA::NodeTrackerManipulator::NODE_CENTER_AND_ROTATION; osgGA::NodeTrackerManipulator::RotationMode rotationMode = osgGA::NodeTrackerManipulator::TRACKBALL; osg::ref_ptr osgGA::NodeTrackerManipulator tm = new osgGA::NodeTrackerManipulator; tm-setTrackerMode(trackerMode); tm-setRotationMode(rotationMode); tm-setMinimumDistance(50.0); tm-setTrackNode(p_pognNodeToFollow); tm-setHomePosition(p_ov3dEye, p_ov3dFocus, p_ov3dUp, false); view-setCameraManipulator(tm.get()); Thanks!! (p.s. And I've no idea why I wouldn't want the manipulator to auto calc the home position. That's just some code I found stumbling around the net. And the proper brackets are around the osgGA::NodeTrackerManipulator in the ref_ptr it's just that the brackets are interpreted so I removed them for this post.) Allen -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14169#14169 ___ 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 1.0 (LGPL) Released
Hi I have no longer moving waves in latest SVN . adrian 2009/6/19 Ümit Uzun umituzu...@gmail.com Hi Kim, There is strange view as you can see from osgOcean_Artifact.jpg Is this artifact or what? And when creating VisualStudio solution, Cmake doesn't create osgOcean's Header Files folder which is created for oceanExample as you can see from osgOcean_Classes.jpg This make the solution panel look messy. Regards. 2009/6/18 Kim C Bale k.b...@hull.ac.uk Hi Umit, Yes, apparently samplerRect has been depreciated. Ulrich flagged this one on OSX and corrected it. I guess some glsl compilers are more fussy than others. Glad you got it working. Kim. From: osg-users-boun...@lists.openscenegraph.org on behalf of Ümit Uzun Sent: Thu 18/06/2009 12:36 To: OpenSceneGraph Users Subject: Re: [osg-users] osgOcean 1.0 (LGPL) Released Hi Kim, Actually I am sorry for not thinking it can be the svn adress :) You make the really good magic. It works perfect without any error as you can see from the attached screenshot:) Thanks so much :) But there is some dots flickering as JS and Martins's said about. And it's not problem I think :) This is really really good application. What did you do? You have only changed samplerRect to sampler2D? Regards and Congratulations :) 2009/6/18 Kim C Bale k.b...@hull.ac.uk Hi Umit, Sorry use svn checkout http://osgocean.googlecode.com/svn/tags/osgOcean-1.0/ osgocean-read-only http://osgocean.googlecode.com/svn/tags/osgOcean-1.0/%0Aosgocean-read-only or grab a copy of the tortoise client to download it. Regards, Kim. From: osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ümit Uzun Sent: 18 June 2009 11:45 To: OpenSceneGraph Users Subject: Re: [osg-users] osgOcean 1.0 (LGPL) Released Hi Kim, Thanks you so much. But prompted screen wants username and password from me? Regards. 2009/6/18 Kim C Bale k.b...@hull.ac.uk Hi Umit, I've just applied a patch that should solve the samplerRect issue for you, I think I was being too hasty to blame your graphics drivers. Update your code from: https://osgocean.googlecode.com/svn/tags/osgOcean-1.0/ https://osgocean.googlecode.com/svn/tags/osgOcean-1.0/ Regards, Kim. From: osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ümit Uzun Sent: 18 June 2009 07:35 To: OpenSceneGraph Users Subject: Re: [osg-users] osgOcean 1.0 (LGPL) Released Hi Kim and JS; Thanks for suggestion. I have tried again and as you said I really need new version GPU. This is only solution which will resolve kind of these problems. Regards. 2009/6/17 Kim C Bale k.b...@hull.ac.uk Martins, J-S, Here you go. If you zoom in to 400% or so you can see 3 pixels near the horizon that are really dark. They flicker during the simulation, sometimes individual pixels, other times it looks like larger groups. Yep it's a bug in the library. Looks like a polygon break to me, possibly a corner piece. I must have been trying to ignore it as it's a nightmare to debug that bit of code. I'll log it, but it could take a while to find that blighter. If you disable godrays, silt and dof (basically disable all underwater effects) then go underwater, you'll see a black like at the horizon. it looks like fog is not being applied for a line of pixels at the horizon. I think this is a fogging issue, the wave tops are probably going over the fog line and exposing unfogged geometry. Shouldn't be too bad that one. Cheers all. Kim. From: osg-users-boun...@lists.openscenegraph.org on behalf of Martins Innus Sent: Wed 17/06/2009 19:35 To: OpenSceneGraph Users Subject: Re: [osg-users] osgOcean 1.0 (LGPL) Released Kim, Here you go. If you zoom in to 400% or so you can see 3 pixels near the horizon that are really dark. They flicker during the simulation, sometimes individual pixels, other times it looks like larger groups. Sorry if this comes through twice, looks like the first one was too big for the list. Martins Kim C Bale wrote: Hi Martins, It now works at any resolution in 32 bit color, but with some shimmering black pixels where the sky meets the ocean. Kind of like you get if you had a bad DVI cable going to your monitor. Could you post a screen shot of that? Does sound a like it
Re: [osg-users] OGR plugin : Build failed, under VS 2005
Hi Robert, VS 2003 - build error with ogr plugin VS 2005 - build ok -- Build started: Project: Plugins ogr, Configuration: Release Win32 -- Compiling... ReaderWriterOGR.cpp ReaderWriterOGR.cpp(41) : error C2146: syntax error : missing ';' before identifier 'CPLOSGErrorHandler' C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(334) : see reference to class template instantiation 'osg::BoundingBoxImplVT' being compiled with [ VT=osg::Vec3f ] C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(334) : see reference to class template instantiation 'osg::BoundingBoxImplVT' being compiled with [ VT=osg::Vec3f ] C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(334) : see reference to class template instantiation 'osg::BoundingBoxImplVT' being compiled with [ VT=osg::Vec3f ] C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(332) : see reference to class template instantiation 'osg::BoundingBoxImplVT' being compiled with [ VT=osg::Vec3f ] C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(332) : see reference to class template instantiation 'osg::BoundingBoxImplVT' being compiled with [ VT=osg::Vec3f ] C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(332) : see reference to class template instantiation 'osg::BoundingBoxImplVT' being compiled with [ VT=osg::Vec3f ] ReaderWriterOGR.cpp(41) : error C2182: 'CPL_STDCALL' : illegal use of type 'void' ReaderWriterOGR.cpp(50) : warning C4508: 'CPLOSGErrorHandler' : function should return a value; 'void' return type assumed Build log was saved at file://c:\dev\OpenSceneGraphSVN\OpenSceneGraph\src\osgPlugins\ogr\osgdb_ogr.dir\Release\BuildLog.htm Plugins ogr - 2 error(s), 1 warning(s) regards adrian 2009/5/12 Robert Osfield robert.osfi...@gmail.com On Tue, May 12, 2009 at 1:02 PM, Adrian Egli OpenSceneGraph (3D) 3dh...@gmail.com wrote: Hi Robert, Which OGR Version does the plugin use? Or does it need the OGR Frame work installed. I've alway got OGR as part of GDAL, the current version of GDAL I have is 1.5.2. I haven't heared of OGR Frame work before so can't comment on this. You haven't specified either the version or the error you are getting. There really isn't much we can do on your behalf without more info about how/where you got OGR from. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Adrian Egli ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] Is the osgOcean Linux bug still present?
Hi Kim, J-S, I've run the osgOcean_debug and got the dump. http://perso.imerir.com/bourdin/wiki/doku.php/en/projets/osgocean#osgocean-1.0-debug I've made an archive including a screenshot the tiles that were created and the debug file. I've made 2 runs, one with libfftss libfftw3f but it does not change anything about the problem... Ah, and I've made some tests on another machine, with a diiferent Graphic card (Quadro 4600): the waves are working well, but I've a trouble when diving underwater... When I reach the water surface, the view is flickering until I'm completely underwater... Has someone else experience the same effect ? Hoping it will be helpful. Pierre. Le jeudi 18 juin 2009 à 19:30 +0100, Kim C Bale a écrit : Roman, Pierre, Thank you for testing, the pictures were very helpful. Firstly Roman, do you get the same result as Pierre does? Images at the bottom here: http://perso.imerir.com/bourdin/wiki/doku.php/en/projets/osgocean http://perso.imerir.com/bourdin/wiki/doku.php/en/projets/osgocean This is pretty much my first time programming for multiple platforms so I'm rather at a loss as to what could be causing it. My only thought is that perhaps your compilers are doing something that the .net compiler isn't. If you could tell me which compiler you use that might be shed some light on it. What I've done is created a version of the library and dumps a load of variables to file. This should at least point to the general area of the fault. So if you could find the time to download the version of osgOcean found here: http://osgocean.googlecode.com/svn/branches/osgOcean-1.0-debug/ Run it and fly around for a about 10 seconds. Then send me the file called osgOcean_debug.txt that it dumps out I would be extremely grateful. Thanks guys. Kim. From: Pierre Bourdin (gmail) [mailto:bour...@imerir.com] Sent: Thu 18/06/2009 16:54 To: osg-users@lists.openscenegraph.org Cc: Kim C Bale Subject: Re: [osg-users] [3rdparty] Is the osgOcean Linux bug still present? Hi Kim, I'm sorry to tell it is the same for me... I've compiled osgocean from svn trunk and tag 1.0 with fftss-3.0-20071031.tar.gz linked with OpenSceneGraph Library 2.9.4 I've just made a simple run/shutdown log: http://perso.imerir.com/bourdin/wiki/doku.php/en/projets/osgocean If you need more informations, tell me how I could help. Cheers, Pierre. Le jeudi 18 juin 2009 à 12:27 +, Roman Grigoriev a écrit : Hi, I've tried with FFTSS, FFTW3 and FFTWF and got patchy ocean on osg svn trunk on Fedora 11 on GTX285 180.60 drivers Thank you! Cheers, Roman -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14162#14162 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org Pierre BOURDIN I.M.E.R.I.R. Av. Pascot BP 90443 66004 PERPIGNAN tél: 04 68 56 84 95 fax: 04 68 55 03 86 email: bour...@imerir.com * To view the terms under which this email is distributed, please go to http://www.hull.ac.uk/legal/email_disclaimer.html * Pierre BOURDIN I.M.E.R.I.R. Av. Pascot BP 90443 66004 PERPIGNAN tél: 04 68 56 84 95 fax: 04 68 55 03 86 email: bour...@imerir.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgManipulator dragger switch
Hi could s.o. give me a short hint how I could attach different draggers to one node and switch between these draggers ? Thanks Dieter Unclassified Mail Disclaimer: If you are not the intended recipient of this email, please notify the sender and delete it. Any unauthorized copying, disclosure or distribution of this email or its attachment(s) is forbidden. Thales Nederland BV will not accept liability for any damage caused by this email or its attachment(s). Thales Nederland BV is seated in Hengelo and is registered at the Chamber of Commerce under number 06061578. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] FFmpeg questions
Hi Garrett, Thanks for your answer. I've made some tests : - setCullingActive(false) on my node as no effect, still too fast. - I've also tried to let my video always on the screen, but I still start to play it after an action, and it's still too fast during the same time than I waited to play it... On Thu, Jun 18, 2009 at 9:31 PM, Garrett Potts po...@cfl.rr.com wrote: Hello Serge: Hmm, sounds like the object is getting culled out and so real time updates is delayed until it comes back into the scene?? I have not looked at the code but,if you are manually putting the object into the scene then try for fun to say setCullingActive(false); just to test this theory out. This way if frustum culling is on or some higher level culling then it will ignore it for that object. Take care Garrett Potts On Jun 18, 2009, at 3:17 PM, Serge Lages wrote: Hi all, I have 2 questions about the ffmpeg plugin : - In the ReaderWriterFFmpeg.cpp file, line 76 a path variable is declared using the osgDB::findDataFile function to get the correct file name, but line 83, the old filename variable is used instead of path. This way, the dataPathList is not used to get the video file, is it normal ? - Currently, I load a video and put it on an object which is outside the screen (the video is in pause mode). After an action, this object slide into the screen and the video is played, but first the video is played too fast (maybe 2x or 4x) and after some seconds it comes back to the correct speed. To be more precise, if I wait 5 seconds before making my object slide into the screen and play the video, it will be too fast during 5 seconds, if I wait 2 seconds, it's too fast 2 seconds... Anyone knows what's the problem here ? I'am under WinXP, compile with VS8 and I took my version of FFmpeg here : http://www.openscenegraph.org/downloads/dependencies/FFmpeg/Windows/ffmpeg-r15261.zip My video is a .FLV with an audio stream. Thanks for your help ! -- Serge Lages http://www.tharsis-software.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Serge Lages http://www.tharsis-software.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to test for anti-alias support
Hi Alex, What OS, Hardware, drivers are you using? Robert. On Thu, Jun 18, 2009 at 8:24 PM, Pecoraro, Alexander Nalexander.n.pecor...@lmco.com wrote: Is there a different or better way to test for anti-aliasing support than to just call osg::DisplaySettings::instance()-setNumMultiSamples() repeatedly with smaller and smaller values, which doesn’t seem to work for me anyway (so hopefully the answer is yes). I tried to have it set the number of multi samples and then call realize() on the viewer and if it failed to realize I have it try a smaller value for number of samples. What ends up happening is that it starts at 8, fails, then tries 4, which I know is supported by my video card so it should work and it appears to work, but the window opens and it is just black and nothing seems to render to it. So I’m wondering if my way of checking for anti-aliasing support is wrong. Here is the debug output from my attempts to make this work: Setting anti-aliasing samples to: 8 GraphicsContext::registerGraphicsContext 0x8e4ff20 Relaxing traits Error: Not able to create requested visual. close(1)0x8e4ff20 close(0)0x8e4ff20 GraphicsContext::unregisterGraphicsContext 0x8e4ff20 Viewer::realize() - No valid contexts found, setting up view across all screens. GraphicsContext::getWindowingSystemInterface() 0x8e4c030 0x102ee20 GraphicsContext::registerGraphicsContext 0x8e51e28 Relaxing traits Error: Not able to create requested visual. close(1)0x8e51e28 close(0)0x8e51e28 GraphicsContext::unregisterGraphicsContext 0x8e51e28 GraphicsWindow has not been created successfully. Viewer::realize() - failed to set up any windows Trying anti aliasing samples at 4 Viewer::realize() - No valid contexts found, setting up view across all screens. GraphicsContext::getWindowingSystemInterface() 0x8e4c030 0x102ee20 GraphicsContext::registerGraphicsContext 0x8e51e28 GraphicsContext::getWindowingSystemInterface() 0x8e4c030 0x102ee20 GraphicsContext::createNewContextID() creating contextID=0 Updating the MaxNumberOfGraphicsContexts to 1 GraphicsWindow has been created successfully. X window successfully opened So even though it appears that the “GraphicsWindow has been created successfully”, my app is not able to render anything into the window. The funny thing is that if I start with a number of multi-samples value of 4 then everything works fine. Its only if I first test the realize() with a multi-samples value that is not supported by my card that makes subsequent valid multi-samples values not work. Any advice for how to fix this? Thanks. Alex ___ 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] Help - Stereo Mode
Hi Manuel, What exactly do you mean by distortion and views start overlapping each other? A screen shot is the best way to convey this. What type of camera manipulator are you using in your scene? Robert. On Thu, Jun 18, 2009 at 11:12 PM, asdf asdfspamcorpeti...@gmail.com wrote: Hello, I'm working with a 3D model in openSceneGraph and I'm having difficulties configuring the Stereo Mode (Interlace). At first the vision of the scene is ok, but when I move through the scene it starts distorting and even if I go back to the orginal point the Stereo View stills distorted. The distortion consists in: When we move forward (we use Traslation movements) the two eye views start overlapping each other.* I attach The corresponding code of activating Stereo Mode: osg::DisplaySettings::instance()-setStereoMode(osg::DisplaySettings::StereoMode::HORIZONTAL_INTERLACE); osg::DisplaySettings::instance()-setStereo(true); *About moving though the scene i use the TrackballManipulator Excuse me for my english and Thank you , Manuel García ___ 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] Impostor, Billboard Cloud, saving Texture to File
Hey OSG Community :) I am coding an algorithm based on billboard clouds described in this article http://www.cs.auckland.ac.nz/~novins/Publications/Huang04.pdf but I have some problems for managing the creation of texture files. I have read to osghud, osgprerender and osgsim::impostor code. I am able to create my own impostor thanks to a camera in Ortho2D mode and FBO to a texture 2D renderered on a quad. Code: //Initialisation of camera with alpha osg::Camera* camera = new osg::Camera; camera-setClearColor(osg::Vec4(1.0f,0.0f,0.0f,0.0f)); camera-setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); const osg::BoundingSphere bs = myModel-getBound(); //Creating texture osg::Texture2D * texture = new osg::Texture2D; float textureWidth = 1024; float textureHeight = 1024; texture-setTextureSize(textureWidth, textureHeight); texture-setInternalFormat(GL_RGBA); texture-setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR); texture-setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR); //Creating quad geometry osg::Geometry * polyGeom = CreateQuadGeometry(myModel); //Linking texture with geometry osg::StateSet* stateset = polyGeom-getOrCreateStateSet(); stateset-setTextureAttributeAndModes(0, texture ,osg::StateAttribute::ON); //Creating the geode and adding my quad osg::Geode* geode = new osg::Geode(); geode-addDrawable(polyGeom); //Adding group with my geode and camera osg::Group * parent = new osg::Group; parent-addChild(geode); parent-addChild(camera); //Configuring Ortho projection and FBO for camera camera-setProjectionMatrixAsOrtho2D(-bs.radius(),bs.radius(),-bs.radius(),bs.radius()); camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF); camera-setViewMatrixAsLookAt(bs.center()-osg::Vec3(0.0f,1.0f,0.0f)*bs.radius(),bs.center(),osg::Vec3(0.0f,0.0f,1.0f)); camera-setViewport(0,0,textureWidth,textureHeight); camera-setRenderOrder(osg::Camera::PRE_RENDER); camera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); //Adding the model to RTT camera-addChild(myModel); camera-attach(osg::Camera::COLOR_BUFFER, texture); //Adding a callback for export TextureSavingCallback * myTSC = new TextureSavingCallback(myfile.png, camera); camera-setFinalDrawCallback(myTSC); Now I want to save my model (quad+texture) into an obj file. So basically I said to myself : - Create an Image during a Callback - Allocate it with Image::allocateImage - Save the texture into with Image::readImageFromCurrentTexture - Save Image thanks to osgDB Code: if (viewport _image.valid()) { _image-allocateImage(int(viewport-width()), int(viewport-height()), 1, GL_RGBA, GL_FLOAT); //Here image-readPixels works fine since I have something in my image after _image-readImageFromCurrentTexture(0,false,GL_FLOAT); osgDB::writeImageFile(*_image, _filename); And after reload the texture and apply it to the quad for saving into OBJ with OSGDB. As you will guess it doesn't work and I only have the allocating output into my image. Do you have any idea of how I can handle this ? Thank you! Cheers, Benoît -- Benoît Bayol benoit.ba...@gmail.com -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14203#14203 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OGR plugin : Build failed, under VS 2005
Hi Adrian, I'm afraid there is nothing I personally can to about this build issue - Windows developers who can reproduce the problem will need to look at it and solve it. The thing I'd look into first would be the roll of the CPL_STDCALL macro. I didn't write this plugin so I can't comment on why the macro is there, whether it's needed etc. As I said it'll need to be Windows developers that will have to tackle this. Good luck, Robert. On Fri, Jun 19, 2009 at 8:35 AM, Adrian Egli OpenSceneGraph (3D)3dh...@gmail.com wrote: Hi Robert, VS 2003 - build error with ogr plugin VS 2005 - build ok -- Build started: Project: Plugins ogr, Configuration: Release Win32 -- Compiling... ReaderWriterOGR.cpp ReaderWriterOGR.cpp(41) : error C2146: syntax error : missing ';' before identifier 'CPLOSGErrorHandler' C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(334) : see reference to class template instantiation 'osg::BoundingBoxImplVT' being compiled with [ VT=osg::Vec3f ] C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(334) : see reference to class template instantiation 'osg::BoundingBoxImplVT' being compiled with [ VT=osg::Vec3f ] C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(334) : see reference to class template instantiation 'osg::BoundingBoxImplVT' being compiled with [ VT=osg::Vec3f ] C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(332) : see reference to class template instantiation 'osg::BoundingBoxImplVT' being compiled with [ VT=osg::Vec3f ] C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(332) : see reference to class template instantiation 'osg::BoundingBoxImplVT' being compiled with [ VT=osg::Vec3f ] C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(332) : see reference to class template instantiation 'osg::BoundingBoxImplVT' being compiled with [ VT=osg::Vec3f ] ReaderWriterOGR.cpp(41) : error C2182: 'CPL_STDCALL' : illegal use of type 'void' ReaderWriterOGR.cpp(50) : warning C4508: 'CPLOSGErrorHandler' : function should return a value; 'void' return type assumed Build log was saved at file://c:\dev\OpenSceneGraphSVN\OpenSceneGraph\src\osgPlugins\ogr\osgdb_ogr.dir\Release\BuildLog.htm Plugins ogr - 2 error(s), 1 warning(s) regards adrian 2009/5/12 Robert Osfield robert.osfi...@gmail.com On Tue, May 12, 2009 at 1:02 PM, Adrian Egli OpenSceneGraph (3D) 3dh...@gmail.com wrote: Hi Robert, Which OGR Version does the plugin use? Or does it need the OGR Frame work installed. I've alway got OGR as part of GDAL, the current version of GDAL I have is 1.5.2. I haven't heared of OGR Frame work before so can't comment on this. You haven't specified either the version or the error you are getting. There really isn't much we can do on your behalf without more info about how/where you got OGR from. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Adrian Egli ___ 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] best DCC workfow using Maya and OSG
Dear OSG users, I just would like to have your feeling on what is the best way to work with 3D content using Maya (2009) and OSG (2.8.1)... I was working on old big project based on Maya 6 ang OSG 1.2, using flt export plugin from Maya and osgconv for .osg output. And then used bad home made tools to put glsl based materials on faces. I'm working now on a complete new version and want to reset the DCC workflow to something better. What I need is to export correctly geometry and hierarchy from Maya and a usable tool to assign shaders on osg models... simple isn't it ? :) What I tried for the moment : * export from maya with OBJ export plugin (ok for geometry and hierachy, no support of glsl materials of course, and bad Kd values on materials !) * using osgMaya (v0.1.1 - new version somewhere ?) that does'nt export materials but only geometry with an assigned texture... so I don't see how to manage glsl shader materials with it * more recently, my interest turns to Collada : I see that there are recent tools (I'm trying to compile it for Maya 2009) like FCollada/MayaCollada and that RenderMonkey (nice tool) can export to collada (for a lot of shaders features at least) !... So what is your feeling about all of that ? Am I going right looking at Collada ? I hoped using directly .osg and having a tool to design glsl shader but RenderMonkey doen't export .fx with glsl (any addon to do that ?) and I don't know if osg support .fx style file containing glsl shaders... I know that DCC workflow is a wide problem, but if some of you are using Maya and found a good worflow with it... :) Thanks in advance for your feedback -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14206#14206 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] I can't load Released OSG library in Debug Mode.
Hi All, Until now, I have been using VS2003 in all project. But we have upgraded to VS2008. I don't know why can't load released OSG in Debug mode or vice versa. It throws and std::badalloc exception while using reading some model or images by osgDB's static functions(readNode, readImageFile etc...) But same code works when working same mode. VS2008 don't let us to use this interchangeability anymore or should I set some parameters? Regards. -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OGR plugin : Build failed, under VS 2005
Hi Robert, Thank you very much. regards adrian 2009/6/19 Robert Osfield robert.osfi...@gmail.com Hi Adrian, I'm afraid there is nothing I personally can to about this build issue - Windows developers who can reproduce the problem will need to look at it and solve it. The thing I'd look into first would be the roll of the CPL_STDCALL macro. I didn't write this plugin so I can't comment on why the macro is there, whether it's needed etc. As I said it'll need to be Windows developers that will have to tackle this. Good luck, Robert. On Fri, Jun 19, 2009 at 8:35 AM, Adrian Egli OpenSceneGraph (3D)3dh...@gmail.com wrote: Hi Robert, VS 2003 - build error with ogr plugin VS 2005 - build ok -- Build started: Project: Plugins ogr, Configuration: Release Win32 -- Compiling... ReaderWriterOGR.cpp ReaderWriterOGR.cpp(41) : error C2146: syntax error : missing ';' before identifier 'CPLOSGErrorHandler' C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(334) : see reference to class template instantiation 'osg::BoundingBoxImplVT' being compiled with [ VT=osg::Vec3f ] C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(334) : see reference to class template instantiation 'osg::BoundingBoxImplVT' being compiled with [ VT=osg::Vec3f ] C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(334) : see reference to class template instantiation 'osg::BoundingBoxImplVT' being compiled with [ VT=osg::Vec3f ] C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(332) : see reference to class template instantiation 'osg::BoundingBoxImplVT' being compiled with [ VT=osg::Vec3f ] C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(332) : see reference to class template instantiation 'osg::BoundingBoxImplVT' being compiled with [ VT=osg::Vec3f ] C:\dev\OpenSceneGraphSVN\OpenSceneGraph\include\osg\Node(332) : see reference to class template instantiation 'osg::BoundingBoxImplVT' being compiled with [ VT=osg::Vec3f ] ReaderWriterOGR.cpp(41) : error C2182: 'CPL_STDCALL' : illegal use of type 'void' ReaderWriterOGR.cpp(50) : warning C4508: 'CPLOSGErrorHandler' : function should return a value; 'void' return type assumed Build log was saved at file://c:\dev\OpenSceneGraphSVN\OpenSceneGraph\src\osgPlugins\ogr\osgdb_ogr.dir\Release\BuildLog.htm Plugins ogr - 2 error(s), 1 warning(s) regards adrian 2009/5/12 Robert Osfield robert.osfi...@gmail.com On Tue, May 12, 2009 at 1:02 PM, Adrian Egli OpenSceneGraph (3D) 3dh...@gmail.com wrote: Hi Robert, Which OGR Version does the plugin use? Or does it need the OGR Frame work installed. I've alway got OGR as part of GDAL, the current version of GDAL I have is 1.5.2. I haven't heared of OGR Frame work before so can't comment on this. You haven't specified either the version or the error you are getting. There really isn't much we can do on your behalf without more info about how/where you got OGR from. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Adrian Egli ___ 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 -- Adrian Egli ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] I can't load Released OSG library in Debug Mode.
Hi Ümit, VS add some dll dependencies to any c++ projet it compiles, so I advice you to rebuild OSG with VS2008 and use theses new lib and dll to run and debug your application. Regards, Vincent 2009/6/19 Ümit Uzun umituzu...@gmail.com Hi All, Until now, I have been using VS2003 in all project. But we have upgraded to VS2008. I don't know why can't load released OSG in Debug mode or vice versa. It throws and std::badalloc exception while using reading some model or images by osgDB's static functions(readNode, readImageFile etc...) But same code works when working same mode. VS2008 don't let us to use this interchangeability anymore or should I set some parameters? Regards. -- Ümit Uzun ___ 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] OpenGl settings wrongly read?
HI Christophe, This shouts out a driver problems. Try updating your laptops OpenGL drivers. Robert. On Fri, Jun 19, 2009 at 10:27 AM, Christophe Herremanchristophe.herre...@barco.com wrote: Hello, OSG sometimes fails to read the correct opengl settings ?? This results in a very slow framerate of 2 fps and numerous messages saying my driver does not support GL_EXT_BLENDCOLOR and many others while the driver does support this. I attached a file with a summary of the driver and the debug messages from OSG. The problem only occurs on my laptop. And it only occurs about half the times I launch the application. Can you think of a workaround or point me in some direction to solve this issue? thank you best regards, Christophe -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14210#14210 ___ 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] OpenGl settings wrongly read?
Hi Christophe, On 19/6/09 11:27 AM, Christophe Herreman wrote: OSG sometimes fails to read the correct opengl settings ?? This results in a very slow framerate of 2 fps and numerous messages saying my driver does not support GL_EXT_BLENDCOLOR and many others while the driver does support this. I attached a file with a summary of the driver and the debug messages from OSG. The problem only occurs on my laptop. And it only occurs about half the times I launch the application. To me it looks like OSG is picking up another OpenGL driver instead of the nvidia one, maybe the MS one? I couldn't say how that's possible or what to do against it. /ulrich PS: It might be helpful if OSG would print the OpenGL renderer/vendor information. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Dynamic line make scene disappear
Hi, I am currently trying to build a dynamic line. I mean the extremities of the segment can be attached to a node and change everytime the node position relativelly to the world change. Actually, I have a NodeCullback redefined class and a geode redefined class. Here is the code : Code: void Trail::_initBefore(){ _drawable = new osg::Geometry; _bounds = new osg::Vec3Array(2); _color = new osg::Vec4Array(1); osg::Vec3Array* normals = new osg::Vec3Array; normals-push_back(osg::Vec3(0.0f,-1.0f,0.0f)); ((osg::Geometry*)_drawable)-setNormalArray(normals); ((osg::Geometry*)_drawable)-setNormalBinding(osg::Geometry::BIND_OVERALL); ((osg::Geometry*)_drawable)-setVertexArray(_bounds); ((osg::Geometry*)_drawable)-setColorBinding(osg::Geometry::BIND_OVERALL); ((osg::Geometry*)_drawable)-setColorArray(_color); ((osg::Geometry*)_drawable)-addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINES,0,2)); _width = new osg::LineWidth(DEF_WIDTH); ((osg::Geometry*)_drawable)-getOrCreateStateSet()-setAttribute(_width, osg::StateAttribute::ON); ((osg::Geometry*)_drawable)-getOrCreateStateSet()-setMode(GL_LIGHTING, osg::StateAttribute::OFF); } void Trail::updateNode(osg::Vec3 source, osg::Vec3 target, osg::Vec3 sourceCenter, osg::Vec3 targetCenter){ (*_bounds)[0].set(source); (*_bounds)[1].set(target); osg::PrimitiveSet* ps = ((osg::Geometry*)_drawable)-getPrimitiveSet(0); ((osg::Geometry*)_drawable)-setPrimitiveSet(0, ps); } The method updateNode is called everytime one of the extremity of the segment change of position. My problem is that when the extremities of the segment are not on the view, the line color change to blue and the line sometimes disappear. I don't understand wher the problem might be. I have the same problem with trace (a Line_Strip that follow an object). In this case, it is worst because the entire scene disappear under some points of view. Here is the code (it's basically the same principle as above) Code: void Trace::_initBefore(){ _drawable = new osg::Geometry; _bounds = new osg::Vec3Array; _color = new osg::Vec4Array; _color-push_back(osg::Vec4(1, 1, 1, 1)); ((osg::Geometry*)_drawable)-setVertexArray(_bounds); ((osg::Geometry*)_drawable)-setColorArray(_color); ((osg::Geometry*)_drawable)-setColorBinding(osg::Geometry::BIND_OVERALL); _width = new osg::LineWidth(DEF_WIDTH); ((osg::Geometry*)_drawable)-getOrCreateStateSet()-setAttribute(_width, osg::StateAttribute::ON); ((osg::Geometry*)_drawable)-getOrCreateStateSet()-setMode(GL_LIGHTING, osg::StateAttribute::OFF); osg::Vec3Array* normals = new osg::Vec3Array; normals-push_back(osg::Vec3(0.0f,-1.0f,0.0f)); ((osg::Geometry*)_drawable)-setNormalArray(normals); ((osg::Geometry*)_drawable)-setNormalBinding(osg::Geometry::BIND_OVERALL); ((osg::Geometry*)_drawable)-addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINE_STRIP,0,2)); } void Trace::updateNode(osg::Vec3 source, osg::Vec3 target, osg::Vec3 sourceCenter, osg::Vec3 targetCenter){ if(!(source == osg::Vec3() target == osg::Vec3())){ if(source != target || firstCallUpdate){ if(!firstCallUpdate){ unsigned int count = _bounds-size(); if(count = 2){ (*_bounds)[count-1] = _oldPosition; } else{ _bounds-push_back(_oldPosition); _bounds-push_back(target); } _bounds-push_back(target); _oldPosition = targetCenter; } else{ _oldPosition = targetCenter; firstCallUpdate = false; } setSource(targetCenter); osg::DrawArrays* ps = ((osg::DrawArrays*)((osg::Geometry*)_drawable)-getPrimitiveSet(0)); ps-setCount(ps-getCount() + 2); ((osg::Geometry*)_drawable)-setPrimitiveSet(0, ps); } } } I need some help ! Thank you! Cheers, Adrien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14216#14216 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Impostor, Billboard Cloud, saving Texture to File
Hi, you can attach an osg::Image directly to the camera (as you do for the texture). OSG will then read it back for you. Have a look at osgprerender (look at the code in the callback that access the read back image) and osgmultiplerendertargets. Inside the callback you should be able to save the image. jp Benoît Bayol wrote: Hey OSG Community :) I am coding an algorithm based on billboard clouds described in this article http://www.cs.auckland.ac.nz/~novins/Publications/Huang04.pdf but I have some problems for managing the creation of texture files. I have read to osghud, osgprerender and osgsim::impostor code. I am able to create my own impostor thanks to a camera in Ortho2D mode and FBO to a texture 2D renderered on a quad. Code: //Initialisation of camera with alpha osg::Camera* camera = new osg::Camera; camera-setClearColor(osg::Vec4(1.0f,0.0f,0.0f,0.0f)); camera-setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); const osg::BoundingSphere bs = myModel-getBound(); //Creating texture osg::Texture2D * texture = new osg::Texture2D; float textureWidth = 1024; float textureHeight = 1024; texture-setTextureSize(textureWidth, textureHeight); texture-setInternalFormat(GL_RGBA); texture-setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR); texture-setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR); //Creating quad geometry osg::Geometry * polyGeom = CreateQuadGeometry(myModel); //Linking texture with geometry osg::StateSet* stateset = polyGeom-getOrCreateStateSet(); stateset-setTextureAttributeAndModes(0, texture ,osg::StateAttribute::ON); //Creating the geode and adding my quad osg::Geode* geode = new osg::Geode(); geode-addDrawable(polyGeom); //Adding group with my geode and camera osg::Group * parent = new osg::Group; parent-addChild(geode); parent-addChild(camera); //Configuring Ortho projection and FBO for camera camera-setProjectionMatrixAsOrtho2D(-bs.radius(),bs.radius(),-bs.radius(),bs.radius()); camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF); camera-setViewMatrixAsLookAt(bs.center()-osg::Vec3(0.0f,1.0f,0.0f)*bs.radius(),bs.center(),osg::Vec3(0.0f,0.0f,1.0f)); camera-setViewport(0,0,textureWidth,textureHeight); camera-setRenderOrder(osg::Camera::PRE_RENDER); camera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); //Adding the model to RTT camera-addChild(myModel); camera-attach(osg::Camera::COLOR_BUFFER, texture); //Adding a callback for export TextureSavingCallback * myTSC = new TextureSavingCallback(myfile.png, camera); camera-setFinalDrawCallback(myTSC); Now I want to save my model (quad+texture) into an obj file. So basically I said to myself : - Create an Image during a Callback - Allocate it with Image::allocateImage - Save the texture into with Image::readImageFromCurrentTexture - Save Image thanks to osgDB Code: if (viewport _image.valid()) { _image-allocateImage(int(viewport-width()), int(viewport-height()), 1, GL_RGBA, GL_FLOAT); //Here image-readPixels works fine since I have something in my image after _image-readImageFromCurrentTexture(0,false,GL_FLOAT); osgDB::writeImageFile(*_image, _filename); And after reload the texture and apply it to the quad for saving into OBJ with OSGDB. As you will guess it doesn't work and I only have the allocating output into my image. Do you have any idea of how I can handle this ? Thank you! Cheers, Benoît -- 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] Dynamic line make scene disappear
Hi, try dirtyBound function on your objects that you change. jp Adrien Joly wrote: Hi, I am currently trying to build a dynamic line. I mean the extremities of the segment can be attached to a node and change everytime the node position relativelly to the world change. Actually, I have a NodeCullback redefined class and a geode redefined class. Here is the code : Code: void Trail::_initBefore(){ _drawable = new osg::Geometry; _bounds = new osg::Vec3Array(2); _color = new osg::Vec4Array(1); osg::Vec3Array* normals = new osg::Vec3Array; normals-push_back(osg::Vec3(0.0f,-1.0f,0.0f)); ((osg::Geometry*)_drawable)-setNormalArray(normals); ((osg::Geometry*)_drawable)-setNormalBinding(osg::Geometry::BIND_OVERALL); ((osg::Geometry*)_drawable)-setVertexArray(_bounds); ((osg::Geometry*)_drawable)-setColorBinding(osg::Geometry::BIND_OVERALL); ((osg::Geometry*)_drawable)-setColorArray(_color); ((osg::Geometry*)_drawable)-addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINES,0,2)); _width = new osg::LineWidth(DEF_WIDTH); ((osg::Geometry*)_drawable)-getOrCreateStateSet()-setAttribute(_width, osg::StateAttribute::ON); ((osg::Geometry*)_drawable)-getOrCreateStateSet()-setMode(GL_LIGHTING, osg::StateAttribute::OFF); } void Trail::updateNode(osg::Vec3 source, osg::Vec3 target, osg::Vec3 sourceCenter, osg::Vec3 targetCenter){ (*_bounds)[0].set(source); (*_bounds)[1].set(target); osg::PrimitiveSet* ps = ((osg::Geometry*)_drawable)-getPrimitiveSet(0); ((osg::Geometry*)_drawable)-setPrimitiveSet(0, ps); } The method updateNode is called everytime one of the extremity of the segment change of position. My problem is that when the extremities of the segment are not on the view, the line color change to blue and the line sometimes disappear. I don't understand wher the problem might be. I have the same problem with trace (a Line_Strip that follow an object). In this case, it is worst because the entire scene disappear under some points of view. Here is the code (it's basically the same principle as above) Code: void Trace::_initBefore(){ _drawable = new osg::Geometry; _bounds = new osg::Vec3Array; _color = new osg::Vec4Array; _color-push_back(osg::Vec4(1, 1, 1, 1)); ((osg::Geometry*)_drawable)-setVertexArray(_bounds); ((osg::Geometry*)_drawable)-setColorArray(_color); ((osg::Geometry*)_drawable)-setColorBinding(osg::Geometry::BIND_OVERALL); _width = new osg::LineWidth(DEF_WIDTH); ((osg::Geometry*)_drawable)-getOrCreateStateSet()-setAttribute(_width, osg::StateAttribute::ON); ((osg::Geometry*)_drawable)-getOrCreateStateSet()-setMode(GL_LIGHTING, osg::StateAttribute::OFF); osg::Vec3Array* normals = new osg::Vec3Array; normals-push_back(osg::Vec3(0.0f,-1.0f,0.0f)); ((osg::Geometry*)_drawable)-setNormalArray(normals); ((osg::Geometry*)_drawable)-setNormalBinding(osg::Geometry::BIND_OVERALL); ((osg::Geometry*)_drawable)-addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINE_STRIP,0,2)); } void Trace::updateNode(osg::Vec3 source, osg::Vec3 target, osg::Vec3 sourceCenter, osg::Vec3 targetCenter){ if(!(source == osg::Vec3() target == osg::Vec3())){ if(source != target || firstCallUpdate){ if(!firstCallUpdate){ unsigned int count = _bounds-size(); if(count = 2){ (*_bounds)[count-1] = _oldPosition; } else{ _bounds-push_back(_oldPosition); _bounds-push_back(target); } _bounds-push_back(target); _oldPosition = targetCenter; } else{ _oldPosition = targetCenter; firstCallUpdate = false; } setSource(targetCenter); osg::DrawArrays* ps = ((osg::DrawArrays*)((osg::Geometry*)_drawable)-getPrimitiveSet(0)); ps-setCount(ps-getCount() + 2); ((osg::Geometry*)_drawable)-setPrimitiveSet(0, ps); } } } I need some help ! Thank you! Cheers, Adrien -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14216#14216 ___ 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
Re: [osg-users] Dynamic line make scene disappear
try dirtyBound function on your objects that you change. + dirtyDisplayList Greetings, Daniel -- Daniel Trstenjak Tel : +49 (0)7071-9457-264 science + computing ag FAX : +49 (0)7071-9457-511 Hagellocher Weg 73 mailto: daniel.trsten...@science-computing.de D-72070 Tübingen WWW : http://www.science-computing.de/ -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Michel Lepert Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgOcean : Integration into existing Database /Application
Hi Kim, Thanks for the short explainations. Well first the openscenegraph motionmodel or manipluators, manager aren't working. it would be good to get similar behaviour like in application-viewer example. this would be important for integration into existing applications. I do now better understand that we need to implement own geometries for water effetc. would it be not much easier that we can append a geometry (osg file, ive file ,... ) which should be used to attach the water shaders. Say for limit we attache a xy plane with shaped borders, this would be very usefull for many terrain visualisation applications, even for osgEarth this could be once an option for the ocean. of course we have fast unlimited ocean effects but once we have a lake this would not help, right? or could it be an option to cut the lake from the terrain, then we can define the height of the ocean. i will read the papers again, and i hope i can work out some strategy and new ideas which way we should - can go for further osg integration improvments. regards adrian 2009/6/19 Kim C Bale k.b...@hull.ac.uk Hi Adrien, I'm having a slight problem understanding your questions, so I'll do my best and ask some back... Would it be possible to add a ocean geometry and attach the ocean effect, shader. if yes how should it be look like, just a plane? more complex geometry? My idea would be to add a lake surface, and two rivers with different waves, and so on. Do you mean you would like to add you own method of generating the water geometry for lakes and rivers? If so, I've tried to accommodate for additional type of geometry by providing the OceanTechnique base class. Basically osgOcean is comprised of two main parts. OceanTechnique: Which generates and animates the ocean geometry and manages any level of detail algorithms that are required. It uses osg::Geode as a base class and therefore drawables for the geometry. A class derived from this should provide a water shader. Animation is provided by adding a cull/update callback. OceanScene: Which manages the various pre and post render passes required for the effects. This also includes controlling the different types of fogging and lighting that are applied based on whether the main camera view is above or below the water surface. If you want to create your own water geometry class you'll have to inherit from OceanTechnique and then add this class to OceanScene as done with FFTOceanSurface in the example application. OceanScene will only work with one OceanTechnique so you'll have to create a new instance of OceanScene if you wish to use multiple OceanTechniques. The geometry can be as complicated or as simple as you like. If you apply the current water shader to a quad it still looks alright and maybe be suitable for some applications. These two papers provide very good explanations of generating water geometry (the first is used in FFTOceanSurface): http://graphics.ucsd.edu/courses/rendering/2005/jdewall/tessendorf.pdf http://citeseer.ist.psu.edu/cache/papers/cs/26265/http:zSzzSzwww.cs.sunysb.eduzSz~ash zSzwaterCGF.pdf/ The tricky part is the shaders. osgOcean provides a very long list of uniforms which you can make use of if you wish in custom shaders. Some must be applied locally to the OceanTechnique (see: FFTOceanSurface::initStateSet() ), and those related to the multipass rendering are inherited from the statesets within OceanScene (see: void OceanScene::init()). The shader implementation used in FFTOceanSurface can be found in the resources directory (water.frag/water.vert). If you want to use this shader for your own technique you'll have to apply it within your OceanTechnique and add the uniforms found in: FFTOceanSurface::initStateSet(). Your best bet is to look at the FFTOceanSurface class and see how it's implemented. It's not as complicated as it looks, 80% of it is to do with generating the vertex array and primitives for the geomipmapping routine which you may not need. we don't need only an unfinite ocean You can disable infinite ocean effect using: FFTOceanSurface::enableEndlessOcean(false,true); Next problem i got is that the default motion models are not working Do you mean the ocean waves aren't moving? I hope that answers your questions, otherwise I've just gone off on a very lengthy tangent :) Kim. From: osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] On Behalf Of Adrian Egli OpenSceneGraph (3D) Sent: 19 June 2009 06:22 To: OpenSceneGraph Users Subject: [osg-users] osgOcean : Integration into existing Database /Application Hi all i am wondering how i can integrate the osgOcean effect into existing application, database. Would it be possible to add a ocean geometry and attach the ocean effect, shader. if yes how should it be look like, just a plane? more complex geometry? My idea would be to add a lake surface, and two
Re: [osg-users] osgOcean 1.0 (LGPL) Released
Hi Adrian, Kim, J-S has made a modification to the OceanTechnique base class which allows you to enable/disable animation. You’ll need to set FFTOceanSurface::startAnimation(void). I had forgotten to initialize the _isAnimating member in the ctor and copy ctor. Fixed - the default behavior is identical to before (_isAnimating = true by default). The trunk is being used for development so it may or may not work properly. I would use the release 1.0 tag, I’m misusing the definition of a tag a little since I’m adding bug fixes to it as I find them. I agree with Kim, I'm making the trunk move forward according to what we need for our project so it won't always be stable. If you want something to use in your projects use the 1.0 branch. 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] PolytopeIntersector
Hi Maxime, Maxime BOUCHER schrieb: Hi, Just a question. The polytopeIntersections compute the intersections with planes or all objects in the Polytope? I mean if I draw the local intersection points will I get an empty or full shape of the polytope? The polytopeIntersector performs the intersection with the space volume defined by the polytope. So if a triangle lies completely inside the polytope (without intersecting the polytope's planes) it is still considered an intersection because it intersects the volume. I wonder because I tried a polytope with a single plane (to test), and I had a lot of points non coplanars... Yes, that is to be expected because you basically got all primitives lying in the half-space to one side of your plane. I also drawed it using intersection.localIntersectionPoint, which is the center of the primitive, isn't it? Almost ;-) No actually it is the center of all intersection-points. Say you have a triangle where two points lie inside the polytope-space and one point lies outside of this space. Than you have 2 intersection-points for the points lying inside, and 2 intersections points where the edges intersect the polytope plane(s). This gives you a total of 4 intersection points and the localIntersectionPoint is the centroid(barycenter) of those 4 points. Cheers, Peter -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Michel Lepert Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] building OSG as static library
Thanks Robert. Just made myself some static libs on osx. I didnt try xcode but plain Unix Makefiles work like a charm. With these libs my deployable executable is only 6mb now. Very nice! @Chris I am working cross-platform. So next I am trying to build statics on ubuntu and windows. Also mingw would be nice. Seems like windows will be the hardest because I need to recompile all the dependencies. Is this correct? Thanks guys so far, stefan hechenberger http://linear.nortd.com -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14233#14233 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PolytopeIntersector distance and Transform
Hi again Andrew, Andrew Cunningham schrieb: Hi, I am having some problems with the distance found by the PolytopeIntersector but only when the geometry I am trying to pick has a non-null (Matrix)Transform in it's parent. The PolytopeIntersector registers that object as a 'hit', BUT the distance recorded appears to be incorrect ( the end result is I end up 'highlighting' the wrong object behind the object I want to pick). The intersection calculation works perfectly (with the transformed object) but the distance to the reference plane (used for sorting the intersections) does not accurately reflect the expected distance. Just to re-iterate this. As long as I do not try to pick a node with a transform, the sorting of the PolytopeIntersector works as expected Using the LineSegmentIntersector on the same scene does not show the issue. It correctly sorts the intersections. Any ideas? I had another look at the code and found a nasty surprise in Plane::transformProvidingInverse(). There is a call to Plane::makeUnitLength() in it which should totally screw distance results of PolytopeIntersector if you have any non-orthogonal Matrix-Transforms (i.e. scaling). Could you try commenting out this line and check if it works for you? If it does help I will think of a proper fix. Thanks Andrew Cheers Peter -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Michel Lepert Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] intersection point and the right triangle
Hello all, i use the intersectVisitor to get the intersection between a ray and a geode. It works fine and I'm very happy, because it is very comfortable. Now I have the point (vector) of intersection, but I need the triangle of the drawable what I hit. I would like calculate the barycentric coordinates of the point. With this coordinates I want to calculate the texture coordinates of my intersection point. There are a comfortable way in osg? Or have anyone a idea for a nice solution? I think the intersectVisitor find the triangle, but i can't get this information. Cheers Martin ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] intersection point and the right triangle
Hi Martin, I would recommend using the osgUtil::IntersectionVisitor rather than the osgUtil::IntersectVisitor as the later is deprecated and only kept around for backwards compatibility. As for examples of getting the texture coords of a ray intersections have a look at the osgViewer::InteractiveImageHandler implementation in src/osgViewer/ViewerEventHandlers.cpp as it does just this. Robert. 2009/6/19 Großer Martin grosser.mar...@gmx.de: Hello all, i use the intersectVisitor to get the intersection between a ray and a geode. It works fine and I'm very happy, because it is very comfortable. Now I have the point (vector) of intersection, but I need the triangle of the drawable what I hit. I would like calculate the barycentric coordinates of the point. With this coordinates I want to calculate the texture coordinates of my intersection point. There are a comfortable way in osg? Or have anyone a idea for a nice solution? I think the intersectVisitor find the triangle, but i can't get this information. Cheers Martin ___ 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] intersection point and the right triangle
Hi Martin, I think the intersectVisitor find the triangle, but i can't get this information. osgUtil::Hit::getPrimitiveIndex == triangle index in vertex array Greetings, Daniel -- Daniel Trstenjak Tel : +49 (0)7071-9457-264 science + computing ag FAX : +49 (0)7071-9457-511 Hagellocher Weg 73 mailto: daniel.trsten...@science-computing.de D-72070 Tübingen WWW : http://www.science-computing.de/ -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Michel Lepert Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgOcean : Integration into existing Database/Application
Hi Kim and John Manipulator developing is a hard task, i will say good and robust and easy to use manipulator are not quite easy to write or to work out. So it would be important having default or common manipulator working with the osgOcean. I am wondering why you having problem with terrain mainpulators if the deformation gets done in vertex shader. so what i would like to mention is the fact that if the gpu support shader 3 (since 2007) you could pass a texture with deformation field information to the GPU and then the geometry stay allways similar. regards adrian 2009/6/19 John Vidar Larring larr...@weatherone.tv Hi Kim and Adrian, As far as I can tell only two of the osgGA manipulators are compatible - Trackball and FlightManipulator. Although you're right the trackball implementation doesn't seem to work correctly, I suspect this is to do with the fact that it doesn't have a node to focus on. TerrainManipulator and DriveManipulators aren't compatible because the ocean surface is animated and they try to position themselves by intersecting with the surface below them, which in the case of the ocean surface, is moving up and down all the time so it creates a nasty camera juddering. I had a go at adding them but I simply couldn't get them to play nicely. If you manage to get them working I'd be interested to see how. Just one idea I'd like to throw out there before I forget. One could possibly make an EllipsoidManipulator quite easily. It would essentially behave like a TerrainManipulator except that it would not take elevation into account; just doing simple ray-ellipoid intersection testing instead. Even better, if there is a way to tell whether intersecting geometry is static or dynamic, one could theoretically implement a manipulator which behaves like the TerrainManipulator over land, and like an Ellipsoid manipulator over the ocean. Best regards, John Kim C Bale wrote: Hi Adrien, Well first the openscenegraph motionmodel or manipluators, manager aren't working. it would be good to get similar behaviour like in application-viewer example. this would be important for integration into existing applications. As far as I can tell only two of the osgGA manipulators are compatible - Trackball and FlightManipulator. Although you're right the trackball implementation doesn't seem to work correctly, I suspect this is to do with the fact that it doesn't have a node to focus on. TerrainManipulator and DriveManipulators aren't compatible because the ocean surface is animated and they try to position themselves by intersecting with the surface below them, which in the case of the ocean surface, is moving up and down all the time so it creates a nasty camera juddering. I had a go at adding them but I simply couldn't get them to play nicely. If you manage to get them working I'd be interested to see how. it be not much easier that we can append a geometry (osg file, ive file ,... ) which should be used to attach the water shaders. I haven't thought a lot about how to implement non-uniform shapes of animated water yet, the goal of osgOcean 1.0 was to get open sea rendering working. However, one of the nice things about the FFT approach is that it tiles. So it would be possible to modify the algorithm so that it places tiles in a non-uniform configuration rather than in a square shape. The current implementation of osgOcean uses a large vertex array that stores the vertices for all the tiles on screen. But a future enhancement will be to store only 1 tiles worth of vertices and then instance it positioning the tiles using a vertex shader. This will be a far more flexible and efficient approach and more suitable for deployment in large terrain datasets. Regards, Kim. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Adrian Egli ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgOcean : Integration into existingDatabase/Application
Hi Adrian, I am wondering why you having problem with terrain mainpulators if the deformation gets done in vertex shader. so what i would like to mention is the fact that if the gpu support shader 3 (since 2007) you could pass a texture with deformation field information to the GPU and then the geometry stay allways similar. The deformation doesn't get done in the vertex shader at the moment. However, it is something to think about. K. From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Adrian Egli OpenSceneGraph (3D) Sent: 19 June 2009 15:57 To: OpenSceneGraph Users Subject: Re: [osg-users] osgOcean : Integration into existingDatabase/Application Hi Kim and John Manipulator developing is a hard task, i will say good and robust and easy to use manipulator are not quite easy to write or to work out. So it would be important having default or common manipulator working with the osgOcean. I am wondering why you having problem with terrain mainpulators if the deformation gets done in vertex shader. so what i would like to mention is the fact that if the gpu support shader 3 (since 2007) you could pass a texture with deformation field information to the GPU and then the geometry stay allways similar. regards adrian 2009/6/19 John Vidar Larring larr...@weatherone.tv Hi Kim and Adrian, As far as I can tell only two of the osgGA manipulators are compatible - Trackball and FlightManipulator. Although you're right the trackball implementation doesn't seem to work correctly, I suspect this is to do with the fact that it doesn't have a node to focus on. TerrainManipulator and DriveManipulators aren't compatible because the ocean surface is animated and they try to position themselves by intersecting with the surface below them, which in the case of the ocean surface, is moving up and down all the time so it creates a nasty camera juddering. I had a go at adding them but I simply couldn't get them to play nicely. If you manage to get them working I'd be interested to see how. Just one idea I'd like to throw out there before I forget. One could possibly make an EllipsoidManipulator quite easily. It would essentially behave like a TerrainManipulator except that it would not take elevation into account; just doing simple ray-ellipoid intersection testing instead. Even better, if there is a way to tell whether intersecting geometry is static or dynamic, one could theoretically implement a manipulator which behaves like the TerrainManipulator over land, and like an Ellipsoid manipulator over the ocean. Best regards, John Kim C Bale wrote: Hi Adrien, Well first the openscenegraph motionmodel or manipluators, manager aren't working. it would be good to get similar behaviour like in application-viewer example. this would be important for integration into existing applications. As far as I can tell only two of the osgGA manipulators are compatible - Trackball and FlightManipulator. Although you're right the trackball implementation doesn't seem to work correctly, I suspect this is to do with the fact that it doesn't have a node to focus on. TerrainManipulator and DriveManipulators aren't compatible because the ocean surface is animated and they try to position themselves by intersecting with the surface below them, which in the case of the ocean surface, is moving up and down all the time so it creates a nasty camera juddering. I had a go at adding them but I simply couldn't get them to play nicely. If you manage to get them working I'd be interested to see how. it be not much easier that we can append a geometry (osg file, ive file ,... ) which should be used to attach the water shaders. I haven't thought a lot about how to implement non-uniform shapes of animated water yet, the goal of osgOcean 1.0 was to get open sea rendering working. However, one of the nice things about the FFT approach is that it tiles. So it would be possible to modify the algorithm so that it places tiles in a non-uniform configuration rather than in a square shape. The current implementation of osgOcean uses a large vertex array that stores the vertices for all the tiles on screen. But a future enhancement will be to store only 1 tiles worth of vertices and then instance it positioning the tiles using a vertex shader. This will be a far more flexible and efficient approach and more suitable for deployment in large terrain datasets. Regards, Kim. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Adrian Egli* To view the terms under which this email is distributed, please go to http://www.hull.ac.uk/legal/email_disclaimer.html
Re: [osg-users] osgOcean : Integration intoexisting Database/Application
Hi John, I'm not quite sure I understand the concept of an ellipsoid manipulator. Do you mean form an bounding ellipse over the ocean surface from which would be used to do the intersection? Wouldn't this suffer from strange intersections nearer the edges? Regards, Kim. -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of John Vidar Larring Sent: 19 June 2009 14:35 To: OpenSceneGraph Users Subject: Re: [osg-users] osgOcean : Integration intoexisting Database/Application Hi Kim and Adrian, As far as I can tell only two of the osgGA manipulators are compatible - Trackball and FlightManipulator. Although you're right the trackball implementation doesn't seem to work correctly, I suspect this is to do with the fact that it doesn't have a node to focus on. TerrainManipulator and DriveManipulators aren't compatible because the ocean surface is animated and they try to position themselves by intersecting with the surface below them, which in the case of the ocean surface, is moving up and down all the time so it creates a nasty camera juddering. I had a go at adding them but I simply couldn't get them to play nicely. If you manage to get them working I'd be interested to see how. Just one idea I'd like to throw out there before I forget. One could possibly make an EllipsoidManipulator quite easily. It would essentially behave like a TerrainManipulator except that it would not take elevation into account; just doing simple ray-ellipoid intersection testing instead. Even better, if there is a way to tell whether intersecting geometry is static or dynamic, one could theoretically implement a manipulator which behaves like the TerrainManipulator over land, and like an Ellipsoid manipulator over the ocean. Best regards, John Kim C Bale wrote: Hi Adrien, Well first the openscenegraph motionmodel or manipluators, manager aren't working. it would be good to get similar behaviour like in application-viewer example. this would be important for integration into existing applications. As far as I can tell only two of the osgGA manipulators are compatible - Trackball and FlightManipulator. Although you're right the trackball implementation doesn't seem to work correctly, I suspect this is to do with the fact that it doesn't have a node to focus on. TerrainManipulator and DriveManipulators aren't compatible because the ocean surface is animated and they try to position themselves by intersecting with the surface below them, which in the case of the ocean surface, is moving up and down all the time so it creates a nasty camera juddering. I had a go at adding them but I simply couldn't get them to play nicely. If you manage to get them working I'd be interested to see how. it be not much easier that we can append a geometry (osg file, ive file ,... ) which should be used to attach the water shaders. I haven't thought a lot about how to implement non-uniform shapes of animated water yet, the goal of osgOcean 1.0 was to get open sea rendering working. However, one of the nice things about the FFT approach is that it tiles. So it would be possible to modify the algorithm so that it places tiles in a non-uniform configuration rather than in a square shape. The current implementation of osgOcean uses a large vertex array that stores the vertices for all the tiles on screen. But a future enhancement will be to store only 1 tiles worth of vertices and then instance it positioning the tiles using a vertex shader. This will be a far more flexible and efficient approach and more suitable for deployment in large terrain datasets. Regards, Kim. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g* To view the terms under which this email is distributed, please go to http://www.hull.ac.uk/legal/email_disclaimer.html *___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgdem write permission error
Hi Yurii, On Mon, Apr 20, 2009 at 8:51 PM, Yurii Monakovmonako...@gmail.com wrote: The problem was in wrong diagnostic message (from vpb::DataSet::_writeNodeFile). In fact, osgDB complained about missing *.ive plugin, which was not on the path. Debugging is a great thing. I have just completed some work on VirtualPlanetBuilder that improves the error reporting so that rather than get a report of a permissions problem we get the message of the sort: Caught exception : Warning: Could not find plugin to write nodes to file myDirectory/output.ive. This improvement along with others is now checked 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] PolytopeIntersector distance and Transform
Hi Peter, Although your fix did not work - it is definitely the scale part of the transform causing the problem. If I remove the scaling part of the transform , then the polytope picking works as expected ... Andrew -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14246#14246 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB refusal to build under certain conditions
Hi Chris, I have just tracked down and fixed the problem in VPB that was causing this problem with building databases when then destination resolution is greater than the source data. I have tested this fix against the data and command line options you supplied and everything looks to be fine now. An svn update on VPB will get this fix. A word of note though, VPB svn/trunk now requires the svn/trunk version of the OSG as the new support for database patching and database revisions relies on new osgDB/DatabaseRevisions classes. This week I completed the last must have feature for VPB-1.0, so will now be looking at testing and documentation for it's 1.0 release. I'll also be making a 2.9.5 release very soon too and this may well be the version that VPB-1.0 will build against (although the official OSG version will be the up comming OSG-2.10). Robert. On Tue, Jun 2, 2009 at 11:37 PM, Chris 'Xenon' Hansonxe...@alphapixel.com wrote: Recently, I was trying to build a very specific piece of terrain dataset, and VPB was refusing to build it. I'm asking for clarification about what criteria VPB uses when deciding whether to build or not. while I talk below about VPB, I was using OSGDEM directly, as it was a small and simple build. The input data was 90m SRTM DEM data and 30m Landsat natural color imagery. I requested VPB build a dataset of 1/10 of one degree wide and high (for example, 10.0N to 10.1N and 150.0W to 150.1W). Under these circumstances, VPB refused to build. I need to see if I still have the output log to see what it said. Changing to 30m DEM data (by interpolating the 90m up in Global Mapper) convinced VPB to build. Using the 90m DEM data and a wider block (10.0N to 10.2N and 150.0W to 150.2W) also convinced it things were ok. I'm imagining there is some threshold where VPB won't build if there are fewer than N columns wide and M rows high of input DEM data cells covering the desired output region, but what are N/M, and where are they defined? -- Chris 'Xenon' Hanson | Xenon @ 3D Nature | http://www.3DNature.com/ 3D World Maps: http://3d-world-map.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to test for anti-alias support
I'm running on Redhat Linux: $ uname -a Linux cavs 2.6.18-92.1.22.el5PAE #1 SMP Fri Dec 5 09:58:49 EST 2008 i686 i686 i386 GNU/Linux My video card is an NVIDIA GeForce 9600 GT, here is some driver information from my X log: NVIDIA GLX Module 173.14.12 Thu Jul 17 18:36:35 PDT 2008 NVIDIA dlloader X Driver 173.14.12 Thu Jul 17 18:15:54 PDT 2008 NVIDIA Unified Driver for all Supported NVIDIA GPUs Here is the rest of the NVidia related output from my X log (just in case it is useful): (--) Chipset NVIDIA GPU found (II) Module wfb: vendor=NVIDIA Corporation (**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32 (==) NVIDIA(0): RGB weight 888 (==) NVIDIA(0): Default visual is TrueColor (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0) (**) NVIDIA(0): Enabling RENDER acceleration (II) NVIDIA(0): Support for GLX with the Damage and Composite X extension is (II) NVIDIA(0): enabled. (II) NVIDIA(0): NVIDIA GPU GeForce 9600 GT (G94) at PCI:8:0:0 (GPU-0) (--) NVIDIA(0): Memory: 524288 kBytes (--) NVIDIA(0): VideoBIOS: 62.94.11.00.02 (II) NVIDIA(0): Detected PCI Express Link width: 16X (--) NVIDIA(0): Interlaced video modes are supported on this GPU (--) NVIDIA(0): Connected display device(s) on GeForce 9600 GT at PCI:8:0:0: (--) NVIDIA(0): DELL 1907FP (CRT-0) (--) NVIDIA(0): DELL 1907FP (CRT-0): 400.0 MHz maximum pixel clock (II) NVIDIA(0): Assigned Display Device: CRT-0 (II) NVIDIA(0): Validated modes: (II) NVIDIA(0): 1280x1024 (II) NVIDIA(0): 1280x960 (II) NVIDIA(0): 1280x800 (II) NVIDIA(0): 1152x864 (II) NVIDIA(0): 1024x768 (II) NVIDIA(0): 800x600 (II) NVIDIA(0): 800x600 (II) NVIDIA(0): 640x480 (II) NVIDIA(0): 640x480 (II) NVIDIA(0): Virtual screen size determined to be 1280 x 1024 (--) NVIDIA(0): DPI set to (85, 86); computed from UseEdidDpi X config (--) NVIDIA(0): option (==) NVIDIA(0): Disabling 32-bit ARGB GLX visuals. (II) NVIDIA(0): Initialized GPU GART. (II) NVIDIA(0): Setting mode 1280x1024 (II) Loading extension NV-GLX (II) NVIDIA(0): NVIDIA 3D Acceleration Architecture Initialized (II) NVIDIA(0): Using the NVIDIA 2D acceleration architecture (==) NVIDIA(0): Backing store disabled (==) NVIDIA(0): Silken mouse enabled (**) NVIDIA(0): DPMS enabled (II) Loading extension NV-CONTROL Akex -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Friday, June 19, 2009 1:15 AM To: OpenSceneGraph Users Subject: Re: [osg-users] How to test for anti-alias support Hi Alex, What OS, Hardware, drivers are you using? Robert. On Thu, Jun 18, 2009 at 8:24 PM, Pecoraro, Alexander Nalexander.n.pecor...@lmco.com wrote: Is there a different or better way to test for anti-aliasing support than to just call osg::DisplaySettings::instance()-setNumMultiSamples() repeatedly with smaller and smaller values, which doesn't seem to work for me anyway (so hopefully the answer is yes). I tried to have it set the number of multi samples and then call realize() on the viewer and if it failed to realize I have it try a smaller value for number of samples. What ends up happening is that it starts at 8, fails, then tries 4, which I know is supported by my video card so it should work and it appears to work, but the window opens and it is just black and nothing seems to render to it. So I'm wondering if my way of checking for anti-aliasing support is wrong. Here is the debug output from my attempts to make this work: Setting anti-aliasing samples to: 8 GraphicsContext::registerGraphicsContext 0x8e4ff20 Relaxing traits Error: Not able to create requested visual. close(1)0x8e4ff20 close(0)0x8e4ff20 GraphicsContext::unregisterGraphicsContext 0x8e4ff20 Viewer::realize() - No valid contexts found, setting up view across all screens. GraphicsContext::getWindowingSystemInterface() 0x8e4c030 0x102ee20 GraphicsContext::registerGraphicsContext 0x8e51e28 Relaxing traits Error: Not able to create requested visual. close(1)0x8e51e28 close(0)0x8e51e28 GraphicsContext::unregisterGraphicsContext 0x8e51e28 GraphicsWindow has not been created successfully. Viewer::realize() - failed to set up any windows Trying anti aliasing samples at 4 Viewer::realize() - No valid contexts found, setting up view across all screens. GraphicsContext::getWindowingSystemInterface() 0x8e4c030 0x102ee20 GraphicsContext::registerGraphicsContext 0x8e51e28 GraphicsContext::getWindowingSystemInterface() 0x8e4c030 0x102ee20 GraphicsContext::createNewContextID() creating contextID=0 Updating the MaxNumberOfGraphicsContexts to 1 GraphicsWindow has been created successfully. X window successfully opened So even though it appears that the GraphicsWindow has been created successfully, my app is not able to render anything into the window. The funny thing is that if I start with a number of multi-samples value of 4 then
Re: [osg-users] [3rdparty] Is the osgOcean Linux bug still present?
Dear Kim, 2009/6/19 Kim C Bale k.b...@hull.ac.uk: Pierre, Many thanks. I've downloaded the debug data, and it's looks fine :(. The vertices seem to be ok and so does the mipmapping information. You mention that the you've tried it with a different graphics card and it worked. Was this machine using the same linux distribution? No it's not the same at all: KUbuntu 9.04 x86_64 - kernel 2.6.28-11 SMP x86_64 g++ is 4.3.3 Nvidia drivers 180.51 OSG version 2.8.1 It's a nightmare not being able to replicate it. You've really done a lot of work, and a good job, this nasty bug is probably a combination of factor... I wonder how numerous we are having this bug ? So far if we are only 2, you don't have to worry that much. If someone else using a Linux 32 bits distribution could test as well... I won't have many time next week, but if I can, I'll try to witch the 2 cards, just to see if it's working well with the 4600 on debian 32 bits... I starting to think it might be because I've used degenerate triangles in the primitives. When I reach the water surface, the view is flickering until I'm completely underwater... Has someone else experience the same effect ? I think i know about this one, inside OceanScene it flips between different lighting and full screen effects when the eye position passes over the average wave height. So you're probably seeing the above water and below water effects flicking between each other if you're near the threshold. I think the only way to solve this is to force the camera down or up when it's near the threshold so that you don't see the change in effects. But I don't think it's the place of osgOcean to do that. Perhaps a shader transition could be used, I'll have a think. I was playing with all the options and I can't reproduce it any more ?! it's even really nice and realistic !! (see the pics enclosed) Great work. Thanks for the help. Kim. Thanks for your all. Pierre. attachment: my_screen_shot_1.jpg___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB refusal to build under certain conditions
Robert Osfield wrote: Hi Chris, I have just tracked down and fixed the problem in VPB that was causing this problem with building databases when then destination resolution is greater than the source data. I have tested this fix against the data and command line options you supplied and everything looks to be fine now. Thanks much. That cause is about what I expected. -- 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
Re: [osg-users] Annotating large numbers of objects
In the end I rendered all 255 characters of my chosen annotation font/style/size into 255 gl bitmaps, then use glBitMap to draw strings on the fly composing them from the character bitmaps -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14257#14257 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgOcean presentation at OSG BOF?
Hi -- I'm wondering if one of the Oceanus developers will be at SIGGRAPH, and if so, would be willing to give a 5-minute presentation/demo of Oceanus? I personally haven't had time to try it out, but it has obviously generated a lot of interest and I think it'd be a valuable addition to the scheduled BOF presentations. Contact me off line by email and we can discuss further. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Non-square osgParticles?
Morning all, Okay, bear with me if this seems an extremely dumb question. I'm extremely new to OSG (heck, I'm new to 3D graphics in general, I've only made it through Chapter 5 of the OpenGL red book...), and I'm basically having to learn as much as fast as I can and what might seem obvious may be moderately difficult to me... Anyway, the question is this: I'm trying to simulate a jet stream emanating from a projectile in motion (ie. jet, rocket, space shuttle, etc.). I've managed to get through setting up a ParticleEffect and attaching it to the back of a Node model and everything, and in terms of where it's placed and such it actually looks pretty good, but it's in the details I'm a little bothered. While I've been able to change the actual size of the particles, I can't seem to figure out how to change the SHAPE of the particles. I'd like to try to round them out a little. I noticed the Particle object has the function setRadius but I've changed that to all sorts of extrema and don't see any difference... changing the size range works but they're still perfect squares. Is there no way to produce round (or even just rounded edge) particles? Thanks to anyone that can offer any help... Kris -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14247#14247 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgOcean is OSG 2.6 compatible
Hi all, I just wanted to let people know that as of yesterday, the osgOcean trunk is OSG-2.6 compatible. Our framework here at work is still using OSG 2.6, and so when I integrated osgOcean into it I made the necessary changes. It might even run on earlier versions, but I can't test that. 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] Non-square osgParticles?
Kris Dale wrote: Morning all, Okay, bear with me if this seems an extremely dumb question. I'm extremely new to OSG (heck, I'm new to 3D graphics in general, I've only made it through Chapter 5 of the OpenGL red book...), and I'm basically having to learn as much as fast as I can and what might seem obvious may be moderately difficult to me... Anyway, the question is this: I'm trying to simulate a jet stream emanating from a projectile in motion (ie. jet, rocket, space shuttle, etc.). I've managed to get through setting up a ParticleEffect and attaching it to the back of a Node model and everything, and in terms of where it's placed and such it actually looks pretty good, but it's in the details I'm a little bothered. While I've been able to change the actual size of the particles, I can't seem to figure out how to change the SHAPE of the particles. I'd like to try to round them out a little. I noticed the Particle object has the function setRadius but I've changed that to all sorts of extrema and don't see any difference... changing the size range works but they're still perfect squares. Is there no way to produce round (or even just rounded edge) particles? Thanks to anyone that can offer any help... Particles are typically rendered as quads, just because it's efficient to do so. Generally rounded objects are expensive (in computation time) to do when you're dealing with polygonal rendering, as OpenGL and OSG do. To make the particles look round, you typically just need to apply a texture map that is transparent near the corners of the quad. I attached an example image to give you an idea what I mean. When you apply this texture to your particles, they'll look round, even though they're still being drawn as quads. --J Kris -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14247#14247 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org inline: smoke.png___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] pixelBufferObject
Hi all, I was recently playing with osgscreencapture and was wandering what is responsible for different PBO support, one of my machines supports single_pbo ( centos) and second one supports double_pbo (windows xp), is it driver dependant or hardware dependant, or os dependant? or what am I missing? any links to this topic are welcome Thanks Alena Bacova ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] building OSG as static library
Hi, Now I am stuck on linux (ubuntu 9.04). I was able to build OSG as static libs without a hick. When I try to run the my app I get linker problems. If I switch in the dynamic precompiled binaries from the wiki the built goes fine. I am afraid I might miss something obvious that xcode does on its own. Is there anything I need to do differently when linking to static libs as opposed dynamic libs? I guess I need to figure out somehow if my static libs are punk or if I am linking them in wrong. Here is the error I get: == ../../../addons/ofxOsg/libs/osg/lib/linux/libosg.a(BufferObject.o)||In function `__static_initialization_and_destruction_0(int, int)':| BufferObject.cpp|| undefined reference to `OpenThreads::Mutex::Mutex()'| BufferObject.cpp|| undefined reference to `OpenThreads::Mutex::~Mutex()'| ../../../addons/ofxOsg/libs/osg/lib/linux/libosg.a(Camera.o)||In function `osg::Camera::~Camera()':| Camera.cpp|| undefined reference to `OpenThreads::Mutex::~Mutex()'| Camera.cpp|| undefined reference to `OpenThreads::Mutex::~Mutex()'| ../../../addons/ofxOsg/libs/osg/lib/linux/libosg.a(Camera.o)||In function `osg::Camera::~Camera()':| Camera.cpp|| undefined reference to `OpenThreads::Mutex::~Mutex()'| Camera.cpp|| undefined reference to `OpenThreads::Mutex::~Mutex()'| (keeps on going) == Any ideas? stefan hechenberger http://linear.nortd.com -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14263#14263 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] I can't load Released OSG library in Debug Mode.
Thanks Vincent and JS; It is interesting no-no which is seen to me odd :) It always restrict us while using created dll project which uses osg. So I have to create my own dll project in two version (debug and release) for compiling new project which uses this dll in it for possibility of beeing different compilation mode. Best Regards. 2009/6/19 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com Hello Ümit, Until now, I have been using VS2003 in all project. But we have upgraded to VS2008. I don't know why can't load released OSG in Debug mode or vice versa. It throws and std::badalloc exception while using reading some model or images by osgDB's static functions(readNode, readImageFile etc...) But same code works when working same mode. VS2008 don't let us to use this interchangeability anymore or should I set some parameters? You mean you're trying to link an app compiled in debug with an OSG lib compiled in release, or vice versa? Yeah, that's a big no-no, and it's been discussed often on this list. You need to match the debug/release across your whole project, at least since VC++ 2005. Otherwise the standard library used is different and makes different assumptions about how to allocate memory and other things. This is true for any library that is coded in C++. If the dependency contains only C code, you can use only the release version of that lib with both release and debug applications if you want. The OSG dependencies packages contain both release and debug dependencies, and CMake will choose the right one when compiling OSG. You just need to make sure you do the same thing in your own apps/projects - when compiling your project in release, link to osg.lib/osgDB.lib/... and when compiling it in debug, link to osgd.lib/osgDBd.lib/... 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 -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] could not find plugin to read objects from file
Hi, could I write a new plugin which transfers my file to osg, and I want use the command: osgviewer myfile and I am sure I can transfer myfile to Geode*. but, when the program run, the warning: could not find plugin to read objects from file... Also, I set the PATH and OSG_LIBRARY_PATH to attach my DLL. what I can do? can't I write my own plugin? ... Thank you! Cheers, abc9804 -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14082#14082 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] I can't load Released OSG library in Debug Mode.
Hi Ümit, It is interesting no-no which is seen to me odd :) It always restrict us while using created dll project which uses osg. So I have to create my own dll project in two version (debug and release) for compiling new project which uses this dll in it for possibility of beeing different compilation mode. Yes, and as I said, it's nothing new. Since VC++ 2005 it's been like that. 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] [build] building OSG as static library
Hi again, Since I got stuck on linux I continued my little adventure on windows VC9sp1. Unfortunately I got stuck at pretty much the same spot. I wonder if my problems on these two platforms have something in common. My OSG static libs built fine under windows but when I try to use them in my app (swapping them out for the synamic ones) I get linker problems: Code: Linking... testApp.obj : error LNK2001: unresolved external symbol __declspec(dllimport) public: __thiscall osg::Box::Box(class osg::Vec3f const ,float) (__imp_??0...@osg@@q...@abvvec3f@1...@m@Z) testApp.obj : error LNK2001: unresolved external symbol public: virtual class osg::Object * __thiscall osg::Box::cloneType(void)const (?clonet...@box@osg@@ubepavobj...@2@XZ) testApp.obj : error LNK2001: unresolved external symbol public: virtual class osg::Object * __thiscall osg::Box::clone(class osg::CopyOp const )const (?cl...@box@osg@@ubepavobj...@2@abvcop...@2@@Z) testApp.obj : error LNK2001: unresolved external symbol public: virtual bool __thiscall osg::Box::isSameKindAs(class osg::Object const *)const (?issamekin...@box@osg@@ube_npbvobj...@2@@Z) testApp.obj : error LNK2001: unresolved external symbol public: virtual char const * __thiscall osg::Box::libraryName(void)const (?libraryn...@box@osg@@UBEPBDXZ) testApp.obj : error LNK2001: unresolved external symbol public: virtual char const * __thiscall osg::Box::className(void)const (?classn...@box@osg@@UBEPBDXZ) testApp.obj : error LNK2001: unresolved external symbol public: virtual void __thiscall osg::Box::accept(class osg::ConstShapeVisitor )const (?acc...@box@osg@@ubexaavconstshapevisi...@2@@Z) testApp.obj : error LNK2001: unresolved external symbol public: virtual void __thiscall osg::Box::accept(class osg::ShapeVisitor ) (?acc...@box@osg@@uaexaavshapevisi...@2@@Z) testApp.obj : error LNK2001: unresolved external symbol __declspec(dllimport) public: void __thiscall osgGA::EventQueue::windowResize(int,int,int,int) (__imp_?windowres...@eventqueue@osgGA@@qaexh...@z) testApp.obj : error LNK2001: unresolved external symbol __declspec(dllimport) public: void __thiscall osg::GraphicsContext::resized(int,int,int,int) (__imp_?resi...@graphicscontext@osg@@qaexh...@z) ofxOsgNode.obj : error LNK2001: unresolved external symbol __declspec(dllimport) public: void __thiscall osg::BlendFunc::setFunction(unsigned int,unsigned int) (__imp_?setfunct...@blendfunc@osg@@qae...@z) ofxOsgNode.obj : error LNK2001: unresolved external symbol __declspec(dllimport) public: class osg::Vec3d const __thiscall osg::PositionAttitudeTransform::getPosition(void)const (__imp_?getposit...@positionattitudetransform@osg@@qbeabvve...@2@XZ) ofxOsgNode.obj : error LNK2001: unresolved external symbol __declspec(dllimport) public: class osg::Quat const __thiscall osg::PositionAttitudeTransform::getAttitude(void)const (__imp_?getattit...@positionattitudetransform@osg@@qbeabvq...@2@XZ) ofxOsgNode.obj : error LNK2001: unresolved external symbol __declspec(dllimport) public: class osg::Vec3d const __thiscall osg::PositionAttitudeTransform::getPivotPoint(void)const (__imp_?getpivotpo...@positionattitudetransform@osg@@qbeabvve...@2@XZ) bin\graphicsExample.exe : fatal error LNK1120: 14 unresolved externals Any immediate thoughts? stefan hechenberger http://linear.nortd.com -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14267#14267 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org