Re: [osg-users] [osgPlugins] OBJ plugin loader places model at wrong position and with wrong attitude
Hi Robert, On Sat, Feb 5, 2011 at 7:37 PM, Robert Pardridge bobbyucsd...@yahoo.com wrote: how exactly do you modify the options string with c++ code? osgDB::ReaderWriter::Options* options = osgDB::Registry::instance()-getOptions(); Might I suggest you look at the header for Options? When you do you'll find a Options::setOptionString(const std::string) method ;-) Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] difference between osg Producer and OpenProducer
Hi Mike, On Sat, Feb 5, 2011 at 9:07 PM, Mike Hatcher mike.hatche...@yahoo.com wrote: What is the difference between the producer functionality provided in osg and the OpenProducer software from http://www.andesengineering.com/ The OSG doesn't provide producer functionality, it provides viewer functionality. OpenProducer (typically just known as Producer in OSG circles) also provides viewer functionality. There is also the osgProducer library from the OSG-1.x era that integrates Producer and the OSG. The osgProducer::Viewer and osgViewer::Viewer are roughly equivalent and you should be able to port from osgProducer::Viewer to osgViewer::Viewer quite easily. osgViewer library provides a CompositeViewer class (made up of multiple independent Views) and Viewer class (single View on the the scene), whereas osgProducer+Producer are only capable of providing a single View. Providing composite viewer functionality with osgProducer/Producer is very awkward indeed and was always a nightmare. osgViewer uses osg::Camera for both viewer and scene graph based Camera's and you can use them interchangeably and dynamically. osgProducer/Producer has it's own Camera classes and only can handle viewer level Cameras, you can't use in scene graph osg::Cameras interchangeable with Producer Cameras. There is lots more low level differences besides, but given I know nothing about why you are asking and how much detail you need it's not really appropriate to go write an essay that isn't needed. Is there any reason to use OpenProducer over the existing osg capabilities? Producer is less flexibility, has less features and provides poorer integration with the OpenSceneGraph than the native osgViewer libraries that are available since OpenSceneGraph-2.0. osgViewer was written to address the short comings of Producer + OSG. The reason to use Producer would be that you have an application written on top of Producer from the OSG-1.x era, and you want to port it to the latest OSG-2.x without rewritting the viewer + windowing functionality. I would suggest this should just be kept as an interim step though as you'll find it easier to work with osgViewer in the medium to long term. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Bug in GLObjectsVisitor::apply(osg::Geode node)
Hello. I was getting GL_INVALID_OPERATION on a glDrawArrays() call in Drawable::compileGLObjects() / Geometry::drawImplementation(). I traced it down to GLObjectsVisitor::apply(osg::Geode node) which does: apply(*drawable); if (drawable-getStateSet()) { apply(*(drawable-getStateSet())); } ... so because the drawable is drawn before it's stateset was applied an invalid vertex program was used (which caused the GL_INVALID_OPERATION error). Changing the order there fixed the problem for me. I checked trunk - the problem is still there. Cheers, Felix ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] LineSegmentIntersector which objects are returned?
Hi, I have a simple question to LineSegmentIntersector: Which objects can be intersect with the test ray? I ask because I have following problem: I have following osg tree: - Geode -Field - Node (Model loaded from disc) - Contains Name obj1 by Model (so not set by my - don't want to presume that the name is everytime same) - Geode (single quad of the ground of terrain) - Name: Ground - Geometry (4 vertices) If I do now a klick I got following names returned: obj1, obj1, obj, ..., Ground (Model is a Firetree - many intersections). But never the name Field. So the problem is: I can't assume that the Model has name obj1. That is why I think I must additional geode around it with an extra class, so I can check with dynamic_cast if the test ray had found an interesting object or not. But this don't work, if I dont get the Field-Geode returned. How to handle this problem? (osgPick-Demo is to simple to see a solution :( ) Thank you! Cheers, Heiko -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36399#36399 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OsgAnimation questions, strange fps and splitting animations
Hi Thomas, I have been able to check a bit your models, I am able to reproduce the slow down. I am not sure at 100% but I am confident it comes from the sampler. Why ? because there is not yet a cache enabled inside, there is some intial code to do it, but not yet finish. So when you have a long animation it will be slower and slower to evaluate the key. And when the animation loop to the frame 0 it's fast as before. It explains completely why it slowdowns during time. To fix this, we need to fix getKeyIndexFromTime and use the _lastKeyAccess as cache. For nathan the animation is small so it makes sense that you dont notice it. Hopes it will help, I would like to do more but I am a bit busy right now. I will try to check culling time ... Cheers, Cedric On Wed, 2011-02-02 at 21:53 +, Thomas Hogarth wrote: Hi Cedric Can you send the me files in osg, osgt, osgb. Then I will check those format before trying the fbx plugin (I dont have it installed yet) The link I sent you was to a rar archive containing all the formats you requested, I'll resend the link in a mo. Also what platform are you on. I can get you an FBX plugin for Windows VS 2008 or OSX XCode 3.x if you like. I don't currently have a linux box setup but can look into it if you want? Thanks again Tom -- Provide OpenGL, WebGL and OpenSceneGraph services +33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net http://www.plopbyte.net signature.asc Description: This is a digitally signed message part ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Extracting the texture from an ive and use it for a shader's sample2DRect uniform
Hi, I am trying to extract the texture from an .ive that is read using osgDB into a node and will be passed as a sample2DRect uniform for the shader. So to make it sort, how do I do that? The code so far: Code: osgDB::Registry::instance()-getDataFilePathList().push_back(resources/SmileFace); const std::string smileyFilename = SmilingFaceDiff0.IVE; //osgDB::Registry::instance()-getDataFilePathList().push_back(resources/SmileFace2); //const std::string smileyFilename = SmilingFace.IVE; osg::ref_ptrosg::Node smiley = osgDB::readNodeFile(smileyFilename); if(smiley.valid()) { //Set StateSet osg::StateSet* ss = new osg::StateSet; ss-setTextureMode(0, GL_LIGHTING, osg::StateAttribute::OFF); ss-addUniform( new osg::Uniform( baseTexture, 0 ) ); //Umm, where did baseTexture come from? need to extract from the ive smiley-setStateSet(ss); //Set Programs osg::ref_ptrosg::Program program = new osg::Program; char vertexSource[]= void main(void)\n {\n gl_Position = ftransform();\n gl_TexCoord[0] = gl_MultiTexCoord0;\n }\n; char fragmentSource[]= uniform sampler2DRect baseTexture;\n \n void main(void)\n {\n gl_FragColor = texture2DRect( baseTexture, gl_TexCoord[0] );\n gl_FragColor.a = 0.05;\n }\n; program-setName( alpha_test ); program-addShader(new osg::Shader(osg::Shader::VERTEX, vertexSource)); program-addShader(new osg::Shader(osg::Shader::FRAGMENT, fragmentSource)); ss-setAttributeAndModes( program, osg::StateAttribute::ON ); } Thank you! Cheers, Bawenang -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36403#36403 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] libvpb.so.10: cannot open shared object file
Hi, I have successfully build and installed VPB in /usr/local/lib for ubuntu 10.01 but when i tried run osgdem it gives me the following error osgdem: error while loading shared libraries: libvpb.so.10: cannot open shared object file: No such file or directory libvpd.so.10 is installed in /usr/local/lib and osgdem is installed in /usr/local/bin what could be the possible reason for above error?? Thank you! Cheers, fly_hi -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36404#36404 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] libvpb.so.10: cannot open shared object file
sudo ldconfig to make ld update its cache of installed app. Also double check /etc/ld.so.conf or dirs there to make sure /usr/local/lib is in die loader's path. jp On 07/02/11 08:35, jamil farooq wrote: Hi, I have successfully build and installed VPB in /usr/local/lib for ubuntu 10.01 but when i tried run osgdem it gives me the following error osgdem: error while loading shared libraries: libvpb.so.10: cannot open shared object file: No such file or directory libvpd.so.10 is installed in /usr/local/lib and osgdem is installed in /usr/local/bin what could be the possible reason for above error?? Thank you! Cheers, fly_hi -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=36404#36404 ___ 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