Re: [osg-users] Multi-Node?
Thanks Robert - osgcluster seems a good starting point. Regards On Sat, 2008-02-16 at 11:07 +, Robert Osfield wrote: > Hi Paul, > > On Feb 16, 2008 11:26 PM, Tanja & Paul <[EMAIL PROTECTED]> wrote: > > Thanks Robert - Yes I meant multiple displays, thanks for your response. I > > saw a thread a while back in regards to openProducer, cant recall it but I > > believe Don was saying openProducer supported multiple channels or a cluster > > of machines. Does anyone know if OpenProducer has this support. > > Producer only supports multiple displays on a single machine, it has > no cluster support. > > osgViewer that exist in 2.x replaces osgProducer/Producer and has the > multi threaded muiltiple display capability that Producer has plus > extra OSG centric high level viewer classes, threading models and > support for distortion correction. osgVierwer like Producer doesn't > have out of the box support cluster though. > > There are various ways to do clustering. The osgcluster example is a > very very basic example that uses UDP packets to sync the view > matrices and frames update. 3rd party solutions like Equalizer and > VR Juggler has cluster support and integrate with the OSG. Lots of > companies roll their own clustering solution too. > > Robert. > > Robert. > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Setting the camera matrix for a viewer
using viewer.frame() instead of viewer.run() solved it! How do I remove the default camera manipulator? Do I remove the corresponding event handler? Paul Martz wrote: If you have a Camera manipulator attached to your Viewer, it will override any changes to the Camera matrices. Viewer attaches a Camera manipulator by default. Paul Martz Skew Matrix Software On Feb 17, 2008, at 5:31 PM, Per Rosengren <[EMAIL PROTECTED]> wrote: Hod do I set the camera matrix for a viewer. If use viewer.getCamera()->setViewMatrix(viewMatrix); viewer.getCamera()->setProjectionMatrix(projectionMatrix); the camera isn't affected. ___ 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 begin:vcard fn:Per Rosengren n:Rosengren;Per org:KTH;CVAP adr:;;KTH;Stockholm;;SE-100 44;Sweden email;internet:[EMAIL PROTECTED] title:Ph.D. student tel;work:+46 8 790 6203 tel;fax:+46 8 723 0302 note:PGP keyID: 0xD40DD8E0 x-mozilla-html:FALSE url:http://www.csc.kth.se/~perrose/ version:2.1 end:vcard ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] LOD problems using OSG with TerraPage
Hi, I'm using OSG viewer to see a txp terrain generated by Terra Vista. I have 10m and 1m imagery, with multiple LODs. I noticed that when I'm doing low level flying using OSG viewer, my most detailed LOD sometimes switches to the 2nd LOD. I'm flying just above the terrain, so it is quite impossible that the 2nd distances switched in. I've tried 3 LOD (10m) with high resolution insets (1m), 3 LOD (10m) with 6 LOD AOI (1m), and I noticed the problem pops most of the time when I generate the database. I've tried shifting the 2nd LOD to 50,000m to avoid the problem, but it still appears. Please help. 777 -Original Message- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Setting the camera matrix for a viewer
If you have a Camera manipulator attached to your Viewer, it will override any changes to the Camera matrices. Viewer attaches a Camera manipulator by default. Paul Martz Skew Matrix Software On Feb 17, 2008, at 5:31 PM, Per Rosengren <[EMAIL PROTECTED]> wrote: > Hod do I set the camera matrix for a viewer. If use > > viewer.getCamera()->setViewMatrix(viewMatrix); > viewer.getCamera()->setProjectionMatrix(projectionMatrix); > > the camera isn't affected. > > ___ > 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] Setting the camera matrix for a viewer
Hod do I set the camera matrix for a viewer. If use viewer.getCamera()->setViewMatrix(viewMatrix); viewer.getCamera()->setProjectionMatrix(projectionMatrix); the camera isn't affected. begin:vcard fn:Per Rosengren n:Rosengren;Per org:KTH;CVAP adr:;;KTH;Stockholm;;SE-100 44;Sweden email;internet:[EMAIL PROTECTED] title:Ph.D. student tel;work:+46 8 790 6203 tel;fax:+46 8 723 0302 note:PGP keyID: 0xD40DD8E0 x-mozilla-html:FALSE url:http://www.csc.kth.se/~perrose/ version:2.1 end:vcard ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Framerate vs stats?
Hello Guy, > How could it be a driver bug if it's debug/release issue?!? > Don't both versions use the same driver? Not sure we're talking about the same issue here. Re-read my message: I said "if you're in release mode, then it might be a driver bug". The premise is that you should never do any performance analysis in debug mode anyways, as in debug mode, weird things can happen to your framerate, and you might suspect an application or driver bug where there is none. But if the issue is present in release (no matter whether it's present in debug or not), then it might be caused by a driver bug since not everyone sees the issue (therefore it might be dependent on driver version). I did not say that the bug might be present in release but not in debug or inversely... Note that we've gotten a bit further in the investigation of this particular issue... Please read the thread to the end. :-) 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] Loading an image file
Hello Per, > I too need to show images. Since osg is (and should be) 3d-based, the > way to do is seemed to be to display a rectange Geometry infront of an > orthographic camera, and set the rectangle texture to be the image. To that end, there is a utility function in the Geometry header. #include osg::Geode* createNodeWithMyImageOnIt(const std::string& filename) { osg::Geode* geode = new osg::Geode; osg::Geometry* geometry = osg::createTexturedQuadGeometry(osg::Vec3(0,0,0), osg::Vec3(1,0,0), osg::Vec3(0,0,1), 0, 0, 1, 1); geode->addDrawable(geometry); osg::Texture2D* texture = new osg::Texture2D(osgDB::readImageFile(filename)); geode->getOrCreateStateSet()->setTextureAttributeAndModes(0, texture, osg::StateAttribute::ON); geode->getOrCreateStateSet()->setTextureMode(0, GL_TEXTURE_2D, osg::StateAttribute::ON); return geode; } Note this is off the top of my head, untested, possibly incomplete. But it should give you an idea. Look up the doxygen for osg::createTexturedQuadGeometry for details. 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] another one - osg and C#
Sherman, With C++/CLI and its IJW ("It Just Works") interop, you don't run into the issues you do with C#. C++/CLI is a superset of C++. That said there are a couple things to keep in mind: First, C++/CLI lets you mix managed and unmanaged C++, and there are some restrictions in how you are allowed to do that. These usually come down to memory management. For example, you cannot have an osg::ref_ptr as a member of a managed C++ class IIRC. Likewise an unmanaged class can't have a managed reference as a member (although there are ways around this). In any case these are minor issues and easy to work around. Second, and this is a little nebulous, there is something "going on" when OSG code calls back into user code in a mixed assembly. I mean something like a cull callback, or an OSG class override. Something that causes the flow of execution to go into the OSG libs and then come back into the mixed assembly. I've seen ever-so-slight performance drops when this happens. To test this, I subclassed DatabasePager, override NO methods, installed an instance of my new object, and got a slightly lower frame rate! Finally is the issue of continuous rendering. Some OSG mechanisms (like paging) rely on a continuously running frame loop. .NET's synchronous timers can't really give you deterministic frame timing. So if you are writing a simulator and need exact frame timing, you will probably need to run the OSG renderer in another thread and marshal your controller calls across the thread boundary. It's a hassle but .NET's delegate/invoke construct come in very handy for doing this. HTH. -gw On Feb 17, 2008 12:55 PM, sherman wilcox <[EMAIL PROTECTED]> wrote: > Glenn - ever run into any issues where you found portions of OSG not > to "work" with C++/CLI? I believe the OSG/C# folks run into this a > lot. Any odd difficulties or does everything just work? > > Follow-up question - have you written any OSG/C++/CLI WPF apps? > Winforms? How well does all this stuff "play" together? > > On Feb 16, 2008 10:16 PM, Glenn Waldron <[EMAIL PROTECTED]> wrote: > > Sherman, > > I'll vouch for it ... I've written dozens of apps using C++/CLI and OSG > and > > it works great. It is very convenient to be able to mix managed and > > unmanaged code virtually at will (there are a few restrictions) as the > > interop is handled transparently by the CLR. Plus with .NET 2.0, it's > simple > > to write an OSG .NET Control in a C++/CLI assembly, and then use it in > all > > your C# UI code. > > -gw > > > > -- > > Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : > 703-652-4791 > > > > > > > > On Feb 16, 2008 10:10 PM, sherman wilcox <[EMAIL PROTECTED]> > wrote: > > > Ok - so it sounds as if using C# with OSG is bad idea. Sounds possible > > > - just painful. On the plus side I hear (on occasion) good things said > > > about C++/CLI. Can anyone else comment on their experience using OSG > > > and C++/CLI? > > > > > > > > > > > > > > > On Feb 14, 2008 10:48 AM, hesicong2006 <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > You should try OSG.NET project, but the project does not contains > every > > > > feature OSG could provide. A much better solution will be use of > > > > C++/CLI, this language can create mix native C++ and managed code. > The > > > > main C# UI design benefit is also contained in C++/CLI. I have use > > > > C++/CLI to integrate OSG and .NET, very well, you should try it. But > the > > > > plain will be the much lower compile speed due to lots of inline > code of > > > > OSG. > > > > > > > > > > > > sherman wilcox wrote: > > > > > I've read a few posts and I'm a bit fuzzy on the subject. I have > an > > > > > OSG app wrapped up in a C++ library. Now I need a UI. I can attach > > > > > this and drive this libarary from a console app, MFC GUI, or even > the > > > > > standard Windows API, etc. - All in C++. However, I'm considering > > > > > using C#. I've heard lots of good things about C# from a UI > > > > > development perspective. From an OSG/C# point of view - there > seems to > > > > > be lots of pain. > > > > > > > > > > I'm not a C# developer - it's all Greek to me - so what I'm > imagining > > > > > may not be practical in reality hence this post. Is it possible to > > > > > link in my OSG app wrapped up in a C++ blanket and use my own API > from > > > > > with a C# GUI? Is it painful? What would I lose by going this > route? > > > > > Is possible that at some point I won't be able to take advantage > of > > > > > some latest OSG feature due to some unforeseen incapability? My > > > > > current UIs (I'm thinking of one MFC UI in particular) don't > really > > > > > interact with the OSG - that's all handled by my own C++ API. I'm > just > > > > > not sure how well all this would glue together using C#. > > > > > > > > > > Can some of the veterans comment? > > > > > > > > > > > > > > > > > > > > > > ___ > > > > osg-users mailing list > > > > osg-users@lists.open
Re: [osg-users] another one - osg and C#
Glenn, That seems like a great design choice, thanks for your insight. It's always nice to get another perspective. Thanks! Jason On Feb 17, 2008 1:09 PM, Glenn Waldron <[EMAIL PROTECTED]> wrote: > Jason, > > Architecturally I will usually treat the OSG API as a low-level > implementation detail. So rather than a thin layer over OSG, I usually will > encapsulate OSG code inside controller interfaces that accompany the OSG > .NET Control. > > So for example, there will be a single C++/CLI assembly that will expose > the .NET control, which handles repainting, mouse/keyboard events, and the > rendering loop. > > That control will then expose various Controller interfaces, like: > > * ViewController - for setting/getting the camera > * ContentController - for adding/removing/toggling models or layers in the > scene > * AssetController - for managing named dynamic objects/entities > * AnnotationController - for managing text labels > ...and so on. > > So this assembly becomes an application-level toolkit that abstracts away > not only OSG but the whole concept of the scene graph. Then the C# UI code > (in a referencing assembly) will look kind of like: > > SceneControl scene = new SceneControl(); > myForm.Controls.Add( scene ); > ... > scene.Content.AddLayer( "f:/data/terrain.osga" ); > scene.Content.AddLayer( "f:/data/trees.osga" ); > ... > scene.View.LookAt( x, y ); > > and so on. Now if you are looking for more re-use, you can break the > Controller interfaces our into their own separate assemblies. It just > depends on the complexity of your app. -gw > > -- > Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791 > > On Feb 17, 2008 10:52 AM, Jason Beverage <[EMAIL PROTECTED]> wrote: > > > Hi Glenn, > > > > We're using c# and OSG as well, but we're using hand crafted wrappers > > that attempt to expose all of the OSG functionality to C# (like the > > osgDotNet wrappers). This works well for the most part, but I often feel > > that sometimes it is more complicated than it is worth. I've also written a > > simple OSG control that binds an osgViewer to a window in C++/CLI like you > > mentioned, and it actually is surprisingly simple. > > > > When you write your applications that use OSG and C#, how is your > > application architecture typically set up? Do you just maintain a thin > > layer of C++/CLI code that deals with OSG? Just curious to get your opinion > > and learn something from your experience:) > > > > Thanks! > > > > Jason > > > > > > On Feb 16, 2008 11:16 PM, Glenn Waldron <[EMAIL PROTECTED]> wrote: > > > > > Sherman, > > > I'll vouch for it ... I've written dozens of apps using C++/CLI and > > > OSG and it works great. It is very convenient to be able to mix managed > > > and > > > unmanaged code virtually at will (there are a few restrictions) as the > > > interop is handled transparently by the CLR. Plus with .NET 2.0, it's > > > simple to write an OSG .NET Control in a C++/CLI assembly, and then use it > > > in all your C# UI code. > > > -gw > > > > > > -- > > > Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : > > > 703-652-4791 > > > > > > > > > On Feb 16, 2008 10:10 PM, sherman wilcox <[EMAIL PROTECTED]> > > > wrote: > > > > > > > Ok - so it sounds as if using C# with OSG is bad idea. Sounds > > > > possible > > > > - just painful. On the plus side I hear (on occasion) good things > > > > said > > > > about C++/CLI. Can anyone else comment on their experience using OSG > > > > and C++/CLI? > > > > > > > > On Feb 14, 2008 10:48 AM, hesicong2006 <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > > You should try OSG.NET project, but the project does not contains > > > > every > > > > > feature OSG could provide. A much better solution will be use of > > > > > C++/CLI, this language can create mix native C++ and managed code. > > > > The > > > > > main C# UI design benefit is also contained in C++/CLI. I have use > > > > > C++/CLI to integrate OSG and .NET, very well, you should try it. > > > > But the > > > > > plain will be the much lower compile speed due to lots of inline > > > > code of > > > > > OSG. > > > > > > > > > > > > > > > sherman wilcox wrote: > > > > > > I've read a few posts and I'm a bit fuzzy on the subject. I have > > > > an > > > > > > OSG app wrapped up in a C++ library. Now I need a UI. I can > > > > attach > > > > > > this and drive this libarary from a console app, MFC GUI, or > > > > even the > > > > > > standard Windows API, etc. - All in C++. However, I'm > > > > considering > > > > > > using C#. I've heard lots of good things about C# from a UI > > > > > > development perspective. From an OSG/C# point of view - there > > > > seems to > > > > > > be lots of pain. > > > > > > > > > > > > I'm not a C# developer - it's all Greek to me - so what I'm > > > > imagining > > > > > > may not be practical in reality hence this post. Is it possible > > > > to > > > > > > link in my OSG app wrapped up in a C++ blanket and use my own > >
Re: [osg-users] another one - osg and C#
Jason, Architecturally I will usually treat the OSG API as a low-level implementation detail. So rather than a thin layer over OSG, I usually will encapsulate OSG code inside controller interfaces that accompany the OSG .NET Control. So for example, there will be a single C++/CLI assembly that will expose the .NET control, which handles repainting, mouse/keyboard events, and the rendering loop. That control will then expose various Controller interfaces, like: * ViewController - for setting/getting the camera * ContentController - for adding/removing/toggling models or layers in the scene * AssetController - for managing named dynamic objects/entities * AnnotationController - for managing text labels ...and so on. So this assembly becomes an application-level toolkit that abstracts away not only OSG but the whole concept of the scene graph. Then the C# UI code (in a referencing assembly) will look kind of like: SceneControl scene = new SceneControl(); myForm.Controls.Add( scene ); ... scene.Content.AddLayer( "f:/data/terrain.osga" ); scene.Content.AddLayer( "f:/data/trees.osga" ); ... scene.View.LookAt( x, y ); and so on. Now if you are looking for more re-use, you can break the Controller interfaces our into their own separate assemblies. It just depends on the complexity of your app. -gw -- Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791 On Feb 17, 2008 10:52 AM, Jason Beverage <[EMAIL PROTECTED]> wrote: > Hi Glenn, > > We're using c# and OSG as well, but we're using hand crafted wrappers that > attempt to expose all of the OSG functionality to C# (like the osgDotNet > wrappers). This works well for the most part, but I often feel that > sometimes it is more complicated than it is worth. I've also written a > simple OSG control that binds an osgViewer to a window in C++/CLI like you > mentioned, and it actually is surprisingly simple. > > When you write your applications that use OSG and C#, how is your > application architecture typically set up? Do you just maintain a thin > layer of C++/CLI code that deals with OSG? Just curious to get your opinion > and learn something from your experience:) > > Thanks! > > Jason > > > On Feb 16, 2008 11:16 PM, Glenn Waldron <[EMAIL PROTECTED]> wrote: > > > Sherman, > > I'll vouch for it ... I've written dozens of apps using C++/CLI and OSG > > and it works great. It is very convenient to be able to mix managed and > > unmanaged code virtually at will (there are a few restrictions) as the > > interop is handled transparently by the CLR. Plus with .NET 2.0, it's > > simple to write an OSG .NET Control in a C++/CLI assembly, and then use it > > in all your C# UI code. > > -gw > > > > -- > > Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : > > 703-652-4791 > > > > > > On Feb 16, 2008 10:10 PM, sherman wilcox <[EMAIL PROTECTED]> > > wrote: > > > > > Ok - so it sounds as if using C# with OSG is bad idea. Sounds possible > > > - just painful. On the plus side I hear (on occasion) good things said > > > about C++/CLI. Can anyone else comment on their experience using OSG > > > and C++/CLI? > > > > > > On Feb 14, 2008 10:48 AM, hesicong2006 <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > You should try OSG.NET project, but the project does not contains > > > every > > > > feature OSG could provide. A much better solution will be use of > > > > C++/CLI, this language can create mix native C++ and managed code. > > > The > > > > main C# UI design benefit is also contained in C++/CLI. I have use > > > > C++/CLI to integrate OSG and .NET, very well, you should try it. But > > > the > > > > plain will be the much lower compile speed due to lots of inline > > > code of > > > > OSG. > > > > > > > > > > > > sherman wilcox wrote: > > > > > I've read a few posts and I'm a bit fuzzy on the subject. I have > > > an > > > > > OSG app wrapped up in a C++ library. Now I need a UI. I can attach > > > > > this and drive this libarary from a console app, MFC GUI, or even > > > the > > > > > standard Windows API, etc. - All in C++. However, I'm considering > > > > > using C#. I've heard lots of good things about C# from a UI > > > > > development perspective. From an OSG/C# point of view - there > > > seems to > > > > > be lots of pain. > > > > > > > > > > I'm not a C# developer - it's all Greek to me - so what I'm > > > imagining > > > > > may not be practical in reality hence this post. Is it possible to > > > > > link in my OSG app wrapped up in a C++ blanket and use my own API > > > from > > > > > with a C# GUI? Is it painful? What would I lose by going this > > > route? > > > > > Is possible that at some point I won't be able to take advantage > > > of > > > > > some latest OSG feature due to some unforeseen incapability? My > > > > > current UIs (I'm thinking of one MFC UI in particular) don't > > > really > > > > > interact with the OSG - that's all handled by my own C++ API. I'm > > > just > > > > > not sure how well all this would
Re: [osg-users] another one - osg and C#
Glenn - ever run into any issues where you found portions of OSG not to "work" with C++/CLI? I believe the OSG/C# folks run into this a lot. Any odd difficulties or does everything just work? Follow-up question - have you written any OSG/C++/CLI WPF apps? Winforms? How well does all this stuff "play" together? On Feb 16, 2008 10:16 PM, Glenn Waldron <[EMAIL PROTECTED]> wrote: > Sherman, > I'll vouch for it ... I've written dozens of apps using C++/CLI and OSG and > it works great. It is very convenient to be able to mix managed and > unmanaged code virtually at will (there are a few restrictions) as the > interop is handled transparently by the CLR. Plus with .NET 2.0, it's simple > to write an OSG .NET Control in a C++/CLI assembly, and then use it in all > your C# UI code. > -gw > > -- > Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791 > > > > On Feb 16, 2008 10:10 PM, sherman wilcox <[EMAIL PROTECTED]> wrote: > > Ok - so it sounds as if using C# with OSG is bad idea. Sounds possible > > - just painful. On the plus side I hear (on occasion) good things said > > about C++/CLI. Can anyone else comment on their experience using OSG > > and C++/CLI? > > > > > > > > > > On Feb 14, 2008 10:48 AM, hesicong2006 <[EMAIL PROTECTED]> wrote: > > > Hi, > > > You should try OSG.NET project, but the project does not contains every > > > feature OSG could provide. A much better solution will be use of > > > C++/CLI, this language can create mix native C++ and managed code. The > > > main C# UI design benefit is also contained in C++/CLI. I have use > > > C++/CLI to integrate OSG and .NET, very well, you should try it. But the > > > plain will be the much lower compile speed due to lots of inline code of > > > OSG. > > > > > > > > > sherman wilcox wrote: > > > > I've read a few posts and I'm a bit fuzzy on the subject. I have an > > > > OSG app wrapped up in a C++ library. Now I need a UI. I can attach > > > > this and drive this libarary from a console app, MFC GUI, or even the > > > > standard Windows API, etc. - All in C++. However, I'm considering > > > > using C#. I've heard lots of good things about C# from a UI > > > > development perspective. From an OSG/C# point of view - there seems to > > > > be lots of pain. > > > > > > > > I'm not a C# developer - it's all Greek to me - so what I'm imagining > > > > may not be practical in reality hence this post. Is it possible to > > > > link in my OSG app wrapped up in a C++ blanket and use my own API from > > > > with a C# GUI? Is it painful? What would I lose by going this route? > > > > Is possible that at some point I won't be able to take advantage of > > > > some latest OSG feature due to some unforeseen incapability? My > > > > current UIs (I'm thinking of one MFC UI in particular) don't really > > > > interact with the OSG - that's all handled by my own C++ API. I'm just > > > > not sure how well all this would glue together using C#. > > > > > > > > Can some of the veterans comment? > > > > > > > > > > > > > > > > > ___ > > > osg-users mailing list > > > osg-users@lists.openscenegraph.org > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > ___ > > osg-users mailing list > > osg-users@lists.openscenegraph.org > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Adding nodes to the scene while theviewer is running
Yes you can add new objects to your application whiles its running all you need is a pointer to your scene graphs and use addChild on that node The man caveat is that you cannot do this in the cull or draw so you have to add your objects before the CULL and draw are dispatched. Also make sure your loading your model in the same thread as the app/update thread __ Gordon Tomlinson Email : [EMAIL PROTECTED] YIM/AIM : gordon3dBrit MSN IM : [EMAIL PROTECTED] Website : www.vis-sim.com www.gordontomlinson.com __ "Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival" -Master Tambo Tetsura -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Guy Sent: Saturday, February 16, 2008 11:52 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Adding nodes to the scene while theviewer is running Robert, If it is possible to add objects while running, what is the purpose of the realize function? I thought it initialize not only the camera. Is it possible to add ANY object while running or there are some limitations to this? Thanks, Guy. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Per Rosengren Sent: Saturday, February 16, 2008 11:32 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Adding nodes to the scene while the viewer is running Thank you! A small typo in my code resulted in that my geodes didn't get any children. No wonder they weren't visible... Robert Osfield wrote: > Hi Per, > > Is it simply that the new objects aren't in the current camera's view? > Try moving the camera around the scene. Try pressing space bar to > force the camera manipulator back to its home position. > > Robert. > > 2008/2/15 Per Rosengren <[EMAIL PROTECTED]>: >> I try to add Geoms to the scene of my running osgViewer::Viewer. If I >> print all children of Viewer::getCamera(), the new nodes are there, but >> they are not visible in the viewer. >> They are added to a Switch in the scene, and they are set to be visible. >> >> ___ >> 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.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Loading an image file
I too need to show images. Since osg is (and should be) 3d-based, the way to do is seemed to be to display a rectange Geometry infront of an orthographic camera, and set the rectangle texture to be the image. Instead of this, I chose to use OpenCV (CV for Computer Vision), but you can also use gtk, qt or SDL. Maybe another way to do it in osg would be to set the pixelbuffer to the image. Don't know how to do that though. wanyama harold wrote: Hi guys, how do i get to load an image file.iam able to load .osg file formats and i have set the directory path that contains the image in the OSG_PATH. the only issue is afte i read the image ie osg::Image* image=osgDB::readImageFile("output1.png"); how can i now view it as it cant be viewed by the osgViewer class. thx guys ___ Support the World Aids Awareness campaign this month with Yahoo! For Good http://uk.promotions.yahoo.com/forgood/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org begin:vcard fn:Per Rosengren n:Rosengren;Per org:KTH;CVAP adr:;;KTH;Stockholm;;SE-100 44;Sweden email;internet:[EMAIL PROTECTED] title:Ph.D. student tel;work:+46 8 790 6203 tel;fax:+46 8 723 0302 note:PGP keyID: 0xD40DD8E0 x-mozilla-html:FALSE url:http://www.csc.kth.se/~perrose/ version:2.1 end:vcard ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] another one - osg and C#
Hi Glenn, We're using c# and OSG as well, but we're using hand crafted wrappers that attempt to expose all of the OSG functionality to C# (like the osgDotNet wrappers). This works well for the most part, but I often feel that sometimes it is more complicated than it is worth. I've also written a simple OSG control that binds an osgViewer to a window in C++/CLI like you mentioned, and it actually is surprisingly simple. When you write your applications that use OSG and C#, how is your application architecture typically set up? Do you just maintain a thin layer of C++/CLI code that deals with OSG? Just curious to get your opinion and learn something from your experience:) Thanks! Jason On Feb 16, 2008 11:16 PM, Glenn Waldron <[EMAIL PROTECTED]> wrote: > Sherman, > I'll vouch for it ... I've written dozens of apps using C++/CLI and OSG > and it works great. It is very convenient to be able to mix managed and > unmanaged code virtually at will (there are a few restrictions) as the > interop is handled transparently by the CLR. Plus with .NET 2.0, it's > simple to write an OSG .NET Control in a C++/CLI assembly, and then use it > in all your C# UI code. > -gw > > -- > Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791 > > > On Feb 16, 2008 10:10 PM, sherman wilcox <[EMAIL PROTECTED]> wrote: > > > Ok - so it sounds as if using C# with OSG is bad idea. Sounds possible > > - just painful. On the plus side I hear (on occasion) good things said > > about C++/CLI. Can anyone else comment on their experience using OSG > > and C++/CLI? > > > > On Feb 14, 2008 10:48 AM, hesicong2006 <[EMAIL PROTECTED]> wrote: > > > Hi, > > > You should try OSG.NET project, but the project does not contains > > every > > > feature OSG could provide. A much better solution will be use of > > > C++/CLI, this language can create mix native C++ and managed code. The > > > main C# UI design benefit is also contained in C++/CLI. I have use > > > C++/CLI to integrate OSG and .NET, very well, you should try it. But > > the > > > plain will be the much lower compile speed due to lots of inline code > > of > > > OSG. > > > > > > > > > sherman wilcox wrote: > > > > I've read a few posts and I'm a bit fuzzy on the subject. I have an > > > > OSG app wrapped up in a C++ library. Now I need a UI. I can attach > > > > this and drive this libarary from a console app, MFC GUI, or even > > the > > > > standard Windows API, etc. - All in C++. However, I'm considering > > > > using C#. I've heard lots of good things about C# from a UI > > > > development perspective. From an OSG/C# point of view - there seems > > to > > > > be lots of pain. > > > > > > > > I'm not a C# developer - it's all Greek to me - so what I'm > > imagining > > > > may not be practical in reality hence this post. Is it possible to > > > > link in my OSG app wrapped up in a C++ blanket and use my own API > > from > > > > with a C# GUI? Is it painful? What would I lose by going this route? > > > > Is possible that at some point I won't be able to take advantage of > > > > some latest OSG feature due to some unforeseen incapability? My > > > > current UIs (I'm thinking of one MFC UI in particular) don't really > > > > interact with the OSG - that's all handled by my own C++ API. I'm > > just > > > > not sure how well all this would glue together using C#. > > > > > > > > Can some of the veterans comment? > > > > > > > > > > > > > > > > > ___ > > > osg-users mailing list > > > osg-users@lists.openscenegraph.org > > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > ___ > > osg-users mailing list > > osg-users@lists.openscenegraph.org > > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Loading an image file
Hi guys, how do i get to load an image file.iam able to load .osg file formats and i have set the directory path that contains the image in the OSG_PATH. the only issue is afte i read the image ie osg::Image* image=osgDB::readImageFile("output1.png"); how can i now view it as it cant be viewed by the osgViewer class. thx guys ___ Support the World Aids Awareness campaign this month with Yahoo! For Good http://uk.promotions.yahoo.com/forgood/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Printing the scene graph as text
I order to debug the osg program I am currently working on, I have written some functions to print the scene graph as text. For instance, notify(NOTICE) << myNode; will print the following to stdout: Camera: Group: Scene root Group: ../../models/polis-tri-v2.3ds Geode: Cube Geometry: : Vertices: 194 Geode: Cylinder Geometry: : Vertices: 392 Switch: Switch blobs on/off: On: 0 1 PositionAttitudeTransform: : Pos: ( -3.21639, -1.86514, 0.587853 ), Scale: ( 1, 1, 1 ) Geode: ShapeDrawable: -> Sphere: : Radius: 0.1 PositionAttitudeTransform: : Pos: ( 2.39094, -1.85198, -0.263018 ), Scale: ( 1.5, 1.5, 1.5 ) Geode: ShapeDrawable: -> Sphere: : Radius: 0.1 PositionAttitudeTransform: : Pos: ( -0.351465, -1.85198, -0.231732 ), Scale: ( 1.9, 1.9, 1.9 ) Geode: ShapeDrawable: -> Sphere: : Radius: 0.1 PositionAttitudeTransform: : Pos: ( 2.39094, -1.85198, -0.263018 ), Scale: ( 1.9, 1.9, 1.9 ) Geode: ShapeDrawable: -> Sphere: : Radius: 0.1 This is very useful for me, and would probably be useful for others as well. Should I add these functions to osg, and in that case, where and how? begin:vcard fn:Per Rosengren n:Rosengren;Per org:KTH;CVAP adr:;;KTH;Stockholm;;SE-100 44;Sweden email;internet:[EMAIL PROTECTED] title:Ph.D. student tel;work:+46 8 790 6203 tel;fax:+46 8 723 0302 note:PGP keyID: 0xD40DD8E0 x-mozilla-html:FALSE url:http://www.csc.kth.se/~perrose/ version:2.1 end:vcard ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] LineSegment and Plane Intersection
Hi, everyone. I'm having some trouble with computing the coordinates of the intersection between a osg::Plane and an osg::LineSegment. In addition, I'd like to be able to compute only the intersection with the plane, and forget about the rest of my scene... Is it possible? Thanks, Renan M Z Mendes ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Test www.osgChina.org , A fatal error(about visiting) have fixed
Hello Rebort and all : A fatel error about some area can't visiting the website have been fixed. Please test it www.osgChina.org. And I want to applicate a link to www.openscenegraph.org. How to do it? Thanks all Yang ShiXing 2008 2 17 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org