[osg-users] Transparent but occluding phantom objects for AR application
Dear All, I'm sure this has been answered before, and I'm merely missing the magic combination of keywords in my various searches. I'm developing a video-see-through AR application which will show the user the contents of holes in the ground. To get the correct depth cues, the user should be able to see the contents of the hole only when they look down into it. From what I can tell, the right way to achieve this is to create some phantom objects which are transparent but occlude objects placed behind them. These phantom objects should be realised by writing them into the depth buffer only. Is that correct? If so, could anybody point me towards a suitable reference? Many thanks! Cheers, Simon ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Transparent but occluding phantom objects for AR application
Hi Simon, On Thu, Jul 8, 2010 at 11:09 PM, Simon Julier s.jul...@cs.ucl.ac.uk wrote: I'm developing a video-see-through AR application which will show the user the contents of holes in the ground. To get the correct depth cues, the user should be able to see the contents of the hole only when they look down into it. From what I can tell, the right way to achieve this is to create some phantom objects which are transparent but occlude objects placed behind them. These phantom objects should be realised by writing them into the depth buffer only. Is that correct? If so, could anybody point me towards a suitable reference? You can use the osg::ColorMask state attribute to prevent the object from writing to the color buffer. I've used this technique in my video-see-through apps. Cheers, Farshid ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] .tif and .tfw
Hello Pierre, I send you in attachment what I get in my console with OSG_NOTIFY_LEVEL = INFO when I run osgdem --geocentric -d data.dem -t data.tif -l 3 -o data.osg and when I run osgviewer data.osg. Otherwise, I use osg-2.8.2, VPB 0.9.10 and gdal 1.5. I will try to use Boston data. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29858#29858 Attachments: http://forum.openscenegraph.org//files/run_osgviewer_830.txt http://forum.openscenegraph.org//files/run_osgdem_171.txt ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osganimationsolid example
Thank you Jean-Sébastien for the detailed explanation. I need to move objects related to cars and their positions/rotations are already calculated by a solver. So I think I will try the callback approach. Thanks again, Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29859#29859 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Texture problem on 64-bit PC
Hi, I have similar problems with an ATI Radeon HD 5850 in Windows 7 64bit. Textures are corrupted, it seems like the MIP levels are mixed together somehow, so that different textures are shown and blended together depending on the viewing distance and angle. I have tried different versions of the Catalyst drivers but to no avail. The phenomenon doesn't appear with all models but it feels like it's an ATI driver issue anyway, triggered by something special in the failing models, but I haven't figured out what just yet. Does anyone else have the same problem or know how to solve it? Regards, Andreas On 2010-07-08 17:48, Gordon Tomlinson wrote: I would have to disagree and say that it is likely to be a hardware\driver issue I have been running OSG on 64 with Nvidia for 3 years and had no issues There have bee quite a few posts recently about continued issues with ATI catalyst drivers and their broken Opengl Support, the suggestions from the post is to use catalyst 10.4 drivers __ Gordon Tomlinson gor...@gordontomlinson.com IM: gordon3db...@3dscenegraph.com www.vis-sim.com www.gordontomlinson.com www.PhotographyByGordon.com __ -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Werner Stoop Sent: Thursday, July 08, 2010 4:29 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Texture problem on 64-bit PC Hi, I recently received a new 64-bit machine at work. When I now use osgviewer to the textures on some of our models seem smeared where they displayed correctly on my older 32-bit PC. Other models do display correctly, so I don't think it's a hardware issue. Our models are in the form of IVE files, and some of them are generated by (an older version of) Virtual Planet Builder. For what it's worth, my PC runs Fedora 12 and has an ATI Radeon HD 3450 graphics card. I also had Fedora 12 on my previous PC, but it had a NVidia card. I would post an image, but I'm a newbie, so I'm not allowed to post URLs Has anyone had similar problems? what causes it? How can I resolve it or fix the models? Thank you! Werner[/i] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29837#29837 ___ 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] [vpb] .tif and .tfw
Hi, I tested the boston example but I'm not sure that the projection has worked well. I run osgdem.exe --geocentric -d boston-dem-downtown-5m-utm19n-meters.tif -t boston-10m-utm19n-meters.tif -l 5 -o test2.osg. I send what I obtain in attachment. Can you tell me if it worked well? Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29863#29863 Attachments: http://forum.openscenegraph.org//files/boston_184.jpg http://forum.openscenegraph.org//files/boston_171.rar ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgVolume volume rendering ?
Hi everyone, I'm just starting to play with the osgVolume sample and I have a very beginner question about it: - Can you actually have any kind of volumetric rendering with this ??? I perform many tests with various arguments, but each time, all I get is a simple 2D image sequence of all the provided 2D images: so it's basically playinig just like a movie... Why would we have complex Raytracing shader techniques just to render an image sequence ? I must be missing something here. Also, note that I actually managed to get a 3D rendering specifying zSize, ySize and xSize, but again the 3D result is merly the projection of a single 2D image (an the image is dynamically changing...) I know the osgVolume still needs more development, but is that really all I can expect from it for the moment ?? Also, I could not use DICOM images directly: I got errors from the dcmtk library, so I first used image magick to convert my dcm images to png images, could it be I lost usefull 3D volumetric rendering info with that step ? And last but not least, those tests were performed on Windows, with OSG 2.9.6. Any known limitation due to this ? In fact, if anyone as any screenshot I would be interested ! :-) Cheers, Manu. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] .tif and .tfw
Hello Lucie, When looking at your log I see that the tiff texture is reprojected... started DataSet::createDestination(3) reprojecting to file temporaryfile_013c07_0100_deme.tif reprojecting to file temporaryfile_S4_06032_5215_20061018_m20_1_utm20.tif Time for after_reproject 8.389910 as recommended by Shayne, you should re-project your data, first it will save you some processing time and secondly it will allow you to detect projection problems more easily... To avoid aliasing artifacts when accessing data, you can also use gdaladdo to store the mip maps in the .tiff, like explained here : http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/osgdem (but it won't fix your projection trouble) Otherwise I believe there was some problems with GDAL 1.5 at least with some release ; particularly the 1.5.0 was buggy... If using known to work data, you still got strange result, try to update gdal lib... I've downloaded and tested on my machine (Debian 64bits - osg 2.9.7) your Boston terrain and it looks normal... but the files are probably not reprojected... You could also try to look at your data in a GIS tool like Quantum GIS http://www.qgis.org/ Just to see if everything is looking good ? Pierre. Le vendredi 09 juillet 2010 à 07:45 +, lucie lemonnier a écrit : Hello Pierre, I send you in attachment what I get in my console with OSG_NOTIFY_LEVEL = INFO when I run osgdem --geocentric -d data.dem -t data.tif -l 3 -o data.osg and when I run osgviewer data.osg. Otherwise, I use osg-2.8.2, VPB 0.9.10 and gdal 1.5. I will try to use Boston data. Thank you! Cheers, lucie -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29858#29858 Attachments: http://forum.openscenegraph.org//files/run_osgviewer_830.txt http://forum.openscenegraph.org//files/run_osgdem_171.txt ___ 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] FBX Plugin: animation speed not as expected...
I've downloaded the latest source code of the FBX plugin and osgAnimation from svn but, I'm still experiencing different playback speed with respect to QuickTime moreover I have also problems with the animations themselves. As I said I'm using the latest code for FBX plugin and osgAnimation, on the other hand I'm using OSG 2.9.6 for all other plugins and libraries, so my question is: beyond the FBX plugin itself and osgAnimation what else could cause the problems with animations I'm experiencing? (ie not only speed, but also wrong/bad animation playback in general) By the way, I tried with both QuickTime and the ViewScene example that comes with the FBX SDK, they both play every model correctly. Talking about test models, I tryed: humanoid.fbx: model messed up during animation the 3-bouncing-balls model (sent to Michael some days ago): animation played at exagerated speed and now I have two more humanoid models one of which has the same problems of humanoid.fbx and the other seems to be missing some starting and ending frames. I'm going to send them to Michael. Regards. Alessandro On Thu, Jul 8, 2010 at 9:35 AM, Alessandro Terenzi a.tere...@gmail.comwrote: Ok, thanks Michael, I will double check that I'm really using the latest source code for both the FBX plugin and osgAnimation. Regards. Alessandro On Wed, Jul 7, 2010 at 6:54 PM, Michael Platings mplati...@gmail.comwrote: Hi Alessandro, I can't reproduce the problem so I don't know why you're seeing that, sorry. ___ 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] osganimationsolid example
One more question. The solver I have generates positions and rotations for the object to move at runtime. So I can not set all positions and rotations when the animation starts. In case of using the osgAnimation library, how could I append new positions and rotations at runtime? Regards Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29869#29869 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Qt 4.6 context menus not repainting in osgViewerQT or osgViewerQtWidget
I have just upgraded to qt 4.6.3, and it has corrected the problem. Thanks, Pan Liang, for the suggestion. James -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29870#29870 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osganimationsolid example
Hi gianni, The solver I have generates positions and rotations for the object to move at runtime. So I can not set all positions and rotations when the animation starts. In case of using the osgAnimation library, how could I append new positions and rotations at runtime? Err, I wonder, if you have something else calculating positions and rotations at runtime, why do you want to use osgAnimation or a callback at all? Just set your graphical object's transform to the new values and you're done... osgAnimation or callbacks will be useful if you have a sequence of precalculated positions/orientations for each frame of animation, and then you want at runtime to move through the sequence and set the current position/orientation. Or if you want to calculate the current position yourself on the fly. But if you have a separate system calculating the position/orientation, then just set the graphical object's transform to that new value directly. Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] DatabasePager Callback
I am aware of the ReadFileCallback - but I guess the problem is how to distinguish between my paging terrain files from other database files loaded during runtime. All my files are FLTs (with the exception of a few TXP files for the terrain). I can't use the file extension as a filter since they are all the same (i.e *.flt). Keep the ideas comming... it's all good. Regards, -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29872#29872 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Transparent but occluding phantom objects for AR application
Dear Farshid, You can use the osg::ColorMask state attribute to prevent the object from writing to the color buffer. I've used this technique in my video-see-through apps. Thanks. I tried it, but it didn't seem to work for me. The way I did it is as follows (r is of type osg::Node*): osg::StateSet* stateSet = r-getOrCreateStateSet(); osg::ColorMask* cm = new osg::ColorMask(false, false, false, false); stateSet-setAttributeAndModes( cm, osg::StateAttribute::ON); It seems to work fine for masking the bits off for each colour channel separately. However, when I disable all the channels, the phantom object does not appear to occlude objects behind it. I also made sure that the depth test was enabled, but that didn't make any difference to the results. Any thoughts? Cheers, Simon ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osganimationsolid example
Hi Jean-Sébastien, I would like to handle two slightly different scenarios. 1) Rotation orientation values are loaded from file (already generated by the solver). Those values are just like the channels of an animation, + one of them is the time channel (with fixed step). 2) The solver calculates the rotations orientations but since it is faster than realtime I need to store them in the same class of point 1. In fact I cannot update the transform directly bucause I would run the animation faster than realtime. At point 1) I could set the animation values but at point 2 I have to add them at runtime, while the animation is running. Maybe what you suggested is correct but it seems the callback method allows me to update the transform when the three is traversed by the update visitor. Moreover I need a way to show the animation in realtime so I need a way to synchronize the transform update to the time channel. Hope this may clarify my problem Gianni -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29874#29874 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osganimationsolid example
Hello Gianni, Maybe what you suggested is correct but it seems the callback method allows me to update the transform when the three is traversed by the update visitor. Moreover I need a way to show the animation in realtime so I need a way to synchronize the transform update to the time channel. You're right, using a callback is appropriate if you need to update your positions/orientations based on a time and you get values from a file or from a generator that generates them faster than realtime and you cache the values. As for the time, in your callback's operator(), the nodevisitor you get has a getFrameStamp() method that lets you get the reference time, which is the time since the program started running. From this you can decide which position/orientation values to use from your cache (and perhaps expire older values, or whatever). Anyways, only you will know what you want to do, but the information is there for you to make your decisions. Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Transparent but occluding phantom objects for AR application
Hi Simon, On Fri, Jul 9, 2010 at 7:38 AM, s.jul...@cs.ucl.ac.uk wrote: It seems to work fine for masking the bits off for each colour channel separately. However, when I disable all the channels, the phantom object does not appear to occlude objects behind it. You will need to ensure that the phantom objects are rendered before the objects they are supposed to occlude. You can do this by either giving the phantom objects a very low render bin order, or the real objects a very high render bin order. The following sample shows how to give an osg::StateSet a very low draw order: stateset-setRenderBinDetails( -1000, RenderBin, osg::StateSet::USE_RENDERBIN_DETAILS ); Cheers, Farshid ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] problem with osgUtil::IntersectVisitor and osg::LineSegment
I stumbled on this thread when working on a similar problem that I had using IntersectionVisitor in Visual Studio projects. I just wanted to confirm that I have found that the OSG examples and OSGHelp examples that utilized IntersectionVisitor crashed under Windows when utilizing the latest downloaded Visual Studio binaries. (I tried the exaples MouseSceneIntersection, osgpick and osgkeyboardmouse and could not get any of them to function) However, numerous other example apps are working in Visual Studio. Based on the previous posters response it appears that recompiling the Source within Visual studio is the method to address this problem. omartinaud wrote: Hi everybody, Finally, I decided to reinstall osg using the sources. I took the osg 2.8.3 sources and I compiled them using my version of visual studio. Now everything works perfectly ! Looks like I didn't have the good binaries. Thank you all for your help ! Cheers, Olivier -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29877#29877 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] problem with osgUtil::IntersectVisitor and osg::LineSegment
Hello Tim, Based on the previous posters response it appears that recompiling the Source within Visual studio is the method to address this problem. Err, no, usually just making sure you don't mix debug and release and that you use binaries for the same version of Visual Studio should make everything work. The previous poster was me, and I just confirmed that the OP was using VC9 (Visual Studio 2008) and the binaries they had downloaded were for VC8 (Visual Studio 2005). Of course, in their case there was no other option than compiling OSG from source, since there were no binaries for VC9 available at the time. It appears there still aren't, so if you use VC9 then you'll have to compile from source too. But saying that the solution to the problem above was recompiling from source is false. The solution was to use binaries for the same version of Visual Studio, which in this particular case implied compiling from source. It just means you have to know what you're downloading. If you see binaries for Visual Studio 8 and you're using Visual Studio 9, don't assume it will still work and then wonder why it crashes... Which version of Visual Studio are you using? Which version of Visual Studio are the binaries compiled for? What library files are you linking to? What configuration are you compiling your project in? 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] problem with osgUtil::IntersectVisitor and osg::LineSegment
Hi Tim, It just means you have to know what you're downloading. If you see binaries for Visual Studio 8 and you're using Visual Studio 9, don't assume it will still work and then wonder why it crashes... In fact, the download page even states it in underlined text... - Quote - Visual Studio users, make sure you download the binaries for your Visual Studio version: 8 (2005) or 9 (2008). You cannot link OSG libraries for VS8 into a VS9 executable or vice versa, they have to match. If you want to be really sure, download the source and compile OSG yourself. - http://www.openscenegraph.org/projects/osg/wiki/Downloads 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