[osg-users] Question about libtiff usage
Hi, all. I see that libtiff is a dependency of OpenSceneGraph. Does anyone know what function it provides and if OSG will work if libtiff.dll is removed? Thanks, Brian -- This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Textured PointSprites broken when upgrading from 3.5.6 to 3.6.2
Hi, We recently upgraded OSG from 3.5.6 to 3.6.2 and our textured PointSprites stopped working. In a debug build they work fine but in a release build they do not display or, if they do, they display using a translucent version of the non-textured points which flash on and off as we navigate the scene. The code is based on the osgpointsprite example - which we cannot get to fail. The code is used by several features all of which have the bug. If we strip it down to just one feature using this code then it still has the bug. If we strip out the textures then default Points work fine on all features. Using hard-coded textures instead of loading them from files does not help. We have tried just about everything we can think of and are about to switch to a combination of non-textured points, billboards & simple geometries as a workaround. Code: addPointSprite(mModel.base().dataPaths.resourcesPath(), PointSpriteShapes::Diamond, NodePointSizeLarge, NodePointSizeSmall, NodePointSizeLarge, mNodesGeometry); const std::map PointSpriteFileNames = { {PointSpriteShapes::Circle, "Circle.png"}, {PointSpriteShapes::Diamond, "Diamond.png"}, {PointSpriteShapes::Square, "Square.png"}, {PointSpriteShapes::MarkerRouteStart, "MarkerRouteStart.png"}, {PointSpriteShapes::MarkerRouteBroken, "MarkerRouteBroken.png"}, {PointSpriteShapes::MarkerRouteEnd, "MarkerRouteEnd.png"}, }; void addPointSprite(const std::string & aResourcesPath, PointSpriteShapes aSpriteShape, float aStartingSize, float aMinSize, float aMaxSize, osg::Node * aNode) { Expects(PointSpriteFileNames.find(aSpriteShape) != PointSpriteFileNames.end()); auto stateset = aNode->getOrCreateStateSet(); osg::ref_ptr sprite = new osg::PointSprite(); sprite->setCoordOriginMode(osg::PointSprite::LOWER_LEFT); stateset->setTextureAttributeAndModes(0, sprite, osg::StateAttribute::ON); auto texture = createTexture(aResourcesPath, PointSpriteFileNames.at(aSpriteShape)); stateset->setTextureAttributeAndModes(0, texture, osg::StateAttribute::ON); osg::ref_ptr point = new osg::Point(); point->setSize(aStartingSize); point->setMinSize(aMinSize); point->setMaxSize(aMaxSize); if (aMaxSize > aMinSize) { point->setDistanceAttenuation(osg::Vec3{1.0f, 0.001f, 0.0f}); } stateset->setAttribute(point); } inline osg::ref_ptr createTexture(const std::string & aResourcesPath, const std::string & aImageName) { const auto imagePath = aResourcesPath + "/images/" + aImageName; return new osg::Texture2D(osgDB::readRefImageFile(imagePath)); } Are you aware of any issues with textures point sprites in 3.5.6, or can you see what we are doing wrong? Thanks, Brian[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74665#74665 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] DXF file with text crashes on Intersect
Sorry Robert, I was still linking against the old version. Now I have manged to get it to link against the new version the dxf/text bug has been fixed. That's the god news, unfortunately the new version has triggered another more severe crash ... probably something we are doing that we were getting away with in the old version. Thanks, Cheers, Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73895#73895 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] DXF file with text crashes on Intersect
Sorry Robert, I was still linking against the old version. Now I have manged to get it to link against the new version the dxf/text bug has been fixed. That's the god news, unfortunately the new version has triggered another more severe crash ... probably something we are doing that we were getting away with in the old version. Thanks, Cheers, Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73894#73894 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] DXF file with text crashes on Intersect
Hi Robert, I have tried in the latest release and unfortunately the bug is still there. I will try and put together some test code, we are in the middle of our own release bugfix cycle at the moment so it may take a while. In the meantime (in case you already have something which views DXF files and lets you pick) here is a DXF file which has this issue. Zooming in around the center you should find some text labels and picking over some text should trigger the crash. Cheers, Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73893#73893 Attachments: http://forum.openscenegraph.org//files/lane_markings_167.zip ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] DXF file with text crashes on Intersect
Hi, We are using osg version 3.5.6 from VCPKG. When we load a DXF which includes text it loads and displays fine. However if we then call GUIActionAdapter::computeIntersections on the scene whilst the mouse is over a piece of text within the loaded DXF it crashes here: Code: void Text::accept(osg::Drawable::ConstAttributeFunctor& af) const { if (_coords.valid() ) { af.apply(osg::Drawable::VERTICES, _coords->size(), &(_coords->front())); af.apply(osg::Drawable::TEXTURE_COORDS_0, _texcoords->size(), &(_texcoords->front())); <<<<<<<<<<<<< } } _texcoord would appear to be empty. We are simply loading the DXF via readRefNodeFile then placing them in a PositionAttitudeTransform within out scene. I can work around it for now as we do not want the loaded DXF's to be directly pickable so can exclude them via a NodeMask, but would prefer not to have to do so. I see that there is a more recent build of osg available - is this something which has been fixed since 3.5.6? I can post a copy of an affected DXF if it would help. Thank you! Cheers, Brian[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73890#73890 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problems with osgText::Text internal transformations and LineSegmentIntersector
Hi Robert, Thanks for the quick response. I will give that a try at some point and let you know if it helped. Do you have a timescale for the release of 5.6.0? Thanks, Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73141#73141 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Problems with osgText::Text internal transformations and LineSegmentIntersector
Hi, When I use any of the following methods to reposition osgText::Text the picking fails when used with LineSegmentIntersector. Code: text->setPosition() // anything other than {0.0,0.0,0.0} text->setRotation() // anything other than osg::Quat(0.0, osg::Z_AXIS) text->setAlignment() // anything other than LEFT_BOTTOM As far as I can work out from debugging, the bounds are being correctly calculated and "intersectAndClip" is returning true. The problem seems to be when "drawable->accept" is called in the "intersect" method, the IntersectFunctor does not have the transformations that Text is using and the vertices passed to it are not transformed. The only way I can find around this is to place the text inside PositionAttitudeTransform's and do the positioning myself. Unfortunately, since I do not know the eventual dimensions of the text, doing a CENTER_CENTER alignment is practically impossible. If I leave the alignment to be done by Text then a CENTER_CENTER alignment means that you can only pick the top left quarter of the text. I have tried placing the text inside either a Geode or a Group but it makes no difference. I would be very happy if I was simply not calling something I should be to initalise the Text or its container correctly. We are using OSG 3.5.6 statically linked via VCPKG. Any help gratefully received, Thanks, Brian[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=73137#73137 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [EXTERNAL] Re: Is there a binary distribution available for version 3.4.0?
Our timeframe is actually pretty urgent. We are trying to get some software through a scanning tool for export/IP compliance. It would be easier for us to add an existing distribution to the cloud scanning tool, rather than our own build. I’ll reach out internally to understand their definition of publicly maintained as well. One available from openscenegraph.org would certainly meet that criteria, but I’m not sure when we go outside of that. Many thanks for the responses, Brian From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Chris Hanson Sent: Thursday, October 05, 2017 1:53 PM To: OpenSceneGraph Users <osg-users@lists.openscenegraph.org> Subject: Re: [osg-users] [EXTERNAL] Re: Is there a binary distribution available for version 3.4.0? External Sender: Use caution with links/attachments. Hi Brian, we had one for a while, but the system hasn't been updated recently because one of our developers who maintained it is working elsewhere at this time. So, we don't have a 3.4 build. I can look into reviving it at some point -- how urgent is your timeframe? On Thu, Oct 5, 2017 at 12:06 PM, Stuart Mentzer <stuart_ment...@objexx.com<mailto:stuart_ment...@objexx.com>> wrote: Hi Brian, No, we aren't using VS 2013 any more. If you are in a pickle for VS 2013 builds contact me and we'll look at the options for getting that done. Regards, Stuart -- Stuart Mentzer Objexx Engineering Office +1 781 455 1150 x11<tel:(781)%20455-1150> Mobile +1 781 708 3872<tel:(781)%20708-3872> On 10/5/2017 1:59 PM, Brian Davis wrote: Thanks for the response, Stuart. Much appreciated. Do you have a Visual Studio 2013 version? It looks like no, based on your web site, but I wanted to ask. Cheers, Brian From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Stuart Mentzer Sent: Thursday, October 05, 2017 2:26 AM To: osg-users@lists.openscenegraph.org<mailto:osg-users@lists.openscenegraph.org> Subject: [EXTERNAL] Re: [osg-users] Is there a binary distribution available for version 3.4.0? External Sender: Use caution with links/attachments. Hi Brian, I'm not sure what your definition of publicly maintained is but my company is providing Windows builds of OSG 3.4.0 at http://objexx.com/OpenSceneGraph.html<https://urldefense.proofpoint.com/v2/url?u=http-3A__objexx.com_OpenSceneGraph.html=DwMDaQ=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo=5bxVULx1mckzDfACIFrAQIBf0kuZWt0S6r7kBSswDmQ=LhI3dmNBsTDv9bkGafOzomUka-OKRj3XlwK8-R1kvIc=dvVyThGuzcsE-4xj1nxcPYAyEfWm1MyfhgHGuojwh5w=>. We set up an automated build system because we need these binaries ourselves and we found no other source for recent releases. We are willing to entertain requests for additional 3rd party libraries and for builds of development releases. We will be posting 3.4.1 binaries within the next couple of weeks (waiting for Qt 5.9.2 or 5.10) and we could also post 3.4.0 builds with up-to-date 3rd party library versions. If you have any questions about our builds just let me know. Regards, Stuart -- Stuart Mentzer Objexx Engineering On 10/5/2017 3:01 AM, Brian Davis wrote: Are there any publicly maintained binary distributions of version 3.4.0 available for Windows? For purposes of IP compliance scans of our software, use of a publicly maintained binary distribution works better than building it ourselves. We currently have binaries that we have built, but are interested in using a public binary distribution if available. Thanks, Brian This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message. ___ osg-users mailing list osg-users@lists.openscenegraph.org<mailto:osg-users@lists.openscenegraph.org> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org<https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.openscenegraph.org_listinfo.cgi_osg-2Dusers-2Dopenscenegraph.org=DwMDaQ=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo=5bxVULx1mckzDfACIFrAQIBf0kuZWt0S6r7kBSswDmQ=LhI3dmNBsTDv9bkGafOzomUka-OKRj3XlwK8-R1kvIc=J3kb84kmZN6_y9WNFSFwGpYfyMqEV9nnn0zSNiDckQI=> ___ osg-users mailing list osg-users@lists.openscenegraph.org<mailto:osg-users@lists.openscenegraph.org> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org<https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.openscenegraph.org_listinfo.cgi_osg-2Dusers-2Dopenscenegraph.org=DwMFaQ=PskvixtEUDK7wuWU-tIg6oKu
Re: [osg-users] [EXTERNAL] Re: Is there a binary distribution available for version 3.4.0?
Thanks for the response, Stuart. Much appreciated. Do you have a Visual Studio 2013 version? It looks like no, based on your web site, but I wanted to ask. Cheers, Brian From: osg-users [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Stuart Mentzer Sent: Thursday, October 05, 2017 2:26 AM To: osg-users@lists.openscenegraph.org Subject: [EXTERNAL] Re: [osg-users] Is there a binary distribution available for version 3.4.0? External Sender: Use caution with links/attachments. Hi Brian, I'm not sure what your definition of publicly maintained is but my company is providing Windows builds of OSG 3.4.0 at http://objexx.com/OpenSceneGraph.html<https://urldefense.proofpoint.com/v2/url?u=http-3A__objexx.com_OpenSceneGraph.html=DwMDaQ=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo=5bxVULx1mckzDfACIFrAQIBf0kuZWt0S6r7kBSswDmQ=LhI3dmNBsTDv9bkGafOzomUka-OKRj3XlwK8-R1kvIc=dvVyThGuzcsE-4xj1nxcPYAyEfWm1MyfhgHGuojwh5w=>. We set up an automated build system because we need these binaries ourselves and we found no other source for recent releases. We are willing to entertain requests for additional 3rd party libraries and for builds of development releases. We will be posting 3.4.1 binaries within the next couple of weeks (waiting for Qt 5.9.2 or 5.10) and we could also post 3.4.0 builds with up-to-date 3rd party library versions. If you have any questions about our builds just let me know. Regards, Stuart -- Stuart Mentzer Objexx Engineering On 10/5/2017 3:01 AM, Brian Davis wrote: Are there any publicly maintained binary distributions of version 3.4.0 available for Windows? For purposes of IP compliance scans of our software, use of a publicly maintained binary distribution works better than building it ourselves. We currently have binaries that we have built, but are interested in using a public binary distribution if available. Thanks, Brian This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message. ___ osg-users mailing list osg-users@lists.openscenegraph.org<mailto:osg-users@lists.openscenegraph.org> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org<https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.openscenegraph.org_listinfo.cgi_osg-2Dusers-2Dopenscenegraph.org=DwMDaQ=PskvixtEUDK7wuWU-tIg6oKuGYBRbrMXk2FZvF0UfTo=5bxVULx1mckzDfACIFrAQIBf0kuZWt0S6r7kBSswDmQ=LhI3dmNBsTDv9bkGafOzomUka-OKRj3XlwK8-R1kvIc=J3kb84kmZN6_y9WNFSFwGpYfyMqEV9nnn0zSNiDckQI=> ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Is there a binary distribution available for version 3.4.0?
Are there any publicly maintained binary distributions of version 3.4.0 available for Windows? For purposes of IP compliance scans of our software, use of a publicly maintained binary distribution works better than building it ourselves. We currently have binaries that we have built, but are interested in using a public binary distribution if available. Thanks, Brian -- This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Enable, Disable Multible Shaders
Hi, Thank you for the reply. I actually found another solution that was a better solution than turning off shaders by the stateset. Originally, I just wanted to turn off shaders for a stateset so that the objects in that stateset would not cast a shadow. I though that this would work because the entire scenegraph has been created in a way so that all objects displayed are rendered through a shader. I did some research and found out there was a way to disable shadows in the scenegraph. I was skeptical at first that this would work but turning off the bit for casting shadows worked. It was a lot more elegant solution to use than turning off shaders for the object. I tried putting in an empty program object and that didn't work. This was the only thing that worked. Thank you! Cheers, Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=65946#65946 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Enable, Disable Multible Shaders
Hi, I having a similar problem with stateset. I have a program where all the geometry has a shader attached at the point of loading. There is one object in this entire database of objects that have shaders attached to it somewhere and is causing this object to cast a shadow based on a singular shader based light source. I tried to solve this problem by disabling the PROGRAM state attribute but disabling doesn't seem to prevent it from casting a shadow. I don't understand though. I can get the node for these objects and derive the state sets from those nodes but I can't seem to disable the object from casting a shadow. Someone told me that there are attributes on textures and geometry that allow you to make it so that texture or geometry doesn't cast a shadow. Thank you! Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=65923#65923 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Suggestion for Cuda + OSG, smooth particle hydrodynamic
Hi, Thank you very very much for your reply. I will post the algorithm up once I got it up and running. From your suggestion, at least now I have a better direction to search for the solution. I can't really do the CUDA inside the osg loop, mainly because i need the cuda to run as fast as maximum possible for robotic control application. They has to be separated. Thank you very much for your help! Appreciate all your effort. Cheers, brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43549#43549 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Suggestion for Cuda + OSG, smooth particle hydrodynamic
Hi, I am very new to CUDA and OSG, please accept my apologies if this is a stupid questions. I am trying to build SPH algorithm using Cuda to calculate the particle forces and update its position. I would like to ask is there a way in Cuda to pass the position array to OSG without doing a cudaMemcpyDeviceToHost operation on every loop? Is there some special function in OSG that directly integrated into CUDA? I have a CPU loop for CUDA kernel, and I have another CPU loop for OSG. When the OSG need the graphics update, it send a flag to CUDA reqesting for new position array. Is this the right way to do it? Thank you very much in advance. I really appreciate your effort. Cheers, Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43510#43510 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Any idea how to tell ccmake to build MINGW on Cygwin
I was trying to build a Windows version of OSG on Cygwin (I can build an X version) and wasn't having any luck. Now that Cygwin has a cross-compiler for MINGW (reworked - not the old -MNO_CYGWIN option) I thought I would give that a try. Seems I can tell it where all the pertinent compiler and linker programs are and maybe even the libs but I'm still missing something as I keep getting an error on the make in pthreads. Anyone tried building a MINGW version on CYGWIN yet? thanks bk ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Attempting X11 (lib issue) and Windows (GLfloat issue) compiles forOSG in Cygwin
Robert Osfield wrote: HI Brian, On Tue, Aug 16, 2011 at 10:12 PM, Brian Keener bkee...@thesoftwaresource.com wrote: Well that makes the X11 version perfectly with standard Cygwin installed and my one change to cmakelists.txt in osgViewer source. Still cannot get it to build though with opengl32 and glu and build a non X11 but Windows version. I get a lot of _gl. Undefined functions. I can't comment on Cygwin specifically as I have no personal experience with it. The only thing I can add is that OSG-3.x no longer needs GLU, instead a subset of GLU is now compiled from source inside the osg library itself. Hi Robert, So how would I tell configure and make to use the OPenSceneGraph version instead of the opengl and glu libraries that are already in my Cygwin install as it does seem to see them and want to use them but I'm not sure. Thanks bk ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Attempting X11 (lib issue) and Windows (GLfloat issue) compiles forOSG in Cygwin
Skai Ware wrote: Hi Brian, Compiling OSG 3 with cygwin is perhaps today not feasible due to the objectives from cygwin team to remove the WIN32 define. Have you tried to cmake OSG with cmake . -DCMAKE_LEGACY_CYGWIN_WIN32=1 Well that makes the X11 version perfectly with standard Cygwin installed and my one change to cmakelists.txt in osgViewer source. Still cannot get it to build though with opengl32 and glu and build a non X11 but Windows version. I get a lot of _gl. Undefined functions. thanks bk ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Attempting X11 (lib issue) and Windows (GLfloat issue) compiles forOSG in Cygwin
I attempted to get OSG to compile in Cygwin and I finally got an X11 version to compile. I had problem with osgViewer which did not seem to want to add the libraries X11 and Xrandr even though it saw them. I could add the libraries to link.txt for the modules that failed and then execute and they would compile. I tried determining what was wrong with the CMakeLists.txt for osgViewer but only way I could get it to add the X11 and Xrandr was to change this routine near the end: IF(MINGW OR CYGWIN) SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARY} gdi32 ) ENDIF() so that the set line reads as follows: SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARY} gdi32 ${X11_X11_LIB} ${X11_Xrandr_LIB} ) And then compiled great and worked. I then tried to get it to compile without X11 by setting OSG_WINDOWING_SYSTEM to none and it compiled but osgViewer could not create a window so then I change the GL references to point to the opengl libs in w32api for cygwin which as I recall is the appropriate think to do so it uses the win opengl libs and includes. But now when compiling I get this error regarding GLfloat and GLdouble [ 0%] Built target OpenThreads [ 0%] Building CXX object src/osg/CMakeFiles/osg.dir/ArrayDispatchers.o /usr/src/OpenSceneGraph/src/osg/ArrayDispatchers.cpp: In member function `void o sg::ArrayDispatchers::init()': /usr/src/OpenSceneGraph/src/osg/ArrayDispatchers.cpp:440: error: no matching fun ction for call to `osg::AttributeDispatchMap::assign(osg::Array::Type, void ()( const GLfloat*), int)' /usr/src/OpenSceneGraph/src/osg/ArrayDispatchers.cpp:268: note: candidates are: void osg::AttributeDispatchMap::assign(osg::Array::Type, void (*)(const T*), uns igned int) [with T = GLfloat] near match /usr/src/OpenSceneGraph/src/osg/ArrayDispatchers.cpp:441: error: no matching fun ction for call to `osg::AttributeDispatchMap::assign(osg::Array::Type, void ()( const GLfloat*), int)' /usr/src/OpenSceneGraph/src/osg/ArrayDispatchers.cpp:268: note: candidates are: void osg::AttributeDispatchMap::assign(osg::Array::Type, void (*)(const T*), uns igned int) [with T = GLfloat] near match /usr/src/OpenSceneGraph/src/osg/ArrayDispatchers.cpp:442: error: no matching fun ction for call to `osg::AttributeDispatchMap::assign(osg::Array::Type, void ()( const GLdouble*), int)' /usr/src/OpenSceneGraph/src/osg/ArrayDispatchers.cpp:268: note: candidates are: void osg::AttributeDispatchMap::assign(osg::Array::Type, void (*)(const T*), uns igned int) [with T = GLdouble] near match /usr/src/OpenSceneGraph/src/osg/ArrayDispatchers.cpp:443: error: no matching fun ction for call to `osg::AttributeDispatchMap::assign(osg::Array::Type, void ()( const GLdouble*), int)' /usr/src/OpenSceneGraph/src/osg/ArrayDispatchers.cpp:268: note: candidates are: void osg::AttributeDispatchMap::assign(osg::Array::Type, void (*)(const T*), uns igned int) [with T = GLdouble] near match /usr/src/OpenSceneGraph/src/osg/ArrayDispatchers.cpp:446: error: no matching fun ction for call to `osg::AttributeDispatchMap::assign(osg::Array::Type, void ()( const GLbyte*), int)' /usr/src/OpenSceneGraph/src/osg/ArrayDispatchers.cpp:268: note: candidates are: void osg::AttributeDispatchMap::assign(osg::Array::Type, void (*)(const T*), uns igned int) [with T = GLbyte] near match /usr/src/OpenSceneGraph/src/osg/ArrayDispatchers.cpp:447: error: no matching fun ction for call to `osg::AttributeDispatchMap::assign(osg::Array::Type, void ()( const GLshort*), int)' /usr/src/OpenSceneGraph/src/osg/ArrayDispatchers.cpp:268: note: candidates are: void osg::AttributeDispatchMap::assign(osg::Array::Type, void (*)(const T*), uns igned int) [with T = GLshort] near match /usr/src/OpenSceneGraph/src/osg/ArrayDispatchers.cpp:448: error: no matching fun ction for call to `osg::AttributeDispatchMap::assign(osg::Array::Type, void ()( const GLfloat*), int)' /usr/src/OpenSceneGraph/src/osg/ArrayDispatchers.cpp:268: note: candidates are: void osg::AttributeDispatchMap::assign(osg::Array::Type, void (*)(const T*), uns igned int) [with T = GLfloat] near match /usr/src/OpenSceneGraph/src/osg/ArrayDispatchers.cpp:449: error: no matching fun ction for call to `osg::AttributeDispatchMap::assign(osg::Array::Type, void ()( const GLdouble*), int)' /usr/src/OpenSceneGraph/src/osg/ArrayDispatchers.cpp:268: note: candidates are: void osg::AttributeDispatchMap::assign(osg::Array::Type, void (*)(const T*), uns igned int) [with T = GLdouble] near match /usr/src/OpenSceneGraph/src/osg/ArrayDispatchers.cpp:451: error: no matching fun ction for call to `osg::AttributeDispatchMap::assign(osg::Array::Type, void ()( const GLubyte*), int)' /usr/src/OpenSceneGraph/src/osg/ArrayDispatchers.cpp:268: note: candidates are: void osg::AttributeDispatchMap::assign(osg::Array::Type, void (*)(const T*), uns igned int) [with T = GLubyte] near match /usr/src/OpenSceneGraph/src/osg/ArrayDispatchers.cpp:452: error: no matching fun ction for call
Re: [osg-users] building for xcode on os x
I'm not using make I'm using xcode, so I'm not sure how that would be done if it's possible I tried building in make and couldn't figure out how to set it to build for 32 bit, on 64 bit I was getting errors with libz: ld: warning: ignoring file /Library/Frameworks//libz.framework/libz, missing required architecture x86_64 in file Undefined symbols for architecture x86_64: _inflateInit2_, referenced from: ZLibCompressor::decompress(std::basic_istreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar )in Compressors.cpp.o _inflate, referenced from: ZLibCompressor::decompress(std::basic_istreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar )in Compressors.cpp.o _inflateEnd, referenced from: ZLibCompressor::decompress(std::basic_istreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar )in Compressors.cpp.o _deflateInit2_, referenced from: ZLibCompressor::compress(std::basic_ostreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar const)in Compressors.cpp.o _deflate, referenced from: ZLibCompressor::compress(std::basic_ostreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar const)in Compressors.cpp.o _deflateEnd, referenced from: ZLibCompressor::compress(std::basic_ostreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar const)in Compressors.cpp.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make[2]: *** [lib/libosgDB.3.0.0.dylib] Error 1 make[1]: *** [src/osgDB/CMakeFiles/osgDB.dir/all] Error 2 make: *** [all] Error 2 On Jul 20, 2011, at 3:00 AM, Michael Chechow wrote: How about using sudo to avoid the permission problem? 2011/7/20 Brian Rojas marchin...@gmail.com Alright I got it working in Xcode now, for the osgdb_jp2 target I added the following to the header search path: /opt/local/include The search path /opt/local/include/jasper was already on the search path from cmake, but the #include's in the jasper.h start with jasper/some_file.h, so it needs the directory above to find the jasper directory However when I build the install target I get the following error: /Applications/CMake\ 2.8-5.app/Contents/bin/cmake -DBUILD_TYPE=Debug -P cmake_install.cmake -- Install configuration: Debug -- Installing: /usr/local/lib/pkgconfig/openscenegraph.pc CMake Error at cmake_install.cmake:31 (FILE): file INSTALL cannot copy file /Users/brojas/Desktop/OpenSceneGraph-3.0.0_build_xcode/packaging/pkgconfig/openscenegraph.pc to /usr/local/lib/pkgconfig/openscenegraph.pc. make: *** [install_buildpart_0] Error 1 Command /bin/sh failed with exit code 2 Looks like it maybe a permissions thing where it can't copy to /usr/local On Jul 19, 2011, at 4:55 PM, Michael Chechow wrote: Is the JASPER_INCLUDE_DIR set correctly within cmake? On my machine it is set to /opt/local/include, which is the standard location of MacPorts. Could you try to compile using make in the Terminal? 2011/7/19 Brian Rojas marchin...@gmail.com I installed jasper using Macports and it installed ok, i checked by running jasper --version and got: 1.900.1 libjasper 1.900.1 However in xcode i'm still getting the same compilation errors. I even deleted the build folder and started the whole configure generate process in cmake again and the errors still shows up, do you know of anything else i would need to do? The errors are below: osgdb_jp2 /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:20:31: error: jasper/jasper.h: No such file or directory /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_stream_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'out' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_image_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'image' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: expected primary-expression before 'int' /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: initializer expression list treated as compound expression /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:33: error: expected ',' or ';' before '{' token /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2
Re: [osg-users] building for xcode on os x
Success! It installed it to /usr/local and I was able to run the viewer with a osg file. Thanks for all the help! I want to setup my first osg project in xcode, do you know if I can just add the libraries and headers to the search path or do I need to do anything else? On Jul 20, 2011, at 3:12 AM, Michael Chechow wrote: You can set the architecture in CMake: CMAKE_OSX_ARCHITECTURES = i386 2011/7/20 Brian Rojas marchin...@gmail.com I'm not using make I'm using xcode, so I'm not sure how that would be done if it's possible I tried building in make and couldn't figure out how to set it to build for 32 bit, on 64 bit I was getting errors with libz: ld: warning: ignoring file /Library/Frameworks//libz.framework/libz, missing required architecture x86_64 in file Undefined symbols for architecture x86_64: _inflateInit2_, referenced from: ZLibCompressor::decompress(std::basic_istreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar )in Compressors.cpp.o _inflate, referenced from: ZLibCompressor::decompress(std::basic_istreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar )in Compressors.cpp.o _inflateEnd, referenced from: ZLibCompressor::decompress(std::basic_istreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar )in Compressors.cpp.o _deflateInit2_, referenced from: ZLibCompressor::compress(std::basic_ostreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar const)in Compressors.cpp.o _deflate, referenced from: ZLibCompressor::compress(std::basic_ostreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar const)in Compressors.cpp.o _deflateEnd, referenced from: ZLibCompressor::compress(std::basic_ostreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar const)in Compressors.cpp.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make[2]: *** [lib/libosgDB.3.0.0.dylib] Error 1 make[1]: *** [src/osgDB/CMakeFiles/osgDB.dir/all] Error 2 make: *** [all] Error 2 On Jul 20, 2011, at 3:00 AM, Michael Chechow wrote: How about using sudo to avoid the permission problem? 2011/7/20 Brian Rojas marchin...@gmail.com Alright I got it working in Xcode now, for the osgdb_jp2 target I added the following to the header search path: /opt/local/include The search path /opt/local/include/jasper was already on the search path from cmake, but the #include's in the jasper.h start with jasper/some_file.h, so it needs the directory above to find the jasper directory However when I build the install target I get the following error: /Applications/CMake\ 2.8-5.app/Contents/bin/cmake -DBUILD_TYPE=Debug -P cmake_install.cmake -- Install configuration: Debug -- Installing: /usr/local/lib/pkgconfig/openscenegraph.pc CMake Error at cmake_install.cmake:31 (FILE): file INSTALL cannot copy file /Users/brojas/Desktop/OpenSceneGraph-3.0.0_build_xcode/packaging/pkgconfig/openscenegraph.pc to /usr/local/lib/pkgconfig/openscenegraph.pc. make: *** [install_buildpart_0] Error 1 Command /bin/sh failed with exit code 2 Looks like it maybe a permissions thing where it can't copy to /usr/local On Jul 19, 2011, at 4:55 PM, Michael Chechow wrote: Is the JASPER_INCLUDE_DIR set correctly within cmake? On my machine it is set to /opt/local/include, which is the standard location of MacPorts. Could you try to compile using make in the Terminal? 2011/7/19 Brian Rojas marchin...@gmail.com I installed jasper using Macports and it installed ok, i checked by running jasper --version and got: 1.900.1 libjasper 1.900.1 However in xcode i'm still getting the same compilation errors. I even deleted the build folder and started the whole configure generate process in cmake again and the errors still shows up, do you know of anything else i would need to do? The errors are below: osgdb_jp2 /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:20:31: error: jasper/jasper.h: No such file or directory /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_stream_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'out' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_image_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'image' was not declared in this scope /Users/brojas
Re: [osg-users] building for xcode on os x
Yup, I added libraries and it works fine, thanks again for the help. On Jul 20, 2011, at 4:24 AM, Michael Chechow wrote: I don't use Xcode, but there are some articles and video tutorials on the OSG wiki: http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/MacOSXTips I don't know wether that information is outdatet, but there should be some Xcode templates available for OSG. Generally speaking, adding the libraries and setting the include path should be sufficient. 2011/7/20 Brian Rojas marchin...@gmail.com Success! It installed it to /usr/local and I was able to run the viewer with a osg file. Thanks for all the help! I want to setup my first osg project in xcode, do you know if I can just add the libraries and headers to the search path or do I need to do anything else? On Jul 20, 2011, at 3:12 AM, Michael Chechow wrote: You can set the architecture in CMake: CMAKE_OSX_ARCHITECTURES = i386 2011/7/20 Brian Rojas marchin...@gmail.com I'm not using make I'm using xcode, so I'm not sure how that would be done if it's possible I tried building in make and couldn't figure out how to set it to build for 32 bit, on 64 bit I was getting errors with libz: ld: warning: ignoring file /Library/Frameworks//libz.framework/libz, missing required architecture x86_64 in file Undefined symbols for architecture x86_64: _inflateInit2_, referenced from: ZLibCompressor::decompress(std::basic_istreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar )in Compressors.cpp.o _inflate, referenced from: ZLibCompressor::decompress(std::basic_istreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar )in Compressors.cpp.o _inflateEnd, referenced from: ZLibCompressor::decompress(std::basic_istreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar )in Compressors.cpp.o _deflateInit2_, referenced from: ZLibCompressor::compress(std::basic_ostreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar const)in Compressors.cpp.o _deflate, referenced from: ZLibCompressor::compress(std::basic_ostreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar const)in Compressors.cpp.o _deflateEnd, referenced from: ZLibCompressor::compress(std::basic_ostreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar const)in Compressors.cpp.o ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make[2]: *** [lib/libosgDB.3.0.0.dylib] Error 1 make[1]: *** [src/osgDB/CMakeFiles/osgDB.dir/all] Error 2 make: *** [all] Error 2 On Jul 20, 2011, at 3:00 AM, Michael Chechow wrote: How about using sudo to avoid the permission problem? 2011/7/20 Brian Rojas marchin...@gmail.com Alright I got it working in Xcode now, for the osgdb_jp2 target I added the following to the header search path: /opt/local/include The search path /opt/local/include/jasper was already on the search path from cmake, but the #include's in the jasper.h start with jasper/some_file.h, so it needs the directory above to find the jasper directory However when I build the install target I get the following error: /Applications/CMake\ 2.8-5.app/Contents/bin/cmake -DBUILD_TYPE=Debug -P cmake_install.cmake -- Install configuration: Debug -- Installing: /usr/local/lib/pkgconfig/openscenegraph.pc CMake Error at cmake_install.cmake:31 (FILE): file INSTALL cannot copy file /Users/brojas/Desktop/OpenSceneGraph-3.0.0_build_xcode/packaging/pkgconfig/openscenegraph.pc to /usr/local/lib/pkgconfig/openscenegraph.pc. make: *** [install_buildpart_0] Error 1 Command /bin/sh failed with exit code 2 Looks like it maybe a permissions thing where it can't copy to /usr/local On Jul 19, 2011, at 4:55 PM, Michael Chechow wrote: Is the JASPER_INCLUDE_DIR set correctly within cmake? On my machine it is set to /opt/local/include, which is the standard location of MacPorts. Could you try to compile using make in the Terminal? 2011/7/19 Brian Rojas marchin...@gmail.com I installed jasper using Macports and it installed ok, i checked by running jasper --version and got: 1.900.1 libjasper 1.900.1 However in xcode i'm still getting the same compilation errors. I even deleted the build folder and started the whole configure generate process in cmake again and the errors still shows up, do you know of anything else i would need to do? The errors are below: osgdb_jp2 /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:20:31: error: jasper/jasper.h: No such file or directory /Users/brojas/Desktop
Re: [osg-users] building for xcode on os x
I installed jasper using Macports and it installed ok, i checked by running jasper --version and got: 1.900.1 libjasper 1.900.1 However in xcode i'm still getting the same compilation errors. I even deleted the build folder and started the whole configure generate process in cmake again and the errors still shows up, do you know of anything else i would need to do? The errors are below: osgdb_jp2 /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:20:31: error: jasper/jasper.h: No such file or directory /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_stream_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'out' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_image_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'image' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: expected primary-expression before 'int' /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: initializer expression list treated as compound expression /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:33: error: expected ',' or ';' before '{' token /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:522: error: expected `}' at end of input /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: warning: 'putdata' defined but not used On Jul 19, 2011, at 1:09 AM, Michael Chechow wrote: Hello, It seems like you don't have the jasper library installed. Install it (using MacPorts for example) and then rerun CMake in order to configure the build script correctly. Michael 2011/7/19 Brian Rojas marchin...@gmail.com I'm getting the following errors when trying to build osg for xcode on mac os x. Does anyone have any idea what's going on and how to fix. I'm a newbie and following instructions for osg book and this is what i got: osgdb_jp2 /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:20:31: error: jasper/jasper.h: No such file or directory /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_stream_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'out' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_image_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'image' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: expected primary-expression before 'int' /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: initializer expression list treated as compound expression /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:33: error: expected ',' or ';' before '{' token /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:522: error: expected `}' at end of input /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: warning: 'putdata' defined but not used Thanks in advance ___ 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] building for xcode on os x
No i didn't set that, I'll try that. I use Xcode cause thats what I'm used too, can try in make too. Sent from my iPhone On Jul 19, 2011, at 4:55 PM, Michael Chechow minich...@googlemail.com wrote: Is the JASPER_INCLUDE_DIR set correctly within cmake? On my machine it is set to /opt/local/include, which is the standard location of MacPorts. Could you try to compile using make in the Terminal? 2011/7/19 Brian Rojas marchin...@gmail.com I installed jasper using Macports and it installed ok, i checked by running jasper --version and got: 1.900.1 libjasper 1.900.1 However in xcode i'm still getting the same compilation errors. I even deleted the build folder and started the whole configure generate process in cmake again and the errors still shows up, do you know of anything else i would need to do? The errors are below: osgdb_jp2 /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:20:31: error: jasper/jasper.h: No such file or directory /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_stream_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'out' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_image_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'image' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: expected primary-expression before 'int' /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: initializer expression list treated as compound expression /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:33: error: expected ',' or ';' before '{' token /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:522: error: expected `}' at end of input /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: warning: 'putdata' defined but not used On Jul 19, 2011, at 1:09 AM, Michael Chechow wrote: Hello, It seems like you don't have the jasper library installed. Install it (using MacPorts for example) and then rerun CMake in order to configure the build script correctly. Michael 2011/7/19 Brian Rojas marchin...@gmail.com I'm getting the following errors when trying to build osg for xcode on mac os x. Does anyone have any idea what's going on and how to fix. I'm a newbie and following instructions for osg book and this is what i got: osgdb_jp2 /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:20:31: error: jasper/jasper.h: No such file or directory /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_stream_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'out' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_image_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'image' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: expected primary-expression before 'int' /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: initializer expression list treated as compound expression /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:33: error: expected ',' or ';' before '{' token /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:522: error: expected `}' at end of input /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: warning: 'putdata' defined but not used Thanks in advance ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http
Re: [osg-users] building for xcode on os x
I set to generate makefiles and the jasper directory appears to be set correctly to the /Library/Frameworks/libjasper.framework/Headers/jasper folder. However now I'm getting the following errors: ld: warning: ignoring file /Library/Frameworks//libz.framework/libz, missing required architecture x86_64 in file Undefined symbols for architecture x86_64: _inflateInit2_, referenced from: ZLibCompressor::decompress(std::basic_istreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar )in Compressors.cpp.o _inflate, referenced from: ZLibCompressor::decompress(std::basic_istreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar )in Compressors.cpp.o _inflateEnd, referenced from: ZLibCompressor::decompress(std::basic_istreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar )in Compressors.cpp.o _deflateInit2_, referenced from: ZLibCompressor::compress(std::basic_ostreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar const)in Compressors.cpp.o _deflate, referenced from: ZLibCompressor::compress(std::basic_ostreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar const)in Compressors.cpp.o _deflateEnd, referenced from: ZLibCompressor::compress(std::basic_ostreamchar, std::char_traitschar , std::basic_stringchar, std::char_traitschar, std::allocatorchar const)in Compressors.cpp.o In Xcode I had to set it to build for 32 not 64, how do I do this in make? On Jul 19, 2011, at 4:55 PM, Michael Chechow wrote: Is the JASPER_INCLUDE_DIR set correctly within cmake? On my machine it is set to /opt/local/include, which is the standard location of MacPorts. Could you try to compile using make in the Terminal? 2011/7/19 Brian Rojas marchin...@gmail.com I installed jasper using Macports and it installed ok, i checked by running jasper --version and got: 1.900.1 libjasper 1.900.1 However in xcode i'm still getting the same compilation errors. I even deleted the build folder and started the whole configure generate process in cmake again and the errors still shows up, do you know of anything else i would need to do? The errors are below: osgdb_jp2 /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:20:31: error: jasper/jasper.h: No such file or directory /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_stream_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'out' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_image_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'image' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: expected primary-expression before 'int' /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: initializer expression list treated as compound expression /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:33: error: expected ',' or ';' before '{' token /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:522: error: expected `}' at end of input /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: warning: 'putdata' defined but not used On Jul 19, 2011, at 1:09 AM, Michael Chechow wrote: Hello, It seems like you don't have the jasper library installed. Install it (using MacPorts for example) and then rerun CMake in order to configure the build script correctly. Michael 2011/7/19 Brian Rojas marchin...@gmail.com I'm getting the following errors when trying to build osg for xcode on mac os x. Does anyone have any idea what's going on and how to fix. I'm a newbie and following instructions for osg book and this is what i got: osgdb_jp2 /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:20:31: error: jasper/jasper.h: No such file or directory /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_stream_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'out' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error
Re: [osg-users] building for xcode on os x
Alright I got it working in Xcode now, for the osgdb_jp2 target I added the following to the header search path: /opt/local/include The search path /opt/local/include/jasper was already on the search path from cmake, but the #include's in the jasper.h start with jasper/some_file.h, so it needs the directory above to find the jasper directory However when I build the install target I get the following error: /Applications/CMake\ 2.8-5.app/Contents/bin/cmake -DBUILD_TYPE=Debug -P cmake_install.cmake -- Install configuration: Debug -- Installing: /usr/local/lib/pkgconfig/openscenegraph.pc CMake Error at cmake_install.cmake:31 (FILE): file INSTALL cannot copy file /Users/brojas/Desktop/OpenSceneGraph-3.0.0_build_xcode/packaging/pkgconfig/openscenegraph.pc to /usr/local/lib/pkgconfig/openscenegraph.pc. make: *** [install_buildpart_0] Error 1 Command /bin/sh failed with exit code 2 Looks like it maybe a permissions thing where it can't copy to /usr/local On Jul 19, 2011, at 4:55 PM, Michael Chechow wrote: Is the JASPER_INCLUDE_DIR set correctly within cmake? On my machine it is set to /opt/local/include, which is the standard location of MacPorts. Could you try to compile using make in the Terminal? 2011/7/19 Brian Rojas marchin...@gmail.com I installed jasper using Macports and it installed ok, i checked by running jasper --version and got: 1.900.1 libjasper 1.900.1 However in xcode i'm still getting the same compilation errors. I even deleted the build folder and started the whole configure generate process in cmake again and the errors still shows up, do you know of anything else i would need to do? The errors are below: osgdb_jp2 /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:20:31: error: jasper/jasper.h: No such file or directory /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_stream_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'out' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_image_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'image' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: expected primary-expression before 'int' /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: initializer expression list treated as compound expression /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:33: error: expected ',' or ';' before '{' token /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:522: error: expected `}' at end of input /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: warning: 'putdata' defined but not used On Jul 19, 2011, at 1:09 AM, Michael Chechow wrote: Hello, It seems like you don't have the jasper library installed. Install it (using MacPorts for example) and then rerun CMake in order to configure the build script correctly. Michael 2011/7/19 Brian Rojas marchin...@gmail.com I'm getting the following errors when trying to build osg for xcode on mac os x. Does anyone have any idea what's going on and how to fix. I'm a newbie and following instructions for osg book and this is what i got: osgdb_jp2 /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:20:31: error: jasper/jasper.h: No such file or directory /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_stream_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'out' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_image_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'image' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: expected primary-expression before 'int' /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: initializer expression list treated as compound expression /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:33: error: expected ',' or ';' before '{' token /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src
[osg-users] building for xcode on os x
I'm getting the following errors when trying to build osg for xcode on mac os x. Does anyone have any idea what's going on and how to fix. I'm a newbie and following instructions for osg book and this is what i got: osgdb_jp2 /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:20:31: error: jasper/jasper.h: No such file or directory /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_stream_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'out' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'jas_image_t' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: 'image' was not declared in this scope /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: expected primary-expression before 'int' /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: error: initializer expression list treated as compound expression /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:33: error: expected ',' or ';' before '{' token /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:522: error: expected `}' at end of input /Users/brojas/Desktop/OpenSceneGraph-3.0.0/src/osgPlugins/jp2/ReaderWriterJP2.cpp:32: warning: 'putdata' defined but not used Thanks in advance ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How do I get osgviewer on Cygwin to compile with -lX11 -lXrandr
I tried building OSG on Cygwin 1.7 and I first tried to do it without X but it seems that osgviewer seems to insist on X11 and that WIN32 option has been removed (or is that what you get if you leave it at none). At any rate I finally accepted the defaults (except adding -DNOMINMAX and was bale to get osg to build but to get edit several link.txt files during the build. I ran Cmake and did the configure and generate and then each time it bombed using something involving osgviewer then I would go edit the appropriate link.txt file and add -lX11 -lXrandr to the executable line in that file and then execute the file. This would complete the link and then when I started my make again it would move past that build and continue. I did this for each link failure as follow: In the build directory for OSG (my build root is /usr/develop/obj/osg): /usr/develop/obj/osg/src/osgViewer I edited the file: vi ./CMakeFiles/osgViewer.dir/link.txt and added the -lX11 -lXrandr to the line in link.txt. I then executed the link.txt file as in : ./CMakeFiles/osgViewer.dir/link.txt and the file built - so that was all it needed for osgViewer but... I then would have to do this other parts of the build (osgArchive, osgConv and so on ) to get it to finish. My question(s) is/are where do I find the logic that dictates during the Cmake configure what libs to include and in what files will I find this when the generate finishes. I would like to tweak this so the cmake configure and generate for cygwin was smart enough add the X11 and Xrandr libs. I would also like to know (if any knows) what in general should be the setting to get osgviewer to build without X11 on Cygwin and just use the opengl and no X. thanks bk ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Will OSG handle RAS to some other format before I try to get it to compile in Cygwin
A year or so back I was able to get OSG to compile on Cygwin. Recently tried again and I am having a few issues. Of course in the meantime I have moved from Cygwin 1.5 to 1.7 and that has major changes plus the GCC/G++ 4.3.4 compiler and changes within that to create the cross compiler as opposed to the old -mno-cygwin switch. Any or all of these factors may be an issue. I've tried following my old notes but if I accept the CCMake defaults where it finds X and OpenGl then it burps n Xsync and others which are in the X libs and present on my system and in the cmake. If I try to make it a Windows appl and viewer then it burps on the _gl??? References. Before I spend any more time on this I wanted to verify that OSG can convert a RAS image file to a bmp or jpeg or something. We have some RAS images we tried to get from an AS400 for forms design but we need to get them back into another format to edit them and proceed. Other programs I have tried tell me invalid/incorrect header. Thanks for any assistance. bk ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [build] Building only osgconv
Hi, I've got a server installation that has no GUI environment and I'd like to compile just osgconv so that no X11 or other GUI-related libraries are required. Is this possible? Thank you! Cheers, Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36924#36924 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Original material names not used during export/write in osgconv
Hi, I noticed that at least with the Collada and OBJ writer plugins for osgconv, the original material names do not seem to be used in the output. Instead, generic names are used. If I use osgconv to output to .osg or .json (plugin from the osgjs website), the original material names are in the output as expected. I also tried setting the notify level to 'DEBUG' when running osgconv, but I didn't see any errors or warnings regarding the materials. If it matters, the input file is a 3ds model (I've also verified that lib3ds reads the material names properly). Thank you! Cheers, Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36994#36994 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] depth and stencil buffers in multi-pass rtt
jp, thanks for responding. i haven't tried this before so my initial concern was that this was the correct approach. i'm assuming from your response that it should work but that i'm missing some detail. i'll start digging deeper to see if i can figure out what i'm doing wrong. clear masks rtt camera 1 is color, depth, stencil rtt camera 2 is color only projections both cameras have the same projection depth range not doing anything with depth range i'll look through the renderstage code. brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. -osg-users-boun...@lists.openscenegraph.org wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: J.P. Delport jpdelp...@csir.co.za Sent by: osg-users-boun...@lists.openscenegraph.org Date: 01/10/2011 02:05AM Subject: Re: [osg-users] depth and stencil buffers in multi-pass rtt Hi, what is your clearmask set to for the 2nd camera? Are the projections the same for the 2 cameras? How about depth range? Only other thing I can recommend is have a look at osgUtil/RenderStage.cpp and check for search for depthAttached. You'll find the code and osg bitmasks you can set for controlling depth/stencil for FBO. jp On 10/01/11 01:02, Brian ... wrote: folks, i'm trying to create 2 render to texture cameras that share the same depth and stencil buffer. i want to render color, depth, and stencil values with the first rtt camera and then use the resulting depth and stencil with the second rtt camera. this is what i'm doing: create color texture1 create depth texture create stencil texture create rtt camera 1 attach color texture 1 attach depth texture attach stencil texture create color texture2 create rtt camera 2 attach color texture 2 attach depth texture attach stencil texture here's the scene graph root rtt camera 1 scene group 1 rtt camera 2 scene group 2 the color, depth, and stencil textures look ok coming out of camera 1, but the depth and stencil textures after camera 2 are blank (all zero). is this the right way to do this? thanks, brian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] depth and stencil buffers in multi-pass rtt
folks, i'm trying to create 2 render to texture cameras that share the same depth and stencil buffer. i want to render color, depth, and stencil values with the first rtt camera and then use the resulting depth and stencil with the second rtt camera. this is what i'm doing: create color texture1 create depth texture create stencil texture create rtt camera 1 attach color texture 1 attach depth texture attach stencil texture create color texture2 create rtt camera 2 attach color texture 2 attach depth texture attach stencil texture here's the scene graph root rtt camera 1 scene group 1 rtt camera 2 scene group 2 the color, depth, and stencil textures look ok coming out of camera 1, but the depth and stencil textures after camera 2 are blank (all zero). is this the right way to do this? thanks, brian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Using a manipulator to follow a moving object
Hi, I'm working on an application where the initial scene is scene is very large. However, as the user adds smaller objects to the scene I want the camera to be able to follow the objects. I'd like to be able to center the manipulator on an object and follow the object along a path. I'm trying to use the orbitalManipulator's setTransformation function to do this by calculating an eye vector (based on a North East Down offset from the center and rotation back to X,Y,Z), a center (the object's position), and an up vector (the unit vector of the object's position). I can run the model and printout what appear to be valid vectors for the eye, center, and up, but the camera appears to be looking at my object from the wrong direction. Does my approach seem logical, and is there some obvious coordinate conversion that I'm not doing to go between global (x,y,z -model coordinates) to viewing (cameraManipulator) coordinates? ViewerQT* canvas; canvas-getCameraManipulator()-setTransformation(eye, center, up); Thank you! Cheers, Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34638#34638 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Using a manipulator to follow a moving object
Hi, Sorry, I missed this reference in the wiki. I'll try to do better next time. I haven't got this working yet, but can't help but think this will be the right way to implement what I'm looking for. Thank you! Cheers, Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34651#34651 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Using a manipulator to follow a moving object
Hi, How do I get the NodeTrackerManipulator to be relatively close to the node it is following? I've tried calling setDistance to no avail. It is seems to be using the boundingSphere of the base node as opposed to the node I'm trying to track. I don't where in the NodeTrackerManipulator the distance is set. It appears to follow in center and rotation only. Any ideas on how to get the NodeTrackerManipulator to follow a smaller object in a larger scene? Thank you! Cheers, Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=34680#34680 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] rotating osgParticle::FireEffect
What is the best way to rotate an osgParticle::FireEffect? It defaults to spraying particles down the +Z axis, but I want the effect to spray down the +Y axis. I tried modifying the class so that the emitter was added to a positionattitudetransform but that does not seem to change anything. Any suggestions? I am using OSG 2.8.3 on windows. Thanks -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32954#32954 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgmovie and gif files
When I load an animated gif file into osgmovie demo, the movie plays fine. However, the '+' key slows the movie down, and the '-' key speeds the movie up. Why are the keys backwards? I am using osg 2.8.3 on windows. Also, in the demo, why is the pointer returned by the osgDB::readImageFile casted to an ImageStream as opposed to an ImageSequence (it failes to cast to an ImageSequence)? I guess I'm not sure what the difference between the two are. The implementation for the speed up and down are missing in the ImageStream class: Code: virtual void setTimeMultiplier(double) {} virtual double getTimeMultiplier() const { return 0.0; } but the implementation is present in the ImageSequence class: Code: virtual void setTimeMultiplier(double tm) { _timeMultiplier = tm; } virtual double getTimeMultiplier() const { return _timeMultiplier; } ImageSequence is the only class I see that inherits from ImageStream. Thanks, Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32668#32668 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] viewer-removeSlave does not make HUD visibly disappear
I found the problem. I had a reference pointer to my camera which prevented the camera from getting deleted by the removeSlave function. I didn't want to delete the camera, so I just did Code: cameraHUD-setViewport(NULL); which worked. Then I could set the viewport again when I wanted the HUD to reappear. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32367#32367 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Rendering left right stereo frames in separate threads?
I have switched to point sprites and performance is over 10X better! However, I had to do much research to get point size to match world unit sizes, as well as transparent textures and depth sorting to create spheres. Here is what I did: I used a shader to calculate point size: Code: m_stateSet-setMode(GL_VERTEX_PROGRAM_POINT_SIZE,osg::StateAttribute::ON); const char* vertSource = { uniform float windowHeight;\n uniform float particleRadius;\n void main(void)\n { \n gl_TexCoord[0] = gl_MultiTexCoord0;\n gl_FrontColor = gl_Color;\n gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n vec4 mod = gl_ModelViewMatrix * gl_Vertex;\n//http://lumina.sourceforge.net/Tutorials/Point_sprites.html //http://www.terathon.com/gdc07_lengyel.ppt //gl_ProjectionMatrix[1][1] = e/a where: // e = focal length = 1 / tan(FOV / 2) // a = viewportHeight / viewportWidth gl_PointSize = particleRadius * gl_ProjectionMatrix[1][1] * windowHeight/ -mod.z ; \n } \n }; const char* fragSource = { uniform sampler2D tex;\n void main(void)\n {\n vec4 texel = texture2D(tex,gl_TexCoord[0].xy);\n gl_FragColor = gl_Color * texel;\n }\n }; I disabled GL_LIGHTING. I set up transparency: Code: m_stateSet-setMode(GL_DEPTH_TEST, osg::StateAttribute::ON); m_stateSet-setRenderingHint(osg::StateSet::TRANSPARENT_BIN); m_stateSet-setRenderBinDetails( 0, RenderBin); m_stateSet-setMode(GL_BLEND, osg::StateAttribute::ON); m_blendFunc = new osg::BlendFunc(); m_blendFunc-setFunction(osg::BlendFunc::SRC_ALPHA, osg::BlendFunc::ONE_MINUS_SRC_ALPHA); m_stateSet-setAttributeAndModes(m_blendFunc, osg::StateAttribute::ON); I enabled point sprites so that my texture would show up: Code: m_pointSprite = new osg::PointSprite(); m_stateSet-setTextureAttributeAndModes(0, m_pointSprite, osg::StateAttribute::ON); I sorted all points by greatest distance from the camera eye vector to each point's origin. I sorted the points (vertices) using std::sort Thanks Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32304#32304 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] viewer-removeSlave does not make HUD visibly disappear
I created an HUD with the following code: Code: //SETUP HUD m_rootHUD = new osg::Group(); // create a camera to set up the projection and model view matrices, and the subgraph to drawn in the HUD m_cameraHUD = new osg::Camera; // set the projection matrix m_cameraHUD-setProjectionMatrix(osg::Matrix::ortho2D(0,1280,0,1024)); // set the view matrix m_cameraHUD-setReferenceFrame(osg::Transform::ABSOLUTE_RF); m_cameraHUD-setViewMatrix(osg::Matrix::identity()); // only clear the depth buffer m_cameraHUD-setClearMask(GL_DEPTH_BUFFER_BIT); // draw subgraph after main camera view. m_cameraHUD-setRenderOrder(osg::Camera::POST_RENDER); // we don't want the camera to grab event focus from the viewers main camera(s). m_cameraHUD-setAllowEventFocus(false); m_cameraHUD-addChild(m_rootHUD); osgViewer::Viewer::Windows windows; m_viewer-getWindows(windows); if (windows.empty()) { std::cout error: no windows\n; exit(1); } // set up cameras to rendering on the first window available. m_cameraHUD-setGraphicsContext(windows[0]); m_cameraHUD-setViewport(0,0,windows[0]-getTraits()-width, windows[0]-getTraits()-height); Then I add some stuff to the group root node. Then I add the camera to the viewer with the following code. Code: unsigned int slaveID = m_viewer-getNumSlaves(); m_viewer-addSlave(m_cameraHUD, false); Now, when I decide I want to remove the HUD with the following code, it removes but the HUD is still visible. Code: if (!m_viewer-removeSlave(slaveID)) { std::cout error removing slave slaveID \n; exit(1); } Shouldn't that command remove the HUD from the screen? Thank you Brian[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=3#3 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Blending Multiple Texture on one triangle mesh with coordinate control
thank you very much for your reply Robert. Sorry to reply late. I finally got it working. At the end i used texture3D instead of texture2D. One problem i had with texture was shadowing. Originally, i used ShadowMap, but some reason, the second texture never show up. the shadowmap doesn't seems to let me set any texture unit higher than 0. I have changed it to shadowtexture, and it works. I will tidy my code up and post it up to check if it is the most optimized. Once again, Many thanks for your help, we appreciate your time. Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=32097#32097 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Blending Multiple Texture on one triangle mesh with coordinate control
Hi Alberto Thank you very much for your quick response. One of the reason our team has to do it via open scene graph is because our program has to modified the triangle mesh in real time, this include additional or removal or triangles. Therefore, (I may be wrong, because i m very new to 3D graphic) we can not do it via Blender or 3dMAX. Do you know if any function in osg i should look into to do that function? Many Thanks for your help and we appreciate your effort. Regards Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31796#31796 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Blending Multiple Texture on one triangle mesh with coordinate control
Hi All I am very new to Open Scene Graph and please accept my apology if this is a very obvious question. Your answer is grateful appreciated. Currently, I build a triangle mesh in osg (eg. triangle mesh is a teddy bear model) I want to implement 2 texture (eg. hair.jpg and skin.jpg) Is there a way i can blend 2 texture together on one single triangle mesh? (eg. hair.jpg showing on one side of the teddy bear model and skin.jpg showing on the other side?) Between them, they can blend together nicely in some way? In the other words, is there a way we can control the texture based on the mesh vertices coordinate information with multiple texture? Thank you very much and sorry this might be a very obvious question. Your Answer will be very helpful. Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31690#31690 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Rendering left right stereo frames in separate threads?
Thanks for your help Robert. I think I will take your advice as to seeing why my app is so cpu limited. I am doing a 600 particle simulation using the bullet physics library. Therefore, I have 1 geometry, 600 geodes, 600 materials, and 600 Positionattitudetransforms. The shared geometry and the materials are attached to the geodes which are then attached to the PAT's. The application runs in real time, and every frame each sphere position and material color changes. I do all the physics stuff and the updating of the positions and materials in a separate thread. So the main OSG thread just runs viewer.frame() with no node update callbacks. I am running the viewer in single threaded mode. I profiled the main thread and find that most of the time spent is in osg::group::computebound and osg::matrixd::premult, premulttranslate, postmult, etc. Is there maybe another structure other than Positionattitudetransform that I can use where I can do all the matrix computations in my other thread so that viewer.frame() doesn't have to do them? Any other suggestions? ... Thank you Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31639#31639 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Rendering left right stereo frames in separate threads?
Hi, I have a 1 camera 1 viewport OSG app that uses close to 50% of the CPU. When I enable stereo (anaglyph/quad buffered), CPU utilization nearly doubles. Is there a way to split the left and right eye frame rendering into separate threads so that I can take advantage of mulitcore? I am using osg 2.8.3 on windows. ... Thank you Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31539#31539 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] EXTERNAL: Re: TerraPage terrain LODs are jumping again - have LODranges to b
Hi Martin, A fix for this was submitted last month to osg-submissions but I think it's been overlooked. Please see: http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/2010-August/006869.html The problem was obscured because it only happens when the loaded PagedLOD count exceeds _targetMaximumNumberOfPageLOD. It is also obscured in OSG versions prior to 2.9.x that seem to use expiryTime differently. Regards, Brian -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Martin Scheffler Sent: Wednesday, September 08, 2010 9:10 AM To: osg-users@lists.openscenegraph.org Subject: EXTERNAL: Re: [osg-users] TerraPage terrain LODs are jumping again - have LODranges to b OK, I managed to make this reproducible. I am attaching a zip with a terrain and a cpp file. If it does not work then get it here: http://www.megaupload.com/?d=TZZMVTHZ This archive contains a terrapage terrain. I was not able to find freely available txp files, so I had one generated. Feel free to use this for examples if you ever need a terrapage terrain. The cpp in the archive simply displays the terrain and then wastes time in a loop printing strings to the console. The terrain looks good when I don't print too many strings, but when I make it print more strings then the spazzing begins. I will have to let this rest for a few days, but will have to solve this eventually. So any ideas are appreciated. Thanks! Cheers, Martin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=31416#31416 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Issue with normal vectors
Just try this and see how it works: geometry-setNormalBinding(osg::Geometry::BIND_PER_VERTEX); Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. -osg-users-boun...@lists.openscenegraph.org wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: Werner Modenbach werner.modenb...@texion.eu Sent by: osg-users-boun...@lists.openscenegraph.org Date: 08/26/2010 07:08AM Subject: Re: [osg-users] Issue with normal vectors Thanks Robert, I get closer to it. Just for verification: If I have i.e. 10 vertexes and I get 20 calls to the callback method each defining a triangle. Each call gives me 3 indexes, 3 normals and 3 texcoords. Right now I just push everything into the corresponding arrays and at the end I call: geometry-addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::TRIANGLES, 0, osgVertexIndices-size())); You say this will not work because: 1) geometry-setNormalBinding(osg::Geometry::BIND_PER_PRIMITIVE_SET); expects just 1 normal for the whole thing (?) 2) Texture coordinates are allways bound per vertex? In this case I have to: 1) initialize a normal array with Vec3(0.0, 0.0, 0.0) for each triangle callback I have to look on each vertex index , if the indexes normal is 0 if yes: just set it if no: duplicate the vertex at the end of the vertexes and push_back the normal 2) do something comparable on the texcoords Is that your recommendation? Is there any way to bind normals to the vertex indexes? Thanks in advance! - Werner - Am Donnerstag, 26. August 2010 12:06:34 schrieb Robert Osfield: Hi Werner, BIND_PER_PRIMITIVE_SET will mean that you'll have one of the associated attribute (i.e. colour, normal) per osg::PrimitiveSet attached the osg::Geometry, so if you have one osg::DrawElementsUShort used for the triangles then you'll need just one of the associated attribute for it. BIND_PER_PRIMITIVE will apply the attribute per primitive in you case per triangle. Tex coords in the OSG are always bound per vertex, there isn't a control to alter this. If you have a vertex array and indices for your triangles the natural thing to do would be to use a osg::DrawElementsUShort(GL_TRIANGLES) then use push_back(tri.p1) for each index on each triangle. I would suggest binding the normals per vertex, you'll have to do this for the tex coords as well. If a single vertex will have multiple tex coords or multiple normals associated with it due to differences in the triangles then you'll need to duplicate the vertices and remap the indices on the triangles to fit this. Robert. On Thu, Aug 26, 2010 at 10:38 AM, Werner Modenbach werner.modenb...@texion.eu wrote: Thank you Paul for your response. Yes, you are right, the solution isn't perfect at all. But I'm integrating some external code which is just giving me a vertex array and a per triangle callback with vertex indexes and normal and texture coords. And further more I need some screenshots very urgently for a customer presentation. The performance improvement has to wait :-( So I try to analyse why it's not working. And I detected something I don't understand. In my opinion it should give the same result having: 1) one normal per triangle an binding PER_PRIMITIVE 2) 3 times the same normal and binding PER_PRIMITIVE_SET But it doesn't. So I'm confused. Thanks for further hints. - Werner - Am Mittwoch, 25. August 2010 22:41:14 schrieb Paul Martz: Werner Modenbach wrote: Maybe someone can give me some explanation on my stupid little problem. I have a geometry being composed of TRIANGLES. I have a vertex-array, a verted-index-array and a normal-array assigned to my geometry. Off-topic: Do you need to use the vertex-index-array? It is deprecated: /** deprecated - forces OpenGL slow path, just kept for backwards compatibility.*/ void setVertexIndices(IndexArray* array); 3 indexes and 3 normals per Triangle. Normal binding is set to BIND_PER_PRIMITIVE_SET. Unfortunately the rendering shows the geometry flat in curious dark colors and some unexpected light behaviour. For analysis purpose I set the normal binding to BIND_PER_PRIMITIVE and pushed just 1 normal per TRIANGLE. Everything looks good except I see the triangles and the geometry isn't smooth. The next test is pushing the same normal vector 3 times and setting the binding back to BIND_PER_PRIMITIVE_SET. In my understanding this should give the same optical result as before. Unfortunately it doesn't
Re: [osg-users] Issue with normal vectors
Try BIND_PER_VERTEX Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. -osg-users-boun...@lists.openscenegraph.org wrote: - To: osg-users@lists.openscenegraph.org From: Werner Modenbach werner.modenb...@texion.eu Sent by: osg-users-boun...@lists.openscenegraph.org Date: 08/25/2010 04:16PM Subject: [osg-users] Issue with normal vectors Maybe someone can give me some explanation on my stupid little problem. I have a geometry being composed of TRIANGLES. I have a vertex-array, a verted-index-array and a normal-array assigned to my geometry. 3 indexes and 3 normals per Triangle. Normal binding is set to BIND_PER_PRIMITIVE_SET. Unfortunately the rendering shows the geometry flat in curious dark colors and some unexpected light behaviour. For analysis purpose I set the normal binding to BIND_PER_PRIMITIVE and pushed just 1 normal per TRIANGLE. Everything looks good except I see the triangles and the geometry isn't smooth. The next test is pushing the same normal vector 3 times and setting the binding back to BIND_PER_PRIMITIVE_SET. In my understanding this should give the same optical result as before. Unfortunately it doesn't and everything is dark again. I guess, I misunderstand something with the normal bindings. Any hint is highly appreciated. Thanks in advance - Werner - ___ 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] FBX Plugin: animation speed not as expected...
Hi Alessandro and Michael, I have similar timing-related playback errors on a multi-take FBX exported from MotionBuilder. Playback in: OSG 2.9.8 OSG FBX plugin built with: FBX Sdk 2011.2: fbxsdk_md2005.lib / fbxsdk_md2005d.lib FBX exported from: MotionBuilder 2011 QuickTime can move between all twenty(ish) animation takes and play them with proper timing. The only oddity is that after each animation plays, there is a variable length dead space on the playback timeline in which the model does not move. For example, the first 40% of playback is animated normally, then it stays in a static pose for the remaining 60% of the timeline. Playback is different using the osgViewer modified for FBX playbacks and changing takes/animations when a key is pressed. Calling playAnimation() moves the character to the correct initial pose but he does not move. In the debugger, the animation durations appear correct (e.g., 12 seconds) but for most takes the model is motionless the whole time. For a few takes, after a long pause the model eventually runs part of the animation at very high-speed, in the way that Alessandro's 3-bouncing-balls model played at high speed. Then even these return to a static pose for the remainder of their play time. My best guess is the timing is thrown off and this is somehow compounded across takes. The plugin has FPS hard-coded to 25 fps so we tried exporting at both 25 fps and 30 fps with only slightly varying results. I can email a sample file to demonstrate this (~15 MB). Thanks, Brian From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Alessandro Terenzi Sent: Friday, July 09, 2010 6:56 AM To: OpenSceneGraph Users Subject: EXTERNAL: 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.commailto:a.tere...@gmail.com wrote: 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.commailto:mplati...@gmail.com wrote: 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.orgmailto: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] [osgPlugins] Exception Raised in Loading Multiple Collada Files with readNodeFile()
Hi, I have a problem loading multiple collada files into osg. here's the code: osg::Node* node1 = osgDB::readNodeFile(tank.dae); osg::Node* node2 = osgDB::readNodeFile(hand.dae); There's an heap allocation exception when the code is trying to load the second dae file. Weird that if the second file is an ive file, everything seems fine. Thank you! Cheers, Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=27919#27919 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Increase image-quality - increase 'Draw' time
Rick, The draw/gpu time is going up because you're making it do more work. Google is your friend, look up the terms to get a basic understanding what they are. Brian From: rick.apple...@altenpts.nl Date: Thu, 18 Mar 2010 15:18:07 + To: osg-users@lists.openscenegraph.org Subject: [osg-users] Increase image-quality - increase 'Draw' time Hi everyone, We were just doing some performance testing when we noticed that increasing the image quality in the NVidia control panel (adding anisotropic filtering, anti-aliasing and multi-sampling) makes the time spent in the 'Draw' section increase greatly. This wasn't something we were expecting. The time in GPU also goes up, but that is to be expected. We're assuming the extra time is spent in the driver somewhere, but we have no clue why. Would anyone dare to hazard a guess? Thank you! Cheers, Rick -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=25798#25798 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _ Hotmail: Trusted email with powerful SPAM protection. http://clk.atdmt.com/GBL/go/210850553/direct/01/___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Off Topic: EPX-50 Anyone know anything about these?
Folks, I'm looking for any info I can find on the Rockwell Collins EPX-50. One of our marketing guys wants to move our visual applications to these. We currently run osg on commodity hardware. Brian _ Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID27925::T:WLMTAGL:ON:WL:en-US:WM_HMP:032010_1___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Would someone be willing to help me diagnose a performance issue?
At the highest level: Update - cpu processing your application is performing Cull - cpu processing performed by osg in traversing the scene graph and packaging drawing state Draw - cpu processing for sending drawing state to gpu and gpu processing of the drawing state If Update stage is large, you need to determine what part of your application is taking the time and optimize it. If Cull stage is large the scene hierarchy is too complex and needs to be optimized - spatial optimization, flatten static hierarchies, ... If Draw stage is large then you need to determine if you are vertex or pixel limited. If you grab the window corner and shrink/expand it's size and the performance increases/decreases significantly, then you are pixel/fill limited (too much depth complexity/too much pixel processing). If the performance doesn't change then you are probably vertex/transform limited (too many verts/too much vertex processing). It's actually much more complex than this, but it's how I start diagnosing performance issues. Run your scene in osgViewer to see how fast it renders. You might have to build the scene in your regular app and then save the scene root to an .ive file, which you can load into osgViewer. A really good tool to use is an OpenGL command logger. It logs all the actual OpenGL commands that OSG is issuing and can help identify problem areas. Brian -osg-users-boun...@lists.openscenegraph.org wrote: - To: osg-users@lists.openscenegraph.org From: Frank Sullivan knarf.navil...@gmail.com Sent by: osg-users-boun...@lists.openscenegraph.org Date: 11/10/2009 12:41PM Subject: [osg-users] Would someone be willing to help me diagnose a performance issue? Hello, I have two applications, both of which are displaying basically the same scene. One application runs at 230+ fps while the other runs at about 45 fps. I'm trying to figure out what is causing this performance difference. Using high-precision timers, I've been able to determine that the difference occurs somewhere in the rendering of the scene graph, but I'm not 100% sure where. I have a couple of ideas, but each will take some amount of time to investigate, and so I was hoping someone might be able to lead me towards the most-correct answer. The first idea I had concerns differences in how the scene graphs are structured in each application. The quick app works simply by loading the three models that it needs (from FLT files, so these 'models' are in fact complex sub-graphs) and attaches them to the root node, and sets that root node as the scene data. The slow app loads every model that could possibly ever be used (52 in all, and again each 'model' could actually be a complex sub-graph). These 52 nodes are then attached to the root, and their visibility is turned off by setting their node mask to 0. Then, if the user of the application wants to see a model, the app will copy the node (and all of it's children) and then add this copy to the scene root group, with the visibility turned on. This way, if the user of the app wants to populate the scene with many instances of the same model, they can do so, because each time they do it, a separate copy of the node is made. I realize that there are a lot of things that can be done to make the slow app more memory-efficient. For instance, it could use lazy loading to load a model only when it is needed (although this may cause a noticeable delay, but that would probably be fine). And if the user wants to see several instances of this model, this could be accomplished without copying the model's entire subgraph. Instead, we could simply create a new matrix transform, and add THAT to the root, and add the model's node as a child of this new matrix transform (at which point, the model's node will have more than one Matrix Transform parent). However, these issues seem to pertain more towards memory efficiency than rendering efficiency, so I'm not sure if this is going to solve my immediate problem (although it is almost certainly something I will implement later on). Related to this, I was wondering if anyone had an explanation as to what the Camera / View statistics referred to. I read the Quick Start Guide, and it had excellent information about the Event/Update/Cull/Draw/GPU chart at the top of the statistics screen, but I'm not exactly sure what the statistics in the Camera / View windows refer to. For instance, does the Vertices stat refer to the total number of vertices in all of the drawables, whether those drawables are visible or not? The reason I ask is that, in terms of these statistics, both the Quick App and the Slow App have nearly-identical numbers in the View section, but in the Camera section, the Slow App's numbers are way, way, way higher. I wonder if this tells me something about how to optimize the Slow App to bring it up to speed. The other major difference I noticed was in the threading model. The Quick App uses DrawThreadPerContext and the Slow App uses
Re: [osg-users] Loading mesh without textures
Just loop it through osgconv to strip the textures out. osgconv original_file_with_textures.ive new_file_no_textures.osg osgconv new_file_no_textures.osg new_file_no_textures.ive Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: osg-users@lists.openscenegraph.org From: Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com Sent by: osg-users-boun...@lists.openscenegraph.org Date: 10/15/2009 09:02AM Subject: Re: [osg-users] Loading mesh without textures Hi Martin, This does not seem to work. The removeTextureAttribute method is called, but I can still see the textures on the meshes. Is this the correct way to remove the textures? Keep in mind that Drawables also have a stateset which you won't get to by using the code you posted. So in addition to removing the textures on all statesets assigned to nodes, you also need to override apply(Geode) and loop through all Drawables and remove the textures there too. If that still doesn't work, then you could use osgDB::writeNodeFile() after running the visitor, to output the resulting subgraph to a .osg file which you can load in a text editor to see where the remaining textures are. 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, ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Rendering Optimizations Not Working
I found the problem. The complex app was creating it's own root node and setting it's rendering hint to transparency. Not sure why it did that. Now it's working like a charm. Thanks, Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17742#17742 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Rendering Optimizations Not Working
Hi Robert, My comment Not sure why it did that was about why the complex app wanted to set the transparency, not why it changed the performance. Once I found it I understood what it was doing - render order based on distance from camera instead of order based on optimized state. BTW - kudos to the developers of bugle. I've never used an opengl trace logger before and was really excited about the insight it provides. Thanks for your help. Brian Date: Wed, 30 Sep 2009 15:52:06 +0100 From: robert.osfi...@gmail.com To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Rendering Optimizations Not Working Hi Brian, On Wed, Sep 30, 2009 at 2:10 PM, Brian Hill br...@hotmail.com wrote: I found the problem. The complex app was creating it's own root node and setting it's rendering hint to transparency. Not sure why it did that. Now it's working like a charm. Setting hint to drop the geometry into transparent bin - which is depth sorted rather than state sorted will break state sorting, so you'll end up with many more state changes that incur greater CPU load on draw traversal and load down on the GPU. So if you keeping the number of transparent objects to the minimum that need it results in best performance. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _ Microsoft brings you a new way to search the web. Try Bing™ now http://www.bing.com?form=MFEHPGpubl=WLHMTAGcrea=TEXT_MFEHPG_Core_tagline_try bing_1x1___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Rendering Optimizations Not Working
Folks, I'm rendering a scene with 3 different objects instanced 500 times each. When I run it in osgviewer is achieves 1000 hz, when I run it in a simple osgViewer::Viewer based app it runs at 1000 hz, when I run it in a more complex osgViewer::Viewer based app it runs at 30 hz. All the additional time is in the draw process. I used bugle to capture the opengl output (bugle is fantastic!) from the 3 apps and the first two outputs were practically identical - the 3 objects graphics state are setup once, followed by 500 glLoadMatrix and glCallList calls. 3 x (graphics setup, 500 x (matrix, calllist)) 3 graphics state changes The more complex app is completely different, the objects are drawn in arbitrary order with their graphics state updated every time. 3 x (500 x (graphics, matrix, calllist)) 1500 graphics state changes All apps call osgUtil::Optimizer::optimize on the scene. I'm digging through the complex app to see if there's a disable_rendering_optimizations call. Does anyone know what would cause this type of behavior? Thanks, Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose.. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Huge triangle mesh / Geometry Clipmap
Have you looked into streaming meshes? I've only looked at them briefly, but they look somewhat related. Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: David Angelo vonengel.gro...@googlemail.com Sent by: osg-users-boun...@lists.openscenegraph.org Date: 09/16/2009 03:26PM Subject: Re: [osg-users] Huge triangle mesh / Geometry Clipmap Hi Robert, hi folks, last century. ;-) Good to have an expert in this area. About VPB and osgEarth. I think so too. Nevertheless, they are both great tools! Thumbs up for the developers. The input data I currently have is a regular grid with holes. At the moment support for irregular meshes is not needed. All mesh manipulationa will be based on the regular grid. Do you have a hint how to efficiently triangulate this regular grid with holes? Since the resulting mesh will be pretty big and may not fit in the texture memory (I also have to share resources with a ravenous volume renderer), my first thought was using a continious LOD (no popping) approach. Does anybody have experience with such an algorithm? This algorithm may also be interesting for VPB. Ah, I almost forgot, the hole algorithm must be an out-of-core solution. So most propably I need to do paging at least between the main memory and the texture memory. Paging between hard disk and main memory may not be needed, since they normally have machines with quite a lot of memory. Thanks in advance for your comments. Cheers, David On Wed, Sep 16, 2009 at 10:27 AM, Robert Osfield robert.osfi...@gmail.com wrote: Hi David, I used to work in the oil-gas sector so I'm rather familiar with needs for visualizing large seismic horizon meshes, albeit a bit rusty - it was last century that I did the work :-) VPB and osgEarth aren't likely to be too helpful for you as they really aren't geared up for the quite specific type of needs you have. What route you take depends upon some of the constraints that you might be able to put upon the geometry. For instance, is it a regular grid with holes, or does this mesh need to be an irregular triangle mesh? Robert. On Tue, Sep 15, 2009 at 8:40 PM, David Angelo vonengel.gro...@googlemail.com wrote: Hi folks, I am starting to work on a project, where I have to render and manipulate huge triangle meshes (~200 mio. vertices). The meshes are seismic horizons, which are quite similar to ordinary terrain meshes. However, theses meshes can and will have holes. I think both VPN and osgEarth (which are pretty cool and I used them in different contexts) are not suited for this purpose. For the rendering part, my first idea was to use the Geometry Clipmap: http://research.microsoft.com/en-us/um/people/hoppe/geomclipmap.pdf technique by Losasso Hoppe. Has anybody already implemented it (preferably with OSG), or does anybody know if this technique supports meshes with holes? Perhaps an integration of this technique into VPB would also be worth thinking of. What do you think? Cheers, David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Transforming on coordinate system
Hi Akilan, The matrix you created (rot), does rotate 90 degress around the X-axis. You need to look at the resulting geometry position to determine if it's what you really want. BTW, There's a fantastic book for learning all about transforms and I think it should be required reading for anyone working with OSG. Mathematical Elements for Computer Graphics, David Rogers and Alan Adams Brian From: akilan.thangam...@gmail.com Date: Fri, 11 Sep 2009 11:44:47 + To: osg-users@lists.openscenegraph.org Subject: [osg-users] Transforming on coordinate system Hi, I have drawn a geometry normal to XY-plane and I would like to transform it in such a way that it must be normal to YZ-plane.I did rotation for 90 degree about X-axis. Will it do what I wanted to do? The corresponding code would seems to be , .. osg::Matrix rot=osg::Matrix::rotate(osg::DegreesToRadians(90.),osg::Vec3f(1.0,0.0,0.0)); .. Thank you! Cheers, Akilan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17275#17275 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _ With Windows Live, you can organize, edit, and share your photos. http://www.windowslive.com/Desktop/PhotoGallery___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Paging strategies for road tiles
Hi Bjorn, It looks like the problem is your tiles are larger than 2000 m radius. Try setting the range to the tile radius, or some multiple (1.5 * radius, 2.0 * radius). Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: Björn Blissing bjorn.bliss...@vti.se Sent by: osg-users-boun...@lists.openscenegraph.org Date: 08/26/2009 11:56AM Subject: [osg-users] Paging strategies for road tiles Hi all, My application involves road vehicles driving down long roads. Approx 1000 km of continuous road. The problem is that I can only hold about 100 km of road before system memory runs out. Plan B then naturally falls on some sort of paging strategy. I rewrote the software so it generates .ive files containing about 10-30 km road. Then the plan was to use pagedLOD to page in the files when needed. My test program only uses four of these tiles, but I do not seem to get it right. My pagedLOD nodes all lie under the scene graph root. Each one only contains a reference to the corresponding .ive file and a range set from 0 to 2000 (since I don't want the next geometry to be paged in until I am closer than 2000 meters). The center of each pagedLOD node is set to the center point of the geometry in the file and the radius is set to half the length of the road in the file. But no geometry is ever paged in. If I set the center to (0, 0, 0) the geometry will page in the first segment of road, but then the geometry disappears when I traveled more than 2000 meters. The other tiles never shows up. I am obviously missing something when setting up my pagedLOD. If someone could give me a hint I would be most thankful. Best Regards, Björn If I output my scenegraph to a osg-file this is the content: Group { nodeMask 0x cullingActive TRUE num_children 4 PagedLOD { nodeMask 0x cullingActive TRUE Center 8933.58 -982.774 0 Radius 9008.5 RangeMode DISTANCE_FROM_EYE_POINT RangeList 1 { 0 2000 } NumChildrenThatCannotBeExpired 0 FileNameList 1 { c://tile1.ive } num_children 0 } PagedLOD { nodeMask 0x cullingActive TRUE Center 19930.8 8704.41 0 Radius 6001 RangeMode DISTANCE_FROM_EYE_POINT RangeList 1 { 0 2000 } NumChildrenThatCannotBeExpired 0 FileNameList 1 { c://tile2.ive } num_children 0 } PagedLOD { nodeMask 0x cullingActive TRUE Center 34616.1 17445.3 0 Radius 11875 RangeMode DISTANCE_FROM_EYE_POINT RangeList 1 { 0 2000 } NumChildrenThatCannotBeExpired 0 FileNameList 1 { c://tile3.ive } num_children 0 } PagedLOD { nodeMask 0x cullingActive TRUE Center 47754.4 25857.3 0 Radius 3955 RangeMode DISTANCE_FROM_EYE_POINT RangeList 1 { 0 2000 } NumChildrenThatCannotBeExpired 0 FileNameList 1 { c://tile4.ive } num_children 0 } } ___ 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 read big openscenegraph files?
Use the source attached to this link. It should do what you want. http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg05445.html Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: osg-users@lists.openscenegraph.org From: Trajce Nikolov nikolov.tra...@gmail.com Sent by: osg-users-boun...@lists.openscenegraph.org Date: 08/25/2009 04:54PM Subject: Re: [osg-users] How to read big openscenegraph files? Hi Colli, please post the master.flt. I have done this in the past, and yes, I have managed dbs larger then 6gb. I ll help you. it is trivial Nick http://www.linkedin.com/in/tnikolov Sent from Benoni, Gauteng, South Africa On Tue, Aug 25, 2009 at 10:50 PM, Colli Bann coli...@gmx.de wrote: Hi, i am sorry for not providing all informations! I was running osgconv on linux 11. The cpu tool over 90% and from memory over 90% as well, before it blew up with a bad alloc. I resized the swap space to over 20Gig, because i thought, that he had problem with memory allocation because it seems, like some of you mentioned, that osgconv is first trying to get all of the 5 Gig into its memory. Yes, there is a master.flt, and i will try to transform it, but i do not know, if i am able to do that because i already to try to do an osgDB::ReadNodeFile but the outcome was the same: it stopped with a Bad alloc. Thank you so much, but i wonder, how other companies manage to handle files bigger than 6 Gig. Thank you! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16722#16722 ___ 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] How to read big openscenegraph files?
Hi Nick, It won't touch any nodes other than the externally referenced node/file. Check out the code, it's really pretty simple. Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: Trajce Nikolov nikolov.tra...@gmail.com Sent by: osg-users-boun...@lists.openscenegraph.org Date: 08/25/2009 05:33PM Subject: Re: [osg-users] How to read big openscenegraph files? this will work for some cases , not for all. All depends how TerraVista exported the database. As I can recall, there are several options for the origins. You might end up with matrix attached to the Xref nodes in the master file. But it is worth of giving it a try Nick http://www.linkedin.com/in/tnikolov Sent from Benoni, Gauteng, South Africa On Tue, Aug 25, 2009 at 11:28 PM, Brian R Hill bhil...@csc.com wrote: Use the source attached to this link. It should do what you want. http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg05445.html Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • - osg-users-boun...@lists.openscenegraph.org wrote: - To: osg-users@lists.openscenegraph.org From: Trajce Nikolov nikolov.tra...@gmail.com Sent by: osg-users-boun...@lists.openscenegraph.org Date: 08/25/2009 04:54PM Subject: Re: [osg-users] How to read big openscenegraph files? Hi Colli, please post the master.flt. I have done this in the past, and yes, I have managed dbs larger then 6gb. I ll help you. it is trivial Nick http://www.linkedin.com/in/tnikolov Sent from Benoni, Gauteng, South Africa On Tue, Aug 25, 2009 at 10:50 PM, Colli Bann coli...@gmx.de wrote: Hi, i am sorry for not providing all informations! I was running osgconv on linux 11. The cpu tool over 90% and from memory over 90% as well, before it blew up with a bad alloc. I resized the swap space to over 20Gig, because i thought, that he had problem with memory allocation because it seems, like some of you mentioned, that osgconv is first trying to get all of the 5 Gig into its memory. Yes, there is a master.flt, and i will try to transform it, but i do not know, if i am able to do that because i already to try to do an osgDB::ReadNodeFile but the outcome was the same: it stopped with a Bad alloc. Thank you so much, but i wonder, how other companies manage to handle files bigger than 6 Gig. Thank you! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16722#16722 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users 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] Turning off main osgViewer camera
Try setting the main camera node mask to 0 when you don't want it to render and 0x when you do. Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: J.P. Delport jpdelp...@csir.co.za Sent by: osg-users-boun...@lists.openscenegraph.org Date: 08/11/2009 10:15AM Subject: Re: [osg-users] Turning off main osgViewer camera Hi, sorry I might have answered too fast. What do you want the main camera to render when you are taking screenshots? What is it rendering when when you only attach the FBO camera? AFAIK you still need to call viewer frame() to trigger the FBO, but you can make the main camera just render nothing. If you want to run an FBO camera without creating a window, then consider the pbuffer option for the main frame buffer. See also maybe the osgscreencapture example. jp J.P. Delport wrote: Hi, have a look at the osgautocapture example. Set the main camera to render offscreen, pbuffer. jp jake chambers wrote: Hi, I have an application where I setup a normal osgViewer view with setUpViewOnSingleScreen(). This works fine. I also create an FBO camera to which I add my scene. When I want to take a screenshot of the application I call osgviewer-setSceneData(myFBOCamera) and render via osgviewer-eventTraversal() / updateTraversal() / renderingTraversals(). After I get the screenshot I restore my normal scene with osgviewer-setSceneData(mySceneData). This also works fine for taking screenshots. What I want to do now is to turn off the main camera whilst I render the FBO (ie if I create a lot of screenshots for a movie I don't want to render to the screen). How can I turn off the main camera and render only to the FBO? I've tried calling osgviewer-setCamera(NULL) without sucess. Indeed when I meddle with the main camera I dont get a valid image from my FBO. I think this makes sense as the FBO is under the main camera(?). I also tried calling osgviewer-setCamera(myFBO) but no luck that way either. I also can't restore the original camera to the osgviewer. Perhaps I am solving the problem the wrong way - is there a better method? Perhaps having two seperate osgViewer objects? But then I think I have only one conceptual View (my FBO always shows the same view as the main camera, it's only a question of if the main camera should render an image or not), so having one Viewer, one View and two Cameras feels correct - it's just that it doesn't work :-) Thank you! Cheers, jake -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16079#16079 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Infinite Grid in OSG
Andrew, You could implement it as an ortho projection (look at HUD examples) and draw text and lines as geometry based on current scale and position. Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: osg-users@lists.openscenegraph.org From: Andrew Thompson andyb1...@yahoo.co.uk Sent by: osg-users-boun...@lists.openscenegraph.org Date: 08/07/2009 09:42AM Subject: [osg-users] Infinite Grid in OSG Hi there, A simple question, would anyone know how I could implement an infinite grid in OSG? This is an image showing what I am trying to achieve. [Image: http://i137.photobucket.com/albums/q217/andyb1979/InfiniteGrid.png] Ideally as the user zooms in/out I would like the grid to subdivide. Do forgive me if this has been asked before. I found some examples about texturing a geode and moving it with your camera, but I need my grid to be static, starting at the origin, and show divisions in 1/10 unit spacing. Thank you! Andrew -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15955#15955 ___ 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] Infinite Grid in OSG
Andrew, I would recommend converting your glBegin/glEnd code to use native osg drawing constructs (geode,geometry,primitives,...). Check out the osggeometry example. Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: osg-users@lists.openscenegraph.org From: Andrew Thompson andyb1...@yahoo.co.uk Sent by: osg-users-boun...@lists.openscenegraph.org Date: 08/07/2009 10:57AM Subject: Re: [osg-users] Infinite Grid in OSG Ok, so I could use a HUD and attach behind my scene - clever, I like it :-) Now the question is, how do I get access to just glBegin/glEnd? I was thinking of creating a class that inherits ShapeDrawable and just rendering my lines (I have found some legacy code that calculates the lines and subdivisions using simple GL calls). However I realised that was a stupid idea as Shapes do not draw themselves, but ShapeDrawable draws them, so I assume that a custom shape will not get rendered. Thank you! Andrew -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15962#15962 ___ 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] Offscreen Rendering - clamping problem
Folks, I'm doing offscreen rendering using fbos with attached images. I'm also using the postdrawcallback to do additional processing. Currently the image/texture copy occurs before the postdrawcallback resulting in the image/texture not having the postdraw effects. Is there a reason why the copy isn't after the postdrawcallback? Thanks, Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] RenderStage::draw order of copyTexture and PostDrawCallback
Sorry about the multiple posts/wrong subjects. Another copy/paste artifact. Folks, I'm doing offscreen rendering using fbos with attached images. I'm also using the postdrawcallback to do additional processing. Currently the image/texture copy occurs before the postdrawcallback resulting in the image/texture not having the postdraw effects. Is there a reason why the copy isn't after the postdrawcallback? Thanks, Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Offscreen Rendering - clamping problem
I think I found the reason. It looks like X windows doesn't support floating point pbuffers. Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: Brian R Hill/DEF/c...@csc Sent by: osg-users-boun...@lists.openscenegraph.org Date: 08/04/2009 06:02PM Subject: [osg-users] Offscreen Rendering - clamping problem Folks, Sorry for another post on this subject. I just can't figure out how to disable the clamping of the output. I'm want to render offscreen without a window with 32 bit floats. Attached is the sample code I'm working with, it's based on the osgscreencapture.cpp example. It uses a shader to write an input uniform float val to the pbuffer. The val varies from -1.0 ... 2.0. Any help would be appreciated. Thanks, Brian (See attached file: offscreenrender.cpp)___ 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] RenderStage::draw order of copyTexture and PostDrawCallback
Hi JP, I'm using a 3rd party library to do filtering on the rendered image. They do all their magic using opengl in a function call from the postdrawcallback. Here's what it currently does: draw - FBO - copy to cpu - postdraw The postdraw operates on the FBO after it's been copied to the cpu and I never see it. Here's what I want to do: draw - FBO - postdraw - copy to cpu I want to access the image with the filtering effects included. Does this make it clearer? My fallback is to not attach an image to the FBO and do the copying myself in the postdrawcallback after the filtering. Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: J.P. Delport jpdelp...@csir.co.za Sent by: osg-users-boun...@lists.openscenegraph.org Date: 08/05/2009 02:17PM Subject: Re: [osg-users] RenderStage::draw order of copyTexture and PostDrawCallback Hi Brian, Brian R Hill wrote: Sorry about the multiple posts/wrong subjects. Another copy/paste artifact. Folks, I'm doing offscreen rendering using fbos with attached images. I'm also using the postdrawcallback to do additional processing. Currently the image/texture copy occurs before the postdrawcallback resulting in the image/texture not having the postdraw effects. Is there a reason why the copy isn't after the postdrawcallback? Copy to where? In the postdrawcallback you have the result of the rendering to FBO copied back to the CPU (osg::Image) if an image was attached to your FBO camera. You can modify the data in the callback and then call dirty on the image and the texture would be updated on GPU. If you then use this texture you should see changes. The osgprerender example does exactly this. I'm not sure if you are expecting anything else? If so, please provide more details on what you want to do. cheers jp Thanks, Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] RenderStage::draw order of copyTexture and PostDrawCallback
Hi JP, I was trying to determine if the current order (copy image, then call postdraw) was deliberate for specific reasons, or if it just got coded that way. I understand where you would want the copied image to be available in the postdraw, but I also understand where you would want the postdraw to apply to the image before the copy. It just depends on what the intended purpose of the postdraw is. Personally I feel the postdraw should occur before the copy and that the copied image should be accessed on the cpu side during the update phase. Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: J.P. Delport jpdelp...@csir.co.za Sent by: osg-users-boun...@lists.openscenegraph.org Date: 08/05/2009 03:27PM Subject: Re: [osg-users] RenderStage::draw order ofcopyTexture and PostDrawCallback Hi, Brian R Hill wrote: Hi JP, I'm using a 3rd party library to do filtering on the rendered image. They do all their magic using opengl in a function call from the postdrawcallback. Here's what it currently does: draw - FBO - copy to cpu - postdraw The postdraw operates on the FBO after it's been copied to the cpu and I never see it. Here's what I want to do: draw - FBO - postdraw - copy to cpu I want to access the image with the filtering effects included. Does this make it clearer? Yes. My fallback is to not attach an image to the FBO and do the copying myself in the postdrawcallback after the filtering. This sounds OK to me, do you have problems with it? AFAIK you cannot change the order for a single FBO camera. The only other option I can think of (if you don't want to manually copy) is to create a second FBO camera solely for copying the result of the filtering (input texture to the second camera) to an osg::Image. Then you have draw - FBO1 - postdraw - FBO2 - to CPU jp Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: J.P. Delport jpdelp...@csir.co.za Sent by: osg-users-boun...@lists.openscenegraph.org Date: 08/05/2009 02:17PM Subject: Re: [osg-users] RenderStage::draw order of copyTexture and PostDrawCallback Hi Brian, Brian R Hill wrote: Sorry about the multiple posts/wrong subjects. Another copy/paste artifact. Folks, I'm doing offscreen rendering using fbos with attached images. I'm also using the postdrawcallback to do additional processing. Currently the image/texture copy occurs before the postdrawcallback resulting in the image/texture not having the postdraw effects. Is there a reason why the copy isn't after the postdrawcallback? Copy to where? In the postdrawcallback you have the result of the rendering to FBO copied back to the CPU (osg::Image) if an image was attached to your FBO camera. You can modify the data in the callback and then call dirty on the image and the texture would be updated on GPU. If you then use this texture you should see changes. The osgprerender example does exactly this. I'm not sure if you are expecting anything else? If so, please provide more details on what you want to do. cheers jp Thanks, Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers
Re: [osg-users] RenderStage::draw order of copyTexture and PostDrawCallback
Hi JP, I think this is the common case and I always understood postdraw to mean that the camera is done with rendering/drawing. I've always thought of it as the last chance to draw something, essentially a hook into the drawing phase to integrate things that don't fit well in the scenegraph architecture. So, if you wanted to add things to be done before image copy, it should be part of the camera's subgraph. I guess I could do this. Create a custom drawable that call the 3rd party function. The difficulty will be guaranteeing it's the absolutely last thing drawn. The postdraw makes this easy. Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: J.P. Delport jpdelp...@csir.co.za Sent by: osg-users-boun...@lists.openscenegraph.org Date: 08/05/2009 03:53PM Subject: Re: [osg-users] RenderStage::draw order ofcopyTexture and PostDrawCallback Hi, Brian R Hill wrote: Hi JP, I was trying to determine if the current order (copy image, then call postdraw) was deliberate for specific reasons, or if it just got coded that way. I think it was deliberate; however, I didn't write the code. I understand where you would want the copied image to be available in the postdraw, I think this is the common case and I always understood postdraw to mean that the camera is done with rendering/drawing. So, if you wanted to add things to be done before image copy, it should be part of the camera's subgraph. but I also understand where you would want the postdraw to apply to the image before the copy. It just depends on what the intended purpose of the postdraw is. Personally I feel the postdraw should occur before the copy and that the copied image should be accessed on the cpu side during the update phase. Would it not be a frame late then? I understand your need for more flexibilty ito processing order and copying. I would suggest you have a look at osgPPU where you have more control over these things. jp Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: J.P. Delport jpdelp...@csir.co.za Sent by: osg-users-boun...@lists.openscenegraph.org Date: 08/05/2009 03:27PM Subject: Re: [osg-users] RenderStage::draw order of copyTexture and PostDrawCallback Hi, Brian R Hill wrote: Hi JP, I'm using a 3rd party library to do filtering on the rendered image. They do all their magic using opengl in a function call from the postdrawcallback. Here's what it currently does: draw - FBO - copy to cpu - postdraw The postdraw operates on the FBO after it's been copied to the cpu and I never see it. Here's what I want to do: draw - FBO - postdraw - copy to cpu I want to access the image with the filtering effects included. Does this make it clearer? Yes. My fallback is to not attach an image to the FBO and do the copying myself in the postdrawcallback after the filtering. This sounds OK to me, do you have problems with it? AFAIK you cannot change the order for a single FBO camera. The only other option I can think of (if you don't want to manually copy) is to create a second FBO camera solely for copying the result of the filtering (input texture to the second camera) to an osg::Image. Then you have draw - FBO1 - postdraw - FBO2 - to CPU jp Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: J.P. Delport jpdelp...@csir.co.za Sent by: osg-users-boun...@lists.openscenegraph.org Date: 08/05/2009 02:17PM Subject: Re: [osg-users] RenderStage::draw order of copyTexture and PostDrawCallback Hi Brian, Brian R Hill wrote: Sorry about the multiple
[osg-users] Offscreen Rendering - clamping problem
Folks, Sorry for another post on this subject. I just can't figure out how to disable the clamping of the output. I'm want to render offscreen without a window with 32 bit floats. Attached is the sample code I'm working with, it's based on the osgscreencapture.cpp example. It uses a shader to write an input uniform float val to the pbuffer. The val varies from -1.0 ... 2.0. Any help would be appreciated. Thanks, Brian (See attached file: offscreenrender.cpp) offscreenrender.cpp Description: Binary data ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG and WPF Questions
Hi Martin, I replied to your message earlier, but I thought I would post my experience here for the benefits of those reading this thread down the line: What I did was create a WinForms Control that hosts the OSG window. Look for examples (theres a good one on CodeProject I think) of integrating WPF and OpenGL. OSG will be the same. This is necessary because WPF uses HWNDs only for the top-level window - everything below is DirectX. But a WinForms control has an HWND, and WPF has an interoperability feature where it can host WinForms controls. There are limitations however - principally that transparent WPF popup windows (used for messages, menus, etc) do not show up properly over the OSG window under XP on most NVIDIA graphics cards (non-Quadro cards), according to NVIDIA. One possible workaround would be to have OSG render to a texture and then blit that to a WPF canvas. I have been intending to do this - but have not gotten around to it yet. Currently I just structured my menus to avoid the overlap. I should also mention that it is useful to crank up the OSG render loop during the initialization of the control - not at construction, IIRC. There are a few other hurdles, like having to use the dispatcher to update WPF UI widgets, when the update originates from OSG - but these type of threading issues are to be expected in this type of app anyway. A lot of my daily pain comes from having to drill a piece of information down through several layers of code (abstraction layers for threading and for the managed/native transition) to get from the UI to the OSG render loop, which is again, to be expected. I have found a couple of issues with events, such as WPF not passing drag events (that originated from outside the app) down to OSG - which I dealt with by handling the events at the WinForms level, and then drilling down the mouse drag info to my OSG render loop. Best of luck, Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15651#15651 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgscreencapture offscreen rendering - clamping floats
Folks, I've been working with the osgscreencapature example to use pbuffers for offscreen rendering. I'm having a problem with floating point values being clamped [0.0 - 1.0]. Any ideas on how to turn the clamping off? Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgscreencapture offscreen rendering - clamping floats
I've gone through the archives and thought I had done the right thing, but I still get clamped values. The osgscreencaptuer example uses pbuffers in a unique way (not simply as a camera setRenderTargetImplementation). I'm wondering if there's something special about how they're being used. Here are the highlights: // image creation image = new osg::Image; image-setInternalTextureFormat(GL_RGBA32F); image-allocateImage(w, h, 1, GL_RGBA, GL_FLOAT); // disable clamping osg::ClampColor* clamp = new osg::ClampColor(); clamp-setClampVertexColor(GL_FALSE); clamp-setClampFragmentColor(GL_FALSE); clamp-setClampReadColor(GL_FALSE); sceneroot-getOrCreateStateSet()-setAttribute(clamp, osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE | osg::StateAttribute::PROTECTED); // write float data in fragment shader uniform float val; gl_FragData[0] = vec4(val,val,val,val); // read pbuffer ext-glBindBuffer(GL_PIXEL_PACK_BUFFER, pbo); glReadPixels(0, 0, w, h, GL_RGBA, GL_FLOAT, 0); src = ext-glMapBuffer(GL_PIXEL_PACK_BUFFER,GL_READ_ONLY); // copy to image memcpy(image-data(), src, image_size); ext-glUnmapBuffer(GL_PIXEL_PACK_BUFFER); ext-glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); Thanks, Brian -osg-users-boun...@lists.openscenegraph.org wrote: - To: osg-users@lists.openscenegraph.org From: Art Tevs arti_t...@yahoo.de Sent by: osg-users-boun...@lists.openscenegraph.org Date: 07/24/2009 04:39PM Subject: Re: [osg-users] osgscreencapture offscreen rendering - clamping floats Hi Brian, yes, you need to disable the OpenGL color value clamping. This can be done by this, I think: Code: // disable color clamping, because we want to work on real hdr values osg::ClampColor* clamp = new osg::ClampColor(); clamp-setClampVertexColor(GL_FALSE); clamp-setClampFragmentColor(GL_FALSE); clamp-setClampReadColor(GL_FALSE); // make it protected and override, so that it is done for the whole rendering pipeline node-getOrCreateStateSet()-setAttribute(clamp, osg::StateAttribute:ShockedN | osg::StateAttribute::OVERRIDE | osg::StateAttribute::PROTECTED); cheers, art Brian R Hill wrote: Folks, I've been working with the osgscreencapature example to use pbuffers for offscreen rendering. I'm having a problem with floating point values being clamped [0.0 - 1.0]. Any ideas on how to turn the clamping off? Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15426#15426 ___ 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] Collision Response
Brett, That's a huge and complex topic that's not directly related to OSG. Google collision detection and response. Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: osg-users@lists.openscenegraph.org From: Brett Thomas Lee sudheer_...@yahoo.com Sent by: osg-users-boun...@lists.openscenegraph.org Date: 07/23/2009 08:33AM Subject: [osg-users] Collision Response Hi, I found intersection of a line segment with a triangle mesh using intersection visitor in osg.But I dont want the line segment to penetrate into the triangle mesh.Can someone help me in doing this using osg please. Thank you! Cheers, Brett -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15296#15296 ___ 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] Rendering Performance and Proper Way to have millions of moveable objects
Sounds like a CAD application. Look into occlusion culling and imposters. Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: osg-users@lists.openscenegraph.org From: Andrew Burnett-Thompson aburnettthomp...@googlemail.com Sent by: osg-users-boun...@lists.openscenegraph.org Date: 07/12/2009 05:12PM Subject: [osg-users] Rendering Performance and Proper Way to have millions of moveable objects Hi Robert, Thanks for your reply. Yes I did guess that I'm using the scene graph wrong. Fortunately with regard to our scene, while we have a lot of objects, the detail is not significant. The application allows users to simulate certain conditions that would occur in an industrial plant. So long as the model is a crude reflection of the plant it works, so we are already significantly optimising geometry. Rendering is only required as the user moves around the plant, or if an object is manipulated. During render we are currently hiding the smallest 50% of objects, which works remarkably well to improve usability (A full re-draw is performed when the user stops moving), but still the frame rate drops below interactive levels depending on how many objects remain. With regard to flattening of static transforms - how exactly would we do this? I was thinking to put a PAT as parent of a geode only while the user is picking/manipulating it, then remove it after, somehow matrix-multiplying the transform with vertices to get the new position. Is this possible? With regard to LOD's - sounds like a good plan but I think this may end up using more memory (which is an issue) even though it improves rendering performance. Paging does interest me though. I already set the cull settings to ENABLE_ALL_CULLING. I noticed that shadow occlusion (which I believe means when a large object occludes the camera, objects behind it are culled?) seems to have no effect. Is this due to my flat scene graph? View frustrum culling seems to have the largest effect. With regard to efficiently managing the scene graph (having a balanced tree), thanks for confirming that. I did have a hunch that would be the case but its nice to know. With regard to state sharing - is it possible to have one state object on multiple geodes? Or did you mean have multiple statesets with similar states? Cheers for the feedback much appreciated, Andrew ___ 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] Custom EventHandlers and Manipulator problem
Hi, I am using a combination of osg manipulators (fly, drive, etc.) with a KeySwitchManipulator. After these are set up, I have several tools which can be loaded at runtime, and each of them can register event handler callbacks for things like mouse up and mouse down. These handlers are working correctly, except the motion model manipulators furnished by osg are still getting the events, despite the fact that the handlers return true indicating the event was handled. So when you click and drag a building, for example, the view will rotate and spin in an undesirable fashion. I ran across a thread (http://forum.openscenegraph.org/viewtopic.php?t=2544highlight=return+manipulator) from back in May 2009 where Robert said: In OSG-1.x events were not passed on if handled. In OSG-2.x events are passed on to all manipulators/event handlers and it's the event handlers responsibility to decide whether they want to ignore handled events or not. This approach is more flexible and robust once you now about if (handled) trick. So what I am wondering is, what is the correct way to keep the built-in manipulators from responding to these handled events? I know about using the following code in custom maniuplators: Code: if (ea.getHandled()) return false; But what about with the built-in ones? And does the order in which the event handlers are registered affect anything? I am using OSG 2.6.1 with MS Visual Studio 2008 on Vista-64. Thank you! Cheers, Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14712#14712 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] MatrixManipulator::home(double) doesn't seem to work
Hi, I am trying to reset my viewer's position in response to an external UI event using the home(double) function on MatrixManipulator, but to no avail. The call to setHomePosition() is working correctly, as I can hit the spacebar, and it takes me to the proper location. The online page for MatrixManipulator does not say what the double parameter does, but a comment in the code says it is the current time. I tried passing in viewer-elapsedTime() and then I tried 0.0 - and neither seemed to work. On digging through the code, it appears that KeyswitchMatrixManipulator does not actually implement this function (at least in my version of OSG - 2.6.1). I then tried getting the current MatrixManipulator from it and calling home(double) directly on that - still with no effect. Am I doing something wrong? Is there a better way to set the view to a desired location and orientation? Is this a bug that's been fixed in a more recent version? Thank you! Cheers, Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13969#13969 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Cygwin Compile Question OSG 2.8.1
Alberto Luaces wrote: on the Cygwin list just told me that my OSG package would only be included in Cygwin if it used the X subsystem instead of the native windows one. I may be confusing two issues but seems I got OSG to build some of the examples (osgViewer using GraphicsWindowX11.cpp). It took a little tweaking in the cmake config - paths are real critical. Is that just building X apps with OSG as opposed to OSG being built as X. Even though you use a configuration heavy on X - it still build OSG as native Windows. It would help if Christopher would post the errors - I've had enough issues over time - I've probably seen it. I see he has posted a dump. Bk ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Outline Effect traversal crash
Hi Maciej, Thank you for the example. It seems to be a lot faster than what I was doing earlier. Before when a node was selected, I removed it from its parent, created an osgFX::Scribe effect and placed it under the parent, and then reattached my node under that. But there was a slight delay between when the node disappeared, and when it reappeared selected. Because the nodes are buildings placed on geo-specific high-resolution imagery, this had the curious effect of make the building appear to be push into the terrain temporarily, and then spring back into position with the Scribe effect applied. Thanks for the links to the post and to the cel-shading article - those helped a lot! I did have one question about the new selection method you demonstrated. It makes the building appear to be all white, since the texture is turned off. Is this correct? I tried disabling that part of the code, but now the backfaced outlines are not enough to make the object stand out. What I would really like to do is outline the object in a striking color (say bright yellow, or something) and then render the textured object with a slight cast if the same color. Is this possible in OSG? I have searched though the archives, but without a lot of success yet. Just a pointer to some techniques that might work, or to a forum thread I missed would be a great help! Thank you! Cheers, Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12792#12792 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Outline Effect traversal crash
Hi Robert, Thanks for that clarification, as my understanding of where nodes should be added and removed was exactly backwards. I did paraphrase my code extensively, because there was a lot of unrelated code - but I guess I didn't include enough. I went to create a simpler example using osgcompositeviewer as a starting point, when I noticed that it is doing exactly the same thing that I am trying to, only in the handle() function of osgaGA::GUIEventHandler, which is called during the event traversal of frame(). When you said it's best to avoid modifying the scenegraph during a traversal, did that specifically mean the Update Traversal, when NodeCallbacks are called, and that modifications in event callbacks are OK? Thank you! Cheers, Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12675#12675 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Outline Effect traversal crash
Hi, I switched my code around to where the model was being added from the main loop rather than the update traversal, and it was still crashing. On closer examination I noticed that the crashes were occurring during the render traversal, so I began to suspect the effect itself. When I replaced the effect with an instance of osgFX::Scribe, then everything worked correctly. So something was amiss in the Outline effect itself. I was using it only because I did not know about the Scribe effect, which is better for my purposes anyway. Thank you! Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12692#12692 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Outline Effect traversal crash
Hi, I am trying to implement a mechanism by which selected objects in my scene are highlighted. Searching the forum I found a reference to the Outline effect (an implementation of osgFX::Effect) on Ulrich Hertlein's web site (http://www.sandbox.de/osg/), and I have attempted to integrate it into our app - however, most of the time, whenever the object which is outlined first comes into view, the app crashes in osg::NodeCallback::traverse, because the _nestedCallback member is corrupted. This is on Windows Vista-64, running OSG 2.6.1 built with Visual Studio 2008, in Debug mode. We are running OSG multithreaded, and all my code setting up the effect is called from osg::NodeCallback::operator() on the render thread. The general flow is as follows: Code: osg::NodeCallback::operator() { osg::PositionAttitudeTransform* modelTransform; // local transform to position the model in the world osg::Node* someChild; // some model osg::ref_ptrosgFX::Effect fxNode = new osgFX::Outline(); fxNode-addChild( someChild ); modelTransform-addChild( fxNode.get() ); } Am I missing something obvious? If not, ideas or debugging strategies would also be greatly appreciated! Thank you! Brian -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12628#12628 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] What is everyone doing for GUIs?
Hi, We are using WPF, which is Windows-only, of course. We have a thin layer written in C++/CLI that wraps our code that uses OSG. Brian Stewart -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12433#12433 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgOcean release
Kim, I've been really excited about checking out your ocean but haven't had the time. Soon. FFTW is GPL. Are you concerned about this? Brian -osg-users-boun...@lists.openscenegraph.org wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: David Spilling david.spill...@gmail.com Sent by: osg-users-boun...@lists.openscenegraph.org Date: 05/06/2009 07:05AM Subject: Re: [osg-users] osgOcean release Kim, A nice piece of work. In case it helps anyone, for FFTW on Windows, I used 3.2.1. I didn't bother compiling it, but just did this: http://www.fftw.org/install/windows.html which worked fine (even with the free Visual C++ 9.0 ! ) I had a compile of minor issues with addCullCallback - I guess this is because we are using different OSG versions - but changing it to setCullCallback seemed to work fine. David ___ 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] Support becoming less and less personal
Folks, I agree with Rick. It's a much larger on-line cultural/social issue. I also understand Robert's feelings. It's hard to put your heart into something when you can't make the human connection with the person you're trying to help. Support is all about reaching out and helping someone, not just throwing information out into a void. I don't know the solution. Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. -osg-users-boun...@lists.openscenegraph.org wrote: - To: osg-users@lists.openscenegraph.org From: R Schwantes rschwan...@gmail.com Sent by: osg-users-boun...@lists.openscenegraph.org Date: 05/06/2009 10:52AM Subject: Re: [osg-users] Support becoming less and less personal Hi guys, Just thought I'd chime in with my .02c. More and more of the emails I receive do not have a greeting, or even a signature. There seems to be a culture shift In the way 'newschoolers'? send email. Almost as if email is heading towards the same format as sms. I agree that it is impolite and almost rude (apparently spell check has also gone out of style), but in my opinion it has become a social problem, bigger than some code on the forum can fix. I guess what I'm getting at is that I don't think severing ties with the forum, or inserting the posters name with code is going to make this problem go away. I think this is a problem that is here to stay, and will probably get worse. I usually flat out ignore emails without a signature, or reply telling them to tell me who they are before I send a useful response. Again just the thoughts of an over caffeinated programmer, Rick On Wed, May 6, 2009 at 9:18 AM, Art Tevs arti_t...@yahoo.de wrote: Hi Jean-Sebastian, Skylark wrote: My suggestions: 1. When the user clicks reply on an existing post, when the template is generated, I guess the forum software could insert the name of the user whose post is being replied to automatically, and at the end the name of the user replying? That would give: --- Hi name of previous poster, ... Thank you! my name --- I don't think that would be too hard. Ok, I am working now on this possibility. However, I am not sure if we need to add the name of previous poster, because somebody will definitily loose the track, when replying to the post. For example in the thread XMen posted something. The last answer will be from Chewbacca. Then the Luke want to answer to XMen's post, however the template will looks like: Hi Chewbacca, ... Cheers, Luke So the XMen will be not happy about that because the post seems to go to him, but Chewbacca was who was greet by Luke. So, I think just hte neutral Hi, is already enough. I bet, that some of the users wouldn't be able even to fill out the template well, this is my experience. 2. Perhaps you could remove the post reply button at the bottom of the thread page, so that users are forced to reply *to* a previous post, quoting the previous post (which is something that's sorely missing from forum posts as well - most of them have no context at all!). Ok, I agree, this would be a nice feature. However, this will take some time to implement. Because I would like to remove the double quoted messages out of the reply message. So that we have only one level of depth in the quoted messages. This is still enough, I think. Otherwise the thread get polluted by quotes, which isn't really helping a lot. As to the use of names. I have first to implement something, that users can be suspended well. The current roblem is, if I suspend a user and he post something. Then the message for the mailing list is also generated and is just waiting to be sent. So if user have a name Coca Cola and has written something. Even if he change then the name when we inform him, the email will still contain the Coca Cola as authors name. This require also some time to be work well, hence be patient. Cheers, art -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=11486#11486 ___ 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] osgOcean release
Folks, A GPU solution is great for the rendering, but it doesn't support all the other things on the cpu side that need to know about the ocean. Wakes, bow waves, floating objects, things falling into the water generating splashes, interaction with land ... all these things need to query the ocean surface for height/geometry info. Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. -osg-users-boun...@lists.openscenegraph.org wrote: - To: osg-users@lists.openscenegraph.org From: Art Tevs arti_t...@yahoo.de Sent by: osg-users-boun...@lists.openscenegraph.org Date: 05/06/2009 11:46AM Subject: Re: [osg-users] osgOcean release Hi J-S, Kim, Skylark wrote: Sure. For now as a first step finding some other FFT library to use in precomputation as it is now would be enough. When we want to implement more dynamic behavior then we can the best way to do that. Why not to take a look into GPGPU or CUDA. CUDA has even a nice FFT library which is really fast. I have used it with, I think it was 512x521, images with 60 FPS. So for your case it should be enough. If CUDA doesn't fit well your needs, then you can take a look into just GPGPU FFT algorithms. I have seen on the nVidia's webpage an OpenGL shader based application which can do compute FFT on the GPU. Even more I could try to manage to create something for osgPPU, then you could use from there, if you like. Cheers, art -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=11517#11517 ___ 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] Shaders on Slave Cameras
Folks, I want to render slave cameras with different shaders. It doesn't seem to work (osg 2.2). They are all rendered the same way as the main camera. Can I do this? Brian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Dinamic Line Drawing
Allen, Your code has the following line: m_ogeomTrailGeometry-dirtyBound(); // forces redraw dirtyBound does not force a redraw. It simply recalculates the bounding volume for the geometry. The problem you were having before was that the geometry was being clipped because the bounding volume was incorrect. Your performance issues can be due to a number of things. How many verts do you have? Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: osg-users@lists.openscenegraph.org From: Allen Saucier allen.sauc...@itt.com Sent by: osg-users-boun...@lists.openscenegraph.org Date: 04/16/2009 05:05PM Subject: Re: [osg-users] Dinamic Line Drawing Thx everyone!! for the help. :D :D You've given me a lot to think about. I really appreciate your time. J-S, here's my code that now works but still drags a little after a few thousand iterations. I found that setVertexArray is (I believe, but could be totally wrong) actually copying the array I send it. After a few thousand times of being called, it really slows down my entire interface. In fact, my interface Almost crawls to a halt calling setVertexArray() each time through the frame loop after about 4000 calls to it. And I'm drawing a LOT of small line segments each millisecond to make up the long looking line. I'm not using vertex buffer objects... yet. if I need to switch to them, I will. Though that will be in the land of experimentation for me too. ha, ha,... :-) I found that dirtyDisplayList() w.o dirtyBound() did nothing. I found that dirtyBound() worked all by itself to get the line to draw during each iteration of my osg::viewer::frame loop. I'm using osg::PrimitiveSet::LINE_STRIP as my primitive type and I do not need to push_back 2 vertices per line segment - I think. [Embarassed] At least, my line is being drawn... :) Honestly, I think it's the way I'm drawing the line. I don't believe there is a bug in OSG. I'm just to new @ this stuff.. ha, ha... here's my code: snippets of it: the 2 main methods w/in my class are 1) setup my line and 2) then to add to that line one new vertex at a time. This code actually works but it does 'slow' down after a few thousand iterations and then speeds up.. and slows down and speeds up... class COsgPaxNodeSceneElementInfo { osg::ref_ptrosg::DrawArrays m_podreTrailDrawElements; osg::ref_ptrosg::Vec3Array m_ov3aLineVerticesData; osg::ref_ptrosg::Geometry m_ogeomTrailGeometry; osg::ref_ptrosg::Geode m_ogeoTrailGeode; osg::Vec3d m_ov3dPrevPos; /// previous trail head bool m_bHasTrail; void m_vConstructATrail(math::Vector3D p_v3dVec); void m_vUpdateTrail(model::PlatformStateVector p_psvState); }; void COsgPaxNodeSceneElementInfo::m_vConstructATrail(math::Vector3D p_v3dVec) { // initialize previous to current point/position sent in m_ov3dPrevPos.set(p_v3dVec.getX(), p_v3dVec.getY(), p_v3dVec.getZ()); // curr pos osg::Vec3d ov3d(p_v3dVec.getX(), p_v3dVec.getY(), p_v3dVec.getZ());); // ALLOCATE ONCE AND ONLY ONCE m_podreTrailDrawElements= new osg::DrawArrays (osg::PrimitiveSet::LINE_STRIP); m_ov3aLineVerticesData = new osg::Vec3Array(); m_ogeomTrailGeometry= new osg::Geometry(); m_ogeoTrailGeode= new osg::Geode; m_ov3aLineVerticesData-push_back(m_ov3dPrevPos); // prev pos m_ov3aLineVerticesData-push_back(ov3d); // curr pos m_podreTrailDrawElements-setFirst(0); m_podreTrailDrawElements-setCount(m_ov3aLineVerticesData-size()); m_ogeomTrailGeometry-addPrimitiveSet(m_podreTrailDrawElements.get()); m_ogeomTrailGeometry-setVertexArray(m_ov3aLineVerticesData.get()); // attempt to draw lines faster by disabling display lists // then with each new vertex added, call dirtyBound() on the geometry. m_ogeomTrailGeometry-setUseDisplayList(false); m_ogeoTrailGeode-addDrawable(m_ogeomTrailGeometry.get()); // ADD ONLY ONCE to the Node Scene m_no3vViewer-m_iAddElementToScene(m_ogeoTrailGeode.get()); // equivalent to root-addChild(m_ogeoTrailGeode.get()); but root of the osg node scene is actually located w/in another class object, not this one. // keep track of fact that this node scene elem has a trail m_bHasTrail = true; } // m_vConstructATrail void COsgPaxNodeSceneElementInfo::m_vUpdateTrail( model::PlatformStateVector p_psvState) { if (!m_bHasTrail) return; static bool b_trailIsShowing=true; // trails on be default static double x,y,z; x=p_psvState.getPosition().getX(); y=p_psvState.getPosition().getY(); z=p_psvState.getPosition().getZ(); // for now, just keep current PTL around
Re: [osg-users] Dinamic Line Drawing
You probably don't need to call setFirst(0) every time, but it won't hurt either. Also, when dynamically changing geometry this way you need to manage display lists (either disable them or dirty them when changed) and you need to manage the bounding volume (either dirty them on change or override the computeBound() method). Brian Date: Thu, 9 Apr 2009 18:13:07 +0530 From: rah...@vizexperts.com To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Dinamic Line Drawing Hi Sergey, You need to add your new vertices to the geometry vertex data and update the first and size of your primitive set which is drawing the line. For example osg::Geometry* geom // is your geometry osg::DrawArrays* drawArrayLines = new osg::DrawArrays(osg::PrimitiveSet::LINE_STRIP); // Is your line strip Primitive set geom -addPrimitiveSet(_drawArrayLines); // Add primitive set Whenever you have new vertex add the new vertex to the vertex array of your geometry and call drawArrayLines-setFirst(0); drawArrayLines-setCount( Num of vertex in your vertex array); I Hope this will help you cheers RJ Sergey wrote: Hi, ALL How can I draw line , and append to this line new vertices (nodes) time after time? For example I need to draw a trajectory of moving object. In examples I have seen only static lines with determined count of vertices. Thank you. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9969#9969 ___ 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 _ Quick access to your favorite MSN content and Windows Live with Internet Explorer 8. http://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=B037MSN55C0701A___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Light Manager
Sajjad, You can't cast a group to a switch if it wasn't created as a switch. osg::ref_ptrosg::Group groupOfLights; This will always fail and return 0. osg::Switch * your_switch = dynamic_castosg::Switch *(groupOfLights.get ()); You need to create your groupOfLights as a switch. osg::ref_ptrosg::Switch groupOfLights; Since a switch is a groud, you can use it as both a group and a switch. Also, using dynamic_cast isn't bad. There are situations where it might not be optimal. But for your intended use - key press events - it's absolutley acceptable. Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: René Molenaar megamillerz...@gmail.com Sent by: osg-users-boun...@lists.openscenegraph.org Date: 04/09/2009 09:28AM Subject: Re: [osg-users] Light Manager Hi Sajjad, There are asType functions is osg::Node, this has better performance then dynamic_cast ... for example you can do: osg::ref_ptrosg::Switch switch = group-asSwitch(); Now you are using a virtual table to get the right type: if the object is a Switch you will get the this-pointer of the Switch if it is not you will get 0. Usually there are always better ways then dynamic_cast, especially if you are the owner of the code. Good Luck, Rene 2009/4/9 ami guru dosto.wa...@gmail.com Hello Forum, I have a LightManager class that tracks the number of lights(OpenGL Lights) that have been created. Inside the class the have the following member osg::ref_ptrosg::Group groupOfLights; vectorosg::ref_ptrosg::LightSourcelights; the member groupOfLights contain the LightSource as child. In the application i want to select different light (spot,point or diffuse) with key press event and only one light is enabled during an instant OR i may enable several lights. In that case i believe that i have to do dynamic casting to cast Group to Switch. In other better way to do that ? Regards Sajjad ___ 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] osgUtil::Simplifier in OpenSceneGraph 1.1 or 1.2 Version
I've migrated one small-medium project from 1.2 to 2.x and am preparing to migrate another really large project. The biggest issue is removing producer. If you don't do much with the internals of osgProducer::Viewer or Producer::Cameras then the upgrade should be pretty straight forward. If you do, then there is a bit of work to do. Another area that caused some pain was migrating our 1.x .ive files to 2.x. We use the .ive format exclusively for run time and distibution. The .ives are created from .flt files and the flt loader changed in 2.x. We found a couple differences in the loaders but were able to make changes on the .flt side. Just make sure you test the models extensively. Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: osg-users@lists.openscenegraph.org From: Sam retc...@yahoo.fr Sent by: osg-users-boun...@lists.openscenegraph.org Date: 04/02/2009 08:54AM Subject: Re: [osg-users] osgUtil::Simplifier in OpenSceneGraph 1.1 or 1.2 Version Thank you Robert for the answer. But updating the osg version of the application(it's a huge application with too many classes and dependencies) may cause some problems. I don't know realy the real impact of a such update but i remember that i tried to update the old version to the new one and finelly somthing was wrong. Is there way to update the OSG without causing problems later. Thank you in advance. Cheers -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9634#9634 ___ 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] osgUtil::Simplifier in OpenSceneGraph 1.1 or 1.2 Version
Sam, Robert suggested back porting the osgUtil::Simplifier class. Grab those files and add them to your 1.x distribution. Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: osg-users@lists.openscenegraph.org From: Sam retc...@yahoo.fr Sent by: osg-users-boun...@lists.openscenegraph.org Date: 04/02/2009 09:40AM Subject: Re: [osg-users] osgUtil::Simplifier in OpenSceneGraph 1.1 or 1.2 Version Thank you Brian. But once again if i tried to use osgUtil::Simplifier in osg1.2 what should i do to get the Simplifier options in my program without updating the OSG version Thank you in advance. Cheers -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9640#9640 ___ 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] SGI declares bankruptcy (UNCLASSIFIED)
I grew up on SGI's starting with the VGX (1990) all the way through the IR-3 (2001). It was a fun and exciting time. Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: Tomlinson, Gordon gtomlin...@overwatch.textron.com Sent by: osg-users-boun...@lists.openscenegraph.org Date: 04/02/2009 03:41PM Subject: Re: [osg-users] SGI declares bankruptcy (UNCLASSIFIED) Again They died the day they killed their logo and changed name, the head had gone but the tale took some time to catch up Found memorys though of great hunking Iron and I loved Irix.. Gordon Product Manager 3d __ Gordon Tomlinson Email : gtomlinson @ overwatch.textron.com __ -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Buckley, Bob CTR MDA/IC Sent: Thursday, April 02, 2009 3:39 PM To: OpenSceneGraph Users Subject: [osg-users] SGI declares bankruptcy (UNCLASSIFIED) Classification: UNCLASSIFIED Caveats: NONE A moment of silence please ... http://www.modsim.org/index.php?name=Newsfile=articlesid=1999 They sure were amazing. Classification: UNCLASSIFIED Caveats: NONE ___ 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 mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] SGI declares bankruptcy (UNCLASSIFIED)
So sad. I had the first Indigo that would digitize video back in '92, and later on I had an Onyx in my house for about a year. It did use a lot of electricity though... This certainly wasn't a surprise, but I will miss them. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9683#9683 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Import Large Meshes
Folks, I'm trying to import large meshes, +10 million verts, +20 million tris from obj files. I'm not familiar with the terrain generation/processing parts of OSG and was wondering if there are any utilities that I can use to subdivide these or convert to pageable chunks. Thanks, Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Most efficient way to use osg::DrawElementsUInt?
Jesper, I've encountered similar issues when managing 1000's of particle systems (bullet splashes in the water). The problem is the constant allocating/deallocation of memory when you create new primitive sets and then remove them. I ended up caching the primitive sets when the particle system ended and then reusing them. This along with using reserve() to preallocate the required number of elements, resize(0) to reset the element counter - without releasing the memory, and the primitive set setCount() method to adjust the number of prims being drawn each time the particle system was updated. This only works of the things you're creating all similar. It's comparable to what you're doing with the static memory - but within the osg framework. Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: Tomlinson, Gordon gtomlin...@overwatch.textron.com Sent by: osg-users-boun...@lists.openscenegraph.org Date: 03/26/2009 08:22AM Subject: Re: [osg-users] Most efficient way to use osg::DrawElementsUInt? FYI push_back() on an pre-reserved() vector/container should not be a performance issue. Under debug in visual studio, if you are storing anything other than a pointer, then a push_back etc will still incure a 'new and a copy' and this can get expensive if your doing a lot of them, under release this handled more efficiently Gordon Product Manager 3d __ Gordon Tomlinson Email : gtomlinson @ overwatch.textron.com __ -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Peter Hrenka Sent: Thursday, March 26, 2009 8:16 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Most efficient way to use osg::DrawElementsUInt? Hi Jesper, Jesper D. Thomsen schrieb: Hi, and thank you. I naturally tried to use reserve() (but thanks for suggesting it) and this of course helped somewhat, but it still seems to be the primary bottleneck. I've changed most of the rest of the per-frame geometry generation code to use static arrays rather than std::vector and this caused a major speedup (factor 10 or more) of my own part of the code, but I'm still stuck with the push_backs on osg::DrawElementsUInt. Maybe there's just no faster way to do it, or maybe I'm just using OSG in a somewhat un-intended way. Jesper D. Thomsen Just some more ideas/comments: Are you testing a release build? Debug-Verions (especially on Windows) are known to have dramatically slower implementations. What profiling tool are you using? Sometimes the output is misleading and can point you in the wrong direction. As from my experience push_back() on an pre-reserved() vector should not be a performace issue. If you can spare the memory you could also try swap(), implementing your own double-buffering for your osg::DrawElements. Cheers, Peter From: osg-users-boun...@lists.openscenegraph.org [osg-users-boun...@lists.openscenegraph.org] On Behalf Of Peter Hrenka [p.hre...@science-computing.de] Sent: Thursday, March 26, 2009 12:00 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Most efficient way to use osg::DrawElementsUInt? Hi Jesper, Jesper D. Thomsen schrieb: Hi all, I'm developing an application where I have to create up to 1000 osg:geometry objects per frame during certain interaction modes. I'm using osg::DrawElementsUInt push_back() to define the geometry primitive sets, and this push_back() seems to be the primary bottleneck for my applications graphical performance. Is there a more efficient way to define the primitive sets than to fill a osg::DrawElementsUInt by push_back and add it to the geometry? This is currently bringing me down to about 1 second per frame, which is kind of a roadblock. You can use reserve() to pre-allocate the needed memory. After that push_back() will not perform any reallocations/copies until the limit is reached. regards, Jesper D. Thomsen Cheers, Peter -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Michel Lepert Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users
Re: [osg-users] NightVision (Green and Blurry?)
To do this even minimally, will require using shaders and multi-pass rendering. If you're not experienced with these you should go through the osg examples and get comfortable with these techniques. Also, osgppu is a good way to quickly get started (it hides a lot of the details). Then you can try different ways to add noise, convolutions, haloing, and experiment to get the results you want. Brian This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. • -osg-users-boun...@lists.openscenegraph.org wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: Ümit Uzun umituzu...@gmail.com Sent by: osg-users-boun...@lists.openscenegraph.org Date: 03/24/2009 09:57AM Subject: Re: [osg-users] NightVision (Green and Blurry?) Hi Ufuk, Actually I have never tried night vision effect but you should look at RenderMonkey's ScreenSpaceEffects.rfx examples which all have been created by MultiPassRendering with GLSL. Looking kind of these effect you can create Blur and Night Vision effects easily. Best Regards. 2009/3/24 Ufuk ufuk@gmail.com Hi, I want to render all the scene in night vision mode. i read the previous posts but i could not find the way of rendering scene in a bit green and blurry. actually i also need to render light sources to much bright but i am not sure if it can be done? do you know any idea how can i do this? if there any of you did such a thing, please help me? -- Ufuk ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org