Re: [osg-users] Using Vertex Attributes
Peter Hrenka wrote: Do you set the initial Bounding Box? I think with generic Vertex Attributes OpenSceneGraph has no chance calculate the Bounding Box by itself. I calculate the bounding box myself and I set up a bounding box calculation callback for every geometry that I create through setComputeBoundingBoxCallback(). This should be enough, shouldn't it? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37875#37875 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Using Vertex Attributes
Things work if I call setVertexArray. I mean that I have to call setVertexArray, in addition to setVertexAttribArray, even though my shader is solely based on vertex attribute data and doesn't use GL2-style dedicated vertex coordinates data. Code: // This line should not be needed but seems required geom.setVertexArray(vertices); geom.setVertexAttribArray(verticesLoc, vertices); Is this expected? If I compile and use OSG with GL3 core profile support, will this still be required (again, it shouldn't)? On the GL trace side I don't see anything wrong when I don't call setVertexArray: glVertexAttribPointer(...); glDrawElements(...); When I also specify a vertex array the glVertexPointer call obviously seems superfluous: glVertexPointer(...); // pointless glVertexAttribPointer(...); // ok glDrawElements(...); Other custom vertex attributes that I tried to use to pass through color data behave fine. Vertex coordinates seem to be treated specially in OSG. Cheers, Fred -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37879#37879 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] flt file not working
Hi Peter, I think your FLT file is invalid. There doesn't seem to be any push record between the header node with its ancillary records and the following group node. Where does test.flt come from? Regards, Andreas Ekstrand On 2011-03-25 11:45, Peter Wraae Marino wrote: Hej osgUsers, I have attached an flt file which will not load with osgviewer. I have also tried to convert it to a .osg file and it becomes: Group { name db nodeMask 0x cullingActive TRUE } which is pretty much empty? we are using osg version 2.8.3 on windows 7 the flt file loads fine in a terravista buildt in viewer and polytrans. any ideas why it doesn't work with osgviewer? regards, Peter -- Bellinge Gymnasterne: http://www.bellingegymnasterne.dk Power Tumbling: http://www.powertumbling.dk OSG-Help: http://code.google.com/p/sigmaosg Personal Site: http://www.marino.dk ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- *__* *Andreas Ekstrand* *CEO / Co-founder* Phone: +46 708 490697 Fax: +46 13 9913093 andreas.ekstr...@remograph.com mailto:andreas.ekstr...@remograph.com *Remograph AB* Norrbergavägen 58 SE-590 54 Sturefors SWEDEN www.remograph.com http://www.remograph.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgPlugins] osg Dae plugin error: Texture coordinate set 0 not found
Hi, when I open some collada file, created with maya, in osg 2.9.11 I've this error: osg Dae plugin error: Texture coordinate set 0 not found and the result is that the texture isn't loaded. why?? thanks -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37882#37882 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] flt file not working
Hej Andreas, the test.flt comes from TerraVista export :( regards, Peter On Fri, Mar 25, 2011 at 12:28 PM, Andreas Ekstrand andreas.ekstr...@remograph.com wrote: Hi Peter, I think your FLT file is invalid. There doesn't seem to be any push record between the header node with its ancillary records and the following group node. Where does test.flt come from? Regards, Andreas Ekstrand On 2011-03-25 11:45, Peter Wraae Marino wrote: Hej osgUsers, I have attached an flt file which will not load with osgviewer. I have also tried to convert it to a .osg file and it becomes: Group { name db nodeMask 0x cullingActive TRUE } which is pretty much empty? we are using osg version 2.8.3 on windows 7 the flt file loads fine in a terravista buildt in viewer and polytrans. any ideas why it doesn't work with osgviewer? regards, Peter -- Bellinge Gymnasterne: http://www.bellingegymnasterne.dk Power Tumbling: http://www.powertumbling.dk OSG-Help: http://code.google.com/p/sigmaosg Personal Site: http://www.marino.dk ___ osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- *__* *Andreas Ekstrand* *CEO / Co-founder* Phone: +46 708 490697 Fax: +46 13 9913093 andreas.ekstr...@remograph.com *Remograph AB* Norrbergavägen 58 SE-590 54 Sturefors SWEDEN www.remograph.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Bellinge Gymnasterne: http://www.bellingegymnasterne.dk Power Tumbling: http://www.powertumbling.dk OSG-Help: http://code.google.com/p/sigmaosg Personal Site: http://www.marino.dk ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Material and SetTrasparancy
Hi, i'm looking for give to an 3d object, some transparent value (not completely transparency) . So, i'm starting from osgclip example, to make trasparent (with 0.5 opacity) the wireframe part of the cow. part of the c++ code : osg::Node* decorate_with_clip_node(osg::Node* subgraph) { ... float Opacity=0.5; osg::Material * material = (osg::Material *) wireframe_subgraph-getOrCreateStateSet()-getAttribute(osg::StateAttribute::MATERIAL); material-setTransparency(osg::Material::FRONT_AND_BACK, 1. - Opacity); wireframe_subgraph-getStateSet()-setRenderBinDetails(0, transparent); wireframe_subgraph-getStateSet()-setMode( GL_BLEND, osg::StateAttribute::ON ); wireframe_subgraph-getStateSet()-setRenderingHint(osg::StateSet::TRANSPARENT_BIN); wireframe_subgraph-getStateSet()-setAttributeAndModes(material, osg::StateAttribute::OVERRIDE); wireframe_subgraph-addChild(subgraph); rootnode-addChild(wireframe_subgraph); ... At runtime, at : material-setTransparency(osg::Material::FRONT_AND_BACK, 1. - Opacity); i get the following error : Access violation in the writing of the address ... and the check is on the following methods: void Material::setTransparency(Face face,float transparency) { //clampBetweenRange(transparency,0.0f,1.0f,Material::setTransparency()); if (face==FRONT || face==FRONT_AND_BACK) { _ambientFront[3] = 1.0f-transparency; // I get error here _diffuseFront[3] = 1.0f-transparency; _specularFront[3] = 1.0f-transparency; _emissionFront[3] = 1.0f-transparency; } if (face==BACK || face==FRONT_AND_BACK) { _ambientBack[3] = 1.0f-transparency; _diffuseBack[3] = 1.0f-transparency; _specularBack[3] = 1.0f-transparency; _emissionBack[3] = 1.0f-transparency; } } Could you suggest me to solve this problem? Thank you! Cheers, Andrea -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37885#37885 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Material and SetTrasparancy
Hi, I solved. The Problem is a null pointer of material, after : osg::Material * material = (osg::Material *) wireframe_subgraph-getOrCreateStateSet()-getAttribute(osg::StateAttribute::MATERIAL); command. I solved simply in this way : osg::Material * material = new osg::Material(); material-setTransparency(osg::Material::FRONT_AND_BACK, 1. - Opacity); wireframe_subgraph-getOrCreateStateSet()-setRenderBinDetails(0, transparent); wireframe_subgraph-getOrCreateStateSet()-setMode( GL_BLEND, osg::StateAttribute::ON ); wireframe_subgraph-getOrCreateStateSet()-setRenderingHint(osg::StateSet::TRANSPARENT_BIN); wireframe_subgraph-getOrCreateStateSet()-setAttributeAndModes(material, osg::StateAttribute::OVERRIDE); ... Sorry. Andrea -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37886#37886 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] fbx animation
ok, but what means an in the follow line?: finder._am-playAnimation( animations[an].get() ); and where i can see how can i do this: Finally, you can do what ever you want: play the animation on the osgViewer, get the Duration, the StartTime, the Name of the animation... specify the PlayMode.. PD the fbx load ok PD2: sorry if my english is not good -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37887#37887 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] fbx animation
forget what i say about the an jeje -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37888#37888 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Using Vertex Attributes
Hi Fred, Am 25.03.2011 11:52, schrieb Fred Smith: Things work if I call setVertexArray. I mean that I have to call setVertexArray, in addition to setVertexAttribArray, even though my shader is solely based on vertex attribute data and doesn't use GL2-style dedicated vertex coordinates data. Code: // This line should not be needed but seems required geom.setVertexArray(vertices); geom.setVertexAttribArray(verticesLoc, vertices); Is this expected? If I compile and use OSG with GL3 core profile support, will this still be required (again, it shouldn't)? This hints again to a faulty bounding box calculation. I you setup a VertexArray OSG uses this to calculate the bounding box. You already said that you provide the bounding box (callback) yourself, so maybe you still have some error there (it was not included in you original post). On the GL trace side I don't see anything wrong when I don't call setVertexArray: glVertexAttribPointer(...); glDrawElements(...); When I also specify a vertex array the glVertexPointer call obviously seems superfluous: glVertexPointer(...); // pointless glVertexAttribPointer(...); // ok glDrawElements(...); Can you compare the traces of the working and the non-working version? If so, can you spot differences in the values of osg_ModelViewProjectionMatrix? Other custom vertex attributes that I tried to use to pass through color data behave fine. Vertex coordinates seem to be treated specially in OSG. Cheers, Fred 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@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Using Vertex Attributes
Peter Hrenka wrote: On the GL trace side I don't see anything wrong when I don't call setVertexArray: glVertexAttribPointer(...); glDrawElements(...); When I also specify a vertex array the glVertexPointer call obviously seems superfluous: glVertexPointer(...); // pointless glVertexAttribPointer(...); // ok glDrawElements(...); Can you compare the traces of the working and the non-working version? If so, can you spot differences in the values of osg_ModelViewProjectionMatrix? The values are the same for the working and non-working versions. My bounding box is correctly calculated. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37890#37890 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Using Vertex Attributes
I don't believe my problem comes from the bounding box, but out of curiosity: the osgvertexattributes sample does not seem to specify a compute bounding box callback, so how come the camera is set up correctly? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37891#37891 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] flt file not working
Hi Jason I would expect Creator to handle things better than OSG as Creator has a quite a robust and forgiving FLT file reader ( as it should : ) ) , and it can handle malformed files quite well, it will skip records it does not know etc. and try to create usable structure, you might see issues in things like the material and color pallets etc. If you save the file out from Creator then it will be upgraded to the version of open flight and written out with the correct records etc. You lose details that were to malformed for Creator to handle etc.. Also you might look in the Creator log it may have spit out some warnings or notices about the original file Also what version of Open Flight was the original file written by Terra Vista ,as this may affect the ability of the OSG to read the file, Creator will read files in back as far as V12 and maybe even earlier depending on the file, but some things are no longer supported by Creator so you can get some oddities on versions earlier the V14 __ Gordon Tomlinson www.photographybyGordon.com www.gordontomlinson.com www.vis-sim.com Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival -Master Tambo Tetsura -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Daly Sent: Friday, March 25, 2011 5:57 PM To: OpenSceneGraph Users Subject: Re: [osg-users] flt file not working On 03/25/2011 07:42 AM, Peter Wraae Marino wrote: Hej Andreas, the test.flt comes from TerraVista export :( Weird. Creator 4.1 loads it fine. I opened it and saved it back out as test2.flt (attached). osgviewer at least shows something with this one (not sure it's correct). --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] flt file not working
On 03/25/2011 03:00 PM, Gordon Tomlinson wrote: I would expect Creator to handle things better than OSG as Creator has a quite a robust and forgiving FLT file reader ( as it should : ) ) , and it can handle malformed files quite well, it will skip records it does not know etc. and try to create usable structure, you might see issues in things like the material and color pallets etc. Yeah, I know. I've found the OSG loader to be at least somewhat forgiving, too. I guess I'd just expect it to get something on the screen, even if it's not completely correct. If you save the file out from Creator then it will be upgraded to the version of open flight and written out with the correct records etc. You lose details that were to malformed for Creator to handle etc.. Also you might look in the Creator log it may have spit out some warnings or notices about the original file I did check the error log. Didn't see anything relevant. Also what version of Open Flight was the original file written by Terra Vista ,as this may affect the ability of the OSG to read the file, Creator will read files in back as far as V12 and maybe even earlier depending on the file, but some things are no longer supported by Creator so you can get some oddities on versions earlier the V14 Peter's file was 15.8. The one I sent will be 16.4. --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] flt file not working
Hi Jason I looked at the file in an older version (3.0) It had no Material palette and the Color palette look pretty hosed as well so I suspect that is malformed as well, I think the file is just not really Open Flight compliant and thus why the OSG reader is struggling __ Gordon Tomlinson www.photographybyGordon.com www.gordontomlinson.com www.vis-sim.com Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival -Master Tambo Tetsura -Original Message- From: Jason Daly [mailto:jd...@ist.ucf.edu] Sent: Friday, March 25, 2011 7:07 PM To: gor...@gordon-tomlinson.com; OpenSceneGraph Users Subject: Re: [osg-users] flt file not working On 03/25/2011 03:00 PM, Gordon Tomlinson wrote: I would expect Creator to handle things better than OSG as Creator has a quite a robust and forgiving FLT file reader ( as it should : ) ) , and it can handle malformed files quite well, it will skip records it does not know etc. and try to create usable structure, you might see issues in things like the material and color pallets etc. Yeah, I know. I've found the OSG loader to be at least somewhat forgiving, too. I guess I'd just expect it to get something on the screen, even if it's not completely correct. If you save the file out from Creator then it will be upgraded to the version of open flight and written out with the correct records etc. You lose details that were to malformed for Creator to handle etc.. Also you might look in the Creator log it may have spit out some warnings or notices about the original file I did check the error log. Didn't see anything relevant. Also what version of Open Flight was the original file written by Terra Vista ,as this may affect the ability of the OSG to read the file, Creator will read files in back as far as V12 and maybe even earlier depending on the file, but some things are no longer supported by Creator so you can get some oddities on versions earlier the V14 Peter's file was 15.8. The one I sent will be 16.4. --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] 64bit OS X builds
Hi -- Is anyone successfully building OSG, either 2.8.3 or svn trunk, for 64bit OS X? I've got a report from an associate that this is broken (sorry, no additional information at this point) and just wanted to see if this was known to either work or not work... -- -Paul Martz Skew Matrix Software http://www.skew-matrix.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 64bit OS X builds
Hi Paul, I successfully made a build but you need to set some cmake variables (maybe we should set up this variables by default) OSG_WINDOWING_SYSTEM=Cocoa OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio Doing this I don't have any problem building it. Rafa. 2011/3/25 Paul Martz pma...@skew-matrix.com: Hi -- Is anyone successfully building OSG, either 2.8.3 or svn trunk, for 64bit OS X? I've got a report from an associate that this is broken (sorry, no additional information at this point) and just wanted to see if this was known to either work or not work... -- -Paul Martz Skew Matrix Software http://www.skew-matrix.com/ ___ 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 http://gvsig3d.blogspot.com 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] 64bit OS X builds
Hi Paul and Rafa, I have also built 2.8.3 on MacOS X, without problems. The build I did was Intel 32 and 64 bit universal. No ppc at all. Perhaps it's the ppc 64-bit build that fails? I seem to remember reading that ppc 64 bit was pretty uncommon anyways. I was having CMake generate normal unix makefiles and building from those. J-S On 25/03/2011 3:46 PM, Rafa Gaitan wrote: Hi Paul, I successfully made a build but you need to set some cmake variables (maybe we should set up this variables by default) OSG_WINDOWING_SYSTEM=Cocoa OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX=imageio Doing this I don't have any problem building it. Rafa. 2011/3/25 Paul Martzpma...@skew-matrix.com: Hi -- Is anyone successfully building OSG, either 2.8.3 or svn trunk, for 64bit OS X? I've got a report from an associate that this is broken (sorry, no additional information at this point) and just wanted to see if this was known to either work or not work... -- -Paul Martz Skew Matrix Software http://www.skew-matrix.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.dyndns-web.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 64bit OS X builds
Hi Paul, Am 25.03.11 20:32, schrieb Paul Martz: Is anyone successfully building OSG, either 2.8.3 or svn trunk, for 64bit OS X? I've got a report from an associate that this is broken (sorry, no additional information at this point) and just wanted to see if this was known to either work or not work... I am doing continuous builds of svn trunk for 64bit OS X via hudson [1], and no problems are reported. I can post the command line I am using for generating xcode-project files on monday when I am back at the office. cheers, Stephan [1] http://hudson-ci.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] 64bit OS X builds
Thanks for all the replies, folks. I understand 64bit OS X builds are working. -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] short video flying with wiimote
Hi all, this is a short demo of my terrain integrated with a wiimote : www.youtube.com/watch?v=cGbD5bpu2uY -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37901#37901 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] short video flying with wiimote
Very cool...:) -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Massimo Tarantini Sent: Friday, March 25, 2011 4:57 PM To: osg-users@lists.openscenegraph.org Subject: [osg-users] [vpb] short video flying with wiimote Hi all, this is a short demo of my terrain integrated with a wiimote : www.youtube.com/watch?v=cGbD5bpu2uY -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37901#37901 ___ 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