[osg-users] help me!
hi! i use Texture UV repeat 3.0 in 3dsMax8,but when i output it to ive,then use osgViewer to look,texture is not right. it seem that repeat is not work! why? osgExp is not surport Texture UV repeat? how to make it? thank you! _ 用手机MSN聊天写邮件看空间,无限沟通,分享精彩! http://mobile.msn.com.cn/___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] help me!
Hi, El Miércoles 23 Julio 2008ES 08:48:19 monkeymonkey escribió: hi! i use Texture UV repeat 3.0 in 3dsMax8,but when i output it to ive,then use osgViewer to look,texture is not right. it seem that repeat is not work! why? osgExp is not surport Texture UV repeat? how to make it? Convert your .ive to .osg with osgconv, then look for the wrap parameter in the file like wrap_s,t,... REPEAT If there is something other word than REPEAT, change it. Alberto ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osg/GL + glut.h interaction
Apologies if this is a FAQ or otherwise known, but, the following test program fails to compile for me: = #include osg/StateSet #include GLUT/glut.h #include osg/Drawable int main(int argc, char** argv) { return 0; } = I'm on Mac, change GLUT/glut.h to GL/glut.h or similar if required. As it turns out, I don't even want GLUT support in the program I was trying to build but there's a genuine issue here - glut.h behaves very badly: at its end, it #undef-s APIENTRY. So when osg/Drawable is included, osg/GL has already been included (and guarded against another include, by defining _osg_gl), but APIENTRY has been undefined so never gets expanded again - the end result is I end up with APIENTRY in the pre-processed source and obviously compilation fails. This took me a while to figure out, so maybe it could be documented? But there is an actual (possible) fix - remove the multiple include guard from osg/GL. This should be fine because it's a very small file that only consists of pre-processor actions. gl.h would still only be pulled in once, but APIENTRY would get set regardless. Regards, James ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] LineSegmentIntersector LEAK-Problem ?
Yes you are right. Code compiles fine in release-mode. Greetings Hagen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem using osgCal2
Thanks Andrew, I am working on Linux, and osgCalViewer is just working fine. I will try to use Delta3D it seems to me a better option too. RJ Andrew Lett wrote: Hello Rahul, I also gave osgCal2 (I believe 0.3.1) a try with both OSG2.0 and OSG2.4 - and I wasn't successful with either release. I just got crashes (under VisualStudio8, didn't try it for Mac). If you do manage to sort it out, please do let me know. However, I do have character animation working with the package 'ReplicantBody'. I had to make a few changes so that it would work under viewer (uses the Producer from before OSG2), and also so that it can use multithreaded rendering (I'm using cal3dv0.11). I know that ReplicantBody hasn't been updated in years (one of my reasons for trying out osgCal2), but it does seems to do the trick. The Delta3D team also seems to have an alternate animation package available, you might want to look at that. Cheers, - 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
Re: [osg-users] Node needs to render at least one pixel
Hi Phil, For the distance from the eye point/view Try: NodeVisitor::getDistanceEyePoint(Vec3) NodeVisitor::getDistanceToViewPoint(Vec3) ViewPoint and EyePoint are usually co-incident, but in some effects like shadows the eye point could be a false one i.e. local to the shadow, rather than the main cameras eye point (which is the viewpoint). Robert. On Tue, Jul 22, 2008 at 10:14 PM, Tessier, Philip [EMAIL PROTECTED] wrote: Many thanks! This will be my first AutoTransform (or first custom Transform with an accept()). I'll need to know the distance from my image to the camera. I'm thinking that the accept( NodeVisitor nv) will call computeLocalToWorldMatrix( an identity matrix, nv) to get that. Am I on the right track? Thanks, Phil Philip A. Tessier Northrop Grumman IT [EMAIL PROTECTED] Cell 210-867-6775 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jean-Sébastien Guay Sent: Tuesday, July 22, 2008 3:40 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Node needs to render at least one pixel Hello Philip, As this iamge shrinks into the distance, it (still) becomes invisible. My coworker (who is knowledgeable of OpenGL, but not so much of OpenSceneGraph), suggests MIP-mapping. I can move to that, it that's the next step. I don't think mipmapping will solve the problem, because that just changes how the texture is filtered when it is minified and magnified. If the quad covers 0 pixels, the filtering of the texture on the quad doesn't really matter, the quad still won't be visible. I really don't know what to suggest as your usage is pretty uncommon... You could try using an osg::AutoTransform to keep the quad the same size (in image space) independently of its distance from the viewer. Not sure if that's what you want. Otherwise, attach a callback to the transform above your quad, which would change the transform's scale when the distance from the viewpoint gets larger than some threshold. Sorry I can't help more. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Help with osgdem
Hi Zhangqiang, You best course is just to leave alone the --*-threads-ratio settings from the command line. They are an experimental part of VPB. Robert. On Wed, Jul 23, 2008 at 3:23 AM, zhangqiang [EMAIL PROTECTED] wrote: Thank you for your advice! I have done according to your idea, the result it that when I use --write-threads-ratio, GDALOpen() function in GeospatialDataset.cpp have a error, and the error message is 0x8144580 directive quoted 0 x memory. The memory can not be read. when I use --read-threads-ratio,GDALOpen() function is ok. I don't know how to solve it, can you help me? Looking for your reply at your earliest convenience! 2008-07-23 zhangqiang ___ 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] Is it possible to know when the node-graph is 'dirty'?
Hi Viggo, On Wed, Jul 23, 2008 at 6:51 AM, Viggo Løvli [EMAIL PROTECTED] wrote: Is there any way to know whether or not the scene-graph has been modified? The OSG has very localised mechanisms for tracking dirty state, such as in osg::Image and osg::Array, but there isn't a general mechanism, such a mechanism would be pretty expensive to implement both in terms of code complexity and CPU cost per frame so it's not something that has been implemented. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg/GL + glut.h interaction
Hi James, Can you not just avoid GLUT because it's crap for an proper application development. Or just put the GLUT include last. I'm not going to mess around with the core OSG to make up for deficiencies in an API that is well passed it's sell by date. Robert. On Wed, Jul 23, 2008 at 9:07 AM, James Turner [EMAIL PROTECTED] wrote: Apologies if this is a FAQ or otherwise known, but, the following test program fails to compile for me: = #include osg/StateSet #include GLUT/glut.h #include osg/Drawable int main(int argc, char** argv) { return 0; } = I'm on Mac, change GLUT/glut.h to GL/glut.h or similar if required. As it turns out, I don't even want GLUT support in the program I was trying to build but there's a genuine issue here - glut.h behaves very badly: at its end, it #undef-s APIENTRY. So when osg/Drawable is included, osg/GL has already been included (and guarded against another include, by defining _osg_gl), but APIENTRY has been undefined so never gets expanded again - the end result is I end up with APIENTRY in the pre-processed source and obviously compilation fails. This took me a while to figure out, so maybe it could be documented? But there is an actual (possible) fix - remove the multiple include guard from osg/GL. This should be fine because it's a very small file that only consists of pre-processor actions. gl.h would still only be pulled in once, but APIENTRY would get set regardless. Regards, James ___ 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] Is it possible to know when the node-graph is 'dirty'?
Hi Peter, What you say is true in most cases. The 'simplest' way to do this would be to tell my system that the node-tree need re-formatting each time we call OSG to add children. That would require two calls each time, and also requre humans to remember to implement both calls. This opens for human errors, which at least I dont want (I am lazy). I want to make my module (the one that need to format the node-masks) independent of the rest of the system, and to ensure that the rest of the system will not need to know about my module. I also want to be able to add 3rd party libraries to my application without re-writing them to do special calls to my module when they add nodes to the tree. So, the conclusion I have is that I need to automatically know when I need to format the node-masks. The osg::Group has a callback function named osg::Group::childInserted. I can make my root-node into a sub-class og osg::Group where I implement the childInserted function. This way I will get a callback each time someone add nodes to my root-node. If a module create it's own osg::Group and add children to it dymically then I would not know anything about that. I also saw Roberts reply and I agree that a dirty system on the node-tree would be very expensive. I knew that my question was a longshot. I am now thinking about other solutions to achieve my goal. The goal is to render the world with 3 slave cameras. One shall render all render-bins up to bin 9. One shall render bin 10. And the 3rd shall render bin 10 and up. So bin 10 is rendered twice. This is to fix some glitches on transparent polygons that intersect each other while needing to write to the depth-buffer. Ok, so another solution would be to force a camera to only render a certain number of bins. I have not seen any place in the code around camera or cull-settings that you can specify a camera to stay within a limited range of render-bins, so I guess this won't be as easy either? Do you have any suggestions on how to be able to render one bin twice in the same frame. The first and second render of the bin shall have a few render-states set differently. Regards, Viggo Date: Wed, 23 Jul 2008 07:58:37 +0200From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Re: [osg-users] Is it possible to know when the node-graph is 'dirty'? Hi Viggo, Don't know the details of your code, but if you are adding a sub-node then you have code already that is called for adding the sub-node and thereby you know when the scene-graph has been modified? regards, Peter http://osghelp.com On Wed, Jul 23, 2008 at 7:51 AM, Viggo Løvli [EMAIL PROTECTED] wrote: Hi, My code is currently formatting the node-masks of the whole scene-graph before we start rendering. The formatting code is only ran once.If a sub-node is added to the node-tree afterwards then I want to run my formatting code again. Is there any way to know whether or not the scene-graph has been modified? Regards,Viggo Windows Live Hotmail på mobilen. Ha alltid e-posten din tilgjengelig.___osg-users mailing [EMAIL PROTECTED]://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org-- Regards,Peter Wraae Marinowww.osghelp.com - OpenSceneGraph support site _ Hold kontakten med Windows Live Messenger. http://clk.atdmt.com/GBL/go/msnnkdre001003gbl/direct/01/___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg2.4 osgUtil::Tessellator bug,cause memory leak
Hi Heishujing, If you think you have a bug fix could you please post the whole modified file to osg-submissions. You can subscribe to the list via: http://www.openscenegraph.org/projects/osg/wiki/MailingLists Also have a read through the notes on SubmissionsProtocol so you know the best way to submit changes for review/merging. http://www.openscenegraph.org/projects/osg/wiki/MailingLists/SubmissionsProtocol Also when posting could you provide your full name, as I credit all contributors in the svn commit messages (this is what the AUTHORS.txt) comes from. Thanks, Robert. On Wed, Jul 23, 2008 at 2:17 AM, heishuijing_2000 [EMAIL PROTECTED] wrote: hi, Some days later,i have sent a email which is about this subject,and Gordon Tomlinson answered as this: This is a compiler problem not an OSG problem, so you really need to ask Microsoft, it's a problem with their compiler and code not OSG this is my email before: hi, I am sorry to ask about this topic again,:). I have asked the same question before. That's about osgMFC example. Somebody in this email List have help me with it. And that's perfect. There is a known issue/BUG with MFC, were MFC makes a call to _CrtDumpMemoryLeaks() in the destructor of the _AFX_DEBUG_STATE, followed by _CrtSetDbgFlag() which sets it to ~_CRTDBG_LEAK_CHECK_DF (therefor disabling memory leak test at *true* program exit) This destructor is called at exit (i.e. atexit()), but before statics residing in dlls and others are destroyed, resulting in many false memory leaks are reported I use VS2003 and osg2.4 in debug mode. In my project, i Just add mfc71d.lib before all of the osg Libs ,and the VS no longer report memory. Unfortunately,recently the project report memory leak again. That is about osgUtil::Tessellator,Here is my test code: //the test code is drawing a concave like a rect containing a triangle with it .The Rect and the triangle intersect with one point,as //we can see bellow //an concave polygon // *** // ** * * // * * * * // * * ** // * * * * // **** * // * * // *** osgViewer::Viewer viewer; osg::ref_ptr osg::Vec3Array vertices = new osg::Vec3Array; vertices-push_back(osg::Vec3(-100,0,-100)); vertices-push_back(osg::Vec3(100,0,-100)); vertices-push_back(osg::Vec3(100,0,100)); vertices-push_back(osg::Vec3(0,0,100)); vertices-push_back(osg::Vec3(50,0,50)); vertices-push_back(osg::Vec3(-50,0,50)); vertices-push_back(osg::Vec3(0,0,100)); vertices-push_back(osg::Vec3(-100,0,100)); osg::ref_ptr osg::Vec3Array pNormal = new osg::Vec3Array(); pNormal-push_back(osg::Vec3(0,-1,0)); osg::ref_ptr osg::Geometry geom = new osg::Geometry; geom-setVertexArray(vertices.get()); geom-setNormalArray(pNormal.get()); geom-setNormalBinding(osg::Geometry::BIND_OVERALL); geom-addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::POLYGON,0,vertices-size())); osg::ref_ptr osgUtil::Tessellator tes = new osgUtil::Tessellator(); tes-setTessellationType(osgUtil::Tessellator::TESS_TYPE_GEOMETRY); tes-setBoundaryOnly(false); tes-setWindingType( osgUtil::Tessellator::TESS_WINDING_ODD); tes-retessellatePolygons(*geom); osg::ref_ptrosg::Geode geode = new osg::Geode; geode-addDrawable(geom.get()); osg::ref_ptrosg::Group pGroup = new osg::Group; pGroup-addChild(geode.get()); viewer.setSceneData( pGroup.get() ); I test this code in non-MFC project such as console project,that works perfect.No memory leak is reported. But when i turn to osg MFC project,the VS always reports memory leak . I notice that if the polygon is self-intersect ,there must be memory leak report in MFC project. I really do not know how to do about it . I just want to find a method to prevent the VS reprot false memory leak. Anyone help me? Thank you ,:) Recently i trace this memory leak In VS with osg2.4 osgviewerMFC project, i do find the problem.I modify the osg code: void Tessellator::reset() { if (_tobj) { gluDeleteTess(_tobj); _tobj = 0; } for (Vec3dList::iterator i = _coordData.begin(); i != _coordData.end(); ++i) { delete (*i); } _coordData.clear(); _newVertexList.clear(); _primList.clear(); _errorCode = 0; } as below:
[osg-users] Building curl plugin on Linux
Hi all, I want to build curl plugin for OSG.2.5.5, but when i hit ccmake I do not find any option to specify the curl include and libs. So the question is how to build the curl plugin. cheers RJ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg/GL + glut.h interaction
On 23 Jul 2008, at 10:56, Robert Osfield wrote: Can you not just avoid GLUT because it's crap for an proper application development. Or just put the GLUT include last. I'm not going to mess around with the core OSG to make up for deficiencies in an API that is well passed it's sell by date. Agreed, but I do think it should be 'officially' documented somewhere, because the failure mode is *extremely* confusing. I was dealing with code that was indirectly dragging in glut.h through two other layers of library headers, and wasted many hours untangling the mess. Though I suppose the next person to have the issue will search the OSG list archives and maybe find this thread. Hello to that person, now you know what the fix is :) James ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Building curl plugin on Linux
Hi RJ, Cmake should automatically find libcul and build the curl plugin. If it hasn't found it already, remove your CMakeCache.txt and then re-run ./configure. Robert. On Wed, Jul 23, 2008 at 10:18 AM, Rahul Jain [EMAIL PROTECTED] wrote: Hi all, I want to build curl plugin for OSG.2.5.5, but when i hit ccmake I do not find any option to specify the curl include and libs. So the question is how to build the curl plugin. cheers RJ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg/GL + glut.h interaction
James You can go to the to the Osg Wiki FAQ and add an entry to it. ( Search the wiki for password details ) Also to look at another way there are, OSG cannot be responsible for what users link in or pull in with headers There are many instances of headers from other packages that have to be included in a certain order and they know nothing about each other, this effects not just OSG but many packages. In your own code your can and certainly should document when headers have to be include in a certain order Or even excluded, btw this can even extend to the way you link certain libs on good old windoze __ Gordon Tomlinson Email : [EMAIL PROTECTED] YIM/AIM : gordon3dBrit MSN IM : [EMAIL PROTECTED] Website : www.vis-sim.com www.gordontomlinson.com __ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James Turner Sent: Wednesday, July 23, 2008 5:11 AM To: OpenSceneGraph Users Subject: Re: [osg-users] osg/GL + glut.h interaction On 23 Jul 2008, at 10:56, Robert Osfield wrote: Can you not just avoid GLUT because it's crap for an proper application development. Or just put the GLUT include last. I'm not going to mess around with the core OSG to make up for deficiencies in an API that is well passed it's sell by date. Agreed, but I do think it should be 'officially' documented somewhere, because the failure mode is *extremely* confusing. I was dealing with code that was indirectly dragging in glut.h through two other layers of library headers, and wasted many hours untangling the mess. Though I suppose the next person to have the issue will search the OSG list archives and maybe find this thread. Hello to that person, now you know what the fix is :) James ___ 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] Is this a too dirty hack?
Hi, I am on the quest to figure out when the node-tree is dirty. I have found a way... But I do not know if this way is a too dirty hack to actually use. I have a class that inherit osg::Group. I use this as the root of my scene-graph. Each time someone add a node to the world, then the dirtyBound function will be called for all parents. This function is not virtual so I can not override it in my specialization of the osg::Group class. I can however set up a callback that is called when we calculate the bounding sphere. This callback is only executed if someone call getBound when the bounding-sphere is set to dirty. So, if the callback to calculate a bounding sphere is called on my root-node then I know that the node tree has been changed. I can thus check if the node-tree is 'dirty' by calling getBound() on my own class. If that results in a callback then it was dirty. So the question is: Is this a too dirty hack to use, or is it okish? Regards, Viggo _ Windows Live Messenger - også på mobilen. http://windowslivemobile.msn.com/Homepage.aspx?lang=nb-noocid=30032___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Is this a too dirty hack?
who care's if it dirty, if it works it works ;) I'm still not sure why your doing this, this way, as you have to add all your nodes to your scene, and if you add a simple addNodestoScene type function that say does somehting like addNodestoScene ( osgDb::LoadNode(myfile.flt)) or similar the you catch all the additions as you have to Load the node , this falls down a little if your using VPB _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Viggo Løvli Sent: Wednesday, July 23, 2008 6:35 AM To: OSG Mailing List Subject: [osg-users] Is this a too dirty hack? Hi, I am on the quest to figure out when the node-tree is dirty. I have found a way... But I do not know if this way is a too dirty hack to actually use. I have a class that inherit osg::Group. I use this as the root of my scene-graph. Each time someone add a node to the world, then the dirtyBound function will be called for all parents. This function is not virtual so I can not override it in my specialization of the osg::Group class. I can however set up a callback that is called when we calculate the bounding sphere. This callback is only executed if someone call getBound when the bounding-sphere is set to dirty. So, if the callback to calculate a bounding sphere is called on my root-node then I know that the node tree has been changed. I can thus check if the node-tree is 'dirty' by calling getBound() on my own class. If that results in a callback then it was dirty. So the question is: Is this a too dirty hack to use, or is it okish? Regards, Viggo _ Windows Live Hotmail på mobilen. Ha alltid e-posten din tilgjengelig. http://windowslivemobile.msn.com/BrowserServiceHotmail.aspx?lang=nb-NOocid =30032 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Is this a too dirty hack?
I am doing it because I want to be able to set node-masks on nodes that is added to the scene-graph after I have initialized my scene. I am trying to avoid having to specialize the code where we add to the tree. I want the code module that set node-masks to be completely standalone. The hack seems to fail however, any movement update on objects in the tree will also set the bound dirty, so I am currently getting a dirty flag every frame because of Ephemeris moon's movement :-) I am not using VPB, but the idea is to somehow know when anything is added to the tree so that I can process them. Viggo From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Wed, 23 Jul 2008 07:15:48 -0400Subject: Re: [osg-users] Is this a too dirty hack? who care's if it dirty, if it works it works ;) I'm still not sure why your doing this, this way, as you have to add all your nodes to your scene, and if you add a simple addNodestoScene type function that say does somehting like addNodestoScene ( osgDb::LoadNode(myfile.flt)) or similar the you catch all the additions as you have to Load the node , this falls down a little if your using VPB From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Viggo LøvliSent: Wednesday, July 23, 2008 6:35 AMTo: OSG Mailing ListSubject: [osg-users] Is this a too dirty hack? Hi, I am on the quest to figure out when the node-tree is dirty. I have found a way... But I do not know if this way is a too dirty hack to actually use. I have a class that inherit osg::Group.I use this as the root of my scene-graph. Each time someone add a node to the world, then the dirtyBound function will be called for all parents. This function is not virtual so I can not override it in my specialization of the osg::Group class.I can however set up a callback that is called when we calculate the bounding sphere.This callback is only executed if someone call getBound when the bounding-sphere is set to dirty. So, if the callback to calculate a bounding sphere is called on my root-node then I know that the node tree has been changed.I can thus check if the node-tree is 'dirty' by calling getBound() on my own class. If that results in a callback then it was dirty. So the question is: Is this a too dirty hack to use, or is it okish? Regards,Viggo Windows Live Hotmail på mobilen. Ha alltid e-posten din tilgjengelig. _ Hold kontakten med Windows Live Messenger. http://clk.atdmt.com/GBL/go/msnnkdre001003gbl/direct/01/___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] vpb on cluster example
Hi, the example should hopefully be complete now. You should be able to get to the example using the front VPB page http://www.openscenegraph.org/projects/VirtualPlanetBuilder/wiki or the Usage Examples page http://www.openscenegraph.org/projects/VirtualPlanetBuilder/wiki/UsageExamples enjoy jp John Vidar Larring wrote: Thanks for sharing with the community J.P! Looking forward to see the example page completed:) http://www.openscenegraph.org/projects/VirtualPlanetBuilder/wiki/ExampleClusterJPD Best Regards, John Larring J.P. Delport wrote: Hi all, I've managed to build a terrain database using vpb on a Linux single system image cluster. Robert, thanks for the great tools. The build took 50 hours using 8 dual core nodes and generated 1.5 million files with a total size of 487GB. The input data is around 800GB of geotiffs. I'd like to share the setup and procedure, where should I put it? OSG Wiki, VPB Wiki? regards jp -- 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] IntersectVisitors and LODs
Hi all, I have a problem in a situation that seem quite common. I have an IntersectVisitor traversing a scene with LOD nodes. The LOD ranges are not overlapped. The problem is that intersections are only detected with one of the LOD children, not neccesarily the visible one. There must be any obvious thing that I am not doing, so any ideas or any advice about where to search would be very appreciated. Thanks in advance. -- Javier Taibo VideaLAB. Grupo de Visualización en Ingeniería, Arquitectura y Urbanismo Universidade da Coruña E.T.S.I. de Caminos, Canales y Puertos Campus de Elviña, s/n 15071 - A Coruña (Spain) http://videalab.udc.es +34-981-167000 (ext. 5444) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] IntersectVisitors and LODs
Try a search of the mail list archive or through google (1st hit) http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2007- December/005306.html -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Javier Taibo Sent: Wednesday, July 23, 2008 7:45 AM To: OpenSceneGraph Users Subject: [osg-users] IntersectVisitors and LODs Hi all, I have a problem in a situation that seem quite common. I have an IntersectVisitor traversing a scene with LOD nodes. The LOD ranges are not overlapped. The problem is that intersections are only detected with one of the LOD children, not neccesarily the visible one. There must be any obvious thing that I am not doing, so any ideas or any advice about where to search would be very appreciated. Thanks in advance. -- Javier Taibo VideaLAB. Grupo de Visualización en Ingeniería, Arquitectura y Urbanismo Universidade da Coruña E.T.S.I. de Caminos, Canales y Puertos Campus de Elviña, s/n 15071 - A Coruña (Spain) http://videalab.udc.es +34-981-167000 (ext. 5444) ___ 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] projects using OSG that appear on the web
Looks like an interesting project _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David _ Sent: Wednesday, July 23, 2008 7:51 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] projects using OSG that appear on the web Hi, i´ve seen that there are some projects that use OSG, announced on the OSG website we´ve been working in a project for a year right now and we´re interested in showing it to as much people as we can. my boss asked me if it was possible to link our project from the OSG website, so that´s why i´m writing this what do i need to do in order to see my project on the osg website??? i guess i should supply a little description and a pair of screenshots we have our own website, take a look if you´re interested -- www.capaware.org (english-spanish) the screenshots are 3-4 months old and things look a little better now thanks in advance _ ¡El Mundo Messenger te espera! Entra ya en I love Messenger y descubre las últimas novedades, trucos, emoticonos. Entra ya en I love http://www.vivelive.com/ilovemessenger/ Messenger ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem using osgCal2
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rahul Jain wrote: Hi All , I am trying to place some characters (cal3D) on a terrain I created using VPB at a particular location on the terrain using the code shown below. But when i run my program i do not see any thing, using mouse (trackball) functionality i cam locate the terrain but could not locate the model. Can some one tell me what am i doing wrong. I am using latest version of osgCal2 (checked out from svn ) and OSG 2.0. That looks to me like a small-feature culling issue - if the model is relatively tiny compared to your terrain, it will be culled when you look afar. Your code looks OK to me. Regards, Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFIhx2Ln11XseNj94gRAnBfAKChGWNzAFNiNMpIl35EPj+RMRUmQACgi2T7 jxc6GNECpF4RKsyELeiVOXA= =gmRE -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Is this a too dirty hack?
Hi Viggo, Do you really have to go through all this hassle? Can't you just catch changes to the scene graph as they are being made by your app? The only part of the OSG which which would add nodes to the scene graph is the DatabasePager, and you can catch all loads from this via a Registry::ReadFileCallback. Robert. On Wed, Jul 23, 2008 at 11:35 AM, Viggo Løvli [EMAIL PROTECTED] wrote: Hi, I am on the quest to figure out when the node-tree is dirty. I have found a way... But I do not know if this way is a too dirty hack to actually use. I have a class that inherit osg::Group. I use this as the root of my scene-graph. Each time someone add a node to the world, then the dirtyBound function will be called for all parents. This function is not virtual so I can not override it in my specialization of the osg::Group class. I can however set up a callback that is called when we calculate the bounding sphere. This callback is only executed if someone call getBound when the bounding-sphere is set to dirty. So, if the callback to calculate a bounding sphere is called on my root-node then I know that the node tree has been changed. I can thus check if the node-tree is 'dirty' by calling getBound() on my own class. If that results in a callback then it was dirty. So the question is: Is this a too dirty hack to use, or is it okish? Regards, Viggo Windows Live Hotmail på mobilen. Ha alltid e-posten din tilgjengelig. ___ 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] Is this a too dirty hack?
Has Max head room entered the OSG ;) Your email is repeating ;) ,at least for me -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Wednesday, July 23, 2008 8:02 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Is this a too dirty hack? Hi Viggo, Do you really have to go through all this hassle? Can't you just catch changes to the scene graph as they are being made by your app? The only part of the OSG which which would add nodes to the scene graph is the DatabasePager, and you can catch all loads from this via a Registry::ReadFileCallback. Robert. On Wed, Jul 23, 2008 at 11:35 AM, Viggo Løvli [EMAIL PROTECTED] wrote: Hi, I am on the quest to figure out when the node-tree is dirty. I have found a way... But I do not know if this way is a too dirty hack to actually use. I have a class that inherit osg::Group. I use this as the root of my scene-graph. Each time someone add a node to the world, then the dirtyBound function will be called for all parents. This function is not virtual so I can not override it in my specialization of the osg::Group class. I can however set up a callback that is called when we calculate the bounding sphere. This callback is only executed if someone call getBound when the bounding-sphere is set to dirty. So, if the callback to calculate a bounding sphere is called on my root-node then I know that the node tree has been changed. I can thus check if the node-tree is 'dirty' by calling getBound() on my own class. If that results in a callback then it was dirty. So the question is: Is this a too dirty hack to use, or is it okish? Regards, Viggo Windows Live Hotmail på mobilen. Ha alltid e-posten din tilgjengelig. ___ 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] vpb on cluster example
Hi J.P. Many thanks for putting this guide, sure saves me some time and will help others. In terms of the work flow, there are couple of things that VPB can help out with. As you note, vpbmaster doesn't like, or actually does not permit building on databases where the source data is in different coordinates system, this is due to the fact that the parallel osgdem runs would end up doing the reprojection themselves each time, which is both a waste of compute resources as well as a threading issue. Since vpbmaster has this requirement, we have a another tool that can do the reprojection for use - vpbcache. The vpbcache app can create a file cache that contains a mapping between your original source data and reprojected versions of it. The vpbcache tool allows you to create this file cache, and then to do the reprojection that is required for the final build. vpbcache takes as input a source file, typically exactly the same source file that vpbmaster run will use. So what's this about source files we'll this is an ascii file that wraps up all the source data and build options that will use. vpbmaster creates a source file and then passes this on to the slaves so they no what to process. You can also get vpbmaster to generate a master source file for you. The rough process is : Step 1: run vpbmaster with all your source files and then get it to output a build.source file, this run does not run the actual build. Add --so build.source to the command line to output the source file. Step 2: run vpbcache with the build.source file, to create a cache file Step 3: run vpbcache to reproject the source files into the required coordinates system for the build Step 4: run vpbmaster with the cache file, and the build.source file, and a master file describing the layout of your cluster Step 5: Wait :-) I'm afraid I don't recall the options off the top of my head... Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Is this a too dirty hack?
Hi Robert, Oh, I would probably be willing to go through fire to ensure that nobody can break the system :-) I am a great fan of writing modules that is as independent of other modules as possible. This also means that I do not want to make future modules dependent on current modules either (unless they have to be). So if I can find a way for my module to automatically ensure that node-masks holds a perfect format throughout the node-tree, then I will be happy. Adding a pre-processing function will cause a few problems: - Future modules will have to set up their node-tree at module init so that my module can run the pre-processing on them once. - Future modules will have to call my module to pre-process any nodes it want to add later on. - Adding some 3rd party software will thus require interface coding as it won't be able to use OSG directly. I want to make life less painful in the future by doing some painful things now :-) Currently I am quite unable to find a good and easy way to automatically detect when nodes are added to the tree. There is one call osg::Group::childInserted(). It does not do anything: virtual void childInserted( unsigned int /*pos*/) {} That would have been a great place for me to add code to call all parents's childInserted, and thus end up with a call to that function on the root node. I could override it in the root node to do my formatting thing. Adding code there is not something everyone wants, so it would have to be a modification I have to do to OSG every time we upgrade OSG. That would however be less painful than having to ensure future modules that we create or get from somewhere else stays true to our node mask regime. I am still willing to put in a few more hours to avoid having to do that. Regards, Viggo Date: Wed, 23 Jul 2008 13:02:08 +0100 From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Is this a too dirty hack? Hi Viggo, Do you really have to go through all this hassle? Can't you just catch changes to the scene graph as they are being made by your app? The only part of the OSG which which would add nodes to the scene graph is the DatabasePager, and you can catch all loads from this via a Registry::ReadFileCallback. Robert. On Wed, Jul 23, 2008 at 11:35 AM, Viggo Løvli [EMAIL PROTECTED] wrote: Hi, I am on the quest to figure out when the node-tree is dirty. I have found a way... But I do not know if this way is a too dirty hack to actually use. I have a class that inherit osg::Group. I use this as the root of my scene-graph. Each time someone add a node to the world, then the dirtyBound function will be called for all parents. This function is not virtual so I can not override it in my specialization of the osg::Group class. I can however set up a callback that is called when we calculate the bounding sphere. This callback is only executed if someone call getBound when the bounding-sphere is set to dirty. So, if the callback to calculate a bounding sphere is called on my root-node then I know that the node tree has been changed. I can thus check if the node-tree is 'dirty' by calling getBound() on my own class. If that results in a callback then it was dirty. So the question is: Is this a too dirty hack to use, or is it okish? Regards, Viggo Windows Live Hotmail på mobilen. Ha alltid e-posten din tilgjengelig. ___ 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 _ Windows Live Messenger - også på mobilen. http://windowslivemobile.msn.com/Homepage.aspx?lang=nb-noocid=30032___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Is this a too dirty hack?
I got the mail from Robert 3 times :-) V From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Date: Wed, 23 Jul 2008 08:28:20 -0400 Subject: Re: [osg-users] Is this a too dirty hack? Has Max head room entered the OSG ;) Your email is repeating ;) ,at least for me -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Wednesday, July 23, 2008 8:02 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Is this a too dirty hack? Hi Viggo, Do you really have to go through all this hassle? Can't you just catch changes to the scene graph as they are being made by your app? The only part of the OSG which which would add nodes to the scene graph is the DatabasePager, and you can catch all loads from this via a Registry::ReadFileCallback. Robert. On Wed, Jul 23, 2008 at 11:35 AM, Viggo Løvli [EMAIL PROTECTED] wrote: Hi, I am on the quest to figure out when the node-tree is dirty. I have found a way... But I do not know if this way is a too dirty hack to actually use. I have a class that inherit osg::Group. I use this as the root of my scene-graph. Each time someone add a node to the world, then the dirtyBound function will be called for all parents. This function is not virtual so I can not override it in my specialization of the osg::Group class. I can however set up a callback that is called when we calculate the bounding sphere. This callback is only executed if someone call getBound when the bounding-sphere is set to dirty. So, if the callback to calculate a bounding sphere is called on my root-node then I know that the node tree has been changed. I can thus check if the node-tree is 'dirty' by calling getBound() on my own class. If that results in a callback then it was dirty. So the question is: Is this a too dirty hack to use, or is it okish? Regards, Viggo Windows Live Hotmail på mobilen. Ha alltid e-posten din tilgjengelig. ___ 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 _ Hold kontakten med Windows Live Messenger. http://clk.atdmt.com/GBL/go/msnnkdre001003gbl/direct/01/___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OverlayNode
Hey, That is indeed the issue. It appears that each of the members that we used to access have been moved into the private struct OverlayData, which only has private access. The getOverlayData(...) function looked almost like a solution, but, it too is private. As for the useage, I am not completely sure the purpose. This section of code hasn't been anything I have worked with. This derived class is used in conjunction with another class (a class derived from Delta3Ds drawables). The traverse function was overwritten - with an edited version of OverlayNode's. The node appears to be there for adding extra specific operations for this section of the project, such as quickly hiding or showing what we want by acting upon the nodes. The system itself is providing a minimap for our scene (an overview that resides in a corner that displays the whole map + extra information such as where objects are. I am trying to find out why this class was needed, as opposed to just using an OverlayNode and moving the extra functionality somewhere else. In the meantime, the easiest solution would of course just to somehow get access from within the derived class. -Lenny -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Tuesday, July 22, 2008 12:06 PM To: OpenSceneGraph Users Subject: Re: [osg-users] OverlayNode Hi Lenny, Is it the use of a private: section in osgSim::OverlayNode that is the issue? I probably made this change to prevent problems with wrapper generation, other than this then isn't a strong need to keep these protected. Could you explain what you are trying to do, and how you are going about it. Robert. On Tue, Jul 22, 2008 at 4:37 PM, Lenny F. Halseth [EMAIL PROTECTED] wrote: Hello, I have recently begun an upgrade process that involves OSG. The project I am on makes use of Delta3D, which makes heavy use of OSG. In a previous version, we derived a class from OverlayNode for our own purposes. However, with the recent version of OSG, some of the members accessed do not appear to be accessible. Most of the things touched are now contained in the OverlayData structure. The class touches _texture, _texgenNode, _texture, _textureFrustrum, _mainSubraphStateSet, which now results in an error from not being able to access. How should I go about gaining access to these, or, what should I consider for an alternative to deriving from OverlayNode? -Lenny ___ 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.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Default vertex shader
Hello Denis, When I added vertex shader, the object was not shadowed properly (with the same exact fragment shader). I suspect I'm doing something wrong with the texture coordinates in a vertex shader. I looked in ShadowMap.cpp, it has only fragment shaders. Do you know where can I find default vertex shader? When you start using a shader for one part of the pipeline (vertex or fragment) you need to do everything that that part of the pipeline used to do (and which is needed by your rendering). In the case of shadows, you'll notice that the code in ShadowMap.cpp adds an osg::TexGen that calculates some texture coordinates for texture unit 1. But that's the fixed pipeline, so you will need to calculate texture coordinates for unit 1 as glTexGen would in your vertex shader now that it has replaced the fixed-function vertex processing. Something like this should work, though you should probably have finer control over when these are calculated or not: gl_TexCoord[1].s = dot( ecPosition, gl_EyePlaneS[1] ); gl_TexCoord[1].t = dot( ecPosition, gl_EyePlaneT[1] ); gl_TexCoord[1].p = dot( ecPosition, gl_EyePlaneR[1] ); gl_TexCoord[1].q = dot( ecPosition, gl_EyePlaneQ[1] ); Note that ecPosition is: vec4 ecPosition = gl_ModelViewMatrix * gl_Vertex; I also assume you're transforming your texture coordinates for texture unit 0 properly: gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0; Just assigning gl_MultiTexCoord0 to gl_TexCoord[0] will work until you try to use a texture matrix (osg::TexMat)... I highly recommend you get/read the Orange Book, as this is all given there. You can also download the ShaderGen program from 3DLabs (now hosted on http://mew.cx/glsl since 3DLabs removed it from their site) which can generate shaders that emulate the fixed pipeline. Note that for speed, you should probably only use the features you need in your shaders, so I am not recommending that you generate a shader that does *all* of what the fixed pipeline would do... Just use what ShaderGen produces as a guide. Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] 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
Re: [osg-users] Is it possible to know when the node-graph is 'dirty'?
Hi Viggo, This is only a suggestion (you may have other reasons). To avoid the human error as you called it, meaning that if someone forgets to call the reformat code... then you should have a method that 3rd party code/humans must use when adding to your scene, for example void CMySceneManagerThingy::AddToScene( osg::Node* pNode ) { // add to wherever you want the pNode to be added in the scene code here // reformat your scene as you want code here } on the other subject about rendering multitimes the same object.. you should just create a new group and add your objects to that group and the group to the scene (do this as many times as you want).. don't know why you should be messing around with the renderbins? unless you are trying somekind of render pass? regards, Peter http://osghelp.com On Wed, Jul 23, 2008 at 11:00 AM, Viggo Løvli [EMAIL PROTECTED] wrote: Hi Peter, What you say is true in most cases. The 'simplest' way to do this would be to tell my system that the node-tree need re-formatting each time we call OSG to add children. That would require two calls each time, and also requre humans to remember to implement both calls. This opens for human errors, which at least I dont want (I am lazy). I want to make my module (the one that need to format the node-masks) independent of the rest of the system, and to ensure that the rest of the system will not need to know about my module. I also want to be able to add 3rd party libraries to my application without re-writing them to do special calls to my module when they add nodes to the tree. So, the conclusion I have is that I need to automatically know when I need to format the node-masks. The osg::Group has a callback function named osg::Group::childInserted. I can make my root-node into a sub-class og osg::Group where I implement the childInserted function. This way I will get a callback each time someone add nodes to my root-node. If a module create it's own osg::Group and add children to it dymically then I would not know anything about that. I also saw Roberts reply and I agree that a dirty system on the node-tree would be very expensive. I knew that my question was a longshot. I am now thinking about other solutions to achieve my goal. The goal is to render the world with 3 slave cameras. One shall render all render-bins up to bin 9. One shall render bin 10. And the 3rd shall render bin 10 and up. So bin 10 is rendered twice. This is to fix some glitches on transparent polygons that intersect each other while needing to write to the depth-buffer. Ok, so another solution would be to force a camera to only render a certain number of bins. I have not seen any place in the code around camera or cull-settings that you can specify a camera to stay within a limited range of render-bins, so I guess this won't be as easy either? Do you have any suggestions on how to be able to render one bin twice in the same frame. The first and second render of the bin shall have a few render-states set differently. Regards, Viggo -- Date: Wed, 23 Jul 2008 07:58:37 +0200 From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Is it possible to know when the node-graph is 'dirty'? Hi Viggo, Don't know the details of your code, but if you are adding a sub-node then you have code already that is called for adding the sub-node and thereby you know when the scene-graph has been modified? regards, Peter http://osghelp.com On Wed, Jul 23, 2008 at 7:51 AM, Viggo Løvli [EMAIL PROTECTED] wrote: Hi, My code is currently formatting the node-masks of the whole scene-graph before we start rendering. The formatting code is only ran once. If a sub-node is added to the node-tree afterwards then I want to run my formatting code again. Is there any way to know whether or not the scene-graph has been modified? Regards, Viggo -- Windows Live Hotmail på mobilen. Ha alltid e-posten din tilgjengelig.http://windowslivemobile.msn.com/BrowserServiceHotmail.aspx?lang=nb-NOocid=30032 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Regards, Peter Wraae Marino www.osghelp.com - OpenSceneGraph support site -- Få Hotmail du også. Windows Live Hotmail nå med 5000 MB gratis lagringsplass.http://clk.atdmt.com/GBL/go/msnnkdre001005gbl/direct/01/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Regards, Peter Wraae Marino www.osghelp.com - OpenSceneGraph support site ___ osg-users mailing list osg-users@lists.openscenegraph.org
Re: [osg-users] Is it possible to know when the node-graph is 'dirty'?
Hi Peter, This is the problem I am trying to solve: --- Two partly transparent polygons intersect each other. Example: A tree created from two quads. The tree has many pixels that is completely opaque, and many pixels that is semi visible (transparent) and of course many invisible pixels. If you render them without writing to the depth buffer: - One will partly owerwrite the other. If you render them with writing to the depth buffer: - One will partly block the other. Solution: Render them twice. First render without writing to the depth buffer. Second render with writing to the depth buffer. When you have multiple trees then trees that are close to each other will some times overwrite or block each others, so I need to solve this too. It can be solved by rendering all trees in one pass, then all trees again in a second pass. Rendering each tree independently in two passes will only solve the problem for that tree while it can still block or overwrite other trees. So I must render all trees without writing to depth buffer and then all trees again with writing to depth buffer. This solution works greatly. The following is a new problem occurring when I am trying to render parts of the scene-grapth two times: I need to reduce the number of polygons I render twice. So, all completely opaque polygons need to be rendered only once. All transparent polygons must be rendered twice. The node tree is quite complex. It contains many different nodes which are turned on and off at runtime. I need to detect who got transparent polygons. This problem is solved by a node visitor that checks the node's stateset and sees if it contains the BLEND state turned on. I can also say that render bin 10 is the only bin that contain transparent objects. If I want to go for the group node solution then I need a group that point only to transparent objects, and another group that point to the same objects. I then need to render both in one go. Sounds doable, but would be quite messy when you shall fo example add LOD nodes that contains both transparent and opaque objects. I would need to split them apart runtime and actually rewrite the whole tree. I do not think that is doable. My solution was to mask the nodes so that I could use the cullMask on the camera to decide wether I want to render opaque objects or transparent objects. So I can have 3 cameras. First one render opaque. 2nd renders transparent without depth write. 3rd renders transparent again with depth write. The solution works like a dream this far. So what is the real problem? If someone add anything to the node tree, then I need to pre-process the nodes and set nodeMasks on them. I can as you suggest write an interface function that all of our code must use to add nodes to the tree. It would work nicely. Any future code will then be dependent on my library. Not a high price to pay. Any future 3rd party products we use will also have to use my add function. This may cost more. If the products create a sub-tree which it give back to me then I can add it through the function. If the product later on through OSG callbacks decide to add more nodes then I have a huge problem. They would not use my function and would proably have 0x as node mask which means they would be rendered one time per camera I use. So... I am struggeling to avoid this function. If I can somehow know that something is added to the tree, then I can simply re-format the tree. Any future products will therefore work automatically and no human errors can break the system. Sorry for writing such a large mail, but its hard to explain with letters :-) I hope it clearifies my problem. Cheers, Viggo Date: Wed, 23 Jul 2008 15:10:45 +0200From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Re: [osg-users] Is it possible to know when the node-graph is 'dirty'? Hi Viggo, This is only a suggestion (you may have other reasons). To avoid the human error as you called it, meaning that if someone forgets to call the reformat code... then you should have a method that 3rd party code/humans must use when adding to your scene, for example void CMySceneManagerThingy::AddToScene( osg::Node* pNode ) { // add to wherever you want the pNode to be added in the scene code here // reformat your scene as you want code here }on the other subject about rendering multitimes the same object.. you should just create a new group and add your objects to that group and the group to the scene (do this as many times as you want).. don't know why you should be messing around with the renderbins? unless you are trying somekind of render pass? regards, Peter http://osghelp.com On Wed, Jul 23, 2008 at 11:00 AM, Viggo Løvli [EMAIL PROTECTED] wrote: Hi Peter, What you say is true in most
Re: [osg-users] vpb on cluster example
On Wed, Jul 23, 2008 at 1:47 PM, J.P. Delport [EMAIL PROTECTED] wrote: I must say that the new vpb with --terrain is a _lot_ faster than the old osgdem used to be. One can now generate quite a bit of data over a weekend :) --terrain switches the build to output osgTerrain::TerrainTile, that are base of height fields so the GDAL to OSG data structure is as staightforward a mapping as it is for imagery, this is far faster than tessellating a heigh field and then simplifying. osgTerrain database also can be simplified at runtime vai the osgTerrain::Terrain::setSampleRation(float). See the osgmultitexturecontrol example for this in action. This enables you to balance the geometry load with the capabilities of the hardware. osgTerrain is not finished yet, so further improvements will be on the fly boundary equalization and compressing the heightfields so the tiles on disk will be smaller. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Is it possible to know when the node-graph is 'dirty'?
Hi Viggo, I think you are on totally wrong take w.r.t trying to track changes in the scene graph, for what is effectively just a custom transparent renderbin setup, and has little to do with the scene itself. The way you should tackle it is to customize the rendering backend so that the bins you require are built for you. One one for instance would be to post process the RenderStage and its contents after the CullVisitor has filled it in. Robert. On Wed, Jul 23, 2008 at 2:52 PM, Viggo Løvli [EMAIL PROTECTED] wrote: Hi Peter, This is the problem I am trying to solve: --- Two partly transparent polygons intersect each other. Example: A tree created from two quads. The tree has many pixels that is completely opaque, and many pixels that is semi visible (transparent) and of course many invisible pixels. If you render them without writing to the depth buffer: - One will partly owerwrite the other. If you render them with writing to the depth buffer: - One will partly block the other. Solution: Render them twice. First render without writing to the depth buffer. Second render with writing to the depth buffer. When you have multiple trees then trees that are close to each other will some times overwrite or block each others, so I need to solve this too. It can be solved by rendering all trees in one pass, then all trees again in a second pass. Rendering each tree independently in two passes will only solve the problem for that tree while it can still block or overwrite other trees. So I must render all trees without writing to depth buffer and then all trees again with writing to depth buffer. This solution works greatly. The following is a new problem occurring when I am trying to render parts of the scene-grapth two times: I need to reduce the number of polygons I render twice. So, all completely opaque polygons need to be rendered only once. All transparent polygons must be rendered twice. The node tree is quite complex. It contains many different nodes which are turned on and off at runtime. I need to detect who got transparent polygons. This problem is solved by a node visitor that checks the node's stateset and sees if it contains the BLEND state turned on. I can also say that render bin 10 is the only bin that contain transparent objects. If I want to go for the group node solution then I need a group that point only to transparent objects, and another group that point to the same objects. I then need to render both in one go. Sounds doable, but would be quite messy when you shall fo example add LOD nodes that contains both transparent and opaque objects. I would need to split them apart runtime and actually rewrite the whole tree. I do not think that is doable. My solution was to mask the nodes so that I could use the cullMask on the camera to decide wether I want to render opaque objects or transparent objects. So I can have 3 cameras. First one render opaque. 2nd renders transparent without depth write. 3rd renders transparent again with depth write. The solution works like a dream this far. So what is the real problem? If someone add anything to the node tree, then I need to pre-process the nodes and set nodeMasks on them. I can as you suggest write an interface function that all of our code must use to add nodes to the tree. It would work nicely. Any future code will then be dependent on my library. Not a high price to pay. Any future 3rd party products we use will also have to use my add function. This may cost more. If the products create a sub-tree which it give back to me then I can add it through the function. If the product later on through OSG callbacks decide to add more nodes then I have a huge problem. They would not use my function and would proably have 0x as node mask which means they would be rendered one time per camera I use. So... I am struggeling to avoid this function. If I can somehow know that something is added to the tree, then I can simply re-format the tree. Any future products will therefore work automatically and no human errors can break the system. Sorry for writing such a large mail, but its hard to explain with letters :-) I hope it clearifies my problem. Cheers, Viggo Date: Wed, 23 Jul 2008 15:10:45 +0200 From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Is it possible to know when the node-graph is 'dirty'? Hi Viggo, This is only a suggestion (you may have other reasons). To avoid the human error as you called it, meaning that if someone forgets to call the reformat code... then you should have a method that 3rd party code/humans must use when adding to your scene, for example void CMySceneManagerThingy::AddToScene( osg::Node* pNode ) {
Re: [osg-users] Is it possible to know when the node-graph is 'dirty'?
Hi Robert, That sounds interesting. I hope it can solve my problem in a much better way. I am looking at the camera class and so far assuming that I need to use the setPreDrawCallback function. Looks to me like RenderStage calls this after culling has been done. My day is ending now, will look more into this tomorrow. This is however an area I am not well known in in OSG yet, so if you have more information for me then please send a mail :-) Thanx, Viggo Date: Wed, 23 Jul 2008 15:01:50 +0100 From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Is it possible to know when the node-graph is 'dirty'? Hi Viggo, I think you are on totally wrong take w.r.t trying to track changes in the scene graph, for what is effectively just a custom transparent renderbin setup, and has little to do with the scene itself. The way you should tackle it is to customize the rendering backend so that the bins you require are built for you. One one for instance would be to post process the RenderStage and its contents after the CullVisitor has filled it in. Robert. On Wed, Jul 23, 2008 at 2:52 PM, Viggo Løvli [EMAIL PROTECTED] wrote: Hi Peter, This is the problem I am trying to solve: --- Two partly transparent polygons intersect each other. Example: A tree created from two quads. The tree has many pixels that is completely opaque, and many pixels that is semi visible (transparent) and of course many invisible pixels. If you render them without writing to the depth buffer: - One will partly owerwrite the other. If you render them with writing to the depth buffer: - One will partly block the other. Solution: Render them twice. First render without writing to the depth buffer. Second render with writing to the depth buffer. When you have multiple trees then trees that are close to each other will some times overwrite or block each others, so I need to solve this too. It can be solved by rendering all trees in one pass, then all trees again in a second pass. Rendering each tree independently in two passes will only solve the problem for that tree while it can still block or overwrite other trees. So I must render all trees without writing to depth buffer and then all trees again with writing to depth buffer. This solution works greatly.The following is a new problem occurring when I am trying to render parts of the scene-grapth two times: I need to reduce the number of polygons I render twice. So, all completely opaque polygons need to be rendered only once. All transparent polygons must be rendered twice. The node tree is quite complex. It contains many different nodes which are turned on and off at runtime. I need to detect who got transparent polygons. This problem is solved by a node visitor that checks the node's stateset and sees if it contains the BLEND state turned on. I can also say that render bin 10 is the only bin that contain transparent objects. If I want to go for the group node solution then I need a group that point only to transparent objects, and another group that point to the same objects. I then need to render both in one go. Sounds doable, but would be quite messy when you shall fo example add LOD nodes that contains both transparent and opaque objects. I would need to split them apart runtime and actually rewrite the whole tree. I do not think that is doable. My solution was to mask the nodes so that I could use the cullMask on the camera to decide wether I want to render opaque objects or transparent objects. So I can have 3 cameras. First one render opaque. 2nd renders transparent without depth write. 3rd renders transparent again with depth write. The solution works like a dream this far.So what is the real problem? If someone add anything to the node tree, then I need to pre-process the nodes and set nodeMasks on them. I can as you suggest write an interface function that all of our code must use to add nodes to the tree. It would work nicely. Any future code will then be dependent on my library. Not a high price to pay. Any future 3rd party products we use will also have to use my add function. This may cost more. If the products create a sub-tree which it give back to me then I can add it through the function. If the product later on through OSG callbacks decide to add more nodes then I have a huge problem. They would not use my function and would proably have 0x as node mask which means they would be rendered one time per camera I use. So... I am struggeling to avoid this function. If I can somehow know that something is added to the tree, then I can simply re-format the tree. Any future products
Re: [osg-users] PolygonMode::FRONT / BACK causes Warning
Looks like uninitialized variables in the constructor to me: PolygonMode(Face face,Mode mode) { setMode(face,mode); } If you specify FRONT in the constructor, the back mode never gets initialized. You should fix this and post your change to osg-submissions. -Paul Hello, I am testing some Code and trying to look at some Wireframe Models, I use the following line of code, first using FRONT_AND_BACK PolygonMode osg::PolygonMode * pm = new osg::PolygonMode(osg::PolygonMode::FRONT_AND_BACK, osg::PolygonMode::LINE); That works, both sides are rendered as wireframe, but then I tried to use FRONT or BACK only with osg::PolygonMode * pm = new osg::PolygonMode(osg::PolygonMode::FRONT, osg::PolygonMode::LINE); osg::PolygonMode * pm = new osg::PolygonMode(osg::PolygonMode::BACK, osg::PolygonMode::LINE); These are the valid modes I found in the documentation and they work, I see either only Front as Wireframe or the Back. But my console window is flooded with following warning: Warning: detected OpenGL error 'invalid enumerant' after RenderBin::draw(,) Where is the problem here? Greets ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce negraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Getting the opengl texture id of an osg::Texture2D
Hi, I cannot find the correct function to get the OpenGL texture-id of an osg::Texture2D. I have several textures in OSG that I want to use as input for a library that needs the textures as GLuint. How do I get my OSG-textures in there? And how can I create an osg::Texture2D out of the GLuint I get as a result after running the API? I would be really happy about any hints on how to do this. Thanks in advance, Steffen ___ EINE FÜR ALLE: die kostenlose WEB.DE-Plattform für Freunde und Deine Homepage mit eigenem Namen. Jetzt starten! http://unddu.de/[EMAIL PROTECTED] ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] PolygonMode::FRONT / BACK causes Warning
On Wed, Jul 23, 2008 at 3:34 PM, Paul Martz [EMAIL PROTECTED] wrote: Looks like uninitialized variables in the constructor to me: PolygonMode(Face face,Mode mode) { setMode(face,mode); } If you specify FRONT in the constructor, the back mode never gets initialized. You should fix this and post your change to osg-submissions. Well spotted Paul, looking into the setMode method, in the case of setting just FRONT or BACK the setMode method won't be sufficient for initializing the opposite face. I have fixed this and checked the fix into SVN. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Getting the opengl texture id of an osg::Texture2D
Hi, you can use osg::Texture::getTextureObject and then osg::Texture::TextureObject._id Alberto El Miércoles 23 Julio 2008ES 16:58:25 Steffen Kim escribió: Hi, I cannot find the correct function to get the OpenGL texture-id of an osg::Texture2D. I have several textures in OSG that I want to use as input for a library that needs the textures as GLuint. How do I get my OSG-textures in there? And how can I create an osg::Texture2D out of the GLuint I get as a result after running the API? I would be really happy about any hints on how to do this. Thanks in advance, Steffen ___ EINE FÜR ALLE: die kostenlose WEB.DE-Plattform für Freunde und Deine Homepage mit eigenem Namen. Jetzt starten! http://unddu.de/[EMAIL PROTECTED] ___ 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] Traversing model nodes and rotating
Hi Alberto, Thanks for reply. Yes, it doesn't show my expected structure. I have to traverse and reorganize all nodes with nodevisitor. And I have another question about extracting the model in graph. What application do you use for extracting the model graph as a image or any document like graphicgy.png? Thanks so much! Ümit UZUN 2008/7/23 Alberto Luaces [EMAIL PROTECTED]: Hi Umit, maybe the hierarchy is wrong. I have extracted the graph and it doesn't show the three concatenated transforms that you describe. I attach the graph file in case you are interested. Alberto El Miércoles 23 Julio 2008ES 14:06:36 Ümit Uzun escribió: Hi all, I have an model in 3ds format. I convert it to osg and look in it for hierarchical structure. It has mainly 5 part which was tied themselves like; PLANETARY - (child)YAW - (child)ROLL - (child)PITCH - (child)PILOTCABIN. I am opening this model with osgDB::readNodeFile and then I am starting to traverse in it to find expected node (for example ROLL node). I can find the node and it's parent node which is MatrixManipulator node and then I can rotate it around the pivot point but when I rotating the ROLL node I am expecting to occur the automatic rotate to it's child nodes. But the child nodes doen't rotate. How can I do for solve this problem? Should I add external transformation node between the required place in the scene graph or is it not necessery? Please look at the model hierarchy and advice me to what shoul I do? --- - class findNodeCallback : public osg::NodeCallback { public: virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) { findNodeVisitor findNode(roll); node-accept(findNode); float i=0.0f; osg::Matrix rotation,m; osg::ref_ptrosg::MatrixTransform foundData = dynamic_castosg::MatrixTransform* (findNode.getFirst()-getParent(0)); if(foundData != NULL) { i+=0.1f; rotation.makeRotate( i, osg::Vec3f(0.0f,0.0f,1.0f) ); m = foundData-getMatrix(); m = m * rotation; // rotate around matrix axis (local space) foundData-setMatrix(m); } traverse(node, nv); } }; With this code I can rotate only roll node, it's child nodes doesn't effect by this traversing. --- - Thanks so much, Umit 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
[osg-users] glPointSize no longer working for me?
I used to be able to change the size of GL_POINTS in my application both from within a vertex shader and also using glPointSize(float f) in a Drawable. I recently upgraded to the latest OpenSceneGraph and now no matter what I do tthe point size always seems to default to 1.0. Anyone have any idea what I could be missing or what might have changed? Your suggestions highly appreciated! -C.E. _ Use video conversation to talk face-to-face with Windows Live Messenger. http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL_Refresh_messenger_video_072008___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Traversing model nodes and rotating
Hi Ümit, I'm glad I could help. The tool I used was osgdot, a program by Paul Melis. See its thread at http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2007-November/004350.html It is is currently hosted in the Mike Weiblen's osgtoy repository : http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2007-November/004377.html Regards, Alberto El Miércoles 23 Julio 2008ES 20:41:17 Ümit Uzun escribió: Hi Alberto, Thanks for reply. Yes, it doesn't show my expected structure. I have to traverse and reorganize all nodes with nodevisitor. And I have another question about extracting the model in graph. What application do you use for extracting the model graph as a image or any document like graphicgy.png? Thanks so much! Ümit UZUN 2008/7/23 Alberto Luaces [EMAIL PROTECTED]: Hi Umit, maybe the hierarchy is wrong. I have extracted the graph and it doesn't show the three concatenated transforms that you describe. I attach the graph file in case you are interested. Alberto El Miércoles 23 Julio 2008ES 14:06:36 Ümit Uzun escribió: Hi all, I have an model in 3ds format. I convert it to osg and look in it for hierarchical structure. It has mainly 5 part which was tied themselves like; PLANETARY - (child)YAW - (child)ROLL - (child)PITCH - (child)PILOTCABIN. I am opening this model with osgDB::readNodeFile and then I am starting to traverse in it to find expected node (for example ROLL node). I can find the node and it's parent node which is MatrixManipulator node and then I can rotate it around the pivot point but when I rotating the ROLL node I am expecting to occur the automatic rotate to it's child nodes. But the child nodes doen't rotate. How can I do for solve this problem? Should I add external transformation node between the required place in the scene graph or is it not necessery? Please look at the model hierarchy and advice me to what shoul I do? - -- - class findNodeCallback : public osg::NodeCallback { public: virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) { findNodeVisitor findNode(roll); node-accept(findNode); float i=0.0f; osg::Matrix rotation,m; osg::ref_ptrosg::MatrixTransform foundData = dynamic_castosg::MatrixTransform* (findNode.getFirst()-getParent(0)); if(foundData != NULL) { i+=0.1f; rotation.makeRotate( i, osg::Vec3f(0.0f,0.0f,1.0f) ); m = foundData-getMatrix(); m = m * rotation; // rotate around matrix axis (local space) foundData-setMatrix(m); } traverse(node, nv); } }; With this code I can rotate only roll node, it's child nodes doesn't effect by this traversing. - -- - Thanks so much, Umit UZUN ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] obj loader: map_* only reads last component
hi all, i recently was working with some .obj files (and associated .mtl files) and ran into the problem where the loader would truncate only the last component of a filename containing spaces. so, for example, in the .mtl file would be an entry like: map_Kd my texture name.jpg which is valid under many filesystems, however, the loader would truncate it to just 'name.jpg' and of course, not resolve that (or resolve a wrong texture). so i did a little research, and the specifications for mtl seem to simply say that: map_Kd filename is valid. my question is to whomever wrote the mtl file parser - why are the filenames truncated? i'd say the should be stripped (ie, ' my file name.jpg ' should resolve to 'my file name.jpg') but never only the last component used. if that's the case, then i've got a patch ready to go. anyone? bob ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] glPointSize no longer working for me?
Hi Crezy, osg::Point is the best way to control point size in the OSG. Robert. On Wed, Jul 23, 2008 at 8:11 PM, Crezy Elmo [EMAIL PROTECTED] wrote: I used to be able to change the size of GL_POINTS in my application both from within a vertex shader and also using glPointSize(float f) in a Drawable. I recently upgraded to the latest OpenSceneGraph and now no matter what I do tthe point size always seems to default to 1.0. Anyone have any idea what I could be missing or what might have changed? Your suggestions highly appreciated! -C.E. Use video conversation to talk face-to-face with Windows Live Messenger. Get started. ___ 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] obj loader: map_* only reads last component
Hi Bob, The code was written under the assumption that filenames wouldn't have spaces... to handle this one would need to add an extra method into the parser to get from a specified position to the end of the line, and do the stripping or extraneous spaces that you mentioned. Feel free to dive in and code such as solution. Robert. On Wed, Jul 23, 2008 at 9:26 PM, Bob Kuehne [EMAIL PROTECTED] wrote: hi all, i recently was working with some .obj files (and associated .mtl files) and ran into the problem where the loader would truncate only the last component of a filename containing spaces. so, for example, in the .mtl file would be an entry like: map_Kd my texture name.jpg which is valid under many filesystems, however, the loader would truncate it to just 'name.jpg' and of course, not resolve that (or resolve a wrong texture). so i did a little research, and the specifications for mtl seem to simply say that: map_Kd filename is valid. my question is to whomever wrote the mtl file parser - why are the filenames truncated? i'd say the should be stripped (ie, ' my file name.jpg ' should resolve to 'my file name.jpg') but never only the last component used. if that's the case, then i've got a patch ready to go. anyone? bob ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OverlayNode
Hi Lenny, I have refactored the OverlayNode usage of OverlayData, so that it's now possible to subclass OverlayData as it now uses a ref_ptr rather than an OveralyData directly, and the getOverlayData and OverlayData struct are now in protected rather than private space. This change did screw up the wrappers, it took me while to workaround this, but it now it compiling. Moving to the svn trunk will get you this change. Robert. On Wed, Jul 23, 2008 at 1:54 PM, Lenny F. Halseth [EMAIL PROTECTED] wrote: Hey, That is indeed the issue. It appears that each of the members that we used to access have been moved into the private struct OverlayData, which only has private access. The getOverlayData(...) function looked almost like a solution, but, it too is private. As for the useage, I am not completely sure the purpose. This section of code hasn't been anything I have worked with. This derived class is used in conjunction with another class (a class derived from Delta3Ds drawables). The traverse function was overwritten - with an edited version of OverlayNode's. The node appears to be there for adding extra specific operations for this section of the project, such as quickly hiding or showing what we want by acting upon the nodes. The system itself is providing a minimap for our scene (an overview that resides in a corner that displays the whole map + extra information such as where objects are. I am trying to find out why this class was needed, as opposed to just using an OverlayNode and moving the extra functionality somewhere else. In the meantime, the easiest solution would of course just to somehow get access from within the derived class. -Lenny -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Tuesday, July 22, 2008 12:06 PM To: OpenSceneGraph Users Subject: Re: [osg-users] OverlayNode Hi Lenny, Is it the use of a private: section in osgSim::OverlayNode that is the issue? I probably made this change to prevent problems with wrapper generation, other than this then isn't a strong need to keep these protected. Could you explain what you are trying to do, and how you are going about it. Robert. On Tue, Jul 22, 2008 at 4:37 PM, Lenny F. Halseth [EMAIL PROTECTED] wrote: Hello, I have recently begun an upgrade process that involves OSG. The project I am on makes use of Delta3D, which makes heavy use of OSG. In a previous version, we derived a class from OverlayNode for our own purposes. However, with the recent version of OSG, some of the members accessed do not appear to be accessible. Most of the things touched are now contained in the OverlayData structure. The class touches _texture, _texgenNode, _texture, _textureFrustrum, _mainSubraphStateSet, which now results in an error from not being able to access. How should I go about gaining access to these, or, what should I consider for an alternative to deriving from OverlayNode? -Lenny ___ 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.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
[osg-users] OSG 2.4 and GCC 4.3
Hi, We are currently using OSG 2.2 in our projects. I just moved to GCC 4.3 and am getting compile errors related to the stricter include rules that release implements. I have seen some traffic in the archives discussing a possible fix in the 2.3 development series. Did these fixes make it into 2.4? Thanks, Will smime.p7s Description: S/MIME Cryptographic Signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] glPointSize no longer working for me?
I tried adjusting the point size using osg::Point but it still had no effect. By the way these points are actually osg::PointSprites if that makes any difference. I queried OpenGL using glGetFloatv to find out the range of supported point sizes on the machine and it returned 0.0 to 64. I also tried enabling and disabling blending as well as point smoothing, no difference. This is puzzling because this same code used to let me change point sizes. :( Please let me know if you have any other ideas. Best, -C.E. Date: Wed, 23 Jul 2008 21:39:09 +0100 From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] glPointSize no longer working for me? Hi Crezy, osg::Point is the best way to control point size in the OSG. Robert. On Wed, Jul 23, 2008 at 8:11 PM, Crezy Elmo [EMAIL PROTECTED] wrote: I used to be able to change the size of GL_POINTS in my application both from within a vertex shader and also using glPointSize(float f) in a Drawable. I recently upgraded to the latest OpenSceneGraph and now no matter what I do tthe point size always seems to default to 1.0. Anyone have any idea what I could be missing or what might have changed? Your suggestions highly appreciated! -C.E. Use video conversation to talk face-to-face with Windows Live Messenger. Get started. ___ 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 _ Time for vacation? WIN what you need- enter now! http://www.gowindowslive.com/summergiveaway/?ocid=tag_jlyhm___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osg::Image::update?
Hi there, I just realized the introduction of osg::Image::update(osg::NodeVisitor*) which is awsome (kindof - for now it just breaks the whole thing), especially for osgART (http://osgart.org) ... I was wondering what your plans are with the implementation as the osgimagesequence is probably a work in progress H -- Hartmut Seichter, PhD (HKU), Dipl-Ing.(BUW), Postdoctoral Fellow, HITLabNZ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Slave Cameras projection matrices and aspect ratio
Hi Anyone, I need to fix this ASAP. I am using OSG 2.4+ with old Producer Config files. OSG creates slave cameras for my multiple window configuration (one for each). The resulting settings are not quite like specified in my configuration file. Field of Views are mostly OK, but it is altering the aspect ratios of the slave cams and providing me with an image slightly off from how it should be. I've tried setting the Slave cams' projection matrix, (setProjectionMatrixAsPerspective) with particular aspect ratios etc, but the aspect ratio value is being overriden somewhere and adjusted a little bit. However, the Master cam's aspect ratio is correct. How do I correctly set the Slave cam's aspect ratios?? and Why are the Producer Configuration files not doing what they used to in OSG 1.2 ?? Anyone please let me know soon, THANKS! -JCOLON ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] obj loader: map_* only reads last component
Hi Bob, hi Robert, Robert Osfield wrote: The code was written under the assumption that filenames wouldn't have spaces... to handle this one would need to add an extra method into the parser to get from a specified position to the end of the line, and do the stripping or extraneous spaces that you mentioned. Feel free to dive in and code such as solution. I submitted a 'fix' a while back because I was getting .obj files that contained something like 'map_Kd scale 2.0 2.0 2.0 filename.jpg' to modify the texture matrix. Since I didn't anticipate filenames with spaces (and didn't have to time/need to do the texture matrix stuff) the easy solution was to skip to the last word. /ulrich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org