[osg-users] osgviewer framerate bug?
Hello, I am not registered for the osg submission list, so I hopefully post it here. We have tested the osgViewer built from 2.6.1 (prior versions have the same bug), while looking at the cow with osgViewer and enabling the framerate with additional information (pressing double s) the framerate begin to drop after 10 seconds or so constantly from 60 fps down to I dont know. Disabling this view brings the frames back. Looking at the framerate only (pressing s once) after the statistic window create another problem, the framerate jumps from 60 to 6 here. Can anyone reproduce the framerate drop with statistic view (double s) osg is 2.6.1 System: Windows XP Prof Sp2 Thanks Sam -- Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Removing colors and lighing from model?
I have troubles to remove every color and every lighting from a loaded model, basically I want to to draw a model completly white without any shading my code snippet is: // state is a pointer to the group where the model will be added state-setMode( GL_LIGHTING, osg::StateAttribute::OFF | StateAttribute::PROTECTED ); state-removeAttribute(StateAttribute::POLYGONMODE); state-removeAttribute(StateAttribute::MATERIAL); osg::Material* mat = new osg::Material(); mat-setEmission(osg::Material::FRONT_AND_BACK, osg::Vec4(0.0,0.0,0.0,1.0)); state-setAttributeAndModes(mat, osg::StateAttribute::ON | StateAttribute::PROTECTED); Basically I set the material as protected which should work but it doesnt for the models like axis.osg, or cessna.osg. Other model files from a model database are rendered white but these ones keep their color and their lighting. Is there a way to fix that without visiting each node of the loaded models? Thanks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Own Trackball Manipulator gets resetet
Hello, I create my own TrackballManipulator and set its Distance testwise to 10, then I set the Trackball to my current viewer and run a while(!done()) { frame();} loop by myself. But my Trackball has never the values I gave it. For instance is the distance of 10 resetet to something like 2.5 when i write _viewer.setCameraManipulator(_trackball.get()); Why does that happen? Thanks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Taking an image (screenshot)...
Hello, basically I have already found a solution to take a simple screenshot from the output buffer, like image-readPixels(0,0,1280,1024, GL_RGB,GL_UNSIGNED_BYTE); The problem is, that I don't want to capture the actual screen, I have two different view modes one is presented to the user with a viewer and contains a lot of debug output, which is text, additional geometry and the rendered object itself. The image, I require to save should only contain the rendered object but no debug output. It is the same position and same perspektive. Switching between debug for user and no debug for saving would cause some really annoying flickering and it is actually not necessary to output the no-debug rendering to the view, it should be only saved (which also would speed up the process, I believe) Another solution would be a split screen with debug and no debug view, but I think this is not necessary nor usefull, because the no-debug output does not contain any valuable information to look at. Thanks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Boundingsphere precision question
Hello, I am trying to rescale models to a boundingsphere of the radius 0.5, so that the model is not bigger than 1. in any dimension. But while rescaling I found some strange detail and I don't know how to treat with that. Here is a screenshot of the NPS Tank from the tutorials http://img180.imageshack.us/img180/2011/tankspherefi9.gif the same applies to the cessna.osg and so on. The bounding sphere is much bigger than the model itself and I require precise boundary values. Is this something that lies within the model or is this an offset applied to the boundingsphere? However I would like to have a precise boundingsohere. Thanks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Boundingsphere precision question
Hello, The bounding spheres in OSG are used as loose bounds to be able to quickly do frustum culling. If you need tight bounds you should be able to use the getBoundingBox() method on the Geode's of interest. This method returns a bounding box that should tightly fit around the geometry data (I haven't checked this, merely assuming it is a tight fit based on the geometry's vertices). I created a NodeVisitor and traversed the loaded node, the boundingbox I received from the Geode is indeed smaller, but it confused me a little bit, since it looks like the attached picture - http://img225.imageshack.us/img225/3594/tankspherexgk9.gif So obviously there are several geode in the model, but is there a quick way to get the overall geode? I tried to traverse all geodes and saving the geode with the biggest boundingbox radius, but then I get the center of the last goede's center, which is seldomly the center of the model. Thanks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Boundingsphere precision question
Hello, You can combine bounding boxes into a single larger one, using BoundingBox::expandBy(BoundingBox) in your node visitor. That should give you the overal bbox for all the Geode's in the graph. A radius doesn't make much sense for a bounding box. I am getting closer and I spent all the time by checking where my last problem is. The boundingbox in red is drawn correctly, with its center at 0,0,0, so is the cow, but unfortunately the nose is too far to the right. The same happens with the tank. The second attached pic shows where the center of the cow lies. The axis are added to the picture, cows_center has the x axis facing the viewer and y axis poining to the right. The cessna model works perfectly but many others don't. Is this a transformation problem? Does the model itself has a transformation, which translates the model away from the idealized boundingbox position? I am looking at the cow.osg file and cannot spot a translation. Thanks for the help attachment: cow_near.gifattachment: cows_center.gif___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Boundingsphere precision question
Hello, When you collecting/drawing your bounding volume Are you taking into account the bounding boxes are localized with respect to the geometry they contain And NOT to the origin or any transforms I am not quite sure, is this required? I am iterating a node and expand an empty boundingbox by all found boxes. If I get a bbox of a geode its xmin,ymin,zmin and their max are placed correct - relative to some local transformation, with the tank example the turret bbox should increase the overall bounding box by its own position, isn't it the desired behaviour? But anyway, the cow has only one geode and a group so the bbox of the cow should be the same as the origin of the model, if I am not, how can I cope with that? Thanks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] ref_ptr, ptr and leaking question (quite simple)
Hello, I have some novoice question about the use of pointers as short-time reference. As in the tutorial book described all objects deriving from osg::Referenced should be used with ref_ptr for proper use. But even in the book and in some tutorials there are many uses of the plain c++ pointer without the reference use of ref_ptr. There is where I have one question, if I develop in VisualStudio for instance and write some code like: osg::Geode * g = new osg::Geode; ... viewer.setSceneData(g); Doesn't I have a ref count of 2 for g? Whild would result in a leak since I never delete the g pointer manually? If this above is true and the programm is running as a childprocess of my IDE (since I have debugging and stacktracing and so on), don't I create some leaking beyond the lifetime of the programm? I am not quite sure if the memory is cleaned after finishing the programm or the whole IDE. Thanks Sam ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] setViewMatrixAsLookAt where is center?
Hello, I was trying to use the setViewMatrixAsLookAt matrix like I would use gluLookAt (since they are similar), my intention is to create a rotation around a point. So first I selected the eye position which should be (0,-25,25) and wanted to point the camera towards (0,0,0) where my object is placed, so basically the code looks like this: viewer.getCamera()-setViewMatrixAsLookAt(osg::Vec3(0,-25,25), osg::Vec3(0,0,0), osg::Vec3(0,1,0) ); but rendering this scene creates some confusing perspective, the position of the camera seems right but even if I am looking at (0,0,0) the object I am looking at is at the top of the screen and not centered, as I supposed. While placing the object at scene's origin, shouldn't this setup center this object since I am looking at (0,0,0) ? Greetings ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Recognizing currently seen polygons / vertices?
Hello, I am trying to render a scene and then recognize all currently seen polygons (or even vertices) of a loaded model. I require not only the node precision but polygons or better vertices. Basically I believe (but do not know) that I need to get hold of the z-buffer after a successfull depth test for a frame and extract the vertices out of it but I don't know how. thanks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] NPS_Tutorials.zip ?
Hi, does anybody know where I can get the NPS Tutorials zip with all modells referenced in the osg tutorials? It's pretty hard to do them without the proper files and it seems that they are unavailable at the moment. The old page here - http://www.openscenegraph.org/documentation/NPSTutorials/ has only a dead link to that zip. Greetings ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] NPS_Tutorials.zip ?
Many thanks for the file! But is this his official package? There seems to be still files missing like HUDBack2.tga Thanks -- From: Ümit Uzun [EMAIL PROTECTED] Sent: Friday, July 25, 2008 4:27 PM To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] NPS_Tutorials.zip ? Hi, You can download it from http://www.openscenegraph.org/projects/osg/attachment/wiki/Support/Tutorials/NPS_Tutorials_src.rar Good luck, Bye.. Umit UZUN 2008/7/25 Ariasgore [EMAIL PROTECTED]: Hi, does anybody know where I can get the NPS Tutorials zip with all modells referenced in the osg tutorials? It's pretty hard to do them without the proper files and it seems that they are unavailable at the moment. The old page here - http://www.openscenegraph.org/documentation/NPSTutorials/ has only a dead link to that zip. Greetings ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Freetype Plugin not found
I have already read about cmakes problem when it comes to freetype, but I checked my osgPlugins-2.4.0 folder, there is a osg_freetyped.dll in it. Whilte trying to load a file, I get the Warning: Could not find plugin to read objects from file ... I recompiled osg_freetyped.dll and also a freetype.dll from 2.3.7 source, put that into output directory. Basically I can load png files, so the folders are found but not with freetype. I set OSG_NOTIFY_LEVEL to DEBUG but unfortunately didnt get more error messages :/ My suspicition is that there is something wrong rather with osg_freetyped.dll than with freetype.dll itself because if osg cannot locate the osg_x.dll I get the warning from above, but if the plugin itself is missing - eg. libpngd.dll I get an additional windows error which is here not present. Thanks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Freetype Plugin not found
I got the following output for the freetype dll, which is somehow confusing: '05. Text.exe': Loaded 'osgPlugins-2.4.0\osgdb_freetyped.dll', Symbols loaded. LDR: LdrpWalkImportDescriptor() failed to probe osgPlugins-2.4.0\osgdb_freetyped.dll for its manifest, ntstatus 0xc0150002 '05. Text.exe': Unloaded osgPlugins-2.4.0\osgdb_freetyped.dll' Whats that? a dynamic linked library without an manifest? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Freetype Plugin not found
Hello, I am always using VS 2008 (which is 9.0) I have read about that problem, the manifest is included, everything is compiled on the same machine with the same VS Version. BUT I found a weird solution to this on this page - http://forums.msdn.microsoft.com/en-US/vcgeneral/thread/3f2869ca-2c07-49a8-a443-52720b10ea09/ I set the manifest ID to 1 (was 2) after compiling the dll and that worked! I actually do not understand why and am exploring this situation. -- From: Gordon Tomlinson [EMAIL PROTECTED] Sent: Thursday, July 24, 2008 2:49 PM To: 'OpenSceneGraph Users' osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Freetype Plugin not found Also make sure in your projects that the manifests are being embedded the doe need to be imbedded -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ariasgore Sent: Thursday, July 24, 2008 8:42 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Freetype Plugin not found I got the following output for the freetype dll, which is somehow confusing: '05. Text.exe': Loaded 'osgPlugins-2.4.0\osgdb_freetyped.dll', Symbols loaded. LDR: LdrpWalkImportDescriptor() failed to probe osgPlugins-2.4.0\osgdb_freetyped.dll for its manifest, ntstatus 0xc0150002 '05. Text.exe': Unloaded osgPlugins-2.4.0\osgdb_freetyped.dll' Whats that? a dynamic linked library without an manifest? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Did getDataFilePathList moved?
Hello, I am doing the tutorials on the osg page and I am stuck while using the osgDB::FilePathList. Did the methods getDataFilePathList and setDataFileList move? I can only find a getDataFilePathList in the osg:DB::Registry, but using this as in the tutorial: osgDB::FilePathList pathList = osgDB::Registry::getDataFilePathList(); Returns me an error- Error 1 error C2668: 'osgDB::Registry::getDataFilePathList' : ambiguous call to overloaded function in files.cpp 36 Using osgDB::getDataFilePathList() as mentioned here http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/HudsAndText leaves me with an Error 1 error C2039: 'getDataFilePathList' : is not a member of 'osgDB' in files.cpp 36 Thanks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Plugin Problem, osgDB doesn't find plugins
Hello, I am using VS2008 and OSG 2.5.2, compiled from source (included plugins) now I am trying to load a simple image with some code: osgDB::readImageFile(test.jpg); osgDB::readImageFile(test.png); osgDB::readImageFile(test.tga); None of those work, I always get the message Warning: Could not find plugin to read objects from file test.jpg. I copied the whole osgPlugins-2.5.2 folder content to my bin output folder directly into it and into a subfolder for testing. No effect. So I basically have the osgdb_jpegd.dll and have no idea if I am missing something. I found no info about any further linking in my projects of those plugins since osgDB should do this automatically. What am I missing? Thanks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Plugin Problem, osgDB doesn't find plugins
Hello, I rebuild everything using the mentioned osghelp article, got 185 Warnings about missing pdb files, but no errors. I added the environment paths, checked them (are they important while compiling osg from source???) copied the plugin folder to my output folder, copied all dlls in to output and the same error occured. Does the error look different if it cannot locate the file? It does I hope. Than I did Gordon Tomlinsons way, copied everything from 3dPartys bin into output, copied everything from plugin folder into the output folder and all the same! Same error. This is not a linking error that must be fixed in the project, am i right? This is a missing dll as i suppose... Thank you - From: Gordon Tomlinson [EMAIL PROTECTED] Sent: Friday, July 18, 2008 6:09 PM To: 'OpenSceneGraph Users' osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Plugin Problem, osgDB doesn't find plugins Do you have the location of the missing Dll's in your path ? The location needs to be... Or place all the DLL's in the same directory as your applications exe.. See my posts on my forums about Dll search orders under windows http://www.vis-sim.com/3dsceneBB/viewtopic.php?t=14 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ariasgore Sent: Friday, July 18, 2008 11:24 AM To: OpenSceneGraph Users Subject: [osg-users] Plugin Problem, osgDB doesn't find plugins Hello, I am using VS2008 and OSG 2.5.2, compiled from source (included plugins) now I am trying to load a simple image with some code: osgDB::readImageFile(test.jpg); osgDB::readImageFile(test.png); osgDB::readImageFile(test.tga); None of those work, I always get the message Warning: Could not find plugin to read objects from file test.jpg. I copied the whole osgPlugins-2.5.2 folder content to my bin output folder directly into it and into a subfolder for testing. No effect. So I basically have the osgdb_jpegd.dll and have no idea if I am missing something. I found no info about any further linking in my projects of those plugins since osgDB should do this automatically. What am I missing? Thanks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Plugin Problem, osgDB doesn't find plugins
Hi, the compiling part seems to be tricky for me, I tried to compile jpeg, got the zip but since there is no vs project in there, I tried that by hand (and reading the install doc) which was less than succesfull. Pretty akward to get the 3rd party libs. Greets -- From: Jean-Sébastien Guay [EMAIL PROTECTED] Sent: Friday, July 18, 2008 8:15 PM To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Plugin Problem, osgDB doesn't find plugins Hello Ariasgore, This is not a linking error that must be fixed in the project, am i right? This is a missing dll as i suppose... You didn't say if you compiled the 3rdParty dependencies yourself or not. If you didn't do that, then stop trying other things and do that. It will eliminate the most likely reason that the plugins don't load. Re-read my previous message. The problem is that when dynamically loading a plugin, the error message is the same if the plugin is *not found* and if the plugin *could not be loaded*. I suspect that in your case, the latter is what's happening. And this could be caused by (among other things) the fact that the plugins' dependencies (libjpegD.lib in your case) were compiled with a different compiler than the plugins themselves. Good luck, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Building sln for VS 9 with CMAKE results in wrong Paths
Hello, I am trying to build OSG from source, so I followed the explanations http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio Now I got the sln File, opened it, tried to build and ended with sth like 150 LNK Errors. I use the standard folder configuration, so that all lib files should be placed in lib. Unfortunately each project links against dependencies in a similar way like this- $(NOINHERIT) kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib ..\..\lib\osgGAd ..\..\lib\osgUtild ..\..\lib\osgd ..\..\lib\OpenThreadsd glu32.lib opengl32.lib And I get lots of Linker Errors, since I have no idea why cmake (or whoever) created a CDUP twice. Rewriting everything from ..\..\lib\osg to osg (removing the ..\..) works but is there another way to do this not spending the whole afternoon rewriting those files? :) Thanks Samuel ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org