Re: [osg-users] Problem with default lighting
Ach, I've had a couple hectic days and forgot to answer until now. Thank you (and Robert both), that was it and I overlooked it. I've managed to replicate this behaviour converting from sketchup to osg file formats through obj and collada, so I guess the problem might be on either end. I'll try to narrow it down when I have the time for it. Thanks again, E. Ulrich Hertlein wrote: Hi Eduard, if you look at Geodes Mesh6 Model and Mesh7 Model you'll notice that they don't have any normals whatsoever. I'd suspect they're just picking up normals from one of the previous nodes. /ulrich ___ 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] Implementing OcclusionQueryNode?
El 13/06/2008, a las 15:15, Todd J. Furlong escribió: So, where have I gone wrong? Do I need to inset OcclusionQueryNodes manually lower in my scenegraph? That is correct. See the osgocclusionquery example. Regards, E. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OcclusionQueryNode woes
But you were right, I *do* want occlusion information, so that means J-S's suggestion does not work for me (didn't even have the time to look at it, and hence the mix-up -- sorry). It's OQN or a similar pixel-counting strategy, then. Paul: I sent you the .osg file yesterday, with a couple notes, although I'm not sure you'll manage to reproduce it on your end. Thanks all, Eduard Paul Martz wrote: Eduard -- I thought you wanted more than just inside/outside the view volume, I thought you wanted occlusion information (object is hidden behind something in the scene). J-S's suggestion will just tell you whether something is in or out of the view volume, but won't tell you whether or not something is hidden. The way to implement J-S's suggestion (if you want to use it) would be to add a cull callback to the root node of your subgraph, and in that callback, call the osgUtil::CullVisitor::isCulled() method. You pass in the bounding volume and get a true/false return. It would be nice if this mechanism also considered culling due to OcclusionQueryNodes, but it does not at this time. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eduard Trulls Sent: Tuesday, June 10, 2008 11:42 AM To: OpenSceneGraph Users Subject: Re: [osg-users] OcclusionQueryNode woes Hi, I think that's still a bit beyond my osg/gl skills, and more so given my time frame; hence the convenience of using library code. (If this feature is already built in, I couldn't find it, please point!) I'll have a look at it if this doesn't pan out, anyway. Thanks, E. Jean-Sébastien Guay wrote: Hello Edward, You can query the test pass/failure results on a per-camera basis. (...) Yes, the query works. I was talking about recovering the pass/failure without acting accordingly (disabling the node if invisible), If all you want is to be able to determine if a node is visible or not, can't you just test its bounding volume against the camera's frustum? It's not quite trivial, but pretty easy once you get the hang of it. Come to think of it, there should probably be a class to do this in OSG (perhaps osgUtil?) - can't remember if there really is, but if not, it would make a useful addition for a number of people I would think. J-S ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce negraph.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] OcclusionQueryNode woes
Hi Paul, So I can reproduce the problem by running osgocclusionquery yourfile.osg? (all that example does is place an OQN above the .osg file that is loaded.) If so, please post your .osg file so I can take a look at the problem. I had forgotten osgocclusionquery could read external files. It seems I can't reproduce the problem, it runs flawlessly (after lowering occlusion and visibility thresholds, of course). Placing the OQNs automatically on the same model using the same node visitor on *my* code does show the problem. I've tried turning off all I could think of, to no avail; I currently have one single model hanging from root with a default trackball manipulator, no stateset (under Qt). I'll see what else I can come up with tomorrow. You can query the test pass/failure results on a per-camera basis. Are you saying that this doesn't work for you for some reason? The osgocclusionquery example does this, IIRC, to display some statistical information. However, you are trying to use OQN for something that it wasn't designed for. You might need to modify OQN or make your own custom node to make it do what you want. Yes, the query works. I was talking about recovering the pass/failure without acting accordingly (disabling the node if invisible), which, yes, is probably quite out of scope. Thanks for your help, E. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OcclusionQueryNode woes
Hi, I think that's still a bit beyond my osg/gl skills, and more so given my time frame; hence the convenience of using library code. (If this feature is already built in, I couldn't find it, please point!) I'll have a look at it if this doesn't pan out, anyway. Thanks, E. Jean-Sébastien Guay wrote: Hello Edward, You can query the test pass/failure results on a per-camera basis. (...) Yes, the query works. I was talking about recovering the pass/failure without acting accordingly (disabling the node if invisible), If all you want is to be able to determine if a node is visible or not, can't you just test its bounding volume against the camera's frustum? It's not quite trivial, but pretty easy once you get the hang of it. Come to think of it, there should probably be a class to do this in OSG (perhaps osgUtil?) - can't remember if there really is, but if not, it would make a useful addition for a number of people I would think. J-S ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OcclusionQueryNode woes
Hi all, I'm having some issues regarding OcclusionQueryNode. I draw an object as a set of faces and a set of edges, and I can't seem to get OQN to deal with both as a single entity, resulting in an artifact where for a fixed camera position the object becomes intermittent (disappears, then reappears on the next cycle, and so on). I reckon once either faces or edges are occluded the other set has enough room to render itself, but in turn occludes the former, or something along those lines; just my guess, though. The setup is as simple as an OQN over a node that reads a .osg file with two children geodes (said sets). Note that while finding a solution to this would be great my problem is even simpler. All I'm trying to do is use the existing implementation of OQN to determine whether an object is visible or not, and then display or hide a label attached to it but on a different renderbin (over both objects and scene). The object's geometry is very simple and I don't really care for occluding it, I'd just like the number of pixels drawn (or a binary output like getPassed()). Is it possible to turn occlusion off while preserving this behaviour? (A threshold of 0 doesn't seem to work.) I've looked through the code a few times but I'm having a hard time with it. :( Thanks in advance, Eduard ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg-conv collada
[EMAIL PROTECTED] wrote: Also, what are the plans for the plugin now that 2.0's out? I plan on submitting a patch to bring OSG up to using DOM 2.0. That should be sometime this month. Steve I think I'll wait for that then. Thanks for your reply. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg-conv collada
Hi, I'm trying to get the collada plugin working and running into this problem too. I've tried Johan Nouvel's suggestion (a few messages later) to no avail. I'm using osg 2.3.7 and the last pre-2.0 stable release for collada, 1.4.1 DOM 3.0. Did anyone find a way around it? Also, what are the plans for the plugin now that 2.0's out? Thanks, Eduard skunkwerk wrote: thanks Jason, here's the output - it seems that it eventually finds the plugin, but dlopen complains about an undefined symbol in the osgdb_dae.so file - how can I fix this? RegisterWindowingSystemInterfaceProxy() X11WindowingSystemInterface() GraphicsContext::setWindowingSystemInterface() 0x80635200xb7f44bd0 itr='/usr/lib/' FindFileInPath() : trying /usr/lib/osgdb_dae ... itr='/usr/local/lib/' FindFileInPath() : trying /usr/local/lib/osgdb_dae ... DynamicLibrary::getLibraryHandle( osgdb_dae) - dlopen(): ./osgdb_dae: cannot open shared object file: No such file or directory DynamicLibrary::failed loading osgdb_dae itr='/usr/lib/' FindFileInPath() : trying /usr/lib/osgPlugins-2.2.0/osgdb_dae.so ... itr='/usr/local/lib/' FindFileInPath() : trying /usr/local/lib/osgPlugins-2.2.0/osgdb_dae.so ... FindFileInPath() : USING /usr/local/lib/osgPlugins-2.2.0/osgdb_dae.so DynamicLibrary::getLibraryHandle( /usr/local/lib/osgPlugins-2.2.0/osgdb_dae.so) - dlopen(): /usr/local/lib/osgPlugins-2.2.0/osgdb_dae.so: undefined symbol: _ZN15daeLIBXMLPluginC1Ev DynamicLibrary::failed loading osgPlugins-2.2.0/osgdb_dae.so Warning: Could not find plugin to read objects from file /home/imran/3d/3dwarehouse/45/models/45.dae. Error no data loaded. ~RegisterWindowingSystemInterfaceProxy() GraphicsContext::setWindowingSystemInterface() 00xb7f44bd0 appreciate it On Mon, Mar 24, 2008 at 8:28 AM, Jason Daly [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: skunkwerk wrote: thanks Jason, once I ran ccmake . I was able to configure the environment variables correctly. the plugin seems to have been installed to /usr/local/lib/osgPlugins-2.2.0/osgdb_dae.so yet I can't get osgconv to find it - i've tried -e dae, -l osgdb_dae, -l /usr/local/lib/osgPlugins-2.2.0/osgdb_dae.so but none of them work. how do i get osgconv to load the library? You might need to set your OSGNOTIFY environment variable to DEBUG and see why osgconv isn't finding it. --J ___ 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] TrackballManipulator with pitch, yaw and no roll
Hi, I'd like to have a TrackballManipulator with a rotation behaviour resembling that of TerrainManipulator with rotation mode ELEVATION_AZIM (as opposed to ELEVATION_AZIM_ROLL). It'd be very useful for drawing and manipulating buildings and other constructs of that sort. I've been trying to replicate that part of TerrainManipulator on TrackballManipulator, but I can't quite get it to work (I can't translate the clamping procedure done on Terrain to Trackball without seeing some weird artifacts, and my understanding of 3D geometry is not good enough to start from scratch). Is there an easy way to achieve this? Thanks in advance, Eduard ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org