Re: [osg-users] OSG website unresponsive
Hi All, We've been trying to upgrade the current server config for a long time now, and it can not wait any longer. We have to move the development and the wiki out of the current server, and change subversion for a distributed control version system by the way, hopefully it wil make easy to contribute to OSG's development. About the current wiki, we are using Trac, which is a disaster given the use we are making of it, OSG doesn't need any bug tracker+wiki+source_code_review, we are only using the wiki part so let's move to a proper wiki (if in the future a bug tracker is needed, maybe a dedicated bug tracker will do the work better) From subversion to Git or mercurial, that's not a problem, as an open source project we definitely can use one of the free services out there which are de facto standars for other big open source projects. That will make easier for other to collaborate with OSG, but we can also hang a repository on the new server. About the new server Robert is already paying an external hosting solution (Dreamhost) which is just fine, or at least, an improvement over the current situation, and for a plain wiki it will be just fine. And moreover, it will be under Robert's control all the time, the software can be auto-updated, backed up, and so on. So here is what I would do, if everybody is fine with it: -1st) migrate from subversion to git, probably github, and try to keep all the history and start there the development. -2nd) create a wiki on dreamhost( choose one from the list: http://wiki.dreamhost.com/Available_One_Click_Installs) and let the community help migrating the content from the old server to the new wiki. -3rd) Choose people from the community to be wiki administrators and look after the content. There are other services like the CDash, which currently run just fine right how they are, we could think about them later. Opinions? JL. On Wed, Jan 4, 2012 at 7:16 PM, Chris 'Xenon' Hanson xe...@alphapixel.com wrote: On 1/4/2012 1:35 AM, Norman Vine wrote: The Oregon State University Open Source Lab is the home of growing, high-impact open source communities. Its world-class hosting services http://osuosl.org/services/hosting/ enable the Linux operating system, Apache web server, the Drupal content management system and over 50 other leading open source software projects to collaborate with contributors and distribute software to millions of users globally. http://osuosl.org/ We migrated mucgh of http://osgeo.org there a while ago and have found OSUOSL to be a great outfit to work with :-) That sound promising. Cheers Norman -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. 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 -- Jose L. Hidalgo Valiño (PpluX) http://www.pplux.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG website unresponsive
Hi, -1st) migrate from subversion to git, probably github, and try to keep all the history and start there the development. There is already a osg git mirror: https://github.com/openscenegraph Just to not duplicate work Arne Kreutzmann ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgviewerGTK and Windows 7
Hi, I encountered some problems with the OSG GTK integration on the Windows 7 (64 bit) platform which shows up in the osgviewerGTK example as well. I have a few observations: 1) The OSG viewport renders in the entire GTK Window and not just in the GtkDrawingarea overwriting the other GTK widgets. 2) OSG update performance is very poor and unstable. 3) The same effects show up in 64 and 32 bit builds. What I used is: - Windows 7 64 bit Professional SP1 - MS Visual Studio 10 - Gtkmm 2.22 - OSG 3.0.1 What is wrong and how can we fix this? Regards, Arend. [cid:image0d7f3b.JPG@85b7.48b8ba79][cid:imagec641bb.JPG@cee6ee4e.41befb25] ing. Arend Abbing Software Engineer Maritime Simulation Group MARIN 2, Haagsteeg E a.abb...@marin.nlmailto:a.abb...@marin.nl P.O. Box 28 T +31 317 49 39 11 6700 AA Wageningen F +31 317 49 32 45 T +31 317 49 32 55 The Netherlands I www.marin.nlhttp://www.marin.nl MARIN news: MARIN joins 'Wind Hybrid Coaster' projecthttp://www.marin.nl/web/News/News-items/MARIN-joins-Wind-Hybrid-Coaster-project.htm This e-mail may be confidential, privileged and/or protected by copyright. If you are not the intended recipient, you should return it to the sender immediately and delete your copy from your system. inline: image0d7f3b.JPGinline: imagec641bb.JPG___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] What callback for setting the viewMatrix of the camera every frame?
Okay, thank you for sharing your idea but this solution isn't the best one for my plugin. The main program should change the camera manipulator as it wants. All I want is to adept the view if the camera is too far away from the action. I think all I need to do is to overwrite the viewmatrix right after the view manipulator updates the view matrix but before the frame is rendered, Isn't there a updatecallback or something like this? Thanks again, Sebas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44612#44612 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] MultiTouchTrackballManipulator on windows 7, isMultiTouchEvent() is false
Hi, I am working with osg 3.0.1 on windows 7, with a dual touch screen. I made a modification to the osg example “osgwindows” to use MultiTouchTrackballManipulator. When I step on the code of MultiTouchTrackballManipulator::handle, my touch movement isn’t detected because GUIEventAdapter.isMultiTouchEvent() return false ie touchData.valid() is false. Is MultiTouchTrackballManipulator supported on windows ? Is there any example of the correct use of MultiTouchTrackballManipulator ? Thank you! Hocine -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44271#44271 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Compiling OSG applications on Linux
Hi, I'm interested in using OSG for a project but am having difficulty compiling the example applications. I am running Ubuntu linux and installed the binaries through the package manager and also built the source. I am able to run the osgversion command as the OSG Quick Start Guide instructs but cannot compile an example program. For example, to compile the sample osglogo program, I try running the command: Code: g++ -I/usr/local/include/ -L/usr/local/lib/ -losgViewer -losgDB -losgUtil -losg osglogo.cpp Which is what the Quick Start Guide says to do. I do indeed have the osg header files in the /usr/local/include/osg* directories and library files in /usr/local/lib/libosg*. I also appended /usr/local/lib to my /etc/ld.so.conf file and ran ldconfig, but I am still receiving this lengthy compiler message: Code: /tmp/ccQ8pJfi.o: In function `createWing(osg::Vec3f const, osg::Vec3f const, osg::Vec3f const, float, osg::Vec4f const)': osglogo.cpp:(.text+0x1d): undefined reference to `osg::Geometry::Geometry()' osglogo.cpp:(.text+0x2cb): undefined reference to `osg::Geometry::setVertexArray(osg::Array*)' osglogo.cpp:(.text+0x30e): undefined reference to `osg::Geometry::setNormalArray(osg::Array*)' osglogo.cpp:(.text+0x321): undefined reference to `osg::Geometry::setNormalBinding(osg::Geometry::AttributeBinding)' osglogo.cpp:(.text+0x361): undefined reference to `osg::Geometry::setColorArray(osg::Array*)' osglogo.cpp:(.text+0x374): undefined reference to `osg::Geometry::setColorBinding(osg::Geometry::AttributeBinding)' osglogo.cpp:(.text+0x3c9): undefined reference to `osg::Geometry::addPrimitiveSet(osg::PrimitiveSet*)' osglogo.cpp:(.text+0x3d7): undefined reference to `osgUtil::Tessellator::Tessellator()' osglogo.cpp:(.text+0x3ec): undefined reference to `osgUtil::Tessellator::retessellatePolygons(osg::Geometry)' osglogo.cpp:(.text+0x3fd): undefined reference to `osgUtil::Tessellator::~Tessellator()' osglogo.cpp:(.text+0x47a): undefined reference to `osgUtil::Tessellator::~Tessellator()' /tmp/ccQ8pJfi.o: In function `createTextBelow(osg::BoundingBoxImplosg::Vec3f const, std::basic_stringchar, std::char_traitschar, std::allocatorchar const, std::basic_stringchar, std::char_traitschar, std::allocatorchar const)': osglogo.cpp:(.text+0x4a2): undefined reference to `osg::Geode::Geode()' osglogo.cpp:(.text+0x4eb): undefined reference to `osgText::Text::Text()' osglogo.cpp:(.text+0x524): undefined reference to `osgText::TextBase::setFontResolution(unsigned int, unsigned int)' osglogo.cpp:(.text+0x537): undefined reference to `osgText::TextBase::setAlignment(osgText::TextBase::AlignmentType)' osglogo.cpp:(.text+0x54a): undefined reference to `osgText::TextBase::setAxisAlignment(osgText::TextBase::AxisAlignment)' osglogo.cpp:(.text+0x5ca): undefined reference to `osgText::TextBase::setPosition(osg::Vec3f const)' osglogo.cpp:(.text+0x60b): undefined reference to `osgText::TextBase::setColor(osg::Vec4f const)' osglogo.cpp:(.text+0x61d): undefined reference to `osgText::TextBase::setText(std::basic_stringchar, std::char_traitschar, std::allocatorchar const)' /tmp/ccQ8pJfi.o: In function `createTextLeft(osg::BoundingBoxImplosg::Vec3f const, std::basic_stringchar, std::char_traitschar, std::allocatorchar const, std::basic_stringchar, std::char_traitschar, std::allocatorchar const)': osglogo.cpp:(.text+0x6be): undefined reference to `osg::Geode::Geode()' osglogo.cpp:(.text+0x6cc): undefined reference to `osg::Node::getOrCreateStateSet()' osglogo.cpp:(.text+0x6ea): undefined reference to `osg::StateSet::setMode(unsigned int, unsigned int)' osglogo.cpp:(.text+0x730): undefined reference to `osgText::Text::Text()' osglogo.cpp:(.text+0x769): undefined reference to `osgText::TextBase::setFontResolution(unsigned int, unsigned int)' osglogo.cpp:(.text+0x77c): undefined reference to `osgText::TextBase::setAlignment(osgText::TextBase::AlignmentType)' osglogo.cpp:(.text+0x78f): undefined reference to `osgText::TextBase::setAxisAlignment(osgText::TextBase::AxisAlignment)' osglogo.cpp:(.text+0x7c0): undefined reference to `osgText::TextBase::setCharacterSize(float)' osglogo.cpp:(.text+0x8aa): undefined reference to `osgText::TextBase::setPosition(osg::Vec3f const)' osglogo.cpp:(.text+0x8f1): undefined reference to `osgText::TextBase::setColor(osg::Vec4f const)' osglogo.cpp:(.text+0x903): undefined reference to `osgText::TextBase::setText(std::basic_stringchar, std::char_traitschar, std::allocatorchar const)' osglogo.cpp:(.text+0x916): undefined reference to `osgText::Text::setBackdropType(osgText::Text::BackdropType)' osglogo.cpp:(.text+0x929): undefined reference to `osgText::Text::setBackdropImplementation(osgText::Text::BackdropImplementation)' osglogo.cpp:(.text+0x93d): undefined reference to `osgText::Text::setBackdropOffset(float)' osglogo.cpp:(.text+0x984): undefined reference to `osgText::Text::setBackdropColor(osg::Vec4f const)' osglogo.cpp:(.text+0x997): undefined
Re: [osg-users] Compiling OSG applications on Linux
Amar Dinsa writes: Hi, I'm interested in using OSG for a project but am having difficulty compiling the example applications. I am running Ubuntu linux and installed the binaries through the package manager and also built the source. I am able to run the osgversion command as the OSG Quick Start Guide instructs but cannot compile an example program. For example, to compile the sample osglogo program, I try running the command: Code: g++ -I/usr/local/include/ -L/usr/local/lib/ -losgViewer -losgDB -losgUtil -losg osglogo.cpp Be careful — if you installed OSG through Ubuntu's package manager, OSG headers are installed in /usr/include, and libraries under /usr/lib. No need to mess with ld.so.conf, nor specify directories at compile time. Since you have those headers in /usr/local, I guess they are left from an older compilation from source. Don't mix them! In your case, you lack some libraries, specially the core one, -losg. Keep adding libraries -losgText,... until the link errors are gone. Which is what the Quick Start Guide says to do. I do indeed have the osg header files in the /usr/local/include/osg* directories and library files in /usr/local/lib/libosg*. I also appended /usr/local/lib to my /etc/ld.so.conf file and ran ldconfig, but I am still receiving this lengthy compiler message: Code: /tmp/ccQ8pJfi.o: In function `createWing(osg::Vec3f const, osg::Vec3f const, osg::Vec3f const, float, osg::Vec4f const)': [...] Regards, -- Alberto ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG website unresponsive
On 5 January 2012 09:30, Arne Kreutzmann m...@arne-kreutzmann.de wrote: There is already a osg git mirror: https://github.com/openscenegraph Does anyone know who is currently the maintainer of github.com/openscenegraph? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG website unresponsive
Hi J.L, I see that openscenegraph.org is back responding so thanks for getting the present server back on it's feet. How much time do we have with the current servers before we things might start to become unmaintainable? What about your own availability with helping out with migrations? So here is what I would do, if everybody is fine with it: -1st) migrate from subversion to git, probably github, and try to keep all the history and start there the development. I'm relatively happy with github, however, right now I don't know who's the current maintainer of the github/openscenegraph, we'll need to take over admin of this. With the migration there are other projects on the openscenegraph.org subversion that we'd need to migrate as well. -2nd) create a wiki on dreamhost( choose one from the list: http://wiki.dreamhost.com/Available_One_Click_Installs) and let the community help migrating the content from the old server to the new wiki. A question to yourself and everyone else - what wiki's would be best? Mediawiki? I don't have much experience with wiki's outside the OSG's website onces so would very much welcome feedback from others that have maintained and contributed to other wiki's. -3rd) Choose people from the community to be wiki administrators and look after the content. Hands up if you think you can help out? There are other services like the CDash, which currently run just fine right how they are, we could think about them later. I guess if needed we could migrate back to using cdash and pay for the service. I don't recall the costs/arrangements, does anyone remember this? I don't see cdash on the dreamhost list so I'd expect that we wouldn't be able to provide this. Robert. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG website unresponsive
If we're unable to find the owner of the github account, I'm sure that Github support could give you control over it... since it's just a mirror of SVN commits right now I'd think that it would be a nonissue to give the actual project control over the account to use it.. https://github.com/contact -Matthew On Thu, Jan 5, 2012 at 8:42 AM, Robert Osfield robert.osfi...@gmail.com wrote: Hi J.L, I see that openscenegraph.org is back responding so thanks for getting the present server back on it's feet. How much time do we have with the current servers before we things might start to become unmaintainable? What about your own availability with helping out with migrations? So here is what I would do, if everybody is fine with it: -1st) migrate from subversion to git, probably github, and try to keep all the history and start there the development. I'm relatively happy with github, however, right now I don't know who's the current maintainer of the github/openscenegraph, we'll need to take over admin of this. With the migration there are other projects on the openscenegraph.org subversion that we'd need to migrate as well. -2nd) create a wiki on dreamhost( choose one from the list: http://wiki.dreamhost.com/Available_One_Click_Installs) and let the community help migrating the content from the old server to the new wiki. A question to yourself and everyone else - what wiki's would be best? Mediawiki? I don't have much experience with wiki's outside the OSG's website onces so would very much welcome feedback from others that have maintained and contributed to other wiki's. -3rd) Choose people from the community to be wiki administrators and look after the content. Hands up if you think you can help out? There are other services like the CDash, which currently run just fine right how they are, we could think about them later. I guess if needed we could migrate back to using cdash and pay for the service. I don't recall the costs/arrangements, does anyone remember this? I don't see cdash on the dreamhost list so I'd expect that we wouldn't be able to provide this. Robert. Robert. ___ 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] osg-users Digest, Vol 54, Issue 23
Hi Ebru, Could you please send posts directly to osg-users@lists.openscenegraph.org rather than replying to digest as doing a reply just includes all the posts from the digest and has completely irrelevant topic to what you want to talk about. Put both things together and the chance of you getting a reply goes down significantly. On 22 December 2011 05:12, Ebru Arslan earslan2...@gmail.com wrote: How i can load large elevation terrain using with osg . and i have sky box problem when i try to load different terrain. how i can solve? please give some sample.. You question is rather open ended, there many many ways to do terrain with the OSG, how you want to go about it will depend on your needs and the data you have to use. You don't mention anything about what you actually what to do so it's rather hard to point you anything specific. There is the osgTerrain NodeKit, VirtualPlanetBuilder tool for generting paged databases, the osgterrain example Go into details is pointless as you needs are so unspecific. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] [build] building osgAndroidExampleGLES* on Ubuntu 10.04 with android-ndk-r7
Hi Jon, I haven't tried the building with Android/NDK so can't provide specific advice. It might be that we need to expose some extra variable via CMake to allow you to customize it or have our CMake make better guess at the settings. What I can say is that merging changes that are tailored to a specific users directory on their machine won't cut it so you diff is inappropriate as it stands. Robert. On 19 December 2011 00:10, Jon Bohren m...@jbohren.com wrote: I followed the instructions on the wiki for building the android osg examples, but with ndk7 I kept getting linker errors for anything in libstdc++ until I added another libdir (android-ndk/sources/cxx-stl/gnu-libstdc++/libs/armeabi) to the linker flags. Is this a known problem / is this the correct solution / should this fix go into trunk? See the diff to Android.mk below: Code: Index: jni/Android.mk === --- jni/Android.mk (revision 12892) +++ jni/Android.mk (working copy) @@ -4,7 +4,7 @@ LOCAL_MODULE := osgNativeLib ### Main Install dir -OSG_ANDROID_DIR := type your install directory +OSG_ANDROID_DIR := /home/jbohren/source/OpenSceneGraph LIBDIR := $(OSG_ANDROID_DIR)/obj/local/armeabi ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) @@ -62,6 +62,7 @@ -losgAnimation \ -losgUtil \ -losg \ --lOpenThreads +-lOpenThreads\ +-L/usr/local/android/android-ndk/sources/cxx-stl/gnu-libstdc++/libs/armeabi include $(BUILD_SHARED_LIBRARY) Thanks! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44414#44414 ___ 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] OSG website unresponsive
On 1/5/2012 9:42 AM, Robert Osfield wrote: There are other services like the CDash, which currently run just fine right how they are, we could think about them later. I guess if needed we could migrate back to using cdash and pay for the service. I don't recall the costs/arrangements, does anyone remember this? I don't see cdash on the dreamhost list so I'd expect that we wouldn't be able to provide this. If you have a VPS account and your own non-shared IP, you should be able to do pretty much whatever you want. I see some indication of people having tried installing CDash on DH, but no conclusive evidence of success. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. 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] Writing to the Depth Buffer (Kinect)
Hi Sam, On 12 December 2011 22:35, Sam Corbett-Davies samcorbettdav...@gmail.com wrote: I am working on an augmented reality project using the Kinect. I am trying to occlude geometry based on the depth image produced by Kinect. To do this I thought I'd write the depth image (after scaling the depth values appropriately) to the depth buffer. It looks as though I'd use glDrawPixels() with GL_DEPTH_COMPONENT if I was doing it in OpenGL, but how do I achieve this in OSG? I'm also open to a better way of using the Kinect to occlude geometry if anyone has any ideas. Using an osg::Image attached osg::Texture2D, then render this texture to a full window quad and have a shader read the texture and write the result to the depth buffer using a shader that sets the gl_FragDepth. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG website unresponsive
Hi, I would vote for migrating to mercurial; it's well support on all platforms, unlike git is mostly for linux. Thank you! Cheers, Long -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44625#44625 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Issues when creating seamless panorama using multiple cameras with arbitrary FOVs
Hi Adam, The osgViewer library is designed to handle your usage model seemlessly. What you describe is a single conceptual view, made up a series of viewports with a camera assigned to each one. The way this is implemented is to have a osgViewer::View with a single master osg::Camera that controls the overall view direction, then a series of slave osg::Camera, each with it's own osg::Viewport, each of these slave Camera can have it's own osg::GraphicsWindow (subclassed from osg::GraphicsContext) or sharing a single GraphicsWindow between them if you want them all on the same window. Each View has it's own CameraManipulator which manages it's masters Camera::ViewMatrix, but you can set the ViewMatrix yourself directly if you wish. The slave Camera all have a projection and view offset matrix that changes they view relative to their parent ViewMatrix. The osgcamera and osgwindows example illustrates. For you usage you just need a single View, so using osgViewer::Viewer is the simplicist thing to use as it inherits directly from osgViewe::View so provides all the master Camera and slave Camera functionality that you need. The offsets of the different slave Camera then just need to be computed appropriately. The osgcamera and osgwindows examples illustrate how you can do this. Robert. On 27 December 2011 19:34, Adam Bruce apalan...@gmail.com wrote: Hi all, I'm (very) new to OSG, though do have some prior graphics experience (which could use brushing up, I'll admit). However, I just can't seem to determine the best solution to this problem. I'm working on an application where, in one window, an aircraft HUD view is being rendered. Originally, a single osg::Viewer with one camera was being used, which works fine. However, I'm trying to implement what are essentially peripheral views which are rendered to the same viewport as the same view, on the left and right sides (I'm not using a single camera as these peripheral views will be compressed horizontally and will allow the user to set an arbitrary FOV for these views, stretching up to 180 degrees across all three views). There is no issue with this part, per se - the problem arises from the fact that there are jarring issues at the seams between viewports. Objects which are partially drawn on each viewport have slight, though very clear, slight issues in offset and scale, such that when they're crossing the boundary, scale and immersion is broken. I've attempted two solutions to compare them. Currently, all views have the same field of view and are drawn with equal size in the viewport. In one method, I add two slave cameras to the viewer, which has its rotation set via a manipulator (this was the implementation before I started the project) with a view offset rotation of +/- main camera's horizontal field of view about the Y-axis (gained by multiplying the vertical FOV by the aspect ratio, all retrieved via getProjectionMatrixAsPerspective()) passed in as an argument. From my understanding, as the main camera's view matrix is post-multiplied by the slave's offset to get the final slave view matrix, this should be a rotation about the local axis and give the correct result. In fact, in this case, not only is there a slight scale/position issue, but there are odd issues with the angle of the horizon getting slightly more off as the roll increases (though the rotation itself seems to be about the correct axis, and tests with other axes are proven to be definitely incorrect). I've used both matrix and quaternion rotations in case there are precision/accuracy differences with no change in results. I've taken a look at setUpViewFor3DSphericalDisplay() which seems to use a very similar method (though I don't quite get the rotation about the Z-axis). In my other (naive, first) implementation, I use a composite viewer with three identical cameras each with their own manipulator, set each to identical rotations each frame, and calculate pitch and azimuth offsets for the peripheral views based on the aircraft roll which is also calculated each frame. This actually seems to work better than the single viewer solution, but is not what I want and certainly doesn't seem to be the correct solution. I'll add code if/when I can (need to clean it up quite a bit, as I've tried this about twenty different ways) and will add information as often as I can. Thanks for any help you can give! -Adam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44488#44488 ___ 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] hard-coded application name osgViewer
Hi Thorsten, This is the first time I've seen mention of this issue, so resource name and class available to set is not something that we've previously discussed. One would either need to extend GraphicsContext::Traits to include the names, or have GraphicsWindowX11 have API for settings this. As the looks to be an X11 specific issue I'd suggest doing the later, but I would imagine that resources is something that other windowing systems would probably use as well. I'm open to suggests about how best to resolve this issue, Robert. On 31 December 2011 12:01, ThorstenB bre...@gmail.com wrote: Hi, OSG currently only allows to set the name of a specific window (GraphicsWindowX11::setWindowName), but it hard-codes the X11 application name to osgViewer. On GNOME3 desktops this results in the main status bar always displaying osgViewer whenever any window of an OSG-based application is active. Obviously I would like to set and see the actual name of my own application instead. You can see a screen shot of the issue in the bug report here: http://code.google.com/p/flightgear-bugs/issues/detail?id=554 The name originates from GraphicsWindowX11.cpp: // Give window a class so that user preferences can be saved in the resource database. XClassHint clH; clH.res_name = (char *)OSG; clH.res_class = (char *)osgViewer; XSetClassHint( _display, _window, clH); This also means that all OSG-based applications share the same user preferences (whatever is saved there). Wouldn't it make sense to make the name(s) configurable? At least the application name (osgViewer), maybe also the class (OSG)? Note that there is a difference between the application name and the name of a specific window. The latter is shown in the title bar of the specific window itself (I guess every platform/window manager does that). But prior to GNOME3 I wasn't aware of places where the actual application name, which is shared by all windows of a single application, was displayed. But this name is certainly displayed most prominently on latest GNOME desktops. Oh, and have happy New Year! Thorsten ___ 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] OSG on OpenGL 3: Example code and cookbook
Happy New Year Paul ;-) On 31 December 2011 22:05, Paul Martz pma...@skew-matrix.com wrote: Happy New Year, everyone -- Attached is source code that demonstrates OSG rendering using an OpenGL 3.x context. At the bottom of the source is a comment block describing how to build OSG for OpenGL 3.x. Thanks for this. Do you feel it'd be appropriate to have this as an one of the OpenSceneGraph/examples? Cheers, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] StateSet and Text, state sets may be shared inadvertently
Hi Juan, osgText::Text is a special case in that the way the text is rendered is using textures and to for best performance and memory usage you need to share these textures, and also share the rest of the text state as well. If you want to decorate the Text with your custom StateSet than it's best to place it on a Geode above the Text object. Robert. On 4 January 2012 17:31, Juan Hernando jherna...@fi.upm.es wrote: Dear all, Trying to use different StateSet with different osgText::Text objects it happens that all text objects transparently may share the same StateSet depending on how the state sets are created. Image that we have two text objects t1 and t2, then the following calling sequences behave as follows: Case 1 t1-getOrCreateStateSet() // t2 with the default empty state set t1 will have a new StateSet and t2 will inherit it from its parent. Case 2 t1-getOrCreateStateSet() t2-getOrCreateStateSet() Both texts will use the same state Case 3 t1-setStateSet(a_state) t2-getOrCreateStateSet() Each object will have its own state. Case 4 t1-getOrCreateStateSet() t2-setStateSet(a_state) Each object will have its own state. Case 5 t1 // created first no stateset assigned t2-getOrCreateStateSet() Both texts will use the same state While it may make sense, it seems a bit weird to me. If this is the expected behaviour I couldn't find where does it say so in the reference. Is it actually supposed to work like that and what is the reason behind it? Thanks and regards, Juan PS I attach a simple program in case someone wants to verify my statements. ___ 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] What callback for setting the viewMatrix of the camera every frame?
Hi Sebas, If you do want the result of the camera manipulator simply don't attach one to your viewer and then just set the Camera's ViewMatrix on each frame. i.e. osgViewer viewer; viewer.setSceneData(osgDB::readNodeFile(cow.osg)); viewer.realize(); while(!viewer.done()); { viewer.setViewMatrix(myViewMatrix); viewer.frame(); } Robert. On 3 January 2012 12:42, Sebas Walther sebas.walt...@googlemail.com wrote: Hi, I am trying to write a plugin for an osg-based application with an TrackballManipultor for the camera. It is no problem to get und set the camera's viewmatrix of the main application if I do not use a camera manipulator like the TrackballManipulator. But how is it possible to change the viewmatrix every frame WITH an attached camera manipulator? I was wondering if this is possible without writing an own camera manipulator. My idea is to change the viewmatrix AFTER the camera manipulator sets the viewmatrix, so that my changed viewmatrix is used for rendering instead of the viewMatrix the camera manipulator sets. Therefore I tried to attach callbacks to the camera. Problem is I am not sure which callback I have to use. I already tried an initialDrawCallback and an updateCallback. Both callbacks are called and they also change the viewMatrix but the cameraManipulator seems to overwrite the viewMatrix every frame. The callbacks are attached to the camera with the methods setUpdateCallback() or setInitialDrawCallback. Code: ...-getViewerCamera()-setUpdateCallback(new MyNodeCallback()); ...-getViewerCamera()-setInitilDrawCallback(new MyInitialDrawCallback()); I am sure that my callbacks are working. Did I try the wrong callbacks? Which callback is the right one for my purpose? Thank you very much! Cheers, Sebas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44542#44542 ___ 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] OSG website unresponsive
Hi robert, Am 05.01.12 17:42, schrieb Robert Osfield: I'm relatively happy with github, however, right now I don't know who's the current maintainer of the github/openscenegraph, we'll need to take over admin of this. If you have a github account, just drop him a message. He's quite responsive, when the repos was stuck in the past. But I can't recall his name :) If you want, i can drop him a message. cheers, Stephan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] MultiTouchTrackballManipulator on windows 7, isMultiTouchEvent() is false
Hi, Am 07.12.11 16:10, schrieb Hocine Zanzibar: Is MultiTouchTrackballManipulator supported on windows ? Is there any example of the correct use of MultiTouchTrackballManipulator ? AFAIK multitouch support is missing for Win 7. You'll have to add support for multitouch to GraphicsWindowWin32. Cheers, Stephan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Writing to the Depth Buffer (Kinect)
Thanks guys, I ended up using a fragment shaders which was a new experience for me. Ran into a loss of precision problem as the Kinect produces a 16-bit depth image but when stored as GL_DEPTH_COMPONENT each RGB channel only has 8-bits of precision in the shader. I ended up having to store it with internal format GL_RGB5_A1 and datatype GL_UNSIGNED_SHORT_5_5_5_1 (any other 16-bit format/datatype pair would do) and manually unpack it in the shader to get the full precision. Cheers Sam -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44634#44634 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG website unresponsive
Hi Stephan, On 5 January 2012 17:51, Stephan Huber ratzf...@digitalmind.de wrote: If you have a github account, just drop him a message. He's quite responsive, when the repos was stuck in the past. But I can't recall his name :) If you want, i can drop him a message. I don't have an account yet, could you drop him a message and get him to pitch in with this thread. Thanks, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Writing to the Depth Buffer (Kinect)
Hi Sam, On 5 January 2012 19:19, Sam Corbett-Davies samcorbettdav...@gmail.com wrote: Thanks guys, I ended up using a fragment shaders which was a new experience for me. Ran into a loss of precision problem as the Kinect produces a 16-bit depth image but when stored as GL_DEPTH_COMPONENT each RGB channel only has 8-bits of precision in the shader. I ended up having to store it with internal format GL_RGB5_A1 and datatype GL_UNSIGNED_SHORT_5_5_5_1 (any other 16-bit format/datatype pair would do) and manually unpack it in the shader to get the full precision. Standard OpenGL doesn't have the high precision types so have a look at the extensions, I'm afraid I don't recall them off the top of my head so you'll need to go have a look at OpenGL extension docs. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgviewerQt crash in OSG 3.0.1
Hi Bob, I don't know if the fix in svn/trunk (applied since 3.0.1) will address this issue, but it might be worth trying out: http://www.openscenegraph.org/projects/osg/changeset/12807/OpenSceneGraph/trunk/src/osgQt/GraphicsWindowQt.cpp Before you test this you could run osgviewerQt cow.osg --SingleThreaded To see if the crash might be related to multi-threading. Robert. On 18 December 2011 18:02, GeeKer Wang wwthu...@gmail.com wrote: I tried to compile OSG 3.0.1 in Fedora 14, and the Qt version is 4.7.4。 When I executed osgviewerQt cow.osg, a window flashed by, and the program crashed: osgviewerQt: xcb_io.c:140: dequeue_pending_request: Assertion `req == dpy-xcb-pending_requests' failed. Aborted (core dumped) When debugging osgviewerQtd with gdb, I get another error: osgviewerQt: xcb_io.c:559: _XReply: Assertion `(((long) (req-sequence) - (long) (dpy-request)) = 0)' failed. The backtrace looks like: #0 0x00110416 in __kernel_vsyscall () #1 0x00cba2f1 in raise () from /lib/libc.so.6 #2 0x00cbbd5e in abort () from /lib/libc.so.6 #3 0x00cb2c08 in __assert_fail () from /lib/libc.so.6 #4 0x0143e71b in _XReply () from /usr/lib/libX11.so.6 #5 0x03335b93 in ?? () from /usr/lib/libGL.so.1 #6 0x033340ad in ?? () from /usr/lib/libGL.so.1 #7 0x0338fd32 in ?? () from /usr/lib/dri/r300_dri.so #8 0x03390a86 in ?? () from /usr/lib/dri/r300_dri.so #9 0x03440368 in ?? () from /usr/lib/dri/r300_dri.so #10 0x03440554 in ?? () from /usr/lib/dri/r300_dri.so #11 0x0339025a in ?? () from /usr/lib/dri/r300_dri.so #12 0x0338d628 in ?? () from /usr/lib/dri/r300_dri.so #13 0x03334e72 in ?? () from /usr/lib/libGL.so.1 #14 0x03315e55 in glXMakeCurrentReadSGI () from /usr/lib/libGL.so.1 #15 0x03315ecc in glXMakeCurrent () from /usr/lib/libGL.so.1 #16 0x0799a130 in QGLContext::makeCurrent() () from /usr/lib/libQtOpenGL.so.4 #17 0x0792208b in QGLWidget::makeCurrent() () from /usr/lib/libQtOpenGL.so.4 #18 0x004d423c in osgQt::GraphicsWindowQt::makeCurrentImplementation() () from /home/pkuwwt/Programs/osg301-build/lib/libosgQt.so.80 #19 0x00958a47 in osg::GraphicsContext::makeCurrent() () from /home/pkuwwt/Programs/osg301-build/lib/libosg.so.80 #20 0x009629eb in osg::GraphicsThread::run() () It seems that there is something wrong with osgQt,because OSG works fine with Qt4.7.4 in OSG2.8.4 without osgQt. May be there are some compiling problems. Any advices? -- Bob ___ 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] Shadow Traversal Mask
Hi Sajjadul, On 21 December 2011 01:43, Sajjadul Islam dosto.wa...@gmail.com wrote: I used to know that shadow mapping is view-dependent. You have ViewDependentShadowTechnique as a subclass of the shadow technique and in turn DebugShadowMap subclass of ViewDependentShadowTechnique. The new ViewDependentShadowMap technique written by is me isn't related to the older ViewDependentSadowTechnique/DebugShadowMap collection of classes. The new ViewDependentShadowMap class inherits directly from ShadowTechnique. I would not recommend getting too engrosed in the old ViewDependentSadowTechnique related classes as they over complicate things significantly. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] computeIntersections performance
Hi Dakota, Without knowing more about your model we can't say too much about what is actually causing the performance to be so poor. KdTree normally help with intersection performance in a massive way, and will typically be hundreds or even thousands of times faster depending on the nature of the model. Since you aren't getting speed and slow in the first place I can't help wonder if there isn't something particular about your model that is causing problem. Could it be that you have many long thin triangles in your scene? Run you model with osgviewer and bring up the on screen stats by pressing 's' three times - the will list the scene stats. How many geometry, primitives and vertices do you have in the scene? Robert. On 14 December 2011 09:40, Jen Hunter jenr...@web.de wrote: Hi, I'm curious about the time it takes to do intersection testing. I have roughly 800 Image points that I need to check for intersection with my model. My model isn't really complicated, it's basically just a huge box with a few rectangular elements that stand out a bit. It was created using Sketchup and is in Collada file format. I use the method computeIntersections. I'm working with OSG 2.8.2. However, even with kdtree support it takes about 120 to 190 ms to test for the 800 intersections. Without kdtrees it takes up to above 400 ms. I'm confused that it varies so much when the setup of the scene I tested was always the same. I am by no means an expert in computer graphics, so I ask you. Is it normal that it takes so long even for kdtrees, or is it likely that I do something terribly wrong? Thank you! Cheers, Dakota -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44379#44379 ___ 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] OpenThreads Question: suspending threads
Hi Bart, OpenThreads doesn't have support for a an external thread suspending another. The only way you could implement such a feature would be to do it co-operatively i.e. have a check for the need for a barrier in the threads. You'd only ever get the threads to pause at this synchronization points, but it would at least give you something close to the behavior you are after. Robert. On 13 December 2011 16:22, bart gallet bartgal...@hotmail.com wrote: Howdy all, Is there an easy and graceful way to temporarily suspend a selected number of threads, and then resume them some later time? I have a have a couple of vehicle simulations running in separate threads that drive various 3D vehicle objects (position and attitude) in the scene graph, and these simulations run at a much higher rate than the rate at which I call viewer::frame(). Because I am doing a number of off-screen post renders followed by the main viewer's rendering, and its very important that all drawing is performed at the same instant in simulated time, hence I would like to suspend all my simulation threads just before I call viewer::frame(), and then resume them as soon as I return. I guess what I need is the opposite of a condition. Can I use OpenThreads::Block for this? (All my threading objects are derived from OpenThreads::Thread) Thank you! Cheers, bart -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44362#44362 ___ 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 create flare or Shining star with OSG
Hi Tolga, Would a point sprite be sufficient? See osgpointsprite example. Robert. On 9 December 2011 12:19, Tolga Yilmaz tolgam...@hotmail.com wrote: Hi, I am a newbie to osg and developing a flight simulation. For some reason i have to create a chaff flare just like an F-16 throws. It should be too bright but doesnt has to lighten another objects in the scene. Smoke trail, animation path etc. and other effects are easy to do but the flaring part that i just dont have any idea. How could i do this? Thank you! Cheers, Tolga -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44305#44305 ___ 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] [osgPlugins] TIFF Plugin not threadsafe?
Hi Christian, Do you come across any discussion online about thread safety of libtiff? Have you got any further in resolving this issue? I have lots of stuff in intray to deal with so can't personally chase up the issue right away so would appreciate if you can make some headway on. Cheers, Robert. On 3 December 2011 15:16, Christian Ehrlicher ch.ehrlic...@gmx.de wrote: Hello, I'm experiencing crashes when I try to read tiff images / textures with osg. When I use other image formats all seems to work fine. Since I'm using a lot of threads I came to the conclusion that there's maybe a threading problem inside ReaderWriterTIFF.cpp. So I wrote a small testcase (see attachment, needs Qt) and valgrind --tool=helgrind gives me thisi answer: Code: ==20491== Possible data race during read of size 4 at 0x128e6270 by thread #4 ==20491== at 0x126E2518: simage_tiff_load(std::istream, int, int, int, unsigned short) (ReaderWriterTIFF.cpp:748) ==20491== by 0x126E3BF4: ReaderWriterTIFF::readImage(std::string const, osgDB::Options const*) const (ReaderWriterTIFF.cpp:793) ==20491== by 0x4EEB3DD: osgDB::Registry::ReadImageFunctor::doRead(osgDB::ReaderWriter) const (Registry.cpp:908) ==20491== by 0x4EE67C8: osgDB::Registry::read(osgDB::Registry::ReadFunctor const) (Registry.cpp:1103) ==20491== by 0x4EE76CA: osgDB::Registry::readImplementation(osgDB::Registry::ReadFunctor const, osgDB::Options::CacheHintOptions) (Registry.cpp:1277) ==20491== by 0x4EE7D44: osgDB::Registry::readImageImplementation(std::string const, osgDB::Options const*) (Registry.cpp:1355) ==20491== by 0x4EDBA30: osgDB::readImageFile(std::string const, osgDB::Options const*) (Registry:231) ==20491== by 0x4019AB: MyThread::run() (in /home/chehrlic/tds/osg-build-desktop-Qt_aus_PATH_Release/osg) ==20491== by 0x68FC024: QThreadPrivate::start(void*) (qthread_unix.cpp:331) ==20491== by 0x4C2A63D: ??? (in /usr/lib64/valgrind/vgpreload_helgrind-amd64-linux.so) ==20491== by 0x6D1BF04: start_thread (in /lib64/libpthread-2.14.1.so) ==20491== by 0x778153C: clone (in /lib64/libc-2.14.1.so) ==20491== This conflicts with a previous write of size 4 by thread #2 ==20491== at 0x126E21E1: simage_tiff_load(std::istream, int, int, int, unsigned short) (ReaderWriterTIFF.cpp:652) ==20491== by 0x126E3BF4: ReaderWriterTIFF::readImage(std::string const, osgDB::Options const*) const (ReaderWriterTIFF.cpp:793) ==20491== by 0x4EEB3DD: osgDB::Registry::ReadImageFunctor::doRead(osgDB::ReaderWriter) const (Registry.cpp:908) ==20491== by 0x4EE67C8: osgDB::Registry::read(osgDB::Registry::ReadFunctor const) (Registry.cpp:1103) ==20491== by 0x4EE76CA: osgDB::Registry::readImplementation(osgDB::Registry::ReadFunctor const, osgDB::Options::CacheHintOptions) (Registry.cpp:1277) ==20491== by 0x4EE7D44: osgDB::Registry::readImageImplementation(std::string const, osgDB::Options const*) (Registry.cpp:1355) ==20491== by 0x4EDBA30: osgDB::readImageFile(std::string const, osgDB::Options const*) (Registry:231) ==20491== by 0x4019AB: MyThread::run() (in /home/chehrlic/tds/osg-build-desktop-Qt_aus_PATH_Release/osg) ==20491== The related piece of code is Code: currPtr = buffer + (h-1)*w*format; tifferror = ERR_NO_ERROR; // line 526 switch (pack(photometric, config)) And tifferror is a static variable which is accessed without a mutex (which would also be wrong - the variable needs to be in the TLS). Is my observation correct? And If so - can someone fix it for me? ;-) /add Looks like TiffSetError/WarningHandler needs also a mutex (Line 526 + 527) - at least valgrind complains about a problem there too (inside tiff library). -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44204#44204 Attachments: http://forum.openscenegraph.org//files/osg_tifftar_197.gz ___ 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] Using the FBO to access and potentially modify pixels
Hi Sam, Can you post processing on the pixels be done entirely on the GPU? If so then the best way would be to render the entire scene to a FBO and then re-render this FBO's texture with your post-processing shader. This will result in much better performance than if you have to fallback to using a glReadPixels and doing processing on the CPU as the later will require a round trip to the GPU and stall the graphics pipeline in the process. Robert. On 30 November 2011 23:47, Sam James itsmike...@verizon.net wrote: Hi all, I'm fairly new to osg and graphics programming in general, so please bear with me :) I am looking to retrieve the pixels from my scene after everything (except the post processing/overlay stuff) has been rendered. I need to get this every frame to perform some simple image analysis of the scene which then will effect how the final frame is displayed. The main catch is I need this to be fast so that I don't take any major performance hits. I plan to use a PostDrawCallback, but does the FBO allow me to avoid calling glReadPixels or speed it up at all? If so how do I set it up to do so? Or are there any other ways to avoid copying to main mem? Also, after the PostDrawCallback is it possible to still use a frag shader to modify the scene after I perform my analysis, or do I have to modify the pixels in my callback function? Any suggestions or advice is greatly appreciated. Thanks -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44151#44151 ___ 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 clone() on class derived from osg::Geometry and osg::MatrixTransform
Hi Peter, I think you question is really about overriding virtual methods in C++, but I'm not sure. If call geometry-clone() and the geometry object is an instance of PiFaceGeometry then the clone method called will be PiFaceGeometry::clone() even if the geometry pointer you have is of the parent class osg::Geometry. i.e. PiFaceGeometry* myFaceGeometry = new PiFaceGeometry; Geometry* geometry = myFaceGeometry; geometry-clone(); // will call PiFaceGeometry::clone(). Robert. On 30 November 2011 12:18, Peter Bako bakopet...@gmail.com wrote: Hello guys! I have run a search over the topics, but I didn't find an answer for my question, so here it is: I have my own derived class called PiFaceGeometry, which is derived from osg::Geometry class, I use this to work with faces of solids - so I have the type of face - cylinder, plane, and other which I store within this class and also some other properties. I have a different class called SolidComponent, which is derived from osg::MatrixTransform and represent machinery workpieces and tools. The problem is that sometimes I need to clone the SolidComponent (which contains Geode as child with PiFaceGeometries, and can also contain other SolidComponents as children). I think, I need a deep copy, because sometimes I have to change the color of triangles, or am I wrong? The question is, how should I reimplement the clone() function? I looked also into the osg source code but I didn't understand the way, how to do this. How can I force the program to call PiFaceGeometry::clone() if this is only a child of object, on which I called clone()? I am sorry If this question is silly, I am not a good C++ programmer and I hate C++ :-P. Thank you for your responses! Cheers, Peter Code: class PiFaceGeometry: public osg::Geometry { public: osg::ref_ptrosg::IntArray edges; PiSurfaceType surfType; void changeFaceColor(osg::Vec4 color){...}; PiFaceGeometry * clone(const osg::CopyOp copyop ){ //how can I reuse Geometry::Clone(), if it returns a Geometry but I need PiFaceGeometry? } }; -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44132#44132 ___ 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] SharedStateManager usage in Registry
Hi Roccardo, osgDB::Registry is the low level hooks for all the plugins so doesn't attempt to wrap up too much high level functionality. If you wish to apply the SharedStateManager to all model calls you could write a custom Registry::ReadFileCallback that loads a model then does the share on it. Robert. On 21 December 2011 14:59, Riccardo Corsi riccardo.co...@kairos3d.it wrote: Hi All, in the attempt of enabling texture sharing when loading a scene at application startup, I've tried to use the SharedStateManager class as suggested in other posts, creating an instance of it in the Registry via: Registry::instance()-getOrCreateSharedStateManager() But after checking the code I've realized the SharedStateManager is used only by the DatabasePager when merging new subgraphs, and not by the Registry itself in methods like readNode()/Image/etc... which means that direct calls to load new objects don't make use of the state sharing. Is this the intended behaviour? I'd have expected that installing a sharing manager into the Registry would have influenced all calls that load some resource. Of course the workaround is to add somewhere an explicit call to SharedStateManager-share(), but I wanted to understand why the sharing mechanism is not used by the Registry automatically. Thank you, Ricky ___ 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] Fwd: Ambient Occlusion Implementation 2 review
Hi Adrian, Just a little note as I fly through my backlog on osg-users messages. I still don't have time to dive in with this new technique, please don't let me forget it though. I'm likely to be mostly handling my backlog of osg-submissions and doing office admin work this month as I've had to put off so much of this work in the last six months due back to back client work. I do still have some client work to do this month, but thankfully not overloaded so far so I'm hopefully of getting through my backlog, once I have place chase me if I haven't already dived in. In the meantime everyone else is welcome to dive in and provide you with feedback ;-) Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] computeIntersections performance
Robert, I've also seen minimal speedup with KdTree usage (in my case with terrain). Is there an example where this feature (KdTree usage) is employed? Perhaps the way it's being used (at least by me) isn't correct... -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Thursday, January 05, 2012 1:14 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] computeIntersections performance Hi Dakota, Without knowing more about your model we can't say too much about what is actually causing the performance to be so poor. KdTree normally help with intersection performance in a massive way, and will typically be hundreds or even thousands of times faster depending on the nature of the model. Since you aren't getting speed and slow in the first place I can't help wonder if there isn't something particular about your model that is causing problem. Could it be that you have many long thin triangles in your scene? Run you model with osgviewer and bring up the on screen stats by pressing 's' three times - the will list the scene stats. How many geometry, primitives and vertices do you have in the scene? Robert. On 14 December 2011 09:40, Jen Hunter jenr...@web.de wrote: Hi, I'm curious about the time it takes to do intersection testing. I have roughly 800 Image points that I need to check for intersection with my model. My model isn't really complicated, it's basically just a huge box with a few rectangular elements that stand out a bit. It was created using Sketchup and is in Collada file format. I use the method computeIntersections. I'm working with OSG 2.8.2. However, even with kdtree support it takes about 120 to 190 ms to test for the 800 intersections. Without kdtrees it takes up to above 400 ms. I'm confused that it varies so much when the setup of the scene I tested was always the same. I am by no means an expert in computer graphics, so I ask you. Is it normal that it takes so long even for kdtrees, or is it likely that I do something terribly wrong? Thank you! Cheers, Dakota -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44379#44379 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Using custom shaders with osgParticle
Hi, I need to render the particles using a custom shader that includes a special lighting system that I'm using. If I can just get the Particle System to pay attention to the shader that I wrote, I think everything will be dandy. However, I am having some trouble with this, and I am hoping for some insight. In order to test this, I wrote a simple shader program with a fragment shader that outputs the color red. There is no vertex or geometry shader. This way, if I'm using the shader program correctly, I should see flat red particles. If I'm using the shader program incorrectly, depending on the problem, I'll either see black particles, or invisible particles, or perhaps particles that look as if they're being rendered without shaders (i.e., how they looked before I embarked on this task). The first thing I tried is to simply follow the osgparticleshader example, without using my red shader at all, just to see if I could get particles working with shaders. Unfortunately, if I call setDefaultAttributesUsingShaders, the result is invisible particles. After much debugging, I discovered that I can get the particles to come back if I call setUseVertexArray(false). So, I think there is something that it doesn't like about using vertex arrays (at least in the context of my program). With vertex arrays disabled, the particle system seems to be using immediate mode draw calls, which I don't mind. However, I can't tell if it's actually using the shader or not, because the particles look the same either way. So, I tried adding my red shader program to the state set, and that did not help. The particles drew normally, as if it was ignoring my program and using the fixed function pipeline instead. I suppose it's possible that the particle system now had two programs -- the one set by setDefaultAttributesUsingShaders and the one set by me. So, to rule out such a conflict, I omitted the call to setDefaultAttributesUsingShaders and instead replaced it with everything the method does (essentially inlining the method myself), with the exception that it uses my red shader program instead of the stock one. Still, however, it seemed to ignore my shader. Can anyone think of what I might be doing wrong? My next step will be to try to accomplish this in isolation in a stand-alone program, but I just wanted to check and see if there are any ideas. Thank you! Cheers, Frank -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44648#44648 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Using custom shaders with osgParticle
On 1/5/2012 5:55 PM, Frank Sullivan wrote: Can anyone think of what I might be doing wrong? My next step will be to try to accomplish this in isolation in a stand-alone program, but I just wanted to check and see if there are any ideas. gDebugger might help you halt at the draw command and snoop on the state to see if your shader is installed. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. 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
[osg-users] OSG FAQ native formats
Hi all, The OSG FAQ here: http://www.openscenegraph.org/projects/osg/wiki/Support/FAQ#DoestheOpenSceneGraphhaveanativefileformat lists osg and ive as the native OSG formats. Is this still accurate? Should this be listed as osgb for the binary format, and osgt for the text format? Or have I got this backward? Or is it a bit more complicated than that? If the FAQ is incorrect, is there somebody I should let know? Cheers. :) Garth ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG FAQ native formats
On 1/5/2012 10:37 PM, Garth D wrote: lists osg and ive as the native OSG formats. Is this still accurate? Should this be listed as osgb for the binary format, and osgt for the text format? You're correct, those are the new native formats. The old should be noted as deprecated in 3.x. If the FAQ is incorrect, is there somebody I should let know? I think you can edit it yourself, but I forget who manages logins for the Wiki. Perhaps Jose Luis Hidalgo? Cheers. :) Garth -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. 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