[osg-users] glow
Hi Community, has anyone experimented with glow effect? I have spent some time with research and I found only implementation as image post processing that requires having your scene rendered into a frame buffer. I dont like this way though, so I am looking for some alternative. Please let me know Thanks -Nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] PagedLod : how to change priority for some nodes
Hi all, Maybe my last question about PagedLod... I hope ;-) Starting my application, databasePager start to load thousand of PagedLod in my scene. In this list, I would like to make some PagedLods nodes being loaded before the rest of the scene. (because thousands of node take sometimes more than 1 or 2 min to load) How can I do that ? (Assuming it is possible...) Thank you. Regards, Vincent __ Information from ESET NOD32 Antivirus, version of virus signature database 4856 (20100210) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 2D rendering priority...
Hi, We used this approach for rendering a 2D scene using the painters algorithm (i.e. render back to front according to our own order definition). I have included the most relevent code snippets. No comments on their quality please ; ). 1) Added a 'user data' object (which contains the rendering priority) to each of our leaves. 2) As required, we run a 'RenderPriorityVisitor' over the scene to set the correct priorities into our user data objects. 3) Create a custom render bin and setup your 2D graph to use it: e.g. root2DstateSet-setRenderBinDetails(0, RenderBin2D::BIN_NAME, osg::StateSet::OVERRIDE_RENDERBIN_DETAILS); We use OVERRIDE_RENDERBIN_DETAILS as some of the objects bellow the root of our 2D scene are also rendered in 3D, in which case they may already have different bin details set (e.g transparent bin). The key bit of the custom bin is setting the sort callback. This callback sorts the leaves based on the priority set in the 'user data' object. Hopefully this all makes sence. I implemented this code ~7 years ago so there may be a neater way to do this now, but it is still working well against the latest OSG releases. Cheers, Brad Code snippets: Custom Render Bin /** Automatically registers the bin prototype. */ static osgUtil::RegisterRenderBinProxy s_registerBin(RenderBin2D::BIN_NAME,new RenderBin2D()); RenderBin2D() { //extends RenderBin setSortCallback(new SortCallback2D()); } SortCallback2D void SortCallback2D::sortImplementation(osgUtil::RenderBin* renderBin) { renderBin-copyLeavesFromStateGraphListToRenderLeafList(); std::sort(renderBin-getRenderLeafList().begin(),renderBin-getRenderLea fList().end(),RenderPrioritySortFunctor()); } --- RenderPrioritySortFunctor int RenderPrioritySortFunctor::getRenderOrder(const osgUtil::RenderLeaf* leaf) const { const osg::Referenced* ud = leaf-getDrawable()-getUserData(); if(ud) { const DrawableData* data = dynamic_castconst DrawableData*(ud); return data-getRenderOrder(); } return 0; } bool RenderPrioritySortFunctor::operator() (const osg::Node* lhs,const osg::Node* rhs) const { int leftOrder = getRenderOrder(lhs); int rightOrder = getRenderOrder(rhs); if(m_sortMode == SORT_ASCENDING) { return leftOrder rightOrder; } else { //sort descending return leftOrder rightOrder; } } -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tueller,Shayne R Civ USAF AFMC 519 SMXS/MXDEC Sent: Wednesday, 10 February 2010 11:49 PM To: OpenSceneGraph Users Subject: Re: [osg-users] 2D rendering priority... Brad, Please elaborate...:) I have not played with RenderBin so any code snippets/examples would be appreciated. Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Christiansen, Brad Sent: Wednesday, February 10, 2010 12:06 AM To: OpenSceneGraph Users Subject: Re: [osg-users] 2D rendering priority... Hi, I use a RenderBin / NodeMask combination to exactly this and it works well. I can elaborate more if you wish. Cheers, Brad -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tueller,Shayne R Civ USAF AFMC 519 SMXS/MXDEC Sent: Wednesday, 10 February 2010 8:18 AM To: OpenSceneGraph Users Subject: Re: [osg-users] 2D rendering priority... Paul, Thanks for the reply. We can have up to 57 levels of priority where each level could have 100-200 simple geometries (i.e. circles, squares, simple line primitives, etc.). It's very rare that all levels are on simultaneously but those that are on, need to stack in priority relative to every other level/group that is on. Realistically, we'll have around 10-15 levels being rendered at the same time. Hopefully this quantity/complexity won't present a problem. I really didn't have any reservations per se about using the RenderBin and NodeMask mechanisms. I suspected that I needed to use them but I wanted to ping the group just to make sure I was on the right track. When using OSG, it's always good to have a reality check before proceeding...:) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Martz Sent: Tuesday, February 09, 2010 4:07 PM To: OpenSceneGraph Users Subject: Re: [osg-users] 2D rendering priority... Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote: I have a need to render a bunch of 2D geometry groups that have different priorities for display (one group rendered on top of the other according to their priority). I also need to have the ability to turn the rendering off and on for some of the groups while maintaining rendering priority. How many different groups do you have, and what is the
Re: [osg-users] PagedLod : how to change priority for some nodes
Hi Vincent, PagedLOD has a prority offset and scale per child that allows you to modify the priority computed from the distance range. The PagedLOD methods of interest are: void setPriorityOffset(unsigned int childNo, float priorityOffset) { expandPerRangeDataTo(childNo); _perRangeDataList[childNo]._priorityOffset=priorityOffset; } float getPriorityOffset(unsigned int childNo) const { return _perRangeDataList[childNo]._priorityOffset; } unsigned int getNumPriorityOffsets() const { return _perRangeDataList.size(); } void setPriorityScale(unsigned int childNo, float priorityScale) { expandPerRangeDataTo(childNo); _perRangeDataList[childNo]._priorityScale=priorityScale; } float getPriorityScale(unsigned int childNo) const { return _perRangeDataList[childNo]._priorityScale; } unsigned int getNumPriorityScales() const { return _perRangeDataList.size(); } Robert. On Thu, Feb 11, 2010 at 9:30 AM, Vincent Bourdier vincent.bourd...@gmail.com wrote: Hi all, Maybe my last question about PagedLod... I hope ;-) Starting my application, databasePager start to load thousand of PagedLod in my scene. In this list, I would like to make some PagedLods nodes being loaded before the rest of the scene. (because thousands of node take sometimes more than 1 or 2 min to load) How can I do that ? (Assuming it is possible...) Thank you. Regards, Vincent __ Information from ESET NOD32 Antivirus, version of virus signature database 4856 (20100210) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ 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] Transparent window
Thank you very much Farshid, I'll try it as soon as I can, but it looks definitely cool ! :) On Thu, Feb 11, 2010 at 8:30 AM, Torben Dannhauer z...@saguaro-fight-club.de wrote: Hi, That looks cool! Where do I call the DwmEnableBlurBehindWindow function? Is this in OSg or just a c++ Windows API call? How many bits are requiered to set for alphachannel? Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23981#23981 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Serge Lages http://www.tharsis-software.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] atomic pointer swap
Hi, does OpenThreads provide an atomic, threadsafe and platform independent swap of two pointers? Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23994#23994 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to thange color of static Geometry using Switch and StateSet?
Hi, i am OSG newbie. and i'm working with Java project which uses JavaOSG binding by NoodleGlue. about the problem: 1. I have static Geode with one drawable (geometry to draw Icosahedron). These geodes represents some specific points (lets name it diamonds) in scene (may be more than 100). Geometry has it's own StateSet: Code: Material material = new Material(); material.setColorMode(MATERIALColorMode.AMBIENT_AND_DIFFUSE); LightModel lightModel = new LightModel(); lightModel.setTwoSided(false); StateSet stateset = new StateSet(); stateset.setMode(GL.GL_LIGHTING, STATEATTRIBUTEValues.ON_Val); stateset.setMode(GL.GL_NORMALIZE, STATEATTRIBUTEValues.ON_Val); stateset.setAttributeAndModes(material); stateset.setAttributeAndModes(lightModel); and color of it is set like this: Code: setColorArray(colors); setColorBinding(GEOMETRYAttributeBinding.BIND_PER_PRIMITIVE_SET); 2. In OSG scene i have as many Switches as visible diamonds are available. So OSG tree would look like this: Code: some ROOT switch | +--- MatrixTransform node for diamond (resizing diamond when mouse is over it) | | | +--- Switch for diamond (i would like to change diamond color there, when it is clicked by mouse) | | | +--- Geode representing the diamond +--- MatrixTransform node for diamond (resizing diamond when mouse is over it) | | | +--- Switch for diamond (i would like to change diamond color there, when it is clicked by mouse) | | | +--- Geode representing the diamond +--- MatrixTransform node for diamond (resizing diamond when mouse is over it) | | | +--- Switch for diamond (i would like to change diamond color there, when it is clicked by mouse) | | | +--- Geode representing the diamond ... 3. So all i want is to change diamond color when it is clicked by mouse. If i change color directly on Geometry, then all visible diamonds changes color after one single diamond click, because it is static. I think Switch and StateSet of it is the best place to change color. I have wrote one StateSet, but it doesn't work: Code: Material material = new Material (); material.setColorMode (MATERIALColorMode.DIFFUSE); material.setDiffuse (MATERIALFace.FRONT_AND_BACK, highlightColor); highlightStateSet.setAttributeAndModes(material, STATEATTRIBUTEValues.OVERRIDE_Val | STATEATTRIBUTEValues.ON_Val); i assume because color of Geometry is set using colors array. What i need to change to make it work? Thank you! Cheers, Andrius -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23987#23987 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] clear and switch buffers
Hi JP, thx for the quick response. Yes, there is a ClearNode, but I'm not sure, if it makes much sense using it, because I think I will need a camera anyway to specify which colorbuffer exactly I want to clear. As far as I know I can only call setDrawBuffer() on a camera object, or is there another way? Cheers, Gottfried -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23997#23997 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Fixed model on scene
Hi, I want to add a model as a fixed image on scene and stay on scene while I translate the scene. I use the following code but the model does not seen. ref_ptrNode myNode(readNodeFile(model.3ds)); ref_ptrStateSet stateSet = myNode-getOrCreateStateSet(); stateSet-setMode(GL_LIGHTING, osg::StateAttribute::OFF); stateSet-setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF); stateSet-setRenderBinDetails(11, RenderBin); ref_ptrMatrixTransform modelviewAbs (new MatrixTransform); modelviewAbs-setMatrix(Matrix::translate(0, 100, 100)); modelviewAbs-addChild(UAVNode.get()); ref_ptrProjection projection (new Projection()); projection-setMatrix(Matrix::ortho2D(0, 1280, 0, 1024)); projection-addChild(modelviewAbs.get()); root-addChild(projection.get()); Thank you! Cheers, Tufan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24001#24001 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Geotiff rendering?
Hi, Suppose when we add ive tiles to a group and render the group, all the tiles are placed at corresponding places according to their lat and lon. But when I m trying to do the same using just tif files it s not happening so. Instead, multiple tif tiles are overlaid one over other. Anyway tif is also having geo details rite? What needs to be done to render tiff just like ive? Thank you! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24002#24002 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] glow
Hi Trajce, I always use this kind of glow. Glow tipically is a post process effect, but If you find another way tell me! :). I have implemented some filtering system with shaders based on OSG so you can concantenate some filters (gaussian, radial, etc) to the final image. If you want I could post you that code, but is based in a previous render to a frame buffer object. Greets, Rafa. On Thu, Feb 11, 2010 at 9:55 AM, Trajce Nikolov nikolov.tra...@gmail.com wrote: Hi Community, has anyone experimented with glow effect? I have spent some time with research and I found only implementation as image post processing that requires having your scene rendered into a frame buffer. I dont like this way though, so I am looking for some alternative. Please let me know Thanks -Nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Rafael Gaitán Linares Instituto de Automática e Informática Industrial http://www.ai2.upv.es Ciudad Politécnica de la Innovación Universidad Politécnica de Valencia ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] clear and switch buffers
Hi, Gottfried Gross wrote: Hi JP, thx for the quick response. Yes, there is a ClearNode, but I'm not sure, if it makes much sense using it, because I think I will need a camera anyway to specify which colorbuffer exactly I want to clear. As far as I know I can only call setDrawBuffer() on a camera object, or is there another way? I'm not sure... There is _Camera-setClearColor(osg::Vec4(0.1f,0.1f,0.3f,1.0f)); _Camera-setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); as well, but I'm not sure exactly what you want to do. I e.g. don't understand why you would want to call setDrawBuffer? Maybe if you could explain your problem in a bit more detail I can help. How many camera's do you want, how many buffers, swap in single frame or swap after frame, etc... jp Cheers, Gottfried -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23997#23997 ___ 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
Re: [osg-users] Geotiff rendering?
Hi, if the tiffs don't have geo info embedded you will need to add it. See gdaltranslate command... gdal_translate -of GTiff -a_srs +proj=latlong +datum=WGS84 -a_ullr ... jp Akilan Thangamani wrote: Hi, Suppose when we add ive tiles to a group and render the group, all the tiles are placed at corresponding places according to their lat and lon. But when I m trying to do the same using just tif files it s not happening so. Instead, multiple tif tiles are overlaid one over other. Anyway tif is also having geo details rite? What needs to be done to render tiff just like ive? Thank you! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24002#24002 ___ 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
Re: [osg-users] Geotiff rendering?
also... J.P. Delport wrote: Hi, if the tiffs don't have geo info embedded you will need to add it. See gdaltranslate command... gdal_translate -of GTiff -a_srs +proj=latlong +datum=WGS84 -a_ullr ... you cannot just read the tiffs directly then, you'll need to push them through vpb or osgearth... jp jp Akilan Thangamani wrote: Hi, Suppose when we add ive tiles to a group and render the group, all the tiles are placed at corresponding places according to their lat and lon. But when I m trying to do the same using just tif files it s not happening so. Instead, multiple tif tiles are overlaid one over other. Anyway tif is also having geo details rite? What needs to be done to render tiff just like ive? Thank you! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24002#24002 ___ 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
Re: [osg-users] glow
Hi Rafa, I have some post processing code I put together from the online resources. But interested in what you have done. Thanks -Nick On Thu, Feb 11, 2010 at 3:08 PM, Rafa Gaitan rafa.gai...@gmail.com wrote: Hi Trajce, I always use this kind of glow. Glow tipically is a post process effect, but If you find another way tell me! :). I have implemented some filtering system with shaders based on OSG so you can concantenate some filters (gaussian, radial, etc) to the final image. If you want I could post you that code, but is based in a previous render to a frame buffer object. Greets, Rafa. On Thu, Feb 11, 2010 at 9:55 AM, Trajce Nikolov nikolov.tra...@gmail.com wrote: Hi Community, has anyone experimented with glow effect? I have spent some time with research and I found only implementation as image post processing that requires having your scene rendered into a frame buffer. I dont like this way though, so I am looking for some alternative. Please let me know Thanks -Nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Rafael Gaitán Linares Instituto de Automática e Informática Industrial http://www.ai2.upv.es Ciudad Politécnica de la Innovación Universidad Politécnica de Valencia ___ 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] glow
Hi, there is also a glow example in osgPPU. jp Trajce Nikolov wrote: Hi Rafa, I have some post processing code I put together from the online resources. But interested in what you have done. Thanks -Nick On Thu, Feb 11, 2010 at 3:08 PM, Rafa Gaitan rafa.gai...@gmail.com mailto:rafa.gai...@gmail.com wrote: Hi Trajce, I always use this kind of glow. Glow tipically is a post process effect, but If you find another way tell me! :). I have implemented some filtering system with shaders based on OSG so you can concantenate some filters (gaussian, radial, etc) to the final image. If you want I could post you that code, but is based in a previous render to a frame buffer object. Greets, Rafa. On Thu, Feb 11, 2010 at 9:55 AM, Trajce Nikolov nikolov.tra...@gmail.com mailto:nikolov.tra...@gmail.com wrote: Hi Community, has anyone experimented with glow effect? I have spent some time with research and I found only implementation as image post processing that requires having your scene rendered into a frame buffer. I dont like this way though, so I am looking for some alternative. Please let me know Thanks -Nick ___ 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 -- Rafael Gaitán Linares Instituto de Automática e Informática Industrial http://www.ai2.upv.es Ciudad Politécnica de la Innovación Universidad Politécnica de Valencia ___ 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 ___ 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
Re: [osg-users] glow
Thanks JP -Nick On Thu, Feb 11, 2010 at 3:33 PM, J.P. Delport jpdelp...@csir.co.za wrote: Hi, there is also a glow example in osgPPU. jp Trajce Nikolov wrote: Hi Rafa, I have some post processing code I put together from the online resources. But interested in what you have done. Thanks -Nick On Thu, Feb 11, 2010 at 3:08 PM, Rafa Gaitan rafa.gai...@gmail.commailto: rafa.gai...@gmail.com wrote: Hi Trajce, I always use this kind of glow. Glow tipically is a post process effect, but If you find another way tell me! :). I have implemented some filtering system with shaders based on OSG so you can concantenate some filters (gaussian, radial, etc) to the final image. If you want I could post you that code, but is based in a previous render to a frame buffer object. Greets, Rafa. On Thu, Feb 11, 2010 at 9:55 AM, Trajce Nikolov nikolov.tra...@gmail.com mailto:nikolov.tra...@gmail.com wrote: Hi Community, has anyone experimented with glow effect? I have spent some time with research and I found only implementation as image post processing that requires having your scene rendered into a frame buffer. I dont like this way though, so I am looking for some alternative. Please let me know Thanks -Nick ___ 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 -- Rafael Gaitán Linares Instituto de Automática e Informática Industrial http://www.ai2.upv.es Ciudad Politécnica de la Innovación Universidad Politécnica de Valencia ___ 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 ___ 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] PagedLod : how to change priority for some nodes
Hi Robert, Thanks for the tip, I'll try that. Regards, Vincent. Robert Osfield a écrit : Hi Vincent, PagedLOD has a prority offset and scale per child that allows you to modify the priority computed from the distance range. The PagedLOD methods of interest are: void setPriorityOffset(unsigned int childNo, float priorityOffset) { expandPerRangeDataTo(childNo); _perRangeDataList[childNo]._priorityOffset=priorityOffset; } float getPriorityOffset(unsigned int childNo) const { return _perRangeDataList[childNo]._priorityOffset; } unsigned int getNumPriorityOffsets() const { return _perRangeDataList.size(); } void setPriorityScale(unsigned int childNo, float priorityScale) { expandPerRangeDataTo(childNo); _perRangeDataList[childNo]._priorityScale=priorityScale; } float getPriorityScale(unsigned int childNo) const { return _perRangeDataList[childNo]._priorityScale; } unsigned int getNumPriorityScales() const { return _perRangeDataList.size(); } Robert. On Thu, Feb 11, 2010 at 9:30 AM, Vincent Bourdier vincent.bourd...@gmail.com wrote: Hi all, Maybe my last question about PagedLod... I hope ;-) Starting my application, databasePager start to load thousand of PagedLod in my scene. In this list, I would like to make some PagedLods nodes being loaded before the rest of the scene. (because thousands of node take sometimes more than 1 or 2 min to load) How can I do that ? (Assuming it is possible...) Thank you. Regards, Vincent __ Information from ESET NOD32 Antivirus, version of virus signature database 4856 (20100210) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org __ Information from ESET NOD32 Antivirus, version of virus signature database 4857 (20100211) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] clear and switch buffers
Hi JP, what I meant is, that I need to call glDrawBuffer (or setDrawBuffer in OSG) to select the buffer that I want to clear. Sorry, that I did not make it clear. The following OpenGL code example shows what I want to realize in OSG: Code: //for each frame do id = id mod 2; // Id is switched in[0, 1] glDrawBuffer(buffers[Id]); // select Buffer glClearColor( 0.1, 0.2, 0.3,0. 4); // choose color glClear(GL_COLOR_BUFFER_BIT); // apply color glDrawBuffer(buffers[2]); // select Buffer glClearColor(0, 0, 0, 0); // choose color glClear(GL_COLOR_BUFFER_BIT); // apply color id += 1; So I have 3 buffers and want to initialize 2 of them each frame with different values and also switch one of them each frame. I hope this explains my problem(s). Thx, Gottfried[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24023#24023 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to thange color of static Geometry using Switch and StateSet?
With the situation you describe, in which the Geometry is shared, the best way to change color would be with a unique BlendColor on the MatrixTransform's StateSet. You'll need to enable blending for this, and set the blend function to reference the blend color and zero the dest color, like (GL_CONSTANT_COLOR, GL_ZERO) or something like that. (I question your use of the word static. You seem to use it as if to mean it is shared by multiple parents. This is confusing, as one of the DataVariance enums is STATIC, which means the data will not be modified.) Paul Martz Skew Matrix Software LLC _http://www.skew-matrix.com_ http://www.skew-matrix.com/ +1 303 859 9466 Andrius Kausinis wrote: Hi, i am OSG newbie. and i'm working with Java project which uses JavaOSG binding by NoodleGlue. about the problem: 1. I have static Geode with one drawable (geometry to draw Icosahedron). These geodes represents some specific points (lets name it diamonds) in scene (may be more than 100). Geometry has it's own StateSet: Code: Material material = new Material(); material.setColorMode(MATERIALColorMode.AMBIENT_AND_DIFFUSE); LightModel lightModel = new LightModel(); lightModel.setTwoSided(false); StateSet stateset = new StateSet(); stateset.setMode(GL.GL_LIGHTING, STATEATTRIBUTEValues.ON_Val); stateset.setMode(GL.GL_NORMALIZE, STATEATTRIBUTEValues.ON_Val); stateset.setAttributeAndModes(material); stateset.setAttributeAndModes(lightModel); and color of it is set like this: Code: setColorArray(colors); setColorBinding(GEOMETRYAttributeBinding.BIND_PER_PRIMITIVE_SET); 2. In OSG scene i have as many Switches as visible diamonds are available. So OSG tree would look like this: Code: some ROOT switch | +--- MatrixTransform node for diamond (resizing diamond when mouse is over it) | | | +--- Switch for diamond (i would like to change diamond color there, when it is clicked by mouse) | | | +--- Geode representing the diamond +--- MatrixTransform node for diamond (resizing diamond when mouse is over it) | | | +--- Switch for diamond (i would like to change diamond color there, when it is clicked by mouse) | | | +--- Geode representing the diamond +--- MatrixTransform node for diamond (resizing diamond when mouse is over it) | | | +--- Switch for diamond (i would like to change diamond color there, when it is clicked by mouse) | | | +--- Geode representing the diamond ... 3. So all i want is to change diamond color when it is clicked by mouse. If i change color directly on Geometry, then all visible diamonds changes color after one single diamond click, because it is static. I think Switch and StateSet of it is the best place to change color. I have wrote one StateSet, but it doesn't work: Code: Material material = new Material (); material.setColorMode (MATERIALColorMode.DIFFUSE); material.setDiffuse (MATERIALFace.FRONT_AND_BACK, highlightColor); highlightStateSet.setAttributeAndModes(material, STATEATTRIBUTEValues.OVERRIDE_Val | STATEATTRIBUTEValues.ON_Val); i assume because color of Geometry is set using colors array. What i need to change to make it work? Thank you! Cheers, Andrius -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23987#23987 ___ 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] 2D rendering priority...
Brad, I'll look over your implementation. Thanks for sharing this...:) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Christiansen, Brad Sent: Thursday, February 11, 2010 2:35 AM To: OpenSceneGraph Users Subject: Re: [osg-users] 2D rendering priority... Hi, We used this approach for rendering a 2D scene using the painters algorithm (i.e. render back to front according to our own order definition). I have included the most relevent code snippets. No comments on their quality please ; ). 1) Added a 'user data' object (which contains the rendering priority) to each of our leaves. 2) As required, we run a 'RenderPriorityVisitor' over the scene to set the correct priorities into our user data objects. 3) Create a custom render bin and setup your 2D graph to use it: e.g. root2DstateSet-setRenderBinDetails(0, RenderBin2D::BIN_NAME, osg::StateSet::OVERRIDE_RENDERBIN_DETAILS); We use OVERRIDE_RENDERBIN_DETAILS as some of the objects bellow the root of our 2D scene are also rendered in 3D, in which case they may already have different bin details set (e.g transparent bin). The key bit of the custom bin is setting the sort callback. This callback sorts the leaves based on the priority set in the 'user data' object. Hopefully this all makes sence. I implemented this code ~7 years ago so there may be a neater way to do this now, but it is still working well against the latest OSG releases. Cheers, Brad Code snippets: Custom Render Bin /** Automatically registers the bin prototype. */ static osgUtil::RegisterRenderBinProxy s_registerBin(RenderBin2D::BIN_NAME,new RenderBin2D()); RenderBin2D() { //extends RenderBin setSortCallback(new SortCallback2D()); } SortCallback2D void SortCallback2D::sortImplementation(osgUtil::RenderBin* renderBin) { renderBin-copyLeavesFromStateGraphListToRenderLeafList(); std::sort(renderBin-getRenderLeafList().begin(),renderBin-getRenderLea fList().end(),RenderPrioritySortFunctor()); } --- RenderPrioritySortFunctor int RenderPrioritySortFunctor::getRenderOrder(const osgUtil::RenderLeaf* leaf) const { const osg::Referenced* ud = leaf-getDrawable()-getUserData(); if(ud) { const DrawableData* data = dynamic_castconst DrawableData*(ud); return data-getRenderOrder(); } return 0; } bool RenderPrioritySortFunctor::operator() (const osg::Node* lhs,const osg::Node* rhs) const { int leftOrder = getRenderOrder(lhs); int rightOrder = getRenderOrder(rhs); if(m_sortMode == SORT_ASCENDING) { return leftOrder rightOrder; } else { //sort descending return leftOrder rightOrder; } } -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tueller,Shayne R Civ USAF AFMC 519 SMXS/MXDEC Sent: Wednesday, 10 February 2010 11:49 PM To: OpenSceneGraph Users Subject: Re: [osg-users] 2D rendering priority... Brad, Please elaborate...:) I have not played with RenderBin so any code snippets/examples would be appreciated. Thanks, -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Christiansen, Brad Sent: Wednesday, February 10, 2010 12:06 AM To: OpenSceneGraph Users Subject: Re: [osg-users] 2D rendering priority... Hi, I use a RenderBin / NodeMask combination to exactly this and it works well. I can elaborate more if you wish. Cheers, Brad -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Tueller,Shayne R Civ USAF AFMC 519 SMXS/MXDEC Sent: Wednesday, 10 February 2010 8:18 AM To: OpenSceneGraph Users Subject: Re: [osg-users] 2D rendering priority... Paul, Thanks for the reply. We can have up to 57 levels of priority where each level could have 100-200 simple geometries (i.e. circles, squares, simple line primitives, etc.). It's very rare that all levels are on simultaneously but those that are on, need to stack in priority relative to every other level/group that is on. Realistically, we'll have around 10-15 levels being rendered at the same time. Hopefully this quantity/complexity won't present a problem. I really didn't have any reservations per se about using the RenderBin and NodeMask mechanisms. I suspected that I needed to use them but I wanted to ping the group just to make sure I was on the right track. When using OSG, it's always good to have a reality check before proceeding...:) -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Martz Sent: Tuesday, February 09, 2010 4:07 PM To: OpenSceneGraph Users Subject: Re: [osg-users] 2D rendering priority... Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote:
[osg-users] Problem with rotations using PositionAttitudeTransform
Hi, I'm trying to make some rotation of objects, but the results are not the desired I want to draw the coordinate axis. The following function draw an axis with the given rotation: Code: osg::PositionAttitudeTransform* createAxis(osg::Vec4f color, osg::Quat rotation){ osg::StateSet* axisStateSet = createColorStateSet(color); osg::Geode* axisGeode = new osg::Geode(); osg::Cylinder* axisCylinder = new osg::Cylinder(osg::Vec3(0.0f,0.0f,0.0f), 20, 5); osg::ShapeDrawable* axisDrawable = new osg::ShapeDrawable(axisCylinder); axisDrawable-setStateSet(axisStateSet); osg::PositionAttitudeTransform* axisTransform = new osg::PositionAttitudeTransform; axisTransform-setAttitude(rotation); axisGeode-addDrawable(axisDrawable); axisTransform-addChild(axisGeode); return axisTransform; } And the following function draw the 3 axis giving the rotations: Code: osg::Group* createCoordinatesAxis(){ osg::PositionAttitudeTransform* xTransform = createAxis(osg::Vec4f(1,0,0,1), osg::Quat(osg::DegreesToRadians(90.0), 0, 1, 0)); osg::PositionAttitudeTransform* yTransform = createAxis(osg::Vec4f(0,1,0,1), osg::Quat(osg::DegreesToRadians(90.0), 0, 0, 1)); osg::PositionAttitudeTransform* zTransform = createAxis(osg::Vec4f(0,0,1,1), osg::Quat(0, 1, 0, 0)); osg::Group* axisGroup = new osg::Group(); axisGroup-addChild(xTransform); axisGroup-addChild(yTransform); axisGroup-addChild(zTransform); return axisGroup; } The result is in the following image, but the axis (red, green and blue) are not turned 90 degrees!!! do someone know why??? Thank you! Cheers, Manuel[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24030#24030 attachment: axis.JPG___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem with rotations using PositionAttitudeTransform
Hi Manuel, You use the osg::Quat(x,y,z,w) constructor, but your arguments are not in the good order. You may use osg::Quat(angle, osg::vec3d(x,y,z)) to be sure. Hope this can help you. Regards, Vincent. Manuel Garea a écrit : Hi, I'm trying to make some rotation of objects, but the results are not the desired I want to draw the coordinate axis. The following function draw an axis with the given rotation: Code: osg::PositionAttitudeTransform* createAxis(osg::Vec4f color, osg::Quat rotation){ osg::StateSet* axisStateSet = createColorStateSet(color); osg::Geode* axisGeode = new osg::Geode(); osg::Cylinder* axisCylinder = new osg::Cylinder(osg::Vec3(0.0f,0.0f,0.0f), 20, 5); osg::ShapeDrawable* axisDrawable = new osg::ShapeDrawable(axisCylinder); axisDrawable-setStateSet(axisStateSet); osg::PositionAttitudeTransform* axisTransform = new osg::PositionAttitudeTransform; axisTransform-setAttitude(rotation); axisGeode-addDrawable(axisDrawable); axisTransform-addChild(axisGeode); return axisTransform; } And the following function draw the 3 axis giving the rotations: Code: osg::Group* createCoordinatesAxis(){ osg::PositionAttitudeTransform* xTransform = createAxis(osg::Vec4f(1,0,0,1), osg::Quat(osg::DegreesToRadians(90.0), 0, 1, 0)); osg::PositionAttitudeTransform* yTransform = createAxis(osg::Vec4f(0,1,0,1), osg::Quat(osg::DegreesToRadians(90.0), 0, 0, 1)); osg::PositionAttitudeTransform* zTransform = createAxis(osg::Vec4f(0,0,1,1), osg::Quat(0, 1, 0, 0)); osg::Group* axisGroup = new osg::Group(); axisGroup-addChild(xTransform); axisGroup-addChild(yTransform); axisGroup-addChild(zTransform); return axisGroup; } The result is in the following image, but the axis (red, green and blue) are not turned 90 degrees!!! do someone know why??? Thank you! Cheers, Manuel[/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24030#24030 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org __ Information from ESET NOD32 Antivirus, version of virus signature database 4858 (20100211) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgDB::writeImageFile() jpg vs png
Hi Jim, I've been bit by this one. It seems that osgDB::writeImageFile does not correctly support images with pixelFormat = GL_RGBA for JPEG files. I think you'll find that changing to GL_RGB will get you a good file. -Don Leich Trying to save an osg::Image as a .jpg file malfunctions. Either false is returned or .jpg file has weird colors. But .png format works ok. osg::ref_ptrosg::Image image = mTextureObject-getImage(); //osgDB::writeImageFile( *image, file.jpg ); osgDB::writeImageFile( *image, file.png ); Tried OSG 2.8.1, 2.8.2, 2.9.6 on Linux, FreeBSD, and that thing from Redmond. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgDB::writeImageFile() jpg vs png
On Thu, Feb 11, 2010 at 5:12 PM, Don Leich d...@ilight.com wrote: Hi Jim, I've been bit by this one. It seems that osgDB::writeImageFile does not correctly support images with pixelFormat = GL_RGBA for JPEG files. I think you'll find that changing to GL_RGB will get you a good file. Standard JPEG doesn't support transparency. So I can't see how the JPEG could even support writing RGBA JPEG's... The best we can do is fail gracefully. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgDB::writeImageFile() jpg vs png
On 2/11/2010 10:12 AM, Don Leich wrote: Hi Jim, I've been bit by this one. It seems that osgDB::writeImageFile does not correctly support images with pixelFormat = GL_RGBA for JPEG files. I think you'll find that changing to GL_RGB will get you a good file. It might be good to put a warning/error or something in there to alert people when they get bit by this. -Don Leich -- Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com PixelSense Landsat processing now available! http://www.alphapixel.com/demos/ There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Build Osg with 64Bit (dependency)
it has been Collada that has caused most of my grief. Iconv seems to be one of the most introvert gcc projects on this planet. I was happy for a while when I found this: http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/ But it turned out, that it does not link with VisualStudio. Collada requires, part of boost, libxml2 and iconv. I found this link: https://collada.org/public_forum/viewtopic.php?f=12t=1221 https://collada.org/public_forum/viewtopic.php?f=12t=1221Where iconv, libxml2, pcre and zlib is built with 64bit. So, that should now make the list just about complete. Building the part I need from boost in 64 bit should not cause problems I hope. jpeg, zlib, png can easily be built from code. I hope this goes for FreeType too, not there yet. This really was more of a mess than I anticipated. I heard that according to steam (which current connects to quite a few window pc:s around the world) that the number of 64bit installations (due to windows7) is increasing exponentially, so this means that we will soon leave the 32bit world of applications. Maybe we will be able to build these things without problem, just when all other platforms has moved over to 128 but ;-) /Anders On Wed, Feb 10, 2010 at 9:27 PM, Mourad Boufarguine mourad.boufargu...@gmail.com wrote: Hi Anders, I am also strugling to build OSG in 64 bits under Windows (MSVC9 SP1). For the moment, I have these 3rdParty libs built in 64 bits : - jpeg - png - tiff - jasper - zlib - ffmpeg The first 5 libs can be easily staticly built within the OpenCV project using CMake (http://sourceforge.net/projects/opencvlibrary/), the latter (ffmpeg) can be found here http://ffmpeg.arrozcru.org/autobuilds/ http://ffmpeg.arrozcru.org/autobuilds/ If you don't have these libs yet, let me know, I'll send them to you. If you succeeded in building some others, please let me know. Regards, Mourad On Wed, Feb 10, 2010 at 10:30 AM, Anders Backman ande...@cs.umu.sewrote: I will, in case I succeed :-) /A On Wed, Feb 10, 2010 at 10:27 AM, Torben Dannhauer z...@saguaro-fight-club.de wrote: Hi, I haven't seen this, but it would be great if you post your prebuild package on OSG website. Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23896#23896 ___ 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] osgDB::serializer and alignment (pack(n))
Hi, I#m thinking about usind the osg serializer to serialize a transportcontainer, transfere it over a network and de-serialize it on the other node. Could osgDB::serializer be fast enough to do that every frame, or is it not fast enough caused by it's architecture? My second question is: what is the alignment of the serializer? Is it alignt by 1 byte, by 4 bytes or anything else? Can I change it freely without side effects? Thank you very much, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24038#24038 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Build Osg with 64Bit (dependency)
Thanks for the hints. I confirm, it is quite easy to build freetype. The distribution comes with visual 2008 project file, you need just to add x64 config and build ! Mourad On Thu, Feb 11, 2010 at 8:13 PM, Anders Backman ande...@cs.umu.se wrote: it has been Collada that has caused most of my grief. Iconv seems to be one of the most introvert gcc projects on this planet. I was happy for a while when I found this: http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/ But it turned out, that it does not link with VisualStudio. Collada requires, part of boost, libxml2 and iconv. I found this link: https://collada.org/public_forum/viewtopic.php?f=12t=1221 https://collada.org/public_forum/viewtopic.php?f=12t=1221Where iconv, libxml2, pcre and zlib is built with 64bit. So, that should now make the list just about complete. Building the part I need from boost in 64 bit should not cause problems I hope. jpeg, zlib, png can easily be built from code. I hope this goes for FreeType too, not there yet. This really was more of a mess than I anticipated. I heard that according to steam (which current connects to quite a few window pc:s around the world) that the number of 64bit installations (due to windows7) is increasing exponentially, so this means that we will soon leave the 32bit world of applications. Maybe we will be able to build these things without problem, just when all other platforms has moved over to 128 but ;-) /Anders On Wed, Feb 10, 2010 at 9:27 PM, Mourad Boufarguine mourad.boufargu...@gmail.com wrote: Hi Anders, I am also strugling to build OSG in 64 bits under Windows (MSVC9 SP1). For the moment, I have these 3rdParty libs built in 64 bits : - jpeg - png - tiff - jasper - zlib - ffmpeg The first 5 libs can be easily staticly built within the OpenCV project using CMake (http://sourceforge.net/projects/opencvlibrary/), the latter (ffmpeg) can be found here http://ffmpeg.arrozcru.org/autobuilds/ http://ffmpeg.arrozcru.org/autobuilds/ If you don't have these libs yet, let me know, I'll send them to you. If you succeeded in building some others, please let me know. Regards, Mourad On Wed, Feb 10, 2010 at 10:30 AM, Anders Backman ande...@cs.umu.sewrote: I will, in case I succeed :-) /A On Wed, Feb 10, 2010 at 10:27 AM, Torben Dannhauer z...@saguaro-fight-club.de wrote: Hi, I haven't seen this, but it would be great if you post your prebuild package on OSG website. Thank you! Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23896#23896 ___ 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] [ANN] OSG Virtual Planets, the core of gvSIG3D.
Hi Rafa Ok, setting the JAVA_HOME env variable did help. What must JAVA_INCLUDE_PATH and JAVA_INCLUDE_PATH2 be set to? I do have a jdk installed on ubuntu and the consistent errors I keep getting are with the JAVA_HOME and JAVA_INCLUDE variables. Setting the JAVA_HOME environment variable got rid of one CMake/Mvn error. Thx for the note on the composite viewer. Once I get this up and running, I'll see how I can use the composite viewer in osgvp and see if it works for me. Best regards, Allen -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24040#24040 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to change color of static Geometry using Switch and StateSet?
Hi, Static means that Geode object is constant (static final in Java) and Data variance of this object is set to STATIC. Thank you! Cheers, Andrius -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24042#24042 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [ANN] OSG Virtual Planets, the core of gvSIG3D.
Rafa, My latest attempt synopsis: 1. set the Java home variable 2. set the java include path variable 3. set the java include path2 variable and then I re-ran mvn clean mvn install -Dmaven.test.skip I still had a crash. maven would not work. THen I decided to run maven as root: sudo mvn install -Dmaven.test.skip and all of the sudden, maven started to work. I am now seeing a lot of files being downloaded and I have NEVER seen that before while attempting to run mvn. I did not know I had to run mvn with root priviledges. I also googled the JAVA_INCLUDE_PATH and figured out how to set those 2 variables correctly. So... now I am waiting for maven to finish. However, I do notice I get checksum failed for a few packages. I hope this does not cause a problem. Thx Rafa, Allen -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24043#24043 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [ANN] OSG Virtual Planets, the core of gvSIG3D.
Ok, well, I keep getting the same errors from maven or cmake and I really don't understand what is wrong. No matter what I do, the JAVA_INCLUDE_PATH and JAVA_INCLUDE_PATH2 are not recognized as being set but they are. I have included my output from maven and I really do not understand it. Why do you think the java include paths are not being recognized but I have set them and they are correct. The Java home variable has been set correctly, too. And I am using your latest CMakeLists.txt file, as well. Best regards, Allen -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24046#24046 Attachments: http://forum.openscenegraph.org//files/mavenoutput5_124.txt ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to change color of static Geometry using Switch and StateSet?
Andrius Kausinis wrote: Hi, Static means that Geode object is constant (static final in Java) and Data variance of this object is set to STATIC. Then I misunderstood your original post. So are you saying that the problem you are trying to solve is this: How to change the color of a static Geometry? If so, then sync the draw threads in the main loop with viewer.sync() then just go ahead and change the color array. Or is this the problem: How to have unique colors on a shared Geode/Geometry multiparented to several transforms? If so, then use my BlendColor suggestion. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem with rotations using PositionAttitudeTransform
Thank you very much Vincent! That was my error, I was calling to the osg::Quad constructor with a wrong order in the params Cheers, Manuel -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24049#24049 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Stereo with pre-split images streams
I'm about to drop OSG into an app and I'm looking at how to do various things. The built-in stereo support is great, but I'm not sure how to do something that's easy in my current code - handle pre-split images. I have to take a variety of images, mainly in streams, and handle them correctly in the left and right eye. The formats I deal with are: 1. Dual-stream, for instance two images, or two tracks in a Quicktime movie or AVI file (3D Blu-ray too, someday), 2. Left-Right, 3. Top-Bottom, 4. Possibly, interleaved. Right now I've dealt mostly with 2 3, by padding two sets of tex coords along with 3D images. I intend to deal with 1 and 4 by splitting textures, maybe using 2 FBO attachments. The issues/options seem to be: Draw the images billboarded and at screen depth, so there's no extra parallax introduced. It would be great to be able to mask or draw a frame 'in-front' of the image, even though it's at zero, so the edges appear to be at the same depth as the content (or can be manipulated). Then I can either use a cull callback, since I believe cull runs once per eye, and reset tex-coords and/or which texture (or attachment of an FBO) to use, or place a duplicate item of each 3D texture in the graph, set it correctly on update, then set the stereo cullsettings correctly. Any suggestions? Did I miss a better technique? Regards, Bruce Wheaton ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] node names not preserved going from flt to ive/osg
Hey all Yep -- setting OSG_OPTIMIZER to off and preserveFace and preserveObject options did the trick. thanks all! Ted -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=24054#24054 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org