Re: [osg-users] crash at delete mViewer
Hi forest, If you had implement cOSG class on your program, you should be careful about destroying viewer and threads precedence. Sometimes it can be crash as you experienced because when destroying threads process time need. In osgviewerMFC project AfxMessageBox(Exit Rendering Thread); message is giving because of gaining this waiting time. So you can give some time this operation to not crash. HTH. Best Regards. Umit Uzun 2008/10/31 forest37 [EMAIL PROTECTED] hi all, There is a class cOSG in example osgviewerMFC,i find that a sentence Sleep(1000); is added to the function cOSG::~cOSG().Maybe it's used to avoid crash at delete mViewer.But Sometimes I still get a crash at delete mViewer.Is it because of the thread is not stoped? How can i slove the problem? Thanks for advance. forest -- 网易邮箱10周年,技术见证辉煌 http://www.yeah.net ___ 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] mingw build problems
Hi Csaba, thank you very much for the pointers. As you said, activating the reports on cmake generates the DartConfiguration.tcl. Now I'm wrestling with some issues that I think are Cygwin specific. Hope to be a new neighbour soon :) El Jueves 30 Octubre 2008ES 14:26:07 Csaba Halász escribió: On Thu, Oct 30, 2008 at 9:38 AM, Alberto Luaces [EMAIL PROTECTED] wrote: Hi Csaba, Out of curiosity, are you jester? Hi Alberto, Yes that's me :) If that were your machine, how did you manage to install Dart with Mingw? I am be interested in doing the same with a Cygwin build. I built tcl and installed Dart. But it didn't work properly, and later I found out you *don't* need dart/tcl at all. Current cmake has a ctest module that does everything. Somebody should put this in big fat letters somewhere :) So just enable the dart stuff in the config and you are done. (It will still use DartConfiguration.tcl, don't be surprised by that) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph Stereo Viewer question
Hi Thanh, In addition of what J-S said, you can also recover the options passed to your program with the ArgumentParser and then initialize the viewer with them: int main(int argc, char **argv){ osg::ArgumentParser args( argc, argv); osgViewer::Viewer v(args); ... } this will make your program mimic osgviewer behaviour, that is, you can run myprogram --stereo to get stereo rendering. The use of one or the other way depends on which fits best to your application. Alberto El Jueves 30 Octubre 2008ES 20:50:28 Jean-Sébastien Guay escribió: Hello Thanh, It's very easy to load a model using stereo display by add an argument --stereo on console line, such as osgviewer --stereo cow.osg but how can I implement the stereo display on my application? I have searched all over but can not find it anywhere. Check osg::DisplaySettings::setStereo. You would do for example osg::DisplaySettings::instance()-setStereo(true); osg::DisplaySettings::instance()-setStereoMode(...); before creating your graphics context (or before the viewer creates it). One more question: Where can I find the osgviewer source code? osgViewer/Viewer.cpp is not that, right? OpenSceneGraph/applications/osgViewer/osgviewer.cpp But it's pretty simple, you won't find for example the --STEREO option there, it's checked somewhere else. I suggest you do a find in files to find out where. Hope this helps, J-S ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Offscreen rendering in PixelBufferWin32 and readPixels
Hi, I currently try to render a setup of multiple cameras off screen in order to read them to an osg::Image (raw data of some kind would be enough - I know how to convert it to an osg::Image). The point is, I want those cameras to be nicely arranged (the way I can arrange them on other graphics contexts like osgViewer::CompositeViewer) I tried different approaches but none worked so far. The simplest one would be: osg::GraphicsContext::Traits* t = new osg::GraphicsContext::Traits(); t-x = 1; t-y = 1; t-width = 1024; t-height = 692; t-pbuffer = true; pb = new osgViewer::PixelBufferWin32(t); camera-setGraphicsContext(pb); camera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER); camera-setViewport(new osg::Viewport(x0,y0,w,h)); ... frame(); img-readPixels(0, 0, width, height, GL_BGRA, GL_UNSIGNED_BYTE); do_something(img); Another approached was using PBOs. Something like: img = new osg::Image; img-allocateImage(1024,692,1,GL_BGRA,GL_UNSIGNED_BYTE); osg::GraphicsContext::Traits* t = new osg::GraphicsContext::Traits(); t-x = 1; t-y = 1; t-width = 1024; t-height = 692; t-pbuffer = true; pb = new osgViewer::PixelBufferWin32(t); pb-getState()-setCurrentPixelBufferObject(img-getPixelBufferObject); camera-setGraphicsContext(pb); camera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); camera-setViewport(new osg::Viewport(x0,y0,w,h)); ... pb-getState()-bindPixelBufferObject(img-getPixelBufferObject); frame(); do_something(img); pb-getState()-unbindPixelBufferObject(img-getPixelBufferObject); But this doesen't work either. Had some other approaches too, but those threw OpenGL errors claiming some operation is not supported... I'm kind of stuck with this. I know the data is some where - things like attaching an image to a camera and reading it work - but I just can't find it. I would be really thankful for at least a hint. Matthias ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Offscreen rendering in PixelBufferWin32 and readPixels
HI Mathias, I've haven't read through your post with a fine tooth come, but it does kinda look like your are making things more complicated than they need to be. Setting up a pbuffer is as simple as setting the osg::GraphicsContext::Traits::pbuffer to true, you shouldn't need to directly construct a PixelBufferWIn32. See the osgscreencapture example. Robert. On Fri, Oct 31, 2008 at 9:54 AM, [EMAIL PROTECTED] wrote: Hi, I currently try to render a setup of multiple cameras off screen in order to read them to an osg::Image (raw data of some kind would be enough - I know how to convert it to an osg::Image). The point is, I want those cameras to be nicely arranged (the way I can arrange them on other graphics contexts like osgViewer::CompositeViewer) I tried different approaches but none worked so far. The simplest one would be: osg::GraphicsContext::Traits* t = new osg::GraphicsContext::Traits(); t-x = 1; t-y = 1; t-width = 1024; t-height = 692; t-pbuffer = true; pb = new osgViewer::PixelBufferWin32(t); camera-setGraphicsContext(pb); camera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER); camera-setViewport(new osg::Viewport(x0,y0,w,h)); ... frame(); img-readPixels(0, 0, width, height, GL_BGRA, GL_UNSIGNED_BYTE); do_something(img); Another approached was using PBOs. Something like: img = new osg::Image; img-allocateImage(1024,692,1,GL_BGRA,GL_UNSIGNED_BYTE); osg::GraphicsContext::Traits* t = new osg::GraphicsContext::Traits(); t-x = 1; t-y = 1; t-width = 1024; t-height = 692; t-pbuffer = true; pb = new osgViewer::PixelBufferWin32(t); pb-getState()-setCurrentPixelBufferObject(img-getPixelBufferObject); camera-setGraphicsContext(pb); camera-setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT); camera-setViewport(new osg::Viewport(x0,y0,w,h)); ... pb-getState()-bindPixelBufferObject(img-getPixelBufferObject); frame(); do_something(img); pb-getState()-unbindPixelBufferObject(img-getPixelBufferObject); But this doesen't work either. Had some other approaches too, but those threw OpenGL errors claiming some operation is not supported... I'm kind of stuck with this. I know the data is some where - things like attaching an image to a camera and reading it work - but I just can't find it. I would be really thankful for at least a hint. Matthias ___ 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] MAX to COLLADA or which format ?
Hi Folks, I follows mail list and I know there was a discussion about converting animated MAX format to any format which osg can understand. I searched the all archive and want to ask same question again around the different content. As I said, I have animated MAX format models and want to export another format in animation too. But after searching, I understand that I only can do this conversion in COLLADA format. Is it right ? And if right how should I achive? I found colladamax exporter http://www.feelingsoftware.com/content/view/65/79/lang,en/ There is anyone who used this exporter? I am asking because of leading me to right way. And Does using COLLADA formatted animated model useful or not on simulation project? I have never use collada format before, so I don't know anything about the efficiency. Any advices would be appreciated with glad. Best Regards. Umit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] problem with image
Hi to all in my application I am applying a texture (. bmp) to a sphere, I have no problems with the plugin, but I do not see the image. What can I do? Miriam ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] problem with image
Not enough information or detail in you post to allow people to really help you How are you applying the texture to the sphere ? How are you setting up you texture coordinates on the sphere ? Gordon __ Gordon Tomlinson Product Manager 3D Email : gtomlinson @ overwatch.textron.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 Miriam D'Elia Sent: Friday, October 31, 2008 7:45 AM To: OpenSceneGraph Users Subject: [osg-users] problem with image Hi to all in my application I am applying a texture (. bmp) to a sphere, I have no problems with the plugin, but I do not see the image. What can I do? Miriam ___ 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] Browser integration
Hello, I would like to embed an osgviewer to standard-browsers (firefox, ie, safari). I already saw Luigi Caloris great work osg4web, but this aims at a much larger scale than what I need. I would just like to embed quite small osg-files to a 3d-gallery. As I saw that browser-integration is on the osg-roadmap, I just wanted to know if there is an easy way to achieve this. If not, I would like to ask if embedding a very simple osg-app into a webbrowser is very difficult. osg is embeded nicely into several toolkits, so my naive approach would be to change one of the toolkit-examples to a browser-plugin-framework. Are there huge pitfalls I am likely to stumble in? If not, I might try this in the next weeks. Regards, Andreas ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] MAX to COLLADA or which format ?
On the animation front the Collada plug-in for OSG does not at this time support animation As to efficiency not sure what you mean, but as a file format Collada is not about speed its about being an interchange format Gordon __ Gordon Tomlinson Product Manager 3D Email : gtomlinson @ overwatch.textron.com __ (C): (+1) 571-265-2612 (W): (+1) 703-437-7651 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 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ümit Uzun Sent: Friday, October 31, 2008 6:06 AM To: OpenSceneGraph Users Subject: [osg-users] MAX to COLLADA or which format ? Hi Folks, I follows mail list and I know there was a discussion about converting animated MAX format to any format which osg can understand. I searched the all archive and want to ask same question again around the different content. As I said, I have animated MAX format models and want to export another format in animation too. But after searching, I understand that I only can do this conversion in COLLADA format. Is it right ? And if right how should I achive? I found colladamax exporter http://www.feelingsoftware.com/content/view/65/79/lang,en/ There is anyone who used this exporter? I am asking because of leading me to right way. And Does using COLLADA formatted animated model useful or not on simulation project? I have never use collada format before, so I don't know anything about the efficiency. Any advices would be appreciated with glad. Best Regards. Umit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] CompositeViewer event delivery bug? [patch included]
Hi Thomas, Could you please post the complete source file to osg-submissions. Thanks, Robert. On Thu, Oct 30, 2008 at 7:06 PM, thomas weidner [EMAIL PROTECTED] wrote: Hi, I use osgViewer::CompositeViewer with several views. All views share parts of their scene graphs. Within these common part some nodes have event handlers which use the action adapter argument to the event handler to determinate which view received the event. Here is the problem, osgViewer::CompositeViewer::eventTraversal sets the action adapter field in the EventVisitor always to the last view which received an event, instead of using the view which actually received the event, so determination of the correct view does not work. I looked at the code a bit, and moved the code for setting the action adapter to a IMO better place. btw, on every mouse move all views seem to receive FRAME events, is that normal or is it some glitch within my application? thanks in advance, thomas ___ 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] MAX to COLLADA or which format ?
Hi Kim, Thanks so much for reply. I remember, you have worked on VENUS project. In this project how can you achieve fish motion modeling? Do you use only shaders to give special motion mathematics on each skeletal model or do you use sophisticated tools? I mean, I want to model school of fish by using Reynold's Flocking Algorithms and fish motions. At this point Do I have to model each fish motion by using shaders (for example sinusoaidal travelling wave to modeling fish waving) ? Or there is another way to to it except osganimation toolkit? Thanks for advices. Best Regards. Umit Uzun 2008/10/31 Kim C Bale [EMAIL PROTECTED] In my experience the feelingsoftware collada exporter gives the most reliable results when exporting models from Max. However, as far as I know there is no way of getting any animation information out of max and into the OSG. I've noticed that the animation toolkit (osgATK/osgAnimation I forget the name), mentioned recently in the forum had a Blender importer/exporter that does support animation. Perhaps that is worth taking a look at. Hope that is of help. Kim. *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Ümit Uzun *Sent:* 31 October 2008 10:06 *To:* OpenSceneGraph Users *Subject:* [osg-users] MAX to COLLADA or which format ? Hi Folks, I follows mail list and I know there was a discussion about converting animated MAX format to any format which osg can understand. I searched the all archive and want to ask same question again around the different content. As I said, I have animated MAX format models and want to export another format in animation too. But after searching, I understand that I only can do this conversion in COLLADA format. Is it right ? And if right how should I achive? I found colladamax exporter http://www.feelingsoftware.com/content/view/65/79/lang,en/ There is anyone who used this exporter? I am asking because of leading me to right way. And Does using COLLADA formatted animated model useful or not on simulation project? I have never use collada format before, so I don't know anything about the efficiency. Any advices would be appreciated with glad. Best Regards. Umit Uzun * To view the terms under which this email is distributed, please go to http://www.hull.ac.uk/legal/email_disclaimer.html * ___ 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] multiple rotation with Quat
Hi, This a math problem, depending on OSG. I need to apply 2 rotation to a vector. I would be very simple if I can cumulate the 2 quat in one. How to do it ? Do Osg implement a method to combine two rotations ? thanks. Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Offscreen rendering in PixelBufferWin32 and readPixels
Hi Mathias, If you are doing pbuffer work you don't need to QT at all, in fact I'd strongly recommend that you just use the functionality in osgViewer as 3rd party window toolkits like often don't have good pbuffer support. You should be able to mix and match osgViewer created pbuffers with other windowing toolkits. Robert. On Fri, Oct 31, 2008 at 10:37 AM, [EMAIL PROTECTED] wrote: Thank you Robert This was actually my first attempt (setting pbuffer true for my QTAdapterWidget) but it doesn't have the desired effect. Important for me is, that the graphics context is still rendered and grabbed correctly when the window is not completely visible. Just setting pbuffer true and using readPixels still produces undefined areas in my image. ___ 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] QT4 ViewerQOSG and Q_OBJECT
HI MMBMGH Could you sign your posts with the name your wish to be address as, it helps us keep track of who's who and keep discussions more friendly. Also could try to reply to previous posts in a thread, as just posting an email in a new thread, that requires info from the other thread to understand it makes things really had for others to understand things without doing lots of detective work. I for one have to read my dozens of emails each day on as many different topics, each topic only take a small slice of my time otherwise I end up totally bogged down. Robert. On Fri, Oct 31, 2008 at 3:57 AM, [EMAIL PROTECTED] wrote: Could you post complete modified file as this will explain the changes without any chance of ambiguity. Sorry my mistake, Note if you want to use QT_OBJECT the ViewerQOSG class declaration should be in it's own header file. ___ 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] Cull-Traversal Performance
Hi Sean, Welcome back :-) Transforms are relatively expensive, as the transforms need to be tracked as well as the view frustum needing to be transformed into the local coords below the transform for culling performance. You two subgraphs have 100 vs 10,000 transforms per frame, 100 won't take the cull traversal much at all, but 10,000 will. Second up having lots of separate osg::Geometry, even when a small number of shared many times, requires lots of work in cull in doing the actual cull test and more critically creating all the RenderLeaf back end data structure required to represent the Geometry instance with its final combination of modelview, projection and state. So as a general rule, keep the number of transforms down, by applying the transforms to the subgraphs and copying the geometry if required, and keep the the number of separate geometries down by combining smaller geometries into bigger groups. Since you culls do look rather high even with the small scene set up, while it's a bit of long shot, make sure that you do all your tests in release/optimized build. Another area you could look at at inspiration is the osgforest example - it provides a range of implementations of forests that you can step between, in the svn/trunk version of the OSG I've added in the StatsHandler to show the relative costs of cull/draw and GPU. You run the osgforest example with a command line option to set the number of trees for instance: osgforest --trees 1 This will give you an indication of the how each of the techniques might work in your instance. In particular the shader path would probably be most applicable. Other items you could look at is the use the multi-threaded use of osgViewer, as the DrawThreadPerContext would certainly help hide the cost of your long cull. Finally we have had some check-in's since OSG-2.6 include optimizations in Matrix that reduce the overhead associated with Transforms. So try out the SVN/trunk or 2.7.x developer releases. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] multiple rotation with Quat
Vincent Bourdier wrote: Hi, This a math problem, depending on OSG. I need to apply 2 rotation to a vector. I would be very simple if I can cumulate the 2 quat in one. How to do it ? Do Osg implement a method to combine two rotations ? Can't you simply multiply them? I.e osg::Quat q1, q2, qf; // set q1 and q2 qf = q1 * q2; Paul thanks. Regards, Vincent. ___ 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] MAX to COLLADA or which format ?
In my experience the feelingsoftware collada exporter gives the most reliable results when exporting models from Max. However, as far as I know there is no way of getting any animation information out of max and into the OSG. I've noticed that the animation toolkit (osgATK/osgAnimation I forget the name), mentioned recently in the forum had a Blender importer/exporter that does support animation. Perhaps that is worth taking a look at. Hope that is of help. Kim. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ümit Uzun Sent: 31 October 2008 10:06 To: OpenSceneGraph Users Subject: [osg-users] MAX to COLLADA or which format ? Hi Folks, I follows mail list and I know there was a discussion about converting animated MAX format to any format which osg can understand. I searched the all archive and want to ask same question again around the different content. As I said, I have animated MAX format models and want to export another format in animation too. But after searching, I understand that I only can do this conversion in COLLADA format. Is it right ? And if right how should I achive? I found colladamax exporter http://www.feelingsoftware.com/content/view/65/79/lang,en/ There is anyone who used this exporter? I am asking because of leading me to right way. And Does using COLLADA formatted animated model useful or not on simulation project? I have never use collada format before, so I don't know anything about the efficiency. Any advices would be appreciated with glad. Best Regards. Umit Uzun * To view the terms under which this email is distributed, please go to http://www.hull.ac.uk/legal/email_disclaimer.html *___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] multiple rotation with Quat
Hi I was not sure that the * operator would compute the quaternion that I'm looking for. I looked in the sources, but the code is very hard to understand for me. If you are sure, I will do it of course. thanks Vincent. 2008/10/31 Paul Melis [EMAIL PROTECTED] Vincent Bourdier wrote: Hi, This a math problem, depending on OSG. I need to apply 2 rotation to a vector. I would be very simple if I can cumulate the 2 quat in one. How to do it ? Do Osg implement a method to combine two rotations ? Can't you simply multiply them? I.e osg::Quat q1, q2, qf; // set q1 and q2 qf = q1 * q2; Paul thanks. Regards, Vincent. ___ 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] multiple rotation with Quat
Vincent Bourdier wrote: Hi I was not sure that the * operator would compute the quaternion that I'm looking for. I looked in the sources, but the code is very hard to understand for me. It probably does what you expect: compute a combined quaternion. Just try it with 2 rotations like 90 around X and 90 around Y and transform a single vec3 to check Paul If you are sure, I will do it of course. thanks Vincent. 2008/10/31 Paul Melis [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Vincent Bourdier wrote: Hi, This a math problem, depending on OSG. I need to apply 2 rotation to a vector. I would be very simple if I can cumulate the 2 quat in one. How to do it ? Do Osg implement a method to combine two rotations ? Can't you simply multiply them? I.e osg::Quat q1, q2, qf; // set q1 and q2 qf = q1 * q2; Paul thanks. Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org mailto:osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org mailto:osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Offscreen rendering in PixelBufferWin32 and readPixels
Thank you Robert This was actually my first attempt (setting pbuffer true for my QTAdapterWidget) but it doesn't have the desired effect. Important for me is, that the graphics context is still rendered and grabbed correctly when the window is not completely visible. Just setting pbuffer true and using readPixels still produces undefined areas in my image. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] problem with image
2 things 1: osg::Sphere is does not have texture coords so you would not see a texture anyway ( search the archives on Shapes and what they were designed for ) 2) is rfi.TGA in your path, turn the debug notification up see whats being said , place a break point in the TGA loader or step in to readImageFile? is you system case sensative ? Gordon __ Gordon Tomlinson Product Manager 3D Email : gtomlinson @ overwatch.textron.com __ (C): (+1) 571-265-2612 (W): (+1) 703-437-7651 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 Miriam D'Elia Sent: Friday, October 31, 2008 8:19 AM To: OpenSceneGraph Users Subject: Re: [osg-users] problem with image Sorry You're right! Explain better: when I run my application, the message is printed: no image. Thanks This is the code: _ osg::Geode* logoGeode= new osg::Geode(); osg::ShapeDrawable* s= new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0, 0, 0), 1.0)); logoGeode-addDrawable(s); osg::Texture2D* texture = new osg::Texture2D; texture-setDataVariance(osg::Object::DYNAMIC); // protect from being optimized away as static state. osg::Image* img = osgDB::readImageFile(rfi.TGA); if(img) { texture-setImage(img); osg::StateSet* blendStateSet = new osg::StateSet(); osg::TexEnv* blendTexEnv = new osg::TexEnv; blendTexEnv-setMode(osg::TexEnv::DECAL); blendStateSet-setTextureAttributeAndModes(0,texture,osg::StateAttribute ::ON); blendStateSet-setTextureAttribute(0,blendTexEnv); logoGeode-setStateSet(blendStateSet); } else std::coutno image; view-setSceneData(logoGeode); __ Tomlinson, Gordon ha scritto: Not enough information or detail in you post to allow people to really help you How are you applying the texture to the sphere ? How are you setting up you texture coordinates on the sphere ? Gordon __ Gordon Tomlinson Product Manager 3D Email : gtomlinson @ overwatch.textron.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 Miriam D'Elia Sent: Friday, October 31, 2008 7:45 AM To: OpenSceneGraph Users Subject: [osg-users] problem with image Hi to all in my application I am applying a texture (. bmp) to a sphere, I have no problems with the plugin, but I do not see the image. What can I do? Miriam ___ 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.or g ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] problem with image
Sorry You're right! Explain better: when I run my application, the message is printed: no image. Thanks This is the code: _ osg::Geode* logoGeode= new osg::Geode(); osg::ShapeDrawable* s= new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0, 0, 0), 1.0)); logoGeode-addDrawable(s); osg::Texture2D* texture = new osg::Texture2D; texture-setDataVariance(osg::Object::DYNAMIC); // protect from being optimized away as static state. osg::Image* img = osgDB::readImageFile(rfi.TGA); if(img) { texture-setImage(img); osg::StateSet* blendStateSet = new osg::StateSet(); osg::TexEnv* blendTexEnv = new osg::TexEnv; blendTexEnv-setMode(osg::TexEnv::DECAL); blendStateSet-setTextureAttributeAndModes(0,texture,osg::StateAttribute::ON); blendStateSet-setTextureAttribute(0,blendTexEnv); logoGeode-setStateSet(blendStateSet); } else std::coutno image; view-setSceneData(logoGeode); __ Tomlinson, Gordon ha scritto: Not enough information or detail in you post to allow people to really help you How are you applying the texture to the sphere ? How are you setting up you texture coordinates on the sphere ? Gordon __ Gordon Tomlinson Product Manager 3D Email : gtomlinson @ overwatch.textron.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 Miriam D'Elia Sent: Friday, October 31, 2008 7:45 AM To: OpenSceneGraph Users Subject: [osg-users] problem with image Hi to all in my application I am applying a texture (. bmp) to a sphere, I have no problems with the plugin, but I do not see the image. What can I do? Miriam ___ 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] multiple rotation with Quat
If I apply 2 quat on the same vector in the same line or in two instruction, the result is the same... so q = q1*q2 look the 2 rotation accumulation, depending of the order of course. thanks, Vincent. 2008/10/31 Paul Melis [EMAIL PROTECTED] Vincent Bourdier wrote: Hi I was not sure that the * operator would compute the quaternion that I'm looking for. I looked in the sources, but the code is very hard to understand for me. It probably does what you expect: compute a combined quaternion. Just try it with 2 rotations like 90 around X and 90 around Y and transform a single vec3 to check Paul If you are sure, I will do it of course. thanks Vincent. 2008/10/31 Paul Melis [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Vincent Bourdier wrote: Hi, This a math problem, depending on OSG. I need to apply 2 rotation to a vector. I would be very simple if I can cumulate the 2 quat in one. How to do it ? Do Osg implement a method to combine two rotations ? Can't you simply multiply them? I.e osg::Quat q1, q2, qf; // set q1 and q2 qf = q1 * q2; Paul thanks. Regards, Vincent. ___ osg-users mailing list osg-users@lists.openscenegraph.org mailto:osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org mailto:osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ 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] Browser integration
Hi, I have written an example before, which results in a very simple OCX file that displays local/http models and images. The website below is in Chinese but maybe you would like to look into some code. :) http://www.osgchina.org/projects/osgChina/wiki/Support/3rd/OSGandIE.php Wang Rui 2008/10/31 Andreas Goebel [EMAIL PROTECTED] Hello, I would like to embed an osgviewer to standard-browsers (firefox, ie, safari). I already saw Luigi Caloris great work osg4web, but this aims at a much larger scale than what I need. I would just like to embed quite small osg-files to a 3d-gallery. As I saw that browser-integration is on the osg-roadmap, I just wanted to know if there is an easy way to achieve this. If not, I would like to ask if embedding a very simple osg-app into a webbrowser is very difficult. osg is embeded nicely into several toolkits, so my naive approach would be to change one of the toolkit-examples to a browser-plugin-framework. Are there huge pitfalls I am likely to stumble in? If not, I might try this in the next weeks. Regards, Andreas ___ 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] Computing bullet collision models from .3ds files
I'm developing a 3d engine that will eventually support exporting collision models from the lowest poly LOD node of a .3ds file for in-game development. The following functions can be used to load (or use existing data in memory) to define the collision box for a .3ds model. btTriangleMesh* trimesh = new btTriangleMesh(); for ( i=0;iNUM_VERTS_X-1;i++) { for (int j=0;jNUM_VERTS_Y-1;j++) { trimesh-addTriangle(gVertices[j*NUM_VERTS_X+i],gVertices[j*NUM_VERTS_X+i+1],gVertices[(j+1)*NUM_VERTS_X+i+1]); trimesh-addTriangle(gVertices[j*NUM_VERTS_X+i],gVertices[(j+1)*NUM_VERTS_X+i+1],gVertices[(j+1)*NUM_VERTS_X+i]); } } delete[] gVertices; bool useQuantizedBvhTree = true; btCollisionShape* trimeshShape = new btBvhTriangleMeshShape(trimesh,useQuantizedBvhTree); *OR * btTriangleIndexVertexArray* indexVertexArrays = new btTriangleIndexVertexArray(totalTriangles, gIndices, indexStride, totalVerts,(btScalar*) gVertices[0].x(),vertStride); bool useQuantizedAabbCompression = true; trimeshShape = new btBvhTriangleMeshShape(indexVertexArrays,useQuantizedAabbCompression); I've looked at a lot of the osg functions, and can't seem to find a function to export the raw triangle mesh. Do a set of functions exist in osg to handle this? If not, -where- should I make my modifications to support this exportation? Thanks in advance~ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Computing bullet collision models from .3ds files
I'm not really sure what you are asking. You can export any osg data using the .osg plugin. osgDB::writeNodeFile(*your_node_or_sub_graph,your_filename.osg) Then open the file (your_filename.osg) in any text editor and you'll see your mesh data as Primitives and VertexArrays in Geometrys. The primitives will be organized/represented based on how the geometry was created in osg. You can easily write a parser to grab the mesh data from the .osg file. Brian [EMAIL PROTECTED] wrote: - To: osg-users@lists.openscenegraph.org From: Dusten Sobotta [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] Date: 10/31/2008 09:49AM Subject: [osg-users] Computing bullet collision models from .3ds files I'm developing a 3d engine that will eventually support exporting collision models from the lowest poly LOD node of a .3ds file for in-game development. The following functions can be used to load (or use existing data in memory) to define the collision box for a .3ds model. btTriangleMesh* trimesh = new btTriangleMesh(); for ( i=0;iNUM_VERTS_X-1;i++) { for (int j=0;jNUM_VERTS_Y-1;j++) { trimesh-addTriangle(gVertices[j*NUM_VERTS_X+i],gVertices [j*NUM_VERTS_X+i+1],gVertices[(j+1)*NUM_VERTS_X+i+1]); trimesh-addTriangle(gVertices[j*NUM_VERTS_X+i],gVertices[(j +1)*NUM_VERTS_X+i+1],gVertices[(j+1)*NUM_VERTS_X+i]); } } delete[] gVertices; bool useQuantizedBvhTree = true; btCollisionShape* trimeshShape = new btBvhTriangleMeshShape (trimesh,useQuantizedBvhTree); OR btTriangleIndexVertexArray* indexVertexArrays = new btTriangleIndexVertexArray(totalTriangles, gIndices, indexStride, totalVerts,(btScalar*) gVertices[0].x(),vertStride); bool useQuantizedAabbCompression = true; trimeshShape = new btBvhTriangleMeshShape (indexVertexArrays,useQuantizedAabbCompression); I've looked at a lot of the osg functions, and can't seem to find a function to export the raw triangle mesh. Do a set of functions exist in osg to handle this? If not, -where- should I make my modifications to support this exportation? Thanks in advance~ ___ 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] Two pass shader help
Hi I have a problem with a two pass shader, moving from release 1.9.8 of OSG to 2.2 and later. The shader used to work properly, and now all I get are black pixels! I can see that the scene is actually there because I can pick the objects, even if they are totally black. The program is a two pass shader, that renders everything on a texture and then sets up a quad where the texture is mapped and a camera that looks at the quad. Here are the simple versions of the shaders: First pass vertex: varying vec2 FragmentPosition; void main(void) { gl_Position = ftransform(); FragmentPosition = gl_MultiTexCoord0.st; } First pass fragment: varying vec2 FragmentPosition; uniform float DistanceMultiplier; uniform float SelectedZone; uniform vec4 HighlightColor; uniform float HighlightWeight; vec4 ReadFromRT(vec2 position); float GetDistanceMultiplier(); void main(void) { vec4 originalColor = ReadFromRT(FragmentPosition); gl_FragColor = SelectedZone == 1.0 ? mix(originalColor, HighlightColor, originalColor[3] * HighlightWeight) : originalColor; } Second pass: uniform sampler2D InputTexture; vec4 ReadFromRT(vec2 position) { return texture2D(InputTexture, position); } varying vec2 FragmentPosition; void main(void) { gl_Position = ftransform(); FragmentPosition = gl_MultiTexCoord0.st; } vec4 ReadFromRT(vec2 position); varying vec2 FragmentPosition; void main(void) { gl_FragColor = ReadFromRT(FragmentPosition); } I haven't changed the shaders since then. Any idea? Thanks -- Tiziano Diamanti Ph.D. HPC and Visualization Cineca Italy Tel. +39-051-6171717 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] problem with image
Hi Gordon, 2 things 1: osg::Sphere is does not have texture coords so you would not see a texture anyway ( search the archives on Shapes and what they were designed for ) Sorry to enter a thread for this, but yes, osg::ShapeDrawables have texcoords. See src/osg/ShapeDrawable.cpp, DrawShapeVisitor::drawHalfSphere() for the case of an osg::Sphere : glNormal3f(-c*nRatioBase,-s*nRatioBase,-nzBase); glTexCoord2f(texCoord,vBase); glVertex3f(c*rBase,s*rBase,zBase+zOffset); etc. It's if you want to *change* the texcoords, or anything else, or do more sophisticated things like multitexturing that you'll have trouble with ShapeDrawables. I can't argue with the comment that ShapeDrawables are not that useful for general use, but for simple things, they're pretty complete (including texcoords). 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] Cull-Traversal Performance
Robert, interesting. Thank you for the detailed explanation. Looking at the osgforest shader-path, one challenge that I see is that if one needs to be able to pick the geometry, then the SG doesn't know about where it is in space to run an interesector. Any thoughts on a strategy to overcome this? I was thinking about hidden geometry, but the intersector wouldn't see it. cheers, sean On Fri, Oct 31, 2008 at 4:31 AM, Robert Osfield [EMAIL PROTECTED]wrote: Hi Sean, Welcome back :-) Transforms are relatively expensive, as the transforms need to be tracked as well as the view frustum needing to be transformed into the local coords below the transform for culling performance. You two subgraphs have 100 vs 10,000 transforms per frame, 100 won't take the cull traversal much at all, but 10,000 will. Second up having lots of separate osg::Geometry, even when a small number of shared many times, requires lots of work in cull in doing the actual cull test and more critically creating all the RenderLeaf back end data structure required to represent the Geometry instance with its final combination of modelview, projection and state. So as a general rule, keep the number of transforms down, by applying the transforms to the subgraphs and copying the geometry if required, and keep the the number of separate geometries down by combining smaller geometries into bigger groups. Since you culls do look rather high even with the small scene set up, while it's a bit of long shot, make sure that you do all your tests in release/optimized build. Another area you could look at at inspiration is the osgforest example - it provides a range of implementations of forests that you can step between, in the svn/trunk version of the OSG I've added in the StatsHandler to show the relative costs of cull/draw and GPU. You run the osgforest example with a command line option to set the number of trees for instance: osgforest --trees 1 This will give you an indication of the how each of the techniques might work in your instance. In particular the shader path would probably be most applicable. Other items you could look at is the use the multi-threaded use of osgViewer, as the DrawThreadPerContext would certainly help hide the cost of your long cull. Finally we have had some check-in's since OSG-2.6 include optimizations in Matrix that reduce the overhead associated with Transforms. So try out the SVN/trunk or 2.7.x developer releases. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Sean Spicer Executive Vice President Chief Technology Officer Aqumin (www.aqumin.com) Office+1.281.466.4848 Mobile...+1.713.447.2706 Fax...+1.281.466.4849 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] problem with image
Executing yours example I get this: itr='D:\Visual Studio Projects\RFI\RFI\Debug' FindFileInPath() : trying D:\Visual Studio Projects\RFI\RFI\Debug\osgplugins-2.6 .1\osgdb_tgad.dll ... FindFileInPath() : USING D:\Visual Studio Projects\RFI\RFI\Debug\osgplugins-2.6. 1\osgdb_tgad.dll Opened DynamicLibrary osgPlugins-2.6.1/osgdb_tgad.dll FindFileInPath(rfi.TGA): returning rfi.TGA couldn't load texture, quitting. close(1)019DFBE8 Doing discard of deleted OpenGL objects. decrementUsageCount()0 GraphicsContext::decrementContextIDUsageCount(0) to 0 close(0)019DFBE8 GraphicsContext::unregisterGraphicsContext 019DFBE8 CompositeViewer::~CompositeViewer() finished CompositeViewer::~CompsiteViewer() Destructing osgViewer::View Destructing osg::View Done destructing osg::View GraphicsContext::setWindowingSystemInterface() 104F3EBC Closing DynamicLibrary osgPlugins-2.6.1/osgdb_tgad.dll Tomlinson, Gordon ha scritto: 2 things 1: osg::Sphere is does not have texture coords so you would not see a texture anyway ( search the archives on Shapes and what they were designed for ) 2) is rfi.TGA in your path, turn the debug notification up see whats being said , place a break point in the TGA loader or step in to readImageFile? is you system case sensative ? Gordon __ Gordon Tomlinson Product Manager 3D Email : gtomlinson @ overwatch.textron.com __ (C): (+1) 571-265-2612 (W): (+1) 703-437-7651 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 Miriam D'Elia Sent: Friday, October 31, 2008 8:19 AM To: OpenSceneGraph Users Subject: Re: [osg-users] problem with image Sorry You're right! Explain better: when I run my application, the message is printed: no image. Thanks This is the code: _ osg::Geode* logoGeode= new osg::Geode(); osg::ShapeDrawable* s= new osg::ShapeDrawable(new osg::Sphere(osg::Vec3(0, 0, 0), 1.0)); logoGeode-addDrawable(s); osg::Texture2D* texture = new osg::Texture2D; texture-setDataVariance(osg::Object::DYNAMIC); // protect from being optimized away as static state. osg::Image* img = osgDB::readImageFile(rfi.TGA); if(img) { texture-setImage(img); osg::StateSet* blendStateSet = new osg::StateSet(); osg::TexEnv* blendTexEnv = new osg::TexEnv; blendTexEnv-setMode(osg::TexEnv::DECAL); blendStateSet-setTextureAttributeAndModes(0,texture,osg::StateAttribute ::ON); blendStateSet-setTextureAttribute(0,blendTexEnv); logoGeode-setStateSet(blendStateSet); } else std::coutno image; view-setSceneData(logoGeode); __ Tomlinson, Gordon ha scritto: Not enough information or detail in you post to allow people to really help you How are you applying the texture to the sphere ? How are you setting up you texture coordinates on the sphere ? Gordon __ Gordon Tomlinson Product Manager 3D Email : gtomlinson @ overwatch.textron.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 Miriam D'Elia Sent: Friday, October 31, 2008 7:45 AM To: OpenSceneGraph Users Subject: [osg-users] problem with image Hi to all in my application I am applying a texture (. bmp) to a sphere, I have no problems with the plugin, but I do not see the image. What can I do? Miriam ___ 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.or g ___ osg-users mailing list
Re: [osg-users] Cull-Traversal Performance
Hi Sean, On Fri, Oct 31, 2008 at 2:16 PM, Sean Spicer [EMAIL PROTECTED] wrote: Looking at the osgforest shader-path, one challenge that I see is that if one needs to be able to pick the geometry, then the SG doesn't know about where it is in space to run an interesector. Any thoughts on a strategy to overcome this? I was thinking about hidden geometry, but the intersector wouldn't see it. The where on earth is it paradox with vertex shaders.. Probably the easiest way to solve would be to manually create an osg::KdTree for where the geometry would be if it had been transformed and then attach this KdTree to the Drawable where the vertex shader is playing games. This would speed intersections as well as solve the where on earth is it. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Browser integration
Hello Wang Rui, if this is all code needed, it is quite simple. Very nice! Thank you for posting this. Unfortunately I do not understand enough to see if this would be useful for me. Maybe my interest motivates you to translate your wiki (at least this part of it) to english, I am sure other users could benefit from it as well. Regards, Andreas Wang Rui schrieb: Hi, I have written an example before, which results in a very simple OCX file that displays local/http models and images. The website below is in Chinese but maybe you would like to look into some code. :) http://www.osgchina.org/projects/osgChina/wiki/Support/3rd/OSGandIE.php Wang Rui 2008/10/31 Andreas Goebel [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Hello, I would like to embed an osgviewer to standard-browsers (firefox, ie, safari). I already saw Luigi Caloris great work osg4web, but this aims at a much larger scale than what I need. I would just like to embed quite small osg-files to a 3d-gallery. As I saw that browser-integration is on the osg-roadmap, I just wanted to know if there is an easy way to achieve this. If not, I would like to ask if embedding a very simple osg-app into a webbrowser is very difficult. osg is embeded nicely into several toolkits, so my naive approach would be to change one of the toolkit-examples to a browser-plugin-framework. Are there huge pitfalls I am likely to stumble in? If not, I might try this in the next weeks. Regards, Andreas ___ osg-users mailing list osg-users@lists.openscenegraph.org mailto:osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VNC client done in 3D
Hi Robert, It just great ! you can imagine a lot of cool stuff with that. supervising a lot of computer screen :) could be good for a network teacher very interesting Cheers, Cedric Robert Osfield wrote: Hi All, Elements of the Volume rendering project that is now underway are to do with doing multi-media/multi-application presentations in 3D, with volume rendering the central media of interest, but also bring in other media/applications is of interest. This this end one of the ideas we've come up with is putting a vnc window into a Present3D presentation, originally I had expected this to be rather a large task, but thankfully it's not been difficult at all thanks to to availability of LIbVNCServer that does all the hard work for us ;-) As a experiment I've written a very simple example, osgvnc, that has an osg::Image that serves as the buffer that the LibVNCServer client library fills in your us, this Image is just applied to a standard Texture2D and standard osg::Geometry. Added an event handler that manages the projection of mouse coords onto the geometry and then into the coords of the remote desktop, it then send the mouse events and keyboard events to the remote desktop. All this is done with just 268 lines of code. To test it out you'll need to run a standard vnc server (tight vnc is supported) on your remote machine - I'm just running two computers here on a local network and running osgvnc like: osgvnc 10.0.0.2 This brings up fullscreen 3d window with a quad with the remote desktop on it, moving the mouse on quad starts mouse on other remote desktop moving, and type into a window term I've run osgviewer cow.osg on the remote machine. Attached is the result, 3d in 2d in 3d! This little experiment doesn't solve the problem of getting a VNC window into Present3D, for this my thought is to create plugin that has code very similar to osgvnc embedded in it, and when you do a readImageFile() or readNodeFile() on a string like 10.0.0.2.vnc it'll create the scene graph that we can then use in any of apps, so one would be able to do: osgviewer 10.0.0.2.vnc And have it automatically create a usable subgraph for us. At least that's the theory. It might actually be worth creating an osgWidget class for managing such subgraphs - such as the input/output to it, it's early days right now so I'm open to suggestions. One of the fun possibilities to this vnc functionality would be to have 3D virtual environments that map to the real world, such as to have a virtual room with computers in it, and you could walk to a computer, switch it on and get a connection to the real machine and see its real desktop. Or perhaps a more practical one - the zooming and panning capabilities of a 3D surface are fluid, so perhaps it might make it possible to have a remote desktop client for people with impaired sight. Have fun! Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- +33 (0) 6 63 20 03 56 Cedric Pinson mailto:[EMAIL PROTECTED] http://www.plopbyte.net ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VNC client done in 3D
On Fri, 2008-10-31 at 14:33 +, Robert Osfield wrote: Hi All, Elements of the Volume rendering project that is now underway are to do with doing multi-media/multi-application presentations in 3D, with volume rendering the central media of interest, but also bring in other media/applications is of interest. This this end one of the ideas we've come up with is putting a vnc window into a Present3D presentation, originally I had expected this to be rather a large task, but thankfully it's not been difficult at all thanks to to availability of LIbVNCServer that does all the hard work for us ;-) As a experiment I've written a very simple example, osgvnc, that has an osg::Image that serves as the buffer that the LibVNCServer client library fills in your us, this Image is just applied to a standard Texture2D and standard osg::Geometry. Added an event handler that manages the projection of mouse coords onto the geometry and then into the coords of the remote desktop, it then send the mouse events and keyboard events to the remote desktop. All this is done with just 268 lines of code. To test it out you'll need to run a standard vnc server (tight vnc is supported) on your remote machine - I'm just running two computers here on a local network and running osgvnc like: osgvnc 10.0.0.2 Also works with Gnome's Vino remote desktop VNC client. :) Coudn't attach a screenshot (way too big), but here's a link: http://the-bob.org/~jlmoles/osgvnc.png This brings up fullscreen 3d window with a quad with the remote desktop on it, moving the mouse on quad starts mouse on other remote desktop moving, and type into a window term I've run osgviewer cow.osg on the remote machine. Attached is the result, 3d in 2d in 3d! This little experiment doesn't solve the problem of getting a VNC window into Present3D, for this my thought is to create plugin that has code very similar to osgvnc embedded in it, and when you do a readImageFile() or readNodeFile() on a string like 10.0.0.2.vnc it'll create the scene graph that we can then use in any of apps, so one would be able to do: osgviewer 10.0.0.2.vnc And have it automatically create a usable subgraph for us. At least that's the theory. It might actually be worth creating an osgWidget class for managing such subgraphs - such as the input/output to it, it's early days right now so I'm open to suggestions. One of the fun possibilities to this vnc functionality would be to have 3D virtual environments that map to the real world, such as to have a virtual room with computers in it, and you could walk to a computer, switch it on and get a connection to the real machine and see its real desktop. Or perhaps a more practical one - the zooming and panning capabilities of a 3D surface are fluid, so perhaps it might make it possible to have a remote desktop client for people with impaired sight. Have fun! Robert. ___ 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] Browser integration
Hi, I don't think it easy for me to translate the whole page into english in a short time. :) But I'm glad to share my project freely. I will send you a private mail later in order not to bother others. Wang Rui 2008/10/31 Andreas Goebel [EMAIL PROTECTED] Hello Wang Rui, if this is all code needed, it is quite simple. Very nice! Thank you for posting this. Unfortunately I do not understand enough to see if this would be useful for me. Maybe my interest motivates you to translate your wiki (at least this part of it) to english, I am sure other users could benefit from it as well. Regards, Andreas ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] MAX to COLLADA or which format ?
Hi Umit, Yes, I am employed on the VENUS project, how on earth do you know that? I, personally haven't worked with any flocking algorithms, it's a feature I haven't got round to adding yet. However, I did supervise an MSc student project on flocking using OSG. In order to simulate fish body motion he used an animated vertex shader to distort the model with a dampened sine wave (as you mentioned). With a bit of tinkering this should provide nice results with minimal effort. However, if you want more accurate movement I think it would have to be modelled, but then of course you have the problem of loading the animation into the OSG.. Hope that's of use. Kim. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ümit Uzun Sent: 31 October 2008 12:02 To: OpenSceneGraph Users Subject: Re: [osg-users] MAX to COLLADA or which format ? Hi Kim, Thanks so much for reply. I remember, you have worked on VENUS project. In this project how can you achieve fish motion modeling? Do you use only shaders to give special motion mathematics on each skeletal model or do you use sophisticated tools? I mean, I want to model school of fish by using Reynold's Flocking Algorithms and fish motions. At this point Do I have to model each fish motion by using shaders (for example sinusoaidal travelling wave to modeling fish waving) ? Or there is another way to to it except osganimation toolkit? Thanks for advices. Best Regards. Umit Uzun 2008/10/31 Kim C Bale [EMAIL PROTECTED] In my experience the feelingsoftware collada exporter gives the most reliable results when exporting models from Max. However, as far as I know there is no way of getting any animation information out of max and into the OSG. I've noticed that the animation toolkit (osgATK/osgAnimation I forget the name), mentioned recently in the forum had a Blender importer/exporter that does support animation. Perhaps that is worth taking a look at. Hope that is of help. Kim. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ümit Uzun Sent: 31 October 2008 10:06 To: OpenSceneGraph Users Subject: [osg-users] MAX to COLLADA or which format ? Hi Folks, I follows mail list and I know there was a discussion about converting animated MAX format to any format which osg can understand. I searched the all archive and want to ask same question again around the different content. As I said, I have animated MAX format models and want to export another format in animation too. But after searching, I understand that I only can do this conversion in COLLADA format. Is it right ? And if right how should I achive? I found colladamax exporter http://www.feelingsoftware.com/content/view/65/79/lang,en/ There is anyone who used this exporter? I am asking because of leading me to right way. And Does using COLLADA formatted animated model useful or not on simulation project? I have never use collada format before, so I don't know anything about the efficiency. Any advices would be appreciated with glad. Best Regards. Umit Uzun * To view the terms under which this email is distributed, please go to http://www.hull.ac.uk/legal/email_disclaimer.html * ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org * To view the terms under which this email is distributed, please go to http://www.hull.ac.uk/legal/email_disclaimer.html *___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Cull-Traversal Performance
Thanks. Is there a primmer on osg::KdTree anywhere? sean On Fri, Oct 31, 2008 at 9:37 AM, Robert Osfield [EMAIL PROTECTED]wrote: Hi Sean, On Fri, Oct 31, 2008 at 2:16 PM, Sean Spicer [EMAIL PROTECTED] wrote: Looking at the osgforest shader-path, one challenge that I see is that if one needs to be able to pick the geometry, then the SG doesn't know about where it is in space to run an interesector. Any thoughts on a strategy to overcome this? I was thinking about hidden geometry, but the intersector wouldn't see it. The where on earth is it paradox with vertex shaders.. Probably the easiest way to solve would be to manually create an osg::KdTree for where the geometry would be if it had been transformed and then attach this KdTree to the Drawable where the vertex shader is playing games. This would speed intersections as well as solve the where on earth is it. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Sean Spicer Executive Vice President Chief Technology Officer Aqumin (www.aqumin.com) Office+1.281.466.4848 Mobile...+1.713.447.2706 Fax...+1.281.466.4849 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] MAX to COLLADA or which format ?
Hi Kim, 2008/10/31 Kim C Bale [EMAIL PROTECTED] Hi Umit, Yes, I am employed on the VENUS project, how on earth do you know that? I have searched on internet and so know VENUS project and your MSc student Franclin Foping and another student Philip Apery who worked same project before. I have read these student thesis and implement in my animation. (caustics, fish motion, aquatic floara, silt on sea bed, water refraction and so on...) Now I only want to much realistic fish motion as I said. So I learned that I should try different tools like animetk or just like it. I want to ask another question about god-rays. Did you implement god-rays to VENUS? I want to create god-rays in my simulation, so is there any advices and searh path you can give me? Thanks for all advices Kim. Best Regards. Umit Uzun I, personally haven't worked with any flocking algorithms, it's a feature I haven't got round to adding yet. However, I did supervise an MSc student project on flocking using OSG. In order to simulate fish body motion he used an animated vertex shader to distort the model with a dampened sine wave (as you mentioned). With a bit of tinkering this should provide nice results with minimal effort. However, if you want more accurate movement I think it would have to be modelled, but then of course you have the problem of loading the animation into the OSG.. Hope that's of use. Kim. *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Ümit Uzun *Sent:* 31 October 2008 12:02 *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] MAX to COLLADA or which format ? Hi Kim, Thanks so much for reply. I remember, you have worked on VENUS project. In this project how can you achieve fish motion modeling? Do you use only shaders to give special motion mathematics on each skeletal model or do you use sophisticated tools? I mean, I want to model school of fish by using Reynold's Flocking Algorithms and fish motions. At this point Do I have to model each fish motion by using shaders (for example sinusoaidal travelling wave to modeling fish waving) ? Or there is another way to to it except osganimation toolkit? Thanks for advices. Best Regards. Umit Uzun 2008/10/31 Kim C Bale [EMAIL PROTECTED] In my experience the feelingsoftware collada exporter gives the most reliable results when exporting models from Max. However, as far as I know there is no way of getting any animation information out of max and into the OSG. I've noticed that the animation toolkit (osgATK/osgAnimation I forget the name), mentioned recently in the forum had a Blender importer/exporter that does support animation. Perhaps that is worth taking a look at. Hope that is of help. Kim. *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Ümit Uzun *Sent:* 31 October 2008 10:06 *To:* OpenSceneGraph Users *Subject:* [osg-users] MAX to COLLADA or which format ? Hi Folks, I follows mail list and I know there was a discussion about converting animated MAX format to any format which osg can understand. I searched the all archive and want to ask same question again around the different content. As I said, I have animated MAX format models and want to export another format in animation too. But after searching, I understand that I only can do this conversion in COLLADA format. Is it right ? And if right how should I achive? I found colladamax exporter http://www.feelingsoftware.com/content/view/65/79/lang,en/ There is anyone who used this exporter? I am asking because of leading me to right way. And Does using COLLADA formatted animated model useful or not on simulation project? I have never use collada format before, so I don't know anything about the efficiency. Any advices would be appreciated with glad. Best Regards. Umit Uzun * To view the terms under which this email is distributed, please go to http://www.hull.ac.uk/legal/email_disclaimer.html * ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org * To view the terms under which this email is distributed, please go to http://www.hull.ac.uk/legal/email_disclaimer.html * ___ 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
Re: [osg-users] Cull-Traversal Performance
On Fri, Oct 31, 2008 at 3:28 PM, Sean Spicer [EMAIL PROTECTED] wrote: Thanks. Is there a primmer on osg::KdTree anywhere? I'm afraid the source code and mailing lists discussions is all have right now. The KdTree data structure is actually quite simple, as is the algorithm that build/intersects so I expect you'll be able to review the source code and work out what's going on ;-) Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VNC client done in 3D
Hi Cedric, On Fri, Oct 31, 2008 at 3:04 PM, Cedric Pinson [EMAIL PROTECTED] wrote: It just great ! you can imagine a lot of cool stuff with that. supervising a lot of computer screen :) could be good for a network teacher I haven't tried creating more than one client yet, whether it's possible will depend upon LibVNCServer. To try it I'll need to refactor the code in osgvnc so that it's more encapsulated, once this is done it'll be easier to create multiple image's that are pair with a vnc client. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] problem with image
Miriam, Just on the off chance that your problem is really simple: in my application I am applying a texture (. bmp) to a sphere, and osg::Image* img = osgDB::readImageFile(rfi.TGA You say your applying a .bmp, but you're trying to load a .tga. Could that be it? David ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Computing bullet collision models from .3ds files
Hi Dusten -- The short answer (probably) is that you should look at osg::TriangleFunctor. The longer answer: I'm currently developing an open source library containing utilities for integrating OSG with Bullet. Here is the code I use to create triangle meshes. The code for ComputeTriMeshVisitor is attached. btTriangleMeshShape* osgBullet::btTriMeshCollisionShapeFromOSG( osg::Node* node ) { ComputeTriMeshVisitor visitor; node-accept( visitor ); osg::Vec3Array* vertices = visitor.getTriMesh(); if( vertices-size() 3 ) { osg::notify( osg::WARN ) osgBullet::btTriMeshCollisionShapeFromOSG, no triangles found std::endl; return( NULL ); } btTriangleMesh* mesh = new btTriangleMesh; for( size_t i = 0; i + 3 vertices-size(); i += 3 ) { osg::Vec3 p1 = ( *vertices )[ i ]; osg::Vec3 p2 = ( *vertices )[ i + 1 ]; osg::Vec3 p3 = ( *vertices )[ i + 2 ]; mesh-addTriangle( btVector3( p1.x(), p1.y(), p1.z() ), btVector3( p2.x(), p2.y(), p2.z() ), btVector3( p3.x(), p3.y(), p3.z() ) ); } btBvhTriangleMeshShape* meshShape = new btBvhTriangleMeshShape( mesh, true ); return( meshShape ); } I hope this is helpful. I'll post more info here when I make this code publically available. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 /* * * Copyright (c) 2008 Blue Newt Software LLC and Skew Matrix Software LLC. * All rights reserved. * */ #ifndef OSGBULLET_COMPUTETRIMESHVISITOR #define OSGBULLET_COMPUTETRIMESHVISITOR1 #include osg/Array #include osg/NodeVisitor namespace osgBullet { /* TBD Consider using OSG localtoworld method instead of keeping a matrix stack. */ class ComputeTriMeshVisitor : public osg::NodeVisitor { public: ComputeTriMeshVisitor( osg::NodeVisitor::TraversalMode traversalMode = TRAVERSE_ALL_CHILDREN ); virtual void reset(); osg::Vec3Array * getTriMesh() { return( mesh.get() ); } void apply( osg::Node node ); void apply( osg::Transform transform ); void apply( osg::Geode geode ); inline void pushMatrix( osg::Matrix matrix ) { stack.push_back( matrix ); } inline void popMatrix() { stack.pop_back(); } void applyDrawable( osg::Drawable * drawable ); protected: typedef std::vector osg::MatrixMatrixStack; MatrixStack stack; osg::ref_ptr osg::Vec3Array mesh; }; } #endif /* * * Copyright (c) 2008 Blue Newt Software LLC and Skew Matrix Software LLC. * All rights reserved. * */ #include osg/Transform #include osg/Drawable #include osg/Geode #include osg/PrimitiveSet #include osg/TriangleFunctor #include osgBullet/ComputeTriMeshVisitor.h #include iostream using namespace osgBullet; using namespace osg; struct ComputeTriMeshFunc { ComputeTriMeshFunc() { vertices = new osg::Vec3Array; vertices-clear(); } void inline operator()( const osg::Vec3 v1, const osg::Vec3 v2, const osg::Vec3 v3, bool _temp ) { vertices-push_back( v1 ); vertices-push_back( v2 ); vertices-push_back( v3 ); } osg::ref_ptr osg::Vec3Array vertices; }; ComputeTriMeshVisitor::ComputeTriMeshVisitor( osg::NodeVisitor::TraversalMode traversalMode ) : osg::NodeVisitor( traversalMode ) { stack.push_back( osg::Matrix::identity() ); mesh = new osg::Vec3Array; } void ComputeTriMeshVisitor::reset() { stack.clear(); stack.push_back( osg::Matrix::identity() ); mesh-clear(); } void ComputeTriMeshVisitor::apply( osg::Node node ) { traverse( node ); } void ComputeTriMeshVisitor::apply( osg::Transform transform ) { osg::Matrix matrix; matrix = stack.back(); transform.computeLocalToWorldMatrix( matrix, this ); pushMatrix( matrix ); traverse( transform ); popMatrix(); } void ComputeTriMeshVisitor::apply( osg::Geode geode ) { for( unsigned int i = 0; i geode.getNumDrawables(); ++i ) { applyDrawable( geode.getDrawable( i ) ); } } void ComputeTriMeshVisitor::applyDrawable( osg::Drawable * drawable ) { osg::TriangleFunctor ComputeTriMeshFunc functor; drawable-accept( functor ); for( osg::Vec3Array::iterator iter = functor.vertices-begin(); iter != functor.vertices-end(); ++iter ) { osg::Matrix matrix = stack.back(); mesh-push_back( *iter * matrix ); } } ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Debugging using Visual Studio
Hi, Until the present date, I've been using cout's to debug my application, which is really annoying, for I didn't know how to configure Visual Studio to be able to debug running a OSG application. At one time I've read how to do it, but I lost that source... Can anyone teach me how? Thanks. Renan M Z Mendes ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgManipulator::Dragger and osg::AutoTransform
Hi all, Replying to myself again. So no one has any ideas about this? I guess I'll go with my hunch and see where it goes. I found a solution to my problem. For reference, what I did is that since my dragger is a composite dragger, I made it so that the structure was CompositeDragger - AutoTransform - MatrixTransform - Child draggers instead of AutoTransform - MatrixTransform - CompositeDragger - Child draggers (left - right = parent - child) And then my dragger subclass itself has an interface to set the screen size it needs to have. Works great. And much simpler than overriding the handle() method to do the resizing myself. 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] Browser integration
Quoting Wang Rui [EMAIL PROTECTED]: Hi Wang, I'm interested too ([EMAIL PROTECTED]) Thank you in advance. Mario Mango Furnari Hi, I don't think it easy for me to translate the whole page into english in a short time. :) But I'm glad to share my project freely. I will send you a private mail later in order not to bother others. Wang Rui 2008/10/31 Andreas Goebel [EMAIL PROTECTED] Hello Wang Rui, if this is all code needed, it is quite simple. Very nice! Thank you for posting this. Unfortunately I do not understand enough to see if this would be useful for me. Maybe my interest motivates you to translate your wiki (at least this part of it) to english, I am sure other users could benefit from it as well. Regards, Andreas --- Istituto di Cibernetica E. Caianiello Comprensorio A. Olivetti Ed. 70 Via Campi Flegrei, 34 I-80078 - Pozzuoli (Italy) Tel:+39.081.867.5154 Fax:+39.081.867.5109 Mobile: +39.335.539.8250 - This mail sent through IMP: http://horde.org/imp/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Browser integration
me three! On Fri, Oct 31, 2008 at 12:43 PM, Mario Mango Furnari [EMAIL PROTECTED] wrote: Quoting Wang Rui [EMAIL PROTECTED]: Hi Wang, I'm interested too ([EMAIL PROTECTED]) Thank you in advance. Mario Mango Furnari Hi, I don't think it easy for me to translate the whole page into english in a short time. :) But I'm glad to share my project freely. I will send you a private mail later in order not to bother others. Wang Rui 2008/10/31 Andreas Goebel [EMAIL PROTECTED] Hello Wang Rui, if this is all code needed, it is quite simple. Very nice! Thank you for posting this. Unfortunately I do not understand enough to see if this would be useful for me. Maybe my interest motivates you to translate your wiki (at least this part of it) to english, I am sure other users could benefit from it as well. Regards, Andreas --- Istituto di Cibernetica E. Caianiello Comprensorio A. Olivetti Ed. 70 Via Campi Flegrei, 34 I-80078 - Pozzuoli (Italy) Tel:+39.081.867.5154 Fax:+39.081.867.5109 Mobile: +39.335.539.8250 - This mail sent through IMP: http://horde.org/imp/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- AsymptopiaSoftware|[EMAIL PROTECTED] http://www.asymptopia.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Browser integration
me four!!! [EMAIL PROTECTED] sajjad On Fri, Oct 31, 2008 at 8:32 PM, Charles Cossé [EMAIL PROTECTED] wrote: me three! On Fri, Oct 31, 2008 at 12:43 PM, Mario Mango Furnari [EMAIL PROTECTED] wrote: Quoting Wang Rui [EMAIL PROTECTED]: Hi Wang, I'm interested too ([EMAIL PROTECTED]) Thank you in advance. Mario Mango Furnari Hi, I don't think it easy for me to translate the whole page into english in a short time. :) But I'm glad to share my project freely. I will send you a private mail later in order not to bother others. Wang Rui 2008/10/31 Andreas Goebel [EMAIL PROTECTED] Hello Wang Rui, if this is all code needed, it is quite simple. Very nice! Thank you for posting this. Unfortunately I do not understand enough to see if this would be useful for me. Maybe my interest motivates you to translate your wiki (at least this part of it) to english, I am sure other users could benefit from it as well. Regards, Andreas --- Istituto di Cibernetica E. Caianiello Comprensorio A. Olivetti Ed. 70 Via Campi Flegrei, 34 I-80078 - Pozzuoli (Italy) Tel:+39.081.867.5154 Fax:+39.081.867.5109 Mobile: +39.335.539.8250 - This mail sent through IMP: http://horde.org/imp/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- AsymptopiaSoftware|[EMAIL PROTECTED] http://www.asymptopia.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] Browser integration
And five, Isnt it a good idea to just to mail to osg-users? Erik _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ami guru Sent: Friday, October 31, 2008 21:02 To: OpenSceneGraph Users Subject: Re: [osg-users] Browser integration me four!!! [EMAIL PROTECTED] sajjad On Fri, Oct 31, 2008 at 8:32 PM, Charles Cossé [EMAIL PROTECTED] wrote: me three! On Fri, Oct 31, 2008 at 12:43 PM, Mario Mango Furnari [EMAIL PROTECTED] wrote: Quoting Wang Rui [EMAIL PROTECTED]: Hi Wang, I'm interested too ([EMAIL PROTECTED]) Thank you in advance. Mario Mango Furnari Hi, I don't think it easy for me to translate the whole page into english in a short time. :) But I'm glad to share my project freely. I will send you a private mail later in order not to bother others. Wang Rui 2008/10/31 Andreas Goebel [EMAIL PROTECTED] Hello Wang Rui, if this is all code needed, it is quite simple. Very nice! Thank you for posting this. Unfortunately I do not understand enough to see if this would be useful for me. Maybe my interest motivates you to translate your wiki (at least this part of it) to english, I am sure other users could benefit from it as well. Regards, Andreas --- Istituto di Cibernetica E. Caianiello Comprensorio A. Olivetti Ed. 70 Via Campi Flegrei, 34 I-80078 - Pozzuoli (Italy) Tel:+39.081.867.5154 Fax:+39.081.867.5109 Mobile: +39.335.539.8250 - This mail sent through IMP: http://horde.org/imp/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- AsymptopiaSoftware|[EMAIL PROTECTED] http://www.asymptopia.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] Debugging using Visual Studio
Hi Renan, You've said that: If you want to debug into OSG itself, you'll need to have compiled OSG with debug symbols too (i.e. in Debug configuration), and link to that. I didn't understand this... What does it mean to debug into OSG itself? If you want to trace into an OSG function, say osg::Group::addChild(), and inspect what it's doing. Another remark: You can debug your application without doing anything specific. Just compile it with debug symbols and you'll be able to set breakpoints, watch variables etc. In general, if you select the Debug configuration (in the box at the top-center of the Visual Studio window) you'll have debug symbols. Do a web search for details. I am doing what you're saying, but some unhandled exceptions, apparently regarding OpenGL, appear when I put a breakpoint and run as debug that weren't there when I simply executed the .exe file... I don't know what that can be about. That's why I thought there was more to debugging than just hitting the play button and entering the breakpoints... Are you linking to debug OSG libraries? If you just download the OSG binary package for Windows, it only contains release libraries. Linking those to a debug executable is a big no-no. So you need to compile OSG yourself in both release and debug, and then make sure your own project links to the OSG debug libraries when compiled in debug mode, and to the release libraries when compiled in release mode. By default, the debug OSG libs have a 'd' suffix, so osg.lib for release becomes osgd.lib for debug. Make extra sure you link to the right ones. If you get more crashes when doing that, you'll need to be more specific and provide for example a stack trace for us to help you find out what's going on. 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] animtk release 0.0.9
Yes i guess i would need to add export in order it compiles on windows. Hum... I'm interested in using animTK in a cross-platform way... I tried to CMake-it under Windows but it can't find pkg-config (of course). I guess the CMake script has to be changed, but I'm new to CMake and I can't. I will try to bybass that problem. If I get something compiled under Windows, I'll let you know. But if anyone did it before, please tell me! Sukender ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Browser integration
Hi, ok... It is a RAR file with a VS8 project inside. i'm not sure if the project could run immediately on your computer, but the code is proved to be usable. BTW, I remember there is a publc account of the OSG website. But I lost the user name and password. Could anybody tell me again, plz? I would try to upload the simple osgviewerIE example and another osgviewerVBasic example to http://www.openscenegraph.org/projects/osg/wiki/Community/WindowingToolkits Regards, Wang Rui 2008/11/1 Erik den Dekker [EMAIL PROTECTED] And five,… Isn't it a good idea to just to mail to osg-users? Erik -- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *ami guru *Sent:* Friday, October 31, 2008 21:02 *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] Browser integration me four!!! [EMAIL PROTECTED] sajjad On Fri, Oct 31, 2008 at 8:32 PM, Charles Cossé [EMAIL PROTECTED] wrote: me three! On Fri, Oct 31, 2008 at 12:43 PM, Mario Mango Furnari [EMAIL PROTECTED] wrote: Quoting Wang Rui [EMAIL PROTECTED]: Hi Wang, I'm interested too ([EMAIL PROTECTED]) Thank you in advance. Mario Mango Furnari Hi, I don't think it easy for me to translate the whole page into english in a short time. :) But I'm glad to share my project freely. I will send you a private mail later in order not to bother others. Wang Rui 2008/10/31 Andreas Goebel [EMAIL PROTECTED] Hello Wang Rui, if this is all code needed, it is quite simple. Very nice! Thank you for posting this. Unfortunately I do not understand enough to see if this would be useful for me. Maybe my interest motivates you to translate your wiki (at least this part of it) to english, I am sure other users could benefit from it as well. Regards, Andreas --- Istituto di Cibernetica E. Caianiello Comprensorio A. Olivetti Ed. 70 Via Campi Flegrei, 34 I-80078 - Pozzuoli (Italy) Tel:+39.081.867.5154 Fax:+39.081.867.5109 Mobile: +39.335.539.8250 - This mail sent through IMP: http://horde.org/imp/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- AsymptopiaSoftware|[EMAIL PROTECTED] http://www.asymptopia.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 osgActiveX.rar Description: Binary data ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Disable self shadows (ShadowMap)
Consider this scene: - Terrain and some buildings: osg::Group sceneNode - Several cars: osg::Group carNode Both are children of a ShadowedScene. I'm using ShadowMap as a technique. I want that the buildings cast shadows on the terrain/road (that is working fine), and that the cars cast shadows on the terrain, BUT not on themselves (disable self shadows for the car node). Is that possible? - Jefferson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Untextured materials = pure black
Every material that has no texture associated becomes completely black when I do one of the following: - change the shadow technique from ShadowMap to SoftShadowMap - add any of the GLSL bloom shader I found on the net ( http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=27976postdays=0postorder=ascstart=0or http://www.gamedev.net/community/forums/topic.asp?topic_id=395186) Any idea why this is happening? Details: I have a single light, declared thusly: osg::Vec3 lightPosition(4,4,8); // my prog's scale is big osg::LightSource* ls = new osg::LightSource; ls-getLight()-setPosition(osg::Vec4(lightPosition,1)); ls-getLight()-setAmbient(osg::Vec4(0.5,0.5,0.5,1.0)); ls-getLight()-setDiffuse(osg::Vec4(0.9,0.9,0.9,1.0)); shadowedScene-addChild(ls); I'm posting direct links to the shaders, case you're lazy to open those ones :) http://magiadosdoces.com/temp/PP_GL_Bloom1.fx http://magiadosdoces.com/temp/PP_GL_Bloom2.fx http://magiadosdoces.com/temp/PP_GL_Bloom3.fx http://magiadosdoces.com/temp/PP_GL_Bloom4.fx http://magiadosdoces.com/temp/shader.frag And this is how I'm loading the shaders: osg::ref_ptrosg::StateSet stateSet(root-getOrCreateStateSet()); osg::Program* program = new osg::Program; osg::Shader* frag = new osg::Shader( osg::Shader::FRAGMENT ); frag-loadShaderSourceFromFile(Shaders/shader.frag); program-addShader(frag); stateSet.get()-setAttributeAndModes(program, osg::StateAttribute::ON); I'm using OSG 2.6, Windows Vista 64, Geforce 8800M GTS. Oh and by the way, the bloom shader effect doesn't works even on the textured surfaces. They simply remain the same. Image: http://magiadosdoces.com/temp/car.jpg Thanks, Jefferson ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Computing bullet collision models from .3ds files
Hi Paul, hi Dusten, On 1/11/08 5:44 AM, Dusten Sobotta wrote: Thanks a lot; this has been incredibly useful. What is the eta for the first release of your library? I've also solved a few problems with integrating osg + bullet, and might be able to contribute a few things if you're up to it. On Fri, Oct 31, 2008 at 12:20 PM, Paul Martz [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: ... I'm currently developing an open source library containing utilities for integrating OSG with Bullet. Here is the code I use to create triangle meshes. The code for ComputeTriMeshVisitor is attached. I'd also be interested in helping out with a proper osg/Bullet integration, having done a half-hearted (it did what I needed) attempt two years ago. Cheers, /ulrich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Reversed Normal in Smoothing Visitor on TRIANGLE_STRIP
Hi All, OSG 2.7.4 - I'm seeing a reversed normal when running osgUtil::SmoothingVisitor on a drawable containing only tri-strips. Not sure if it is the first or last vertex, but I've repeated it with several different examples. Has anyone else seen this? sean -- Sean Spicer Executive Vice President Chief Technology Officer Aqumin (www.aqumin.com) Office+1.281.466.4848 Mobile...+1.713.447.2706 Fax...+1.281.466.4849 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org