Re: [osg-users] [3rdparty] Distributed rendering (was: RE: Cloud node kit)
Selam Muhammed; This http://www.ub.uit.no/munin/bitstream/handle/10037/1065/thesis.pdf;jsessionid=C0E24ED29579BADBBA942B95B8C93B1D?sequence=1master thesis may help you to solve your problem about how OpenSceneGraph supports distributed rendering. Regards. Ümit Uzun 2011/4/10 Muhammed Kalkan kalkanik...@gmail.com Hi, Sorry if subject changed in previous topic. In my humble knowledge of distributed rendering, i think scene graph must have some kind of mechanism to sync frames to be rendered in each cluster (rendering machine). As your post states , a socket communication can transmit the sync messages. However what i wanted to know is how we build the structure for OSG to make sense of it. In short how and which part of OSG do we pass these sync messages to obtain distributed rendering. Thank you! Cheers, Muhammed -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38370#38370 ___ 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] Select node on screen
Selam Tufan, Look at the herehttp://umituzun84.blogspot.com/2009/12/osgart-project.htmland download sourcecode which is related to Picking by Intersection on model by mouse clicks. HTH. Saygilar. Ümit Uzun 2010/7/15 Trajce (Nick) Nikolov nikolov.tra...@gmail.com Have a look at the osgpick example -Nick On Thu, Jul 15, 2010 at 4:53 PM, Tufan Taş tas.tu...@gmail.com wrote: Hi, I have nodes on screen and I want to select a node by clicking on it using mouse. Do you know any samples about this subject? ... Thank you! Cheers, Tufan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=30027#30027 ___ 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] SetImage problem
Selam Osman, Did you try void osg::Image::setOrigin ( Originhttp://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00305.html#3eb3fb7f290c3b5ef6122b76d5fe6c69 *origin* ) [inline]function before convert TopLeft image to BottomLeft? May be you won't need any flipping operation before setImage funtion. And another hint, are you sure your captured image's depth is IPL_DEPTH_8U from OpenCV. You have set GL_UNSIGNED_BYTE to image type but may be your type could be IPL_DEPTH_16U or IPL_DEPTH_32U. Hope this helps. Regards. Ümit Uzun 2010/5/29 Osman Hancer enderenderenderen...@hotmail.com Hi, I want to convert an OpenCV IplImage to an OSG image. For this, I first fliped image from top-left to bottom-left by cvConvertImage(cvImg , cvImg, CV_CVTIMG_FLIP); then converted BGR to RGB color format by cvCvtColor( cvImg, cvImg, CV_BGR2RGB ); then I used setImage to do the actual conversion. osgImg-setImage(cvImg-width,cvImg-height, 3, GL_RGB, GL_RGB, GL_UNSIGNED_BYTE,(BYTE*)(cvImg-imageData),osg::Image::AllocationMode::NO_DELETE ,1); The result is not what I expected. First of all, the result is in Greyscale and image seems to shifted a little bit. You can see the results form the attached picture. Do you have any idea about the problem? Thank you! Cheers, osman -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=28335#28335 Attachments: http://forum.openscenegraph.org//files/_700.jpg ___ 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] Telemetry Data (Motion Data) supported Free Game?
Hi Frederic, I know FlightGear and relation with OSG but haven't used before to get motion data from. I mean Microsoft flight Simulation X to get motion information and send to my 3D model as you can see from MotionModel3Dhttp://umituzun84.blogspot.com/2009/06/gyrolab-4000-3d-motion-model-on-labview.html . Regards. Ümit Uzun 2010/5/26 Frederic Bouvier fredlis...@free.fr Hi Ümit, - Ümit Uzuna écrit : Hi All, Thanks for your all replies. Brede, I will look all suggested games ASAP. may be it helps me for a while before we grow our project. Jan, I mean motion information data(pitch, roll, yaw, planetary accelaration, velocity and etc). I need a game which has an interface or partial plugin to interrogate the game's motion informations like Microsoft Flight Simulations. I can interrogate FS by FSUIPC framework then I can send these motion data to my any device(for example motion platform or Separate 3D Models). Did you consider FlightGear ? It can output any kind of data, has a scripting language and a bunch of customizable protocols. And it is built over OSG. -Fred ___ 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] Telemetry Data (Motion Data) supported Free Game?
Hi All, I need a game which is OpenSource or free and it supports users with Telemetry Data (Motion Data) like http://www.thunderisland.com/index.phpbefore we write our own game with motion data support interface. Is there anyone who know like this game. That's not important game's immersiveness or quality, I need only simple game which support me by accurate telemetry data. Thanks in advance. Regards. Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Underwater OSG Video
You can use some tunnel sites or you can only chance your dns (for example 4.2.2.2 or 4.2.2.1):D It works for me in Turkey. Ümit Uzun 2010/2/18 Trajce (Nick) Nikolov nikolov.tra...@gmail.com Hi Kim, I managed to see the video (thanks to some net tools) ... Looks awesome ! -Nick On Thu, Feb 18, 2010 at 3:43 PM, Trajce (Nick) Nikolov nikolov.tra...@gmail.com wrote: great .. Thanks ! -Nick On Thu, Feb 18, 2010 at 3:41 PM, Kim Bale kcb...@googlemail.com wrote: Really?! Blimey, well i'll send you a dropsend link when I get home.. Fight the power! ;) Kim. On 18 February 2010 13:39, Trajce (Nick) Nikolov nikolov.tra...@gmail.com wrote: Hi Kim, I would really like to see the video. However, youtube is forbidden in Turkey :( -Nick On Thu, Feb 18, 2010 at 3:25 PM, Kim Bale kcb...@googlemail.com wrote: Hello all, I was going through some old work stuff last night and came across this video of some work I did with OSG a little while ago. I was planning on putting it on the osgOcean website since it shows an old version of osgOcean being used in a practical context, but I thought I'd also post it here since it's always interesting to see what people are using OSG for. This was part of a research project aimed at digitally preserving underwater archaeological sites. The majority of the work was involved in sending ROVs down to gather acoustic and photogrammetric data from the sites and then reconstructing accurate 3D replicas of the ship wrecks and their cargo from it. However, in order to make this data accessible for the general public we created this dive simulator that allowed them to explore these 3d datasets in a realistic setting. You'll have to forgive the poor quality, that's youtube for you. http://www.youtube.com/watch?v=JjG-TSu1KJAfeature=player_embedded# Tata, Kim. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Follow an object
Hi Tufan, You can use NodeTracker Manipulator, so you can track your origin node by your camera and manipulate your camera's rotation and oriantation due to your tracked node too. Regards. Ümit Uzun 2010/2/10 Vincent Bourdier vincent.bourd...@gmail.com In osgHud example, some text is rendered front to the camera, whatever the camera position/orientation is. You can replace the text using 3D geometries and keeping the same behavior. If this is not what you are looking, give us more explanations... Vincent. Tufan Taş a écrit : Hi, I add geometries on the screen but when I use the manipulator to translate the scene I want that object to translate also. Like a a cockpit that ground and sky moves when rotate but the cockpit image stays on the scene. Thank you! Cheers, Tufan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=23905#23905 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org __ Information from ESET NOD32 Antivirus, version of virus signature database 4852 (20100209) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ 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] osgQtBrowser error while compiling.
Hi All, When I compile last revision on svn I get c:\qt\4.6.0\include\qtwebkit\../../src/3rdparty/webkit/WebCore/../WebKit/qt/Api/qwebelement.h(23) : fatal error C1083: Cannot open include file: 'QString': No such file or directory error because of qwebelement.h class has #include QString and also osgQtBrowser has only C:\Qt\4.6.0\include path in Additional Include directories field. So there should be C:\Qt\4.6.0\include\qt too in CMake configuration to find QString header, shouldn't there? Or Am I missing something? Regards. Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgQtBrowser error while compiling.
I have mean C:\Qt\4.6.0\include\QtCore Ümit Uzun 2010/1/18 Ümit Uzun umituzu...@gmail.com Hi All, When I compile last revision on svn I get c:\qt\4.6.0\include\qtwebkit\../../src/3rdparty/webkit/WebCore/../WebKit/qt/Api/qwebelement.h(23) : fatal error C1083: Cannot open include file: 'QString': No such file or directory error because of qwebelement.h class has #include QString and also osgQtBrowser has only C:\Qt\4.6.0\include path in Additional Include directories field. So there should be C:\Qt\4.6.0\include\qt too in CMake configuration to find QString header, shouldn't there? Or Am I missing something? Regards. Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] FBX plugin and previous OSG releases...
Hi Alessandro, As I understand there is dll hells. Please be careful to reach different version of osg and osg_plugin. Try to use dependency walker to check your programs using dlls. I had same problem and solution is clear environment where different versioned osg dlls (plugins and core osg dlls) doesn't interfere. HTH. Ümit Uzun 2010/1/18 Michael Platings mplati...@pixelpower.com Hi Alessandro I'll be happy to look at this. Please send me a zip of your model and textures and I'll see if I can repeat the bug. Cheers -- *From:* osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *alessandro terenzi *Sent:* 18 January 2010 16:27 *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] FBX plugin and previous OSG releases... Thank you, I tried both the zip file got from the osg-submission forum and the zip of previous mail but osgviewer still crashes if the FBX model has textures. I just can think only about sending you my zip and model and let you see if the problem is there also for you. Regards. Alessandro On Mon, Jan 18, 2010 at 5:16 PM, Michael Platings mplati...@pixelpower.com wrote: Hi Alessandro, here's the latest version of the plugin for you. Cheers -Michael -- *From:* osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *alessandro terenzi *Sent:* 18 January 2010 15:34 *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] FBX plugin and previous OSG releases... Ok, I'm going to try...but I've never downloaded code from osg-submissions, actually I don't know if I need an account...I've looked at the archive but could not find source code, just messages. Maybe you could zip and send me the latest submission of the plugin? Thank you. Kind Regards. Alessandro On Mon, Jan 18, 2010 at 4:09 PM, Sukender suky0...@free.fr wrote: I think it's maybe because of a problem in the code. You really should try the FBX plugin posted on osg-submissions to check if it behaves the same or not. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - alessandro terenzi a.tere...@gmail.com a écrit : I've just tried to start with a clean configuration but the crash remains. Anyway, I found out that the crash happens only if the FBX model contains textures, if on the other hand I export only the geometry the plugin works fine also with the previous version of OSG. I tried to use JPG, TIFF and TGA textures (of course I have the corrensponding plugins in the osgplugins-2.9.6 directory). Hope this can suggest you where the problem could be. By the way, I could also send you a zip containing my built DLLS, osgviewer and the FBX model if this could be useful. Regards. Alessandro On Mon, Jan 18, 2010 at 2:00 PM, Sukender suky0...@free.fr wrote: Hi Alessandro, That sounds very strange. There should be no problem using 2.9.6. Maybe this is related to the project/cmake itself? Or maybe a problem with multiple OSG installations??? As I don't know the error you got I can't say much more, sorry. You may try using the last submitted FBX plugin (on osg-submissions) if not already done yet. Please tell if you still got issues. Cheers, Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - alessandro terenzi a.tere...@gmail.com a écrit : I cannot figure out exactly where the problem is, I set the notify level to DEBUG_INFO and all I can see is that the last notification is about the model file name being loaded (of course a .FBX file). I can say that the plugin is successfully discovered but I guess that the problem occurs just when loading the model (not the plugin itself). If the plugin is supposed to work without modification also with previous releases, I'd like to help to find out where the problem could be, but I need directions in order to try something useful. Just to be more precise, I'm trying to use the plugin with OSG 2.9.6 (not 2.6.*) but with DLLs version number 61 not 62 (ie my build produces osg61-osg.dll, osg61-osgDB.dll and so on...). By the way, I didn't modify nor OSG neither the FBX plugin, I just copied the FBX plugin project from the last dev release to the previous one and added it to my solution. I managed to build it within the previous release without any source code modification, but problems occurr only at runtime with an application crash. Regards. Alessandro On Mon, Jan 18, 2010 at 11:23 AM, Sukender suky0...@free.fr wrote: Hi Alessandro, What kind of problems did you have? I've proposed a modified FBX plugin with writer support (submission still pending). So if you have modifications, please tell so that I
Re: [osg-users] FBX plugin and previous OSG releases...
Hi Alessandro, Maybe problem in osg plugin interfere. So you can't see from dependency walker. As you see osg plugins aren,t named with their version like osg61 So they can be used which doen,t belong your exiting osg core version. Most probably plugin inteference is your problem. Delete all plugin's on your system(all plugins which you can reach from your Path Environment Variables) and rebuild with your existing OSG version again. This would solve your problem. Regards. Ümit Uzun 2010/1/18 Sukender suky0...@free.fr Arg! Please avoid sending email addresses in clear (because of harvesters)... Anyway, I'll mmerge your changes ASAP and give you feedback. Cheers, Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ Le Mon, 18 Jan 2010 19:19:09 +0100, Michael Platings mplati...@pixelpower.com a écrit: I sent you a few emails (suky0...@free.fr) but it seems you don't receive them if I email you directly! Let me know if there are any further changes you'd like to make on top of my alterations. Cheers -Michael -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] On Behalf Of Sukender Sent: 18 January 2010 16:30 To: OpenSceneGraph Users Subject: Re: [osg-users] FBX plugin and previous OSG releases... Forget about my message, I just got my answer on osg-submissions! Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - Sukender suky0...@free.fr a écrit : Hi Michael, Did you include the sources I sent to you recently? It seems you haven't answered my mails... Cheers, Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - alessandro terenzi a.tere...@gmail.com a écrit : Thank you, I tried both the zip file got from the osg-submission forum and the zip of previous mail but osgviewer still crashes if the FBX model has textures. I just can think only about sending you my zip and model and let you see if the problem is there also for you. Regards. Alessandro On Mon, Jan 18, 2010 at 5:16 PM, Michael Platings mplati...@pixelpower.comwrote: Hi Alessandro, here's the latest version of the plugin for you. Cheers -Michael -- *From:* osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *alessandro terenzi *Sent:* 18 January 2010 15:34 *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] FBX plugin and previous OSG releases... Ok, I'm going to try...but I've never downloaded code from osg-submissions, actually I don't know if I need an account...I've looked at the archive but could not find source code, just messages. Maybe you could zip and send me the latest submission of the plugin? Thank you. Kind Regards. Alessandro On Mon, Jan 18, 2010 at 4:09 PM, Sukender suky0...@free.fr wrote: I think it's maybe because of a problem in the code. You really should try the FBX plugin posted on osg-submissions to check if it behaves the same or not. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - alessandro terenzi a.tere...@gmail.com a écrit : I've just tried to start with a clean configuration but the crash remains. Anyway, I found out that the crash happens only if the FBX model contains textures, if on the other hand I export only the geometry the plugin works fine also with the previous version of OSG. I tried to use JPG, TIFF and TGA textures (of course I have the corrensponding plugins in the osgplugins-2.9.6 directory). Hope this can suggest you where the problem could be. By the way, I could also send you a zip containing my built DLLS, osgviewer and the FBX model if this could be useful. Regards. Alessandro On Mon, Jan 18, 2010 at 2:00 PM, Sukender suky0...@free.fr wrote: Hi Alessandro, That sounds very strange. There should be no problem using 2.9.6. Maybe this is related to the project/cmake itself? Or maybe a problem with multiple OSG installations??? As I don't know the error you got I can't say much more, sorry. You may try using the last submitted FBX plugin (on osg-submissions) if not already done yet. Please tell if you still got issues. Cheers, Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - alessandro terenzi a.tere...@gmail.com a écrit : I cannot figure out exactly where the problem is, I set the notify level to DEBUG_INFO and all I can see is that the last notification is about the model file name being loaded (of course a .FBX file). I can
Re: [osg-users] FBX plugin and previous OSG releases...
I have had same problem on different plugin while loading my model on runtime. After that I reliazed that version inconsistent with target plugin with my OSG. After recompilation problem disapperead. Ümit Uzun 2010/1/18 alessandro terenzi a.tere...@gmail.com I will try your suggestion Ümit...by the way, did you have exactly the same problem o mine? I mean no crashes if the FBX model contains no textures whereas crashes if the model contains some textures? Thanks. Alessandro On Mon, Jan 18, 2010 at 8:29 PM, Ümit Uzun umituzu...@gmail.com wrote: Hi Alessandro, Maybe problem in osg plugin interfere. So you can't see from dependency walker. As you see osg plugins aren,t named with their version like osg61 So they can be used which doen,t belong your exiting osg core version. Most probably plugin inteference is your problem. Delete all plugin's on your system(all plugins which you can reach from your Path Environment Variables) and rebuild with your existing OSG version again. This would solve your problem. Regards. Ümit Uzun 2010/1/18 Sukender suky0...@free.fr Arg! Please avoid sending email addresses in clear (because of harvesters)... Anyway, I'll mmerge your changes ASAP and give you feedback. Cheers, Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ Le Mon, 18 Jan 2010 19:19:09 +0100, Michael Platings mplati...@pixelpower.com a écrit: I sent you a few emails (suky0...@free.fr) but it seems you don't receive them if I email you directly! Let me know if there are any further changes you'd like to make on top of my alterations. Cheers -Michael -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] On Behalf Of Sukender Sent: 18 January 2010 16:30 To: OpenSceneGraph Users Subject: Re: [osg-users] FBX plugin and previous OSG releases... Forget about my message, I just got my answer on osg-submissions! Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - Sukender suky0...@free.fr a écrit : Hi Michael, Did you include the sources I sent to you recently? It seems you haven't answered my mails... Cheers, Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - alessandro terenzi a.tere...@gmail.com a écrit : Thank you, I tried both the zip file got from the osg-submission forum and the zip of previous mail but osgviewer still crashes if the FBX model has textures. I just can think only about sending you my zip and model and let you see if the problem is there also for you. Regards. Alessandro On Mon, Jan 18, 2010 at 5:16 PM, Michael Platings mplati...@pixelpower.comwrote: Hi Alessandro, here's the latest version of the plugin for you. Cheers -Michael -- *From:* osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *alessandro terenzi *Sent:* 18 January 2010 15:34 *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] FBX plugin and previous OSG releases... Ok, I'm going to try...but I've never downloaded code from osg-submissions, actually I don't know if I need an account...I've looked at the archive but could not find source code, just messages. Maybe you could zip and send me the latest submission of the plugin? Thank you. Kind Regards. Alessandro On Mon, Jan 18, 2010 at 4:09 PM, Sukender suky0...@free.fr wrote: I think it's maybe because of a problem in the code. You really should try the FBX plugin posted on osg-submissions to check if it behaves the same or not. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - alessandro terenzi a.tere...@gmail.com a écrit : I've just tried to start with a clean configuration but the crash remains. Anyway, I found out that the crash happens only if the FBX model contains textures, if on the other hand I export only the geometry the plugin works fine also with the previous version of OSG. I tried to use JPG, TIFF and TGA textures (of course I have the corrensponding plugins in the osgplugins-2.9.6 directory). Hope this can suggest you where the problem could be. By the way, I could also send you a zip containing my built DLLS, osgviewer and the FBX model if this could be useful. Regards. Alessandro On Mon, Jan 18, 2010 at 2:00 PM, Sukender suky0...@free.fr wrote: Hi Alessandro, That sounds very strange. There should be no problem using 2.9.6. Maybe this is related to the project/cmake itself? Or maybe a problem with multiple OSG installations??? As I don't know the error you got I can't say much more, sorry. You
Re: [osg-users] Applying transparency to STL model
Hi Maxym, Transparent objects drawing order is important. You have set ss-setRenderBinDetails(1, DepthSortedBin); so it make your object drawn first. Try to draw it last with supporting 11 renderbin order instead of 1. HTH. Regards. Ümit Uzun 2010/1/16 Maxym Bilinets maxymbilin...@gmail.com Hi, I'm having very first look at OSG. What I need to do is rendering transparent STL model. I do steps the below: osg::ref_ptrosg::Material matirial = new osg::Material; matirial-setColorMode(osg::Material::AMBIENT); matirial-setAlpha(osg::Material::Face::FRONT, 0.5); matirial-setAmbient(osg::Material::FRONT_AND_BACK, osg::Vec4(1, 1, 1, 1)); matirial-setSpecular(osg::Material::FRONT_AND_BACK, osg::Vec4(1, 1, 1, 1)); matirial-setShininess(osg::Material::FRONT_AND_BACK, 64.0f); ss-setAttributeAndModes(matirial.get(), osg::StateAttribute::ON); ss-setMode(GL_BLEND, osg::StateAttribute::ON); ss-setRenderingHint(osg::StateSet::TRANSPARENT_BIN); ss-setRenderBinDetails(1, DepthSortedBin); osg::CullFace* cull = new osg::CullFace(); cull-setMode(osg::CullFace::BACK); ss-setAttributeAndModes(cull, osg::StateAttribute::OFF); and after all the transparency works but slightly wrong. Seems it uses some optimization algorithm, kinda Depth peeling or something else. But I would like to get true transparency with simple tringle sorting. I do realise that it might be rather slow but I in my case correctness is more important than performance. I believe it's possible in OSG since it is claimed in the feature list: - Automatic sorting for correct rendering of partially transparent geometry. Can someone help me with that? Thank you in advance! Maxym -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=22754#22754 ___ 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] osgWidget::input work
Merhaba Nikolov :) I would have been glad to meet you, but I stay in Ankara :( I think you are on graphical prject in Istanbul. Which company works based on 3D environment and simulation on Istanbul? Nice to meet you. Saygilar :D Ümit Uzun 2010/1/15 Trajce Nikolov nikolov.tra...@gmail.com Merhaba Umut :), its the google mail stuff, I guess based on the ip. I am originaly half macedonian half czech, at present in Istanbul on a project. No idea how long will stay here. If you are in Istanbul we can meet to have a beer Nick http://www.linkedin.com/in/tnick Sent from Devlet, Ankara, Turkey On Fri, Jan 15, 2010 at 4:36 PM, Ümit Uzun umituzu...@gmail.com wrote: Hi Nikolov, What does http://www.linkedin.com/in/tnickhttp://www.linkedin.com/in/tnickSent from Devlet, Ankara, Turkey mean. Is this undefined spam type? Your location changing too fast. I am crious because I am from Turkey, too :D Regards. Ümit Uzun 2010/1/15 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com Hi Nick, However, I started the osgwidgetinput example and for some reason it is not getting my input from the keyboard. This is the same problem I noticed in other osgWidget classes lately. Someone changed the signature of virtual methods in the EventInterface class (which Widget inherits and thus, all other Widgets too) adding a const, but didn't change the signature of methods that are supposed to overload those virtual methods in derived classes. So for example, EventInterface defines: virtual bool keyDown (int, int, const WindowManager*) { return false; } virtual bool keyUp (int, int, const WindowManager*) { return false; } but Input defines: virtual bool keyUp (int, int, WindowManager*); virtual bool keyDown (int, int, WindowManager*); So there is no compile error, but the base class methods are called instead of the derived class methods because their argument lists don't match. Here's the change for Input. It would be nice to go across all osgWidget classes and fix this if you have the time. I already did it for Frame a week or so ago, and this fixes Input, but there are bound to be more. Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield * * This library is open source and may be redistributed and/or modified under * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or * (at your option) any later version. The full license is in LICENSE file * included with this distribution, and on the openscenegraph.orgwebsite. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * OpenSceneGraph Public License for more details. */ // Code by: Jeremy Moles (cubicool) 2007-2008 #ifndef OSGWIDGET_INPUT #define OSGWIDGET_INPUT #include osgWidget/Label namespace osgWidget { // This is a string of values we use to try and determine the best Y // descent value (yoffset); you're welcome to use what works best for // your font. const std::string DESCENT_STRING(qpl); class OSGWIDGET_EXPORT Input: public Label { public: Input(const std::string = , const std::string = , unsigned int = 20); virtual void parented (Window*); virtual void positioned (); virtual bool focus (const WindowManager*); virtual bool unfocus (const WindowManager*); virtual bool keyUp (int, int, const WindowManager*); virtual bool keyDown (int, int, const WindowManager*); void setCursor(Widget*); unsigned int calculateBestYOffset (const std::string = qgl); void setXOffset(point_type xo) { _xoff = xo; } void setYOffset(point_type yo) { _yoff = yo; } void setXYOffset(point_type xo, point_type yo) { _xoff = xo; _yoff = yo; } osg::Drawable* getCursor() { return _cursor.get(); } const osg::Drawable* getCursor() const { return _cursor.get(); } point_type getXOffset() const { return _xoff; } point_type getYOffset() const { return _yoff; } XYCoord getXYOffset() const { return XYCoord(_xoff, _yoff); } protected: virtual void _calculateSize(const XYCoord); void _calculateCursorOffsets(); point_type _xoff; point_type _yoff; unsigned int _index; unsigned int _size; unsigned int _cursorIndex; unsigned int _maxSize; std::vectorpoint_type
Re: [osg-users] osgWidget::input work
Merhaba Nikolov, If you come Ankara, we may can meet :) Sorry for special question about company! See you... Regards. Ümit Uzun 2010/1/15 Trajce Nikolov nikolov.tra...@gmail.com hi Umut, I might have a short trip to Ankara soon. I am not going to disclose the company :) Nick http://www.linkedin.com/in/tnick Sent from Devlet, Ankara, Turkey On Fri, Jan 15, 2010 at 4:58 PM, Ümit Uzun umituzu...@gmail.com wrote: Merhaba Nikolov :) I would have been glad to meet you, but I stay in Ankara :( I think you are on graphical prject in Istanbul. Which company works based on 3D environment and simulation on Istanbul? Nice to meet you. Saygilar :D Ümit Uzun 2010/1/15 Trajce Nikolov nikolov.tra...@gmail.com Merhaba Umut :), its the google mail stuff, I guess based on the ip. I am originaly half macedonian half czech, at present in Istanbul on a project. No idea how long will stay here. If you are in Istanbul we can meet to have a beer Nick http://www.linkedin.com/in/tnick Sent from Devlet, Ankara, Turkey On Fri, Jan 15, 2010 at 4:36 PM, Ümit Uzun umituzu...@gmail.com wrote: Hi Nikolov, What does http://www.linkedin.com/in/tnickhttp://www.linkedin.com/in/tnickSent from Devlet, Ankara, Turkey mean. Is this undefined spam type? Your location changing too fast. I am crious because I am from Turkey, too :D Regards. Ümit Uzun 2010/1/15 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com Hi Nick, However, I started the osgwidgetinput example and for some reason it is not getting my input from the keyboard. This is the same problem I noticed in other osgWidget classes lately. Someone changed the signature of virtual methods in the EventInterface class (which Widget inherits and thus, all other Widgets too) adding a const, but didn't change the signature of methods that are supposed to overload those virtual methods in derived classes. So for example, EventInterface defines: virtual bool keyDown (int, int, const WindowManager*) { return false; } virtual bool keyUp (int, int, const WindowManager*) { return false; } but Input defines: virtual bool keyUp (int, int, WindowManager*); virtual bool keyDown (int, int, WindowManager*); So there is no compile error, but the base class methods are called instead of the derived class methods because their argument lists don't match. Here's the change for Input. It would be nice to go across all osgWidget classes and fix this if you have the time. I already did it for Frame a week or so ago, and this fixes Input, but there are bound to be more. Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield * * This library is open source and may be redistributed and/or modified under * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or * (at your option) any later version. The full license is in LICENSE file * included with this distribution, and on the openscenegraph.orgwebsite. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * OpenSceneGraph Public License for more details. */ // Code by: Jeremy Moles (cubicool) 2007-2008 #ifndef OSGWIDGET_INPUT #define OSGWIDGET_INPUT #include osgWidget/Label namespace osgWidget { // This is a string of values we use to try and determine the best Y // descent value (yoffset); you're welcome to use what works best for // your font. const std::string DESCENT_STRING(qpl); class OSGWIDGET_EXPORT Input: public Label { public: Input(const std::string = , const std::string = , unsigned int = 20); virtual void parented (Window*); virtual void positioned (); virtual bool focus (const WindowManager*); virtual bool unfocus (const WindowManager*); virtual bool keyUp (int, int, const WindowManager*); virtual bool keyDown (int, int, const WindowManager*); void setCursor(Widget*); unsigned int calculateBestYOffset (const std::string = qgl); void setXOffset(point_type xo) { _xoff = xo; } void setYOffset(point_type yo) { _yoff = yo; } void setXYOffset(point_type xo, point_type yo) { _xoff = xo; _yoff = yo; } osg::Drawable* getCursor() { return _cursor.get(); } const osg::Drawable* getCursor() const { return _cursor.get(); } point_type getXOffset() const { return _xoff; } point_type getYOffset() const
Re: [osg-users] osgWidget::input work
Hi Nikolov, What does http://www.linkedin.com/in/tnickhttp://www.linkedin.com/in/tnickSent from Devlet, Ankara, Turkey mean. Is this undefined spam type? Your location changing too fast. I am crious because I am from Turkey, too :D Regards. Ümit Uzun 2010/1/15 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com Hi Nick, However, I started the osgwidgetinput example and for some reason it is not getting my input from the keyboard. This is the same problem I noticed in other osgWidget classes lately. Someone changed the signature of virtual methods in the EventInterface class (which Widget inherits and thus, all other Widgets too) adding a const, but didn't change the signature of methods that are supposed to overload those virtual methods in derived classes. So for example, EventInterface defines: virtual bool keyDown (int, int, const WindowManager*) { return false; } virtual bool keyUp (int, int, const WindowManager*) { return false; } but Input defines: virtual bool keyUp (int, int, WindowManager*); virtual bool keyDown (int, int, WindowManager*); So there is no compile error, but the base class methods are called instead of the derived class methods because their argument lists don't match. Here's the change for Input. It would be nice to go across all osgWidget classes and fix this if you have the time. I already did it for Frame a week or so ago, and this fixes Input, but there are bound to be more. Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield * * This library is open source and may be redistributed and/or modified under * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or * (at your option) any later version. The full license is in LICENSE file * included with this distribution, and on the openscenegraph.org website. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * OpenSceneGraph Public License for more details. */ // Code by: Jeremy Moles (cubicool) 2007-2008 #ifndef OSGWIDGET_INPUT #define OSGWIDGET_INPUT #include osgWidget/Label namespace osgWidget { // This is a string of values we use to try and determine the best Y // descent value (yoffset); you're welcome to use what works best for // your font. const std::string DESCENT_STRING(qpl); class OSGWIDGET_EXPORT Input: public Label { public: Input(const std::string = , const std::string = , unsigned int = 20); virtual void parented (Window*); virtual void positioned (); virtual bool focus (const WindowManager*); virtual bool unfocus (const WindowManager*); virtual bool keyUp (int, int, const WindowManager*); virtual bool keyDown (int, int, const WindowManager*); void setCursor(Widget*); unsigned int calculateBestYOffset (const std::string = qgl); void setXOffset(point_type xo) { _xoff = xo; } void setYOffset(point_type yo) { _yoff = yo; } void setXYOffset(point_type xo, point_type yo) { _xoff = xo; _yoff = yo; } osg::Drawable* getCursor() { return _cursor.get(); } const osg::Drawable* getCursor() const { return _cursor.get(); } point_type getXOffset() const { return _xoff; } point_type getYOffset() const { return _yoff; } XYCoord getXYOffset() const { return XYCoord(_xoff, _yoff); } protected: virtual void _calculateSize(const XYCoord); void _calculateCursorOffsets(); point_type _xoff; point_type _yoff; unsigned int _index; unsigned int _size; unsigned int _cursorIndex; unsigned int _maxSize; std::vectorpoint_type _offsets; osg::ref_ptrWidget_cursor; }; } #endif // -*-c++-*- osgWidget - Code by: Jeremy Moles (cubicool) 2007-2008 #include osg/io_utils #include osgWidget/WindowManager #include osgWidget/Input namespace osgWidget { Input::Input(const std::string name, const std::string label, unsigned int size): Label(name, label), _xoff(0.0f), _yoff(0.0f), _index (0), _size(0), _cursorIndex (0), _maxSize (size), _cursor (new Widget(cursor)) { _text-setAlignment(osgText::Text::LEFT_BOTTOM_BASE_LINE); _text-setKerningType(osgText::KERNING_NONE); // Make the cursor un-copyable. _cursor-setCanClone(false
Re: [osg-users] Attempted to read or write protected memory. ERROR
Hi Tufan, If there is no obligation you should use general Win32 Console Project instead of CLI, and problem most probably about CLI C++ and Pure C++ reference collision. Good Luck :D Regards. Ümit Uzun 2010/1/7 Tufan Taş tas.tu...@gmail.com Hi, I am new in open scene graph. I installed open scene graph 2.8.2 with thirdParty for VS2008. I wrote a simple code using C++/CLI as in the following: ref_ptrViewer viewer = new Viewer(); viewer-setUpViewInWindow(100, 100, 640, 480); viewer-run(); After debuging it I take the reulting dll into my c# project references. But when I run my c# project it gets Attempted to read or write protected memory. This is often an indication that other memory is corrupt. error message on viewer-run(); line. Even if I only write the ref_ptrViewer viewer = new Viewer(); line I take the A first chance exception of type 'System.AccessViolationException' occurred in OpenSceneGraphLibrary.dll Exception ang goes on to ref_ptr code. If you have any suggestion please share with me I need a quick help. Thank you! Cheers, tufan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=22197#22197 ___ 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] Rotation 2 DOF node with 2 Different Matrix.
Hi Paul, Thanks for your reply. I need only one explanation about that; psudo code Matrix model= identity; Matrix matrix1= identity; matrix1-rotate( 10 degree on LOCAL X axis ) matrix1-rotate( 10 degree on LOCAL Y axis ) matrix1-rotate( -10 degree on LOCAL X axis ) matrix1-rotate( -10 degree on LOCAL Y axis ) model-setMatrix( matrix1 ) matrix1 is NOT IDENTITY at last. // Do you think it is impossible rotating due to 2 different LOCAL axis on same matrix? I have tried your suggestion but can't resolve; psudo code Matrix model= identity; Matrix matrix1= identity; Matrix matrix2= identity; matrix1-rotate( 10 degree on LOCAL X axis ) model-setMatrix(matrix1 * matrix2); // Turned Local X axis 10 degree matrix2-rotate( 10 degree on LOCAL Y axis ) model-setMatrix(matrix1 * matrix2); // Turned Global Y axis 10 degree matrix1-rotate( -10 degree on LOCAL X axis ) model-setMatrix(matrix1 * matrix2); // Turned Local X axis -10 degree matrix2-rotate( -10 degree on LOCAL Y axis ) model-setMatrix(matrix1 * matrix2); // Turned Global Y axis -10 degree model is IDENTITY at last. // As you said I hold different rotation Matrix for each Axis, but as you can see from above code some rotations done on LOCAL and some rotations done on GLOBAL axis. But I want to do all rotations on LOCAL axis without any artifacts. I know below formulation; /// m = rotation * m; // rotate around matrix axis (local space) m = m * rotation; // rotate around fixed axis (global space) /// But if I change model-setMatrix(matrix1 * matrix2); formulation for Y Axis to model-setMatrix(matrix2 * matrix1); , this time as a result some frame jumping occured on rotation operations. Do you think it is impossible to operate absolute matrix multiplication for 2 different Local axis on one model? If I operate incremental matrix multiplication for 2 different Local axis I can rotate my model pretty easy but this time I might not reach initial rotation state for this model although I rotate reverse direction for each axis but in different order. Am I trying to achieve impossible operation or not? Thanks so much. Regards. Ümit Uzun 30 Aralık 2009 23:48 tarihinde Paul Martz pma...@skew-matrix.com yazdı: I would store the x and y rotations as separate variables. Use them to compute a single Matrix when you need to update. Test for identity by checking to see if your x and y variables fall within an epsilon range of zero. Paul Martz Skew Matrix Software LLC _http://www.skew-matrix.com_ http://www.skew-matrix.com/ +1 303 859 9466 Ümit Uzun wrote: Hi All, I have a problem about rotating one MatrixTransform node with 2 different Matrix which one of responsible for rotation on X by osg::X_AXIS and one of responsible for rotatin by osg::Y_AXIS. I have done some rotation to MT node but after this operations I am waiting to get Identity matrix for MT which has Identity matrix in initial state. Some psudo codes; - // Initial states osg::MatrixTransform* MT; MT-setMatrix( osg::Matrix::identity() ); osg::Matrix ang1 = osg::Matrix::identity(); osg::Matrix ang2 = osg::Matrix::identity(); // Updates done with this codes ang1.preMult(osg::Matrix::rotate(osg::Quat(osg::DegreesToRadians(10.0f), osg::X_AXIS))); ang2.preMult(osg::Matrix::rotate(osg::Quat(osg::DegreesToRadians(10.0f), osg::Y_AXIS))); MT-setMatrix(ang2 * ang1); - if I rotate my MT by above code; model rotated on Y by localCoordinate axis and rotated on X fixedCoordinate axis. But I wanted to rotate on X local coordınate axis too. If I use one matrix to update rotation; - // Initial states osg::MatrixTransform* MT; MT-setMatrix( osg::Matrix::identity() ); osg::Matrix ang1 = osg::Matrix::identity(); // Updates done with this codes ang1.preMult(osg::Matrix::rotate(osg::Quat(osg::DegreesToRadians(10.0f), osg::X_AXIS))); ang1.preMult(osg::Matrix::rotate(osg::Quat(osg::DegreesToRadians(10.0f), osg::Y_AXIS))); ang1.preMult(osg::Matrix::rotate(osg::Quat(osg::DegreesToRadians(-10.0f), osg::X_AXIS))); ang1.preMult(osg::Matrix::rotate(osg::Quat(osg::DegreesToRadians(-10.0f), osg::Y_AXIS))); MT-setMatrix(ang1); - With above code I can rotate my model X and Y local coordinate axis. But this code has lack too. After apply positive and negative way rotation I am waiting to get IdentityMatrix but after all rotation operation my MT-getMatrix() give me different from IdentityMatrix. I think I should use inverse matrix instead of negative direction rotated matrix
Re: [osg-users] Rotation 2 DOF node with 2 Different Matrix.
Hi Simon, Thanks for your advices, but I need to apply unordered rotation. And I don't want to think about rotation apply order. So I can't use direct invert function, rotation should be incremental order, not direct neutralization. Thanks for your advices again. Regards. Ümit Uzun 2009/12/31 Simon Hammett s.d.hamm...@googlemail.com Not really following what you are after, but one point: 2009/12/31 Ümit Uzun umituzu...@gmail.com Hi Paul, Thanks for your reply. I need only one explanation about that; psudo code Matrix matrix1= identity; matrix1-rotate( 10 degree on LOCAL X axis ) matrix1-rotate( 10 degree on LOCAL Y axis ) matrix1-rotate( -10 degree on LOCAL X axis ) matrix1-rotate( -10 degree on LOCAL Y axis ) matrix1 is NOT IDENTITY at last. / No it won't be the identity, you've got the undo in the wrong order. Matrix matrix1= identity; // rotate matrix1-rotate( 10 degree on LOCAL X axis ) matrix1-rotate( 10 degree on LOCAL Y axis ) // un-rotate matrix1-rotate( -10 degree on LOCAL Y axis ) matrix1-rotate( -10 degree on LOCAL X axis ) ASSERT(matrix1 == identity); If you want undo, just use matrix invert, which will work unless you've got a scale by 0 in the transform. -- http://www.ssTk.co.uk ___ 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] Rotation 2 DOF node with 2 Different Matrix.
Hi All, I have a problem about rotating one MatrixTransform node with 2 different Matrix which one of responsible for rotation on X by osg::X_AXIS and one of responsible for rotatin by osg::Y_AXIS. I have done some rotation to MT node but after this operations I am waiting to get Identity matrix for MT which has Identity matrix in initial state. Some psudo codes; - // Initial states osg::MatrixTransform* MT; MT-setMatrix( osg::Matrix::identity() ); osg::Matrix ang1 = osg::Matrix::identity(); osg::Matrix ang2 = osg::Matrix::identity(); // Updates done with this codes ang1.preMult(osg::Matrix::rotate(osg::Quat(osg::DegreesToRadians(10.0f), osg::X_AXIS))); ang2.preMult(osg::Matrix::rotate(osg::Quat(osg::DegreesToRadians(10.0f), osg::Y_AXIS))); MT-setMatrix(ang2 * ang1); - if I rotate my MT by above code; model rotated on Y by localCoordinate axis and rotated on X fixedCoordinate axis. But I wanted to rotate on X local coordınate axis too. If I use one matrix to update rotation; - // Initial states osg::MatrixTransform* MT; MT-setMatrix( osg::Matrix::identity() ); osg::Matrix ang1 = osg::Matrix::identity(); // Updates done with this codes ang1.preMult(osg::Matrix::rotate(osg::Quat(osg::DegreesToRadians(10.0f), osg::X_AXIS))); ang1.preMult(osg::Matrix::rotate(osg::Quat(osg::DegreesToRadians(10.0f), osg::Y_AXIS))); ang1.preMult(osg::Matrix::rotate(osg::Quat(osg::DegreesToRadians(-10.0f), osg::X_AXIS))); ang1.preMult(osg::Matrix::rotate(osg::Quat(osg::DegreesToRadians(-10.0f), osg::Y_AXIS))); MT-setMatrix(ang1); - With above code I can rotate my model X and Y local coordinate axis. But this code has lack too. After apply positive and negative way rotation I am waiting to get IdentityMatrix but after all rotation operation my MT-getMatrix() give me different from IdentityMatrix. I think I should use inverse matrix instead of negative direction rotated matrix to rotate -X or -Y direction. Could it solve my problem or not? By these 2 rotation operations my main goal is that; I want to rotate MT by X and Y local coordinate system. And after all rotations I can get initial state of MT. I mean I apply to many rotation transformation to my unique node and after all dual(for X and -X or for y and -Y with unordered queue) operation I want to get first initial matrix for my MT node. I know this is not hard operations, but I am unstable about choosing which one is right way. I appreciate any comments. Regards. Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] HUD-Problem
Hi Carl, Please download http://www.openscenegraph.org/projects/osg/attachment/wiki/Support/Tutorials/NPS_Tutorials_src.rarand test Tutorial_06 which is given link osgHud in OSG website by you. I have already tried and it is working pretty good. I think your problem was that you didn't control model's path. So you can't see any hud on the screen. Please control all path's on your system and recompile it. You will see all of them works. Regards. Ümit Uzun 2009/12/29 Trajce Nikolov nikolov.tra...@gmail.com dont panic :)) here is your code modfied and working osg::ref_ptrosg::Group CreateHUD() { osg::ref_ptrosg::Group Root( new osg::Group ); // HUD osg::ref_ptrosgText::Text HUD_Text( new osgText::Text ); HUD_Text-setCharacterSize( 25 ); HUD_Text-setFont( fonts/arial.ttf ); HUD_Text-setText( Not so good ); //HUD_Text-setAxisAlignment( osgText::Text::SCREEN ); HUD_Text-setPosition( osg::Vec3( 30.0, 30.0, 0.0 ) ); HUD_Text-setColor( osg::Vec4( 1.0, 1.0, 0.0, 1.0 ) ); // HUD Vertices osg::ref_ptrosg::Vec3Array HUD_Vertices( new osg::Vec3Array ); HUD_Vertices-push_back( osg::Vec3d( 0.0, 0.0, -0.1 ) ); HUD_Vertices-push_back( osg::Vec3d( 1024.0, 0.0, -0.1 ) ); HUD_Vertices-push_back( osg::Vec3d( 1024.0, 200.0, -0.1 ) ); HUD_Vertices-push_back( osg::Vec3d( 0.0, 200.0, -0.1 ) ); // HUD Indices osg::ref_ptrosg::DrawElementsUInt HUD_Indices( new osg::DrawElementsUInt( osg::PrimitiveSet::POLYGON, 0 ) ); HUD_Indices-push_back( 0 ); HUD_Indices-push_back( 1 ); HUD_Indices-push_back( 2 ); HUD_Indices-push_back( 3 ); // Hud Color osg::ref_ptrosg::Vec4Array HUD_Color(new osg::Vec4Array ); HUD_Color-push_back( osg::Vec4( 0.8f, 0.8f, 0.8f, 0.8f) ); // HUD Normals osg::ref_ptrosg::Vec3Array HUD_Normals( new osg::Vec3Array ); HUD_Normals-push_back( osg::Vec3( 0.0f, 0.0f, -1.0f ) ); // HUD Geometry osg::ref_ptrosg::Geometry HUD_Geometry( new osg::Geometry ); HUD_Geometry-setNormalArray( HUD_Normals ); HUD_Geometry-setNormalBinding( osg::Geometry::BIND_OVERALL ); HUD_Geometry-addPrimitiveSet( HUD_Indices ); HUD_Geometry-setVertexArray( HUD_Vertices ); HUD_Geometry-setColorArray( HUD_Color ); HUD_Geometry-setColorBinding( osg::Geometry::BIND_OVERALL ); // HUD Renderstates osg::ref_ptrosg::StateSet HUD_StateSet( new osg::StateSet ); HUD_StateSet-setMode( GL_BLEND, osg::StateAttribute::ON ); HUD_StateSet-setMode( GL_DEPTH_TEST, osg::StateAttribute::OFF ); HUD_StateSet-setRenderingHint( osg::StateSet::TRANSPARENT_BIN ); HUD_StateSet-setRenderBinDetails( 11, DepthSortedBin); // HUD Geode osg::ref_ptrosg::Geode HUD_Geode( new osg::Geode ); HUD_Geode-addDrawable( HUD_Geometry.get() ); HUD_Geode-addDrawable( HUD_Text.get() ); //HUD_Geode-setStateSet( HUD_StateSet.get() ); // HUD View osg::ref_ptrosg::MatrixTransform HUD_Transform( new osg::MatrixTransform ); HUD_Transform-setMatrix( osg::Matrix::identity() ); HUD_Transform-setReferenceFrame( osg::Transform::ABSOLUTE_RF_INHERIT_VIEWPOINT ); HUD_Transform-addChild( HUD_Geode.get() ); // HUD Projection /* osg::ref_ptrosg::Projection HUD_Projection( new osg::Projection ); HUD_Projection-setMatrix( osg::Matrix::ortho2D( 0.0, 1024.0, 0.0, 768.0 ) ); HUD_Projection-addChild( HUD_Transform.get() ); */ osg::Camera* camera = new osg::Camera; camera-setProjectionMatrix(osg::Matrix::ortho2D(0,1280,0,1024)); camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF); camera-setViewMatrix(osg::Matrix::identity()); camera-setClearMask(GL_DEPTH_BUFFER_BIT); camera-setRenderOrder(osg::Camera::NESTED_RENDER); camera-setAllowEventFocus(false); camera-addChild( HUD_Transform.get() ); //Root-addChild( HUD_Projection.get() ); Root-addChild( camera ); return Root; } int main (int argc, char* argv[]) { // Create a Producer-based viewer osgViewer::Viewer viewer; viewer.addEventHandler( new osgViewer::StatsHandler ); viewer.setUpViewInWindow( 32, 32, 1024, 768 ); viewer.setSceneData( CreateHUD().get() ); viewer.setCameraManipulator(new osgGA::TrackballManipulator()); viewer.realize(); while( !viewer.done() ) { viewer.frame(); } //return viewer.run(); return 0; } Nick http://www.linkedin.com/in/tnick Sent from Devlet, Ankara, Turkey On Tue, Dec 29, 2009 at 1:46 PM, Carl Johnson uto...@gmx.net wrote: Hi, it is unbelievable that nobody can help. [Question] http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/HudsAndText This tutorial dont work :- It looks like so easy and plausible, so i can not understand what i do wrong. Thank you! Cheers, Carl -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=21911#21911 ___ 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
Re: [osg-users] What are the your favorite free 3d model sites?
Hi Maxim; If you have time could you look at http://www.delta3d.org/article.php?story=20050720155458456topic=tutorials Resource Creation section to conform some rules to make much general conversion. Maybe it can help while conversion. Regards. Ümit Uzun 2009/12/21 Maxim Gammer maxgam...@gmail.com Hi! Ok. I can convert these models into a format OSG. There is a need? http://cde.tsogu.ru/3d_scenes/ http://cde.tsogu.ru/lybrery/ http://cde.tsogu.ru/3d_vneshnee/ http://cde.tsogu.ru/3D_upravlenie/ http://cde.tsogu.ru/3d_mebel/ http://cde.tsogu.ru/3d_equipment/ http://cde.tsogu.ru/3d_indicator/ http://cde.tsogu.ru/3d_dezign/ 2009/12/21 Robert Osfield robert.osfi...@gmail.com Hi All, Thanks for all the very useful links. Delta3D's site has been the most useful so far... but I've only really started scratching the surface. On Mon, Dec 21, 2009 at 2:14 PM, Clay, Bruce bc...@ball.com wrote: A lot of the models are in MAX format but I did not find as OSG plugin to read that format in the precompiled OSG nor in the src/osgPlugin directory. Is there a plugin that will read the max format of graphics files? There is no plugin for the OSG itself for reading max files. The is the OSGExp project that provides a plugin to 3D Studio Max for exporting .ive + .osg files though, so if you want to use Max files this is the route - it does of course require Max. As I don't have an OS that would run Max, let alone Max itself it doesn't really me too much for this particular little task. Thanks again for all your links, keep them coming ;-) Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Maxim Gammer ___ 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] Simple water effects
Hi Dominic; As you know there is too much resource on the net. Some of them which I can advice you to look, http://habib.wikidot.com/ OrangeBook (aka GLSL Book) There is Real Worldz chapter which talk about rendering ocean in simple and not comprehensive way. http://www.vterrain.org/Water/ I don't know which way is the best, simple textures, normal mapping or shaders? What I would like to see is the sun reflecting the rays on the water ;-) Any help is welcome. IMHO, you only need Reflection Rays on the water surface with Environment mapping and animated texturing. This 3 combination would give you best ocean surface as you expect without much CPU usage. But I really suggest you to use osgOcean, You can turn on/off much of rendering unit. So you can only use reflection and environment mapping by toggling off all off other which are needs too much processing time. Regards. Ümit Uzun 2009/12/21 Dominic Stalder dominic.stal...@bluewin.ch Hi there is there a simple and good looking way to have water effects for the sea? How do you implement this? I don't know which way is the best, simple textures, normal mapping or shaders? What I would like to see is the sun reflecting the rays on the water ;-) Any help is welcome. I know the amazing looking osgOcean, but for our game it uses to much CPU. Regards Dominic ___ 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] Simple water effects
Hi Dominic, thanks for the interesting links, but the habib tuturials are all for direct x, right? And I don't see how I have to integrate with OSG (sorry for the stupid questions, but I'm a beginer at all...). Yes right. But he has good understanding to achieve kind of water surface. You can grasp the understanding and make yourself in GLSL. I can't find the real worldz examples on the net, do you have the source? Grab the GLSL book and look at Real Worldz section. There is not comprehensive source code and example, there is only information to how you can create water surface. If you are very beginner, you need to learn water mathematic(which habib's talked about enough in his site) and implementation by GLSL. I think you have already known this is not trivial operation. Regards. Ümit Uzun 2009/12/22 Dominic Stalder dominic.stal...@bluewin.ch Hi Ümit thanks for the interesting links, but the habib tuturials are all for direct x, right? And I don't see how I have to integrate with OSG (sorry for the stupid questions, but I'm a beginer at all...). I can't find the real worldz examples on the net, do you have the source? Regards Dominic Ümit Uzun schrieb: Hi Dominic; As you know there is too much resource on the net. Some of them which I can advice you to look, http://habib.wikidot.com/ OrangeBook (aka GLSL Book) There is Real Worldz chapter which talk about rendering ocean in simple and not comprehensive way. http://www.vterrain.org/Water/ I don't know which way is the best, simple textures, normal mapping or shaders? What I would like to see is the sun reflecting the rays on the water ;-) Any help is welcome. IMHO, you only need Reflection Rays on the water surface with Environment mapping and animated texturing. This 3 combination would give you best ocean surface as you expect without much CPU usage. But I really suggest you to use osgOcean, You can turn on/off much of rendering unit. So you can only use reflection and environment mapping by toggling off all off other which are needs too much processing time. Regards. Ümit Uzun 2009/12/21 Dominic Stalder dominic.stal...@bluewin.ch mailto: dominic.stal...@bluewin.ch Hi there is there a simple and good looking way to have water effects for the sea? How do you implement this? I don't know which way is the best, simple textures, normal mapping or shaders? What I would like to see is the sun reflecting the rays on the water ;-) Any help is welcome. I know the amazing looking osgOcean, but for our game it uses to much CPU. Regards Dominic ___ 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] light lobes
Hi Nick, I advice you to look at, How can I ask smart question? from http://catb.org/~esr/faqs/smart-questions.html Regards. Ümit Uzun 2009/12/11 Robert Osfield robert.osfi...@gmail.com Hi Nick, On Fri, Dec 11, 2009 at 1:01 PM, Trajce Nikolov nikolov.tra...@gmail.com wrote: one more thing. The matrix that I pass to TexGen seem to not be taken into account. No matter how I set the far plane it shows same results. Is this expected behavior ? I can't comment on the issues you are seeing as I'm not party to your code. As for the 1D texture - this would just be a simple alpha textured with a region set to zero for behind the light source, and 1.0 or attenuated in front. 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
[osg-users] osg::StateAttribute::PROTECTED usage for not effected from it's parental shaders.
Hi All, ParentNode-ChildNode I have a shader and try implement to the ParentNode but I don't want to effect ChildNode with this shader. I want render ParentNode with Shader and render ChildNode with FixedFunction without any effect from it's parent's shader. I have tried to use osg::StateAttribute::PROTECTED but which osg::Attribute should I set to PROTECTED? I mean ChildNode-getOrCreateStateSet()-setAttributeAndModes( , osg::StateAttribute::PROTECTED | osg::StateAttribute::OFF); What should I assign to Or Does this way wrong or not? Regards. Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg::StateAttribute::PROTECTED usage for not effected from it's parental shaders.
Hi J.S; Thanks for reply, It works. I have known this rule but for some reason forgot so I have been trying to PROTECT child's stateSet :D Regards. Ümit Uzun 2009/12/3 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com Hi Ümit, I have a shader and try implement to the ParentNode but I don't want to effect ChildNode with this shader. I want render ParentNode with Shader and render ChildNode with FixedFunction without any effect from it's parent's shader. I have tried to use osg::StateAttribute::PROTECTED but which osg::Attribute should I set to PROTECTED? I mean ChildNode-getOrCreateStateSet()-setAttributeAndModes( , osg::StateAttribute::PROTECTED | osg::StateAttribute::OFF); What should I assign to Or Does this way wrong or not? This is an FAQ... ChildNode-getOrCreateStateSet()-setAttributeAndModes( new osg::Program, osg::StateAttribute::ON); Empty osg::Program without any shaders attached means fixed pipeline. You don't even need Protected, unless you're using Override on the parent node. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [ANN] The book OpenSceneGraph Design and Implementation is published
Thanks Wang, But is there anyone who is OSG user and knows Chinese and wants to translate this book to english in the future? :) Or will you translate it to make it more universe? Regards. Ümit Uzun 2009/11/26 Andrea Negri andrea.ne...@gmail.com Hi Wang, any chance to see an english version of your book in the near future? Congratulation for your work, indeed. :) Regards, Andrea Negri Wang Rui wrote: Hi all, After 3 months of long waiting (from the SIGGRAPH to present), I am very pleased to announce that, the book /OpenSceneGraph Design and Implementation/, which is written by Wang Rui and Qian Xuelei and predicted on the OSG BOF, finally COMES OUT! Wang Rui and Qian Xuelei, OpenSceneGraph Design and Implementation, Tsinghua University Press, 2009.11; ISBN: 978-7-302-21303-1; Price: 45.00Yuan (about $6.6); Paperback, 377 pages. Please visit the Tsinghua University Press website for more information about this book: http://www.tup.com.cn/book/Showbook.asp?CPBH=033945-01DJ=45 http://www.tup.com.cn/book/Showbook.asp?CPBH=033945-01DJ=45 Chinese readers may order it from: http://product.dangdang.com/product.aspx?product_id=20732977 The book resource website: http://code.google.com/p/osgenginebook/ You may freely download the full examples source code and have an overview of them here. Hope the 38 very short examples may help you even without reading the book. I try to build the website Chinese-English bilingual, so don't worry about language limitations. :) More snapshots could be found at http://code.google.com/p/osgenginebook/ I’d like to thank Don Burns and Robert Osfield for their creative efforts to give birth to OpenSceneGraph, as well as over 1700 (maybe even more today?) members of the OSG core community and over 2400 members of the osgChina community, for their support and contribution all the time! Many thanks to Paul Martz of the Skew Matrix, for his tremendous passion for improving OSG documentations and great help on supporting the publication of this book. He also took time out of his busy schedule writing the foreword. Thanks to Wei Zhanying, Guan Yanling, Chen Xuexia and Su Yuyang of Beijing Geo-Vision, for providing all kinds of assistance to the author during writing. Thanks to Xiong Jian of Tsinghua University Press, Zhu Youhong of 3DVRI, Gao Feng of Appsoft, Xu Mingliang of Zhejiang University, CG Laboratory of Beijing Forestry University and Yang Shixing, Xiao Peng and He Sicong of the osgChina Team, for technical reviewing, providing images and examples, and contributing in some other way. Thanks to my co-author Dr. Qian Xuelei, for helping me finish some chapters and proofread the entire text. Finally, I should thank my parents Wang Lihang and Bao Ximei, and my fiancee Leng Qin. I could not have done this without their patience and moral support during the whole time. Best wishes, Wang Rui ___ 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] GLSL tricks about texturing.
Hi All, May be my former question not much understandable. I want to try express my problem again. I have a 3D model which is created by Blender. As you guess, model has to many texture on it. After I export my model in standard model type(3ds or what else), I want to make per pixel shading on my model. My question do I have to define all my texture in fragment shader as uniform sampler2D xxx and bind this uniform in my related osg::Program one by one to shade my model per pixel lightening? How can I reach related pixel's texture value in fragment shader if I doesn't use sampler2D? For example, now I can access to related pixel's texture value by; uniform sampler2D diffuseTexture; vec4 texture = texture2D(diffuseTexture,gl_TexCoord[0].st); But if I doesn't define my sampler2D to related texture how can I access? Thanks in advance. Regards. Ümit Uzun 2009/10/30 Ümit Uzun umituzu...@gmail.com Hi Folks, I am using PerPixel lighting on my some model which has created with Blender. My model has lots of textures on it. And my question is, do I have to send all textures in uniform variable to shader? That makes all think to complex, doesn't that? I have try to send only one texture to shader and saw that it can texture all of texture on my model instead of only send one. Then I realize that declared uniform sampler2 sampleTexture definition doesn't hold the related texture file. It only hold texture unit, I mean 0,1 or 7. My question is what is the standart shadering operation when we have canned model? Should we send texture's to shader or what else? And sending texture is meaningless, because if we have ive or another texture integrated model what should we do this time? We haven't related texture separately? This time what should we send? Thanks in advance. Regards. Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GLSL tricks about texturing.
Hi JS, Thanks so much for your detailed explanations. I get your thinking. I have known same think but I didn't sure very well. My last question is, I have declared; uniform sampler2D diffuseTexture; in my fragment shader, although I didn't bind it to osg::Uniform in my main application, I can sample my texture from my shader in Unit 0. Do you think it is weird or not? You have said that; I only need to bind my uniform sampler2d variable in my application to set to related stateset. I didn't set to stateset too, but I get the unit 0 texture value from shader and can see my model textured. Thanks again. Regards, Ümit Uzun 2009/10/30 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com Hi Ümit, How can I reach related pixel's texture value in fragment shader if I doesn't use sampler2D? I don't understand why you would *not* use sampler2D? You always need a sampler to sample the texture in a shader. But if I doesn't define my sampler2D to related texture how can I access? You just need to create a uniform and set it correctly. Then you'll have a sampler. See my other message. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] GLSL tricks about texturing.
Hi JS, I will declare osg::Uniform on root node's stateset as you said. Thanks so much. Regards. Ümit Uzun 2009/10/30 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com Hi Ümit, My last question is, I have declared; uniform sampler2D diffuseTexture; in my fragment shader, although I didn't bind it to osg::Uniform in my main application, I can sample my texture from my shader in Unit 0. Do you think it is weird or not? You are relying on the value being set to 0 when it's undefined, which is not reliable. You should set it correctly. But as I said, you can set it once on the root node of your scene if that's sufficient for you. No need to set a uniform with the same name and the same value on every stateset of every model! J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] TangentSpaceGenerator usage...
Hi Alessandro, Try my bumpmapping sample from http://www.fileden.com/files/2007/9/10/1423182/BumpMapping.rar Hope this helps. Ümit Uzun 2009/10/30 alessandro terenzi a.tere...@gmail.com I'm trying to use the TangentSpaceGenerator in order to apply a bump mapping shader, but I cannot manage it to work properly. Having looked also at the osgFX::BumpMapping effect, I used the visitor defined in BumpMapping in order to find all the geodes and apply TangentSpaceGenerator on them, but if I save the model to disk just before and after the generation has been applied, I notice that in the .osg the arrays supposed to contain normals, tangents and binormals are empty...here is the only part that is different among the two .osg: VertexAttribBinding 1 PER_VERTEX VertexAttribNormalize 1 FALSE VertexAttribArray 1 Vec4Array 0 { } VertexAttribBinding 6 PER_VERTEX VertexAttribNormalize 6 FALSE VertexAttribArray 6 Vec4Array 0 { } VertexAttribBinding 7 PER_VERTEX VertexAttribNormalize 7 FALSE VertexAttribArray 7 Vec4Array 0 { } 6 is supposed to be the TU of the tangent, 7 is for binormal attributes and 1 for the normal map textures. The model have textures coordinates set for TU 0 that is associated to the diffuse map. Maybe I'm missing some steps to setup properly everything... Thanks in advance. Kind regards. Alessandro ___ 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] [build] How i build the osg dll on WINXP
Hi Mike, You need to open up cmake again and assign collada dependency columns to collada 3rdParty folder which is in your system, And after generated solution again you need to build up osg dae plugin. I mean you simply build fully OSG again. That's all I think. Regards. Ümit Uzun 2009/10/26 Mike Fried mike.fr...@gmx.de Hi, yes cmake build the makefile and with mingw-make.exe i build up the *.dll's, but now i search the dae plugin for the COLLADA files. The makefile build the dll's but where i can find the plugin or more specifically how is the name for that plugin? Thank you! Cheers, Mike -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18698#18698 ___ 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] Video as background
Hi Nectarious; There isn't video example or application in osg release except osgmovie as I know. But if you want to use Augmented Reality with osg I strongly advice you to look at osgART(http://www.artoolworks.com/community/osgart/) This is what look for. Regards. Ümit Uzun 2009/10/26 Nectarios Pelekanos nectarios.peleka...@armes-tech.com Hi, I am very new with osg and I am trying to develop an AR application, is there any example for using Video at the bckground of the scene? Any other help is also welcome Thank you! Cheers, Nectarios -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18696#18696 ___ 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] [build] How i build the osg dll on WINXP
Yes, osgdb_dae plugin for collada :D Ümit Uzun 2009/10/26 Mike Fried mike.fr...@gmx.de mikefried wrote: Hi, if the new build was OK, where can i find the dae plugin? Is the osgdb_dae the name of the dae plugin? Thank you! Cheers, Mike -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18711#18711 ___ 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] Hey Guys (osgWidget)
Hi Jeremy, Welcome back :) I had used osgWidget a little before and unfortunately I have no more idea except that, I guess general people prefer to use C++ than Lua. If you can achieve C++, it would be much better. Thanks for your awesome efforts. I hope you will be get your health again, God Bless You :) Regards. Ümit Uzun 2009/10/22 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com Hi Jeremy, I totally understand where you're coming from here--and indeed, there would have to be SOME low-level interface in C++ to build off of--but the bottom line is, you simply can't (or rather, I can't) build sophisticated, intelligent, and easy-to-use containers and GUI logic in C++ without it becoming unimaginably huge and unwieldy. :( Well, I think you did a pretty good job up until now. osgWidget, in my estimation, works well and is well-coded. I guess going forward I hope you don't remove anything, at least... I'll definitely keep what you said in mind though. Perhaps prototyping it in Lua first will make it a lot easier to go back in C++ and do it right... I hope so... J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Multiple Windows
Hi Morris, Did you try to close only viewer; rViewer-getEventQueue()-keyPress(osgGA::GUIEventAdapter::KEY_Escape); rViewer-getEventQueue()-keyRelease(osgGA::GUIEventAdapter::KEY_Escape); Regards. Ümit Uzun 2009/10/12 Russell Morris russell.co...@gmail.com Hey all, I've been searching the forums this afternoon and can't seem to find the answer to my question. I have a viewer setup with the following: rViewer = new osgViewer::Viewer(); wm = new osgWidget::WindowManager(rViewer, width, height, MASK_2D, osgWidget::WindowManager::PD_NONE); rViewer-setUpViewInWindow(width,height,wm-getWidth(),wm-getHeight()); cam = wm-createParentOrthoCamera(); osg::ClearNode *backdrop = new osg::ClearNode; backdrop-setClearColor(osg::Vec4(0.1,0.1,0.0,1.0)); cam-addChild(backdrop); // add event handlers rViewer-addEventHandler(new osgWidget::MouseHandler(wm)); rViewer-addEventHandler(new osgWidget::KeyboardHandler(wm)); rViewer-realize(); rViewer-setCameraWithFocus(cam); rViewer-setSceneData(cam); And I need to be able to close the window dynamically. I implemented this: osgViewer::Viewer::Windows windows; rViewer-getWindows(windows); osgViewer::GraphicsWindow *win = *windows.begin(); win-getEventQueue()-keyPress(osgGA::GUIEventAdapter::KEY_Escape); win-getEventQueue()-keyRelease(osgGA::GUIEventAdapter::KEY_Escape); but no joy. If anyone can point me in the right direction I'd be most grateful. Thanks in advance! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=18198#18198 ___ 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] [build] How to open OSG in a CView MFC ?
Hi Nemo, I ask DisplaySetting configuration because of some system hardware not support more multisampling and sometimes viewer open up in full screen. Your suspect about stateHandler does not cause this problem. But you should check your m_hWnd. It should be right handler for your CView. Because base parameters to create rendering window boundaries are got from m_hWnd. Regards. Good Luck. Ümit Uzun 2009/10/5 Nemo Ulysse ulysse.vau...@gmail.com Hi, no I do not us osg::DIsplaySetting. but as I didn't have the file osgViewer/StataHanler in the instalation of osg and do not manage to instal it. I delete the EventHandler, do you think that it could be the reason why when I use m_G = new osgViewer::GraphicsWindow; m_G- setWindowRectangle(100, 100, 200, 200); it don't do anything ? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17876#17876 ___ 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] [build] How to open OSG in a CView MFC ?
Ni Nemo, There is osgViewerMFC example in the source, and firstly you should get the rendering way by scratching the codes. And then you can implement your with same way. There is not much example on MFC, so your only chance is osgViewerMFC I think. Regards. Ümit Uzun 2009/10/3 Nemo Ulysse ulysse.vau...@gmail.com Hi, I have an MFC application with tow CView, I would like to use osg in those view to manipulate the display model with MFC window. I am a complete beginner with OSG and after a long time of research I still don’t fin the way to do it. Should I resize my osg window and put it over the CView or make the osg as child of the CView? And how to do it? Please give me some tips or some indication on what should I look for. An example will be the best. Thank you -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17823#17823 ___ 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] [build] How to open OSG in a CView MFC ?
Hi Nemo, Did you use osg::DisplaySettings to open up multisampling for antialiasing? If you answer yes, remove multisampling support or reduce the multisampling rate. Regards. Ümit Uzun 2009/10/3 Nemo Ulysse ulysse.vau...@gmail.com Hi Thanks’ for your answer I already work on this example but the 3d model is open in full screen and I don’t manage to change that. Hi Thanks’ for your answer I already work on this example but the 3d model is open in full screen and I don’t manage to change that. I sougth that the window parameters was set there // Setup the traits parameters traits-x = 0; traits-y = 0; traits-width = rect.right - rect.left; traits-height = rect.bottom - rect.top; traits-windowDecoration = false; traits-doubleBuffer = true; traits-sharedContext = 0; traits-setInheritedWindowPixelFormat = true; traits-inheritedWindowData = windata; but I change it and nothing hapen -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17838#17838 ___ 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] problem in setPivotPoint of PAT for .3DS file
Hi Gopal, Sometimes canned models pivotpoint set to undesired position which not suitable your desired pivotpoint position. So to solve this problem you have two chance, you can open your model by 3D model programs and after you configure pivotpoint you export it again and use new model or set your desired pivot position to your PAT node by setPivotPoint. Its usage so simple. You choose your desired global point to make pivot your PAT node. For example; osg::Node* createRoom(osg::Node* loadedModel) // From osgLight example { // default scale for this model. osg::BoundingSphere bs(osg::Vec3(0.0f,0.0f,0.0f),1.0f); osg::Group* root = new osg::Group; if (loadedModel) { const osg::BoundingSphere loaded_bs = loadedModel-getBound(); osg::PositionAttitudeTransform* pat = new osg::PositionAttitudeTransform(); pat-setPivotPoint(loaded_bs.center()); As you can see from attached code we get the models boundingSphere's center and make it pivotPoint. After this initialization your model will be rotated around this point by setAttitude command. You can look at osgLight, osgLauncher and osgLogo too. HTH. Regards. Ümit Uzun 2009/10/2 gopal goenka gopal.goe...@hed.ltindia.com Hi, I am using OSG-2.8.0 i have read a .3DS file with a certain origin. now i am trying to rotate the object in the file about a point other than its origin in that file . for that i have used PAT. i have tried to use setPivotPoint but could not understand its working can any body suggest the way to use it . if possible with an example... Thank you! Cheers, gopal :P -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17783#17783 ___ 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] problem in setPivotPoint of PAT for .3DS file
Hi Gopal; I don't understand what you really want. Please write simple and much understandable words to specify your problem. Regards. Ümit Uzun 2009/10/2 gopal goenka gopal.goe...@hed.ltindia.com Hi Ümit, i have a .3ds files with there own origin now i have set the files such that they form a assembly now if i want to rotate an object in one of the 3ds file about a point other than its origin(0,0,0) i will have to set pivot point to lets say (0,-200,10) and than rotate the object in that file about this point and not the origin of that file. can u suggest ... Thank you! Cheers, gopal :| -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17795#17795 ___ 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] problem in camera rotation
Hi Akilan; Matrix multiplaction is not commutative. If you change the order of matrix as a result the accumulated matrix will behave different as you anticipated. So order of matrix multiplexing is Scale, Rotate and lastly Translate. So in multiplexting operation order of them as follows; AccumulatedMatrix = TranslateMatrix * RotateMatrix * ScaleMatrix; So I suggest you to use one MatrixTransform because you can do all operation in one MatrixTransform too. And try rotMT-setMatrix(tmatrix * rmatrix); and delete transMT. Use single MatrixTransform. HTH. Regards. Ümit Uzun 2009/9/10 Akilan Thangamani akilan.thangam...@gmail.com Hi, yeah. I found my geometry center as ( 0.04,0.075,0.0). So first I do the rotation of 90 degree about z-axis and then translating my geometry to 0 by subtracting the aboive center values. Again I m getting my geometry is translated and half of the geometry is off the view. Have a look at my code, I dont understand where I am making mistake. void applyTexture(osg::Drawable* drawable, std::string imgName) { static std::string filePath = getenv(OSGHOME); osg::ref_ptrosg::Image image = osgDB::readImageFile(filePath + imgName); osg::ref_ptrosg::Texture2D tex2D = new osg::Texture2D; tex2D-setImage(image.get()); tex2D-setResizeNonPowerOfTwoHint(false); drawable-getOrCreateStateSet()-setTextureAttributeAndModes (0, tex2D.get()); drawable-getOrCreateStateSet()-setMode(GL_LIGHTING, osg::StateAttribute::OVERRIDE | osg::StateAttribute::OFF); osg::ref_ptrosg::TexEnv texEnv = new osg::TexEnv; texEnv-setMode(osg::TexEnv::REPLACE); drawable-getOrCreateStateSet()-setTextureAttributeAndModes (0, texEnv.get()); } osg::Geode* createGeometry() { float x = 0.0, y = 0.0; float width=0.08 , height=0.15 ; std::string imgName=\\images\\ring_active.png; osg::Geometry* boxGeom = new osg::Geometry; boxGeom-setName(myGeometry); osg::Vec3Array* vertices = new osg::Vec3Array; int _z=0.0; vertices-push_back(osg::Vec3(x, y, _z)); vertices-push_back(osg::Vec3(x + width, y, _z)); vertices-push_back(osg::Vec3(x + width, y + height, _z)); vertices-push_back(osg::Vec3(x, y + height , _z)); boxGeom-setVertexArray(vertices); osg::Vec3Array* normals = new osg::Vec3Array; normals-push_back(osg::Vec3(0.0f,50.0f,1.0f)); boxGeom-setNormalArray(normals); boxGeom-setNormalBinding(osg::Geometry::BIND_OVERALL); osg::Vec4Array* colors = new osg::Vec4Array; colors-push_back(osg::Vec4(0., 0., 0., 0.9)); boxGeom-setColorArray(colors); boxGeom-setColorBinding(osg::Geometry::BIND_OVERALL); //applying texture osg::ref_ptrosg::Vec2Array texCoordArray = new osg::Vec2Array; texCoordArray-push_back(osg::Vec2(0.f, 0.f)); texCoordArray-push_back(osg::Vec2(1.0, 0.f)); texCoordArray-push_back(osg::Vec2(1.0, 1.0)); texCoordArray-push_back(osg::Vec2(0.0, 1.0)); boxGeom-setTexCoordArray(0, texCoordArray.get()); applyTexture(boxGeom, imgName); boxGeom-addPrimitiveSet(new osg::DrawArrays(GL_QUADS,0,4)); osg::StateSet* stateset = boxGeom-getOrCreateStateSet(); stateset-setMode(GL_BLEND,osg::StateAttribute::ON); stateset-setRenderingHint(osg::StateSet::TRANSPARENT_BIN); osg::Geode* _geode=new osg::Geode; _geode-addDrawable(boxGeom); _geode-setName(myGeode); geometry_center=boxGeom-getBound().center(); return _geode; } int main( int argc, char **argv ) { osg::Camera* g_camera=new osg::Camera; g_camera-setProjectionMatrixAsOrtho2D(0,1,0,1.25); g_camera-setReferenceFrame(osg::Transform::ABSOLUTE_RF); g_camera-setClearMask(GL_DEPTH_BUFFER_BIT); g_camera-setRenderOrder(osg::Camera::POST_RENDER); //rotate osg::ref_ptrosg::MatrixTransform rotMT=new osg::MatrixTransform;osg::Matrix rmatrix; rmatrix.makeRotate(osg::DegreesToRadians(45.),osg::Vec3f(0.0,0.0,1.0)); rotMT-setMatrix(rmatrix); //translate osg::ref_ptrosg::MatrixTransform transMT=new osg::MatrixTransform;osg::Matrix tmatrix; tmatrix.makeTranslate(osg::Vec3f(-0.04,-0.075,0.0)); transMT-setMatrix(tmatrix); rotMT-addChild(transMT.get()); transMT-addChild(createGeometry()); g_camera-addChild(rotMT.get()); osgViewer::Viewer viewer; viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded); viewer.setCameraManipulator( new osgGA::TrackballManipulator() ); viewer.addEventHandler(new Rot); viewer.setSceneData(g_camera); osg::Vec3d eye(osg::Vec3f(0.0,0.0,0.0)); osg::Vec3d center(osg::Vec3f(0.0,0.0,0.0)); osg::Vec3d up
Re: [osg-users] [vpb] virtual reality builder
Yes I agree you about this is spammer :) Ümit Uzun 2009/9/4 Kim Bale kcb...@googlemail.com Is this spam? The website looks plain dodgy Kim. 2009/9/4 Lulin Wang osgfo...@tevs.eu: Lanmeivr company is superior in solving system simulation problems,specializing system simulation research and development under OSG platform. Lanmeivr’s has owned 30 patents and our simulator and system simulation products has been popular among more than 20 foreign countries such as France, America, Holand, Hinland, Russia, India, Egypt, Saudi Arabia, Malaysia, Indonesia, Costarica, Argentina, Chile,etc. Lanmeivr Company undertake the following virtual reality projects: 1. training system VR for cars, racing cars, special vehicles, aircraft (multi-DOF) 2.system simulation for industrial production units (single / multipeople ) 3.system simulation for weapons and equipment 4.3D digital city system development; (Stand alone / Network Version) 5.3D digital factory system development (Stand alone / Network Version) 6.3D science fiction film production services. www.lanmeivr.com [Image: http://i911.photobucket.com/albums/ac315/lanmeivr/3screensimulator.jpg][/url] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17041#17041 ___ 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] Generate example solution with osg Examples
Hi Filip; This is impossible because all example uses generated library, includes and dll's on your own platform so you have to compile OSG Core library too. Or if you have latest OSG binary installed your system before and create related environment variables you can create your sln normally and when compiling step in VisualStudio you may exclude core libraries and build only examples. I haven't tried but it would work. HTH. Regards. Ümit Uzun 2009/9/4 Filip Holm filip.h...@gmail.com Hi All, Is there a way to generate a solution that only contains the osg Example projects with the current CMakeLists.txt configuration? I've looked through the mailing list and the CMakeLIst files without finding an answer. I'm working on MSVC80 and find that a solution containing all the osg Core projects, applications and examples is a bit cumbersome to work with. I don't have a hole lot experience with CMake yet, but if there are no objections, I might have wack at setting up the CMakeLists to support a standalone example project. Filip ___ 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] osgmovie plugin missing?
Hi Alex; You only create an account that's it. And also I have already send SDK to your mail address. HTH. Ümit Uzun 2009/9/4 Alex Malhao franciskovi...@gmail.com Hi, thanks for your reply. I tryied to install quicktime sdk for windows how ever I has not able to download it from https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=19910. I need to have a specific account to do it. I used the following link to get the link for quicktime sdk for window: http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio/VisualStudioPlugins Is there any other way to get this? Thank you! Cheers, Alex -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17059#17059 ___ 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] osgmovie plugin missing?
Hi Alex; Yes you should rebuild OSG to use the QuickTime because to generate qt osg plugin. Regards. Ümit Uzun 2009/9/4 Alex Malhao franciskovi...@gmail.com Hi thanks again for the file! Now that I installed quicktime sdk, I used CMake to configure and generate, with the new quicktime links (like exposed in http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio/VisualStudioPlugins). Then I open the project in VisualStudio and build it. However the same error percists: Code: Warning: Could not find plugin to read objects form file xpto.mov. Unable to read file xpto.mov Do I need to Rebuild the whole project? Thank you! Cheers, Alex -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17062#17062 ___ 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] osgmovie plugin missing?
Hi Alex; If your mov type video has sound, you will hear sound too. Regards. Ümit Uzun 2009/9/4 Alex Malhao franciskovi...@gmail.com Ok thank you again! Using this qt plugin am I going to hear any sound? Or just the video without any sound? Cheers, Alex -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17068#17068 ___ 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] osgmovie plugin missing?
Hi, You can watch my old underwater simulation video which has quicktime plugin and play video in it from http://umituzun84.blogspot.com/2009/06/deepworker-submarine-simulator.html Regards. Ümit Uzun 2009/9/4 Ümit Uzun umituzu...@gmail.com Hi Alex; If your mov type video has sound, you will hear sound too. Regards. Ümit Uzun 2009/9/4 Alex Malhao franciskovi...@gmail.com Ok thank you again! Using this qt plugin am I going to hear any sound? Or just the video without any sound? Cheers, Alex -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=17068#17068 ___ 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] tutorial Problem
Hi Alex; You can find all source code and resource file from http://www.openscenegraph.org/projects/osg/attachment/wiki/Support/Tutorials/NPS_Tutorials_src.rar Regards. Ümit Uzun 2009/9/1 Charles Cossé cco...@gmail.com Alex, perhaps it's bad etiquette to send this as attachment, but oh well ... Charles On Mon, Aug 31, 2009 at 12:05 PM, Alex Gutheil gutisfo...@mymail.chwrote: Hi, iam new in that Community... Have a Q to this Tutorial: http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/FileLoadingAndTransforms Where can I get the file called t72-tank_des.flt... I cant find it in the Data Dir or sth... Thank you! Cheers, Alex -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16881#16881 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- AsymptopiaSoftware|softw...@thelimit 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] Rotate camera
Hi Alex, If you want to create your own viewer manipulator you should look at the other manipulator, for example look at TrackballManipulator and as you can see it inherits MatrixManipultor and you will do same operation and overload existing functions which will manipulate your expected viewer motions. And I attend to Gordon too :) Regards. Ümit Uzun 2009/8/28 Tomlinson, Gordon gtomlin...@overwatch.textron.com Look in the source YOU HAVE IT, do a simple search for files with the word 'Manipulator' in the name or used with in See the examples theres over 140 of them out the box with OSG in [OpenSceneGraph]\examples\ Look on the osg web site ( www.openscenegraph.org ) there are many more examples link and tutorials listed there Search email archives for previous answers Gordon Product Manager 3d __ Gordon Tomlinson Email : gtomlinson @ overwatch.textron.com __ -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Alex Malhao Sent: Friday, August 28, 2009 10:28 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Rotate camera Hi, I am trying to move the camera using the osgviewer. The user robertosfield already gave me the tipo to change the CameraManipulator, but I am still trying to figure out how to do that, is there any tutorial or example that I can see to help me? Where (among the source files) can I find this CameraManipulator? Sorry, but I am quite a noob in osg. Thank you! Cheers, Alex -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16826#16826 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or ghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or%0Ag ___ 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] Shadows Problem on vista
Hi Danny; Problems not related OS most possibly. ATI card generally can produce shadow texturing coordinate incompatibility. So shadows interlacing each other or recieve on different surface which not related target cast model. Please try same code on popular NVidia graphics card. Regards. Ümit Uzun 2009/8/25 Danny Lesnik danny...@walla.co.il Hi everybody, Thank you for reply. We are talking about 2 different laptops. One with Windows XP and second with Vista, both have latest ATI Rageon drivers. Thank you! Cheers, Danny -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16669#16669 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [vpb] download problem - Nasa Blue Marble Next Generation
Hi Miraslav; If you try to open image in your browser it's normal to crash or can't show anything. Because these images is too big images to not be shown on simple browser and image viewer. Try to Save As Image to your hard-disk. Regards. Ümit Uzun 2009/8/23 miroslav karpis karpis_miros...@yahoo.com Hi, I'm having difficulties with downloading data from the nasa web page ( http://mirrors.arsc.edu/nasa/world_500m/). In Ubuntu firefox the firefox just crashes after some download. Vista/Explorer does not show anything, Vista/Firefox shows error in the image. Are you able to download the images? Do you have any ideas why I can have this kind of problem? (maybe question for ubuntuforums?) Thank you! Cheers, miroslav -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16608#16608 ___ 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] Texturing Operation on osg::Cylinder ShapeDrawable Problem.
Hi All; If this is much simple question please forgive me :D I am trying to create wheel body and related texture by using ShapeDrawable and can't. Do I have to use Modeling tools to create my expected looking images as you can see from attached image? Or Do I have to manipulate texture coordinate by programmatically at runtime? What should I do? I can create this wheel easly by using Blender but I want to create by coding. ExpectedWheel part had created on DirectX by using same wheel texture. My Code: // Wheel osg::ref_ptrosg::Geode wheelGeode = new osg::Geode(); wheelGeode-addDrawable(new osg::ShapeDrawable(new osg::Cylinder(osg::Vec3(0.0, 0.0, 0.0), RADIUS, 0.08))); osg::ref_ptrosg::Texture2D texWheel = new osg::Texture2D(); texWheel-setImage(osgDB::readImageFile(./Data/wheel.bmp)); wheelGeode-getOrCreateStateSet()-setTextureAttributeAndModes(0, texWheel.get(), osg::StateAttribute::ON); Regards. Ümit Uzun attachment: Wheel.jpg___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Texturing Operation on osg::Cylinder ShapeDrawable Problem.
Hi Robert; Thanks for reply. I have known ShapeDrawable's main target is creating faster general shape for scene construction :) I will try to create my wheel by Geometry class. Regards. Ümit Uzun 2009/8/21 Robert Osfield robert.osfi...@gmail.com Hi Umit, The osg::Shapes/osg::ShapeDrawable really aren't written to be used for general geometry/scene construction. osg::Shape exist to help with defining primitive shapes for physics modeling, and the ShapeDrawable as a just a convenience method to help visualize them. The tool to use is osg::Geometry as it will give you complete flexibility. See the osggeometry example. Robert. On Fri, Aug 21, 2009 at 10:09 AM, Ümit Uzunumituzu...@gmail.com wrote: Hi All; If this is much simple question please forgive me :D I am trying to create wheel body and related texture by using ShapeDrawable and can't. Do I have to use Modeling tools to create my expected looking images as you can see from attached image? Or Do I have to manipulate texture coordinate by programmatically at runtime? What should I do? I can create this wheel easly by using Blender but I want to create by coding. ExpectedWheel part had created on DirectX by using same wheel texture. My Code: // Wheel osg::ref_ptrosg::Geode wheelGeode = new osg::Geode(); wheelGeode-addDrawable(new osg::ShapeDrawable(new osg::Cylinder(osg::Vec3(0.0, 0.0, 0.0), RADIUS, 0.08))); osg::ref_ptrosg::Texture2D texWheel = new osg::Texture2D(); texWheel-setImage(osgDB::readImageFile(./Data/wheel.bmp)); wheelGeode-getOrCreateStateSet()-setTextureAttributeAndModes(0, texWheel.get(), osg::StateAttribute::ON); Regards. Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Compress image
Hi Ufuk; Compress word doesn't define your expected operation very well. This operation's name is Mipmapping. You should generate automatic mipmapping for your texture in runtime and the you can choose any resolution you have created to use your program. Regards. Ümit Uzun 2009/8/20 Ufuk ufuk@gmail.com is there any function that compress image in osg? for example i have an 256x256 image and i want to compress it to 128x128 or 64x64... i checked for osg::Image::scaleImage() but it did not change the resolution.. maybe i did something wrong? Here is the code: /// void simUtil::SimImageUtils::scaleAndSaveImage( osg::Image* image, float scaleFactor, const std::string filename ) { osg::ref_ptrosg::Image cImage = new osg::Image(*image); cImage-scaleImage(image-s() * scaleFactor, image-t() * scaleFactor, image-r() * scaleFactor); osgDB::writeImageFile(*image, filename); } /// -- Ufuk ___ 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] Compress image
Hi Ufuk; If you want to create mippaped images on your disk instead of programmaticaly. I suggest you to use GIMP to mipmap(rescale each different resolution image separately) and when you need you can call related resolution image :) Is this your expected or you want to create one image which has all resoluted images in it? If you want kind of this operation you can use dds format. But I don't know osg does support reading mipmapped dds format. Regards. Ümit Uzun 2009/8/20 Ufuk ufuk@gmail.com Hi Ümit,yes, i need mipmapping but i want to store these mipmapped textures on disk. i dont want so many calculations on rendering... so i wanted to store these images on disk. do you know a way to do this or i should write a code? On Thu, Aug 20, 2009 at 5:43 PM, Ümit Uzun umituzu...@gmail.com wrote: Hi Ufuk; Compress word doesn't define your expected operation very well. This operation's name is Mipmapping. You should generate automatic mipmapping for your texture in runtime and the you can choose any resolution you have created to use your program. Regards. Ümit Uzun 2009/8/20 Ufuk ufuk@gmail.com is there any function that compress image in osg? for example i have an 256x256 image and i want to compress it to 128x128 or 64x64... i checked for osg::Image::scaleImage() but it did not change the resolution.. maybe i did something wrong? Here is the code: /// void simUtil::SimImageUtils::scaleAndSaveImage( osg::Image* image, float scaleFactor, const std::string filename ) { osg::ref_ptrosg::Image cImage = new osg::Image(*image); cImage-scaleImage(image-s() * scaleFactor, image-t() * scaleFactor, image-r() * scaleFactor); osgDB::writeImageFile(*image, filename); } /// -- Ufuk ___ 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 -- Ufuk ___ 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] Reference count catcher?
Hi Ufuk; As I know, If you create a new object with using ref_ptr, object's default ref_ptr should be initialized to 1. And after you have attached it to your scene, ref_ptr count gets 2. And after you delete your geometry from your scene graph ref count gets 1 again. And then this ref_ptr object will be deleted automatically when intelligent ref_ptr decided to it is unneccessary some times later. And then it will be deleted automaticly. Be cool. ref_ptr's target is counting pointer usage and finding unneccesary pointers. Regards. Ümit Uzun 2009/8/19 Ufuk ufuk@gmail.com Hi Ismail,thanks for the advice.. i think what you tell probably works but it is very long process... i already thought this but i wanted to try my chance here for an easier way.. these recompiling stuff is not easy for me now... anyway there should be an easier way? if i cant find an easier way, i definitely try what you have said.. On Wed, Aug 19, 2009 at 3:06 PM, Ismail Pazarbasi pazarb...@gmail.comwrote: 2009/8/19 Ufuk ufuk@gmail.com: i have an osg::Geometry. i store it in a class with ref_ptr when i delete it, i expect it to be deleted. in debug, i saw that the reference count is 2 before this destructor. even if i set this value to null, there reference count remains 1. so it is not deleting... what i want to ask is, how can i find who stores reference of my geometry. someone stores and increments the reference count without my information... do you know a way of doing this? i just want to be informed when my geometry reference count is increased so that i can find the memory leak in my project. -- Ufuk ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org Hi Ufuk, I don't know whether there already is a solution, but I'd suggest you to: 1. Add virtual qualifier before osg::Referenced::ref method: inline virtual void ref() const; 2. Rebuild OSG 3. override this method in your custom Geometry class class MyGeometry : public osg::Geometry { public: inline virtual void ref() const { osg::Geometry::ref(); } }; 4. Place breakpoint to that method and see callers. You can do the same for unref method as well. I haven't tested this but seems like to give you some hints. Ismail ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ufuk ___ 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] Reference count catcher?
Hi Ufuk; I am sure this working way is true, because Paul Martz had written a mail about rep_ptr's working mechanism and in this mail, he had talked about ref_ptr's automatic destruction in suitable time when realize related object's unnecessity for working program but I can't find this mail archieve ling to send you. Whatever, I am glad to solved at last :) Regards. Ümit Uzun 2009/8/19 Ufuk ufuk@gmail.com Hi Daniel, thanks for link. i searched but all i found was normal debugging and breakpoints... it really useful for me. i did not know such an ability of visual studio. i will try to use this way... --- Hi Ümit, maybe you are right about being cool... i realized that the destructor of my geometry is called but it is called without my control.. it is deleted after a time. i still wonder who gets this geometry and release this. anyway it is not a big problem for me now.. thanks for all your answers... On Wed, Aug 19, 2009 at 4:38 PM, Daniel Trstenjak daniel.trsten...@science-computing.de wrote: if you know could you tell me because i could not find. google's your friend: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/0ce702d6-5428-4b9b-8113-7fa3afe5b66f -- Daniel Trstenjak Tel : +49 (0)7071-9457-264 science + computing ag FAX : +49 (0)7071-9457-511 Hagellocher Weg 73 mailto: daniel.trsten...@science-computing.de D-72070 Tübingen WWW : http://www.science-computing.de/ -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Michel Lepert Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ufuk ___ 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] [forum] Help to use osgViewer in MFC
Hi Nguyen; OpenSceneGraph has multithreaded structure on drawing, culling and some kind of operation and singleThreaded structure on update traversal. So if you want to add or remove some nodes from your scene graph you should do this operation any updating operation sector. For example you can create one update callback and you can do these operation in it. Or you have to stop viewer renderer and then you do your add-remove operation and then start threading again. So application doesn't crash. But stopping and starting renderer thread is not best solution. This is my humble opinion. Regards. Ümit Uzun 2009/8/18 Nguyen Cuong manhcuong111...@yahoo.com Hi, I'm new mem, i have some problems that want suggetion. i use osg 2.8.2 in MFC viewer, in my scene, i have a root(osg::Group), and i can add object to root, remove all object in root(init scene again). but when i use removeChilden(0,root-getNumChildren()), my app run not well, some time it crash :( . Please give me some idea for it! ... Thank you! Cheers, Nguyen -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=16366#16366 ___ 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] osgMovie example problem
Hi Yang; It's not related quicktime or OSG. It's only related your Graphics Card and driver. I had same problem which I haven't solved on ATI card. Try same example different system, you will see it's perfectly working. And another suggestion is try to use Texture2D texturing, may be it can play in this texturing operation. Regards. Ümit Uzun 2009/7/25 yang zhiyuan yangzy...@gmail.com Hi: I find that there is only sound when I set useTextureRectangle to false.Does quicktime plugin only support TextrueRectangle. zhi yuan ___ 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] [build] Help building OSG 2.8.1 with CMAKE
Hi David; Please look at http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudioto achieve OSG installation on your VisualStudio environment. Regards. Ümit Uzun 2009/7/24 David Goering dgoer...@gmail.com Hi, I am trying to get OpenSceneGraph running under Windows XP, and Visual Studio 2003 or 2005. My plan is to try and use OSGART which requires ARToolkit / Openscenegraph to be installed previously. I downloaded OpenSceneGraph-2.8.1.zip, installed Cmake 2.61 and opened the Cmakelist.txt with Cmake. When I hit Configure a lot of things are read (which is normal as I have come to find out :D). But I am not sure how to update the variables so that they are all valid ? Virtually everything is read, All of the directories are NOTFOUND ACTUAL_3DPARTY_DIR is set to a folder that doesnt exist (I am not exactly sure what that is anyway). Sorry if this question is dumb, but I only want to get OpenScenegraph built and able to run, so that I can try and get OSGART running... any help would be appreciated :-* Thank you! Greetings, David [/code] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15331#15331 ___ 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] [build] Help building OSG 2.8.1 with CMAKE
Hi David; If you do all configurations (for example all Environment Variable settings, it is very critic to help CMAKE to find related libraries) there won't be any error I think and it is normal if you build in Debug mode :) Release mode would be faster. Regards. Ümit Uzun 2009/7/24 David Goering dgoer...@gmail.com Hi Ümit, Thanks for the quick answer. I dont know how I managed to miss that site, because I really did click through the documentation. I hope I did everything right now and I am building the project now, but its taking like 45 Minutes already and is still building, is that normal ? :O Thanks again, I'll keep you posted if it works or not Cheers, David -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15344#15344 ___ 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] [build] Help building OSG 2.8.1 with CMAKE
Hi David; Now choose INSTALL branch which listed left tree view and right click and choose Project Only-Build only INSTALL. After build operation you can go to C:\Program Files\OpenSceneGraph\share\OpenSceneGraph\bin and start every sample only double clicking. But don't forget to set OpenSceneGraph-Data environment varible pointer to use necessary data. Regards. Ümit Uzun 2009/7/24 David Goering dgoer...@gmail.com Hey, It is done building now, and it said it was successfull. But somehow I am pretty confused now, how exactly can I test if it worked, so that I can continue and install OSGART. I am new to VS/C++ and OSG, so excuse my ignorance :' A picture of my current visual studio is in the attatchment. Where do I go from here? Cheers, David -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15349#15349 ___ 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] Camera Move example
Hi Danny; You mean it is not working or working but not as expected? I saw a problem you multiply matrices wrong order. You always obey the TRS rule. First Scale then Rotate and lastly Translate. But as I see you have done wrong order for myCameraMatrix = cameraRotation * cameraTrans; HTH. Regards. Ümit Uzun 2009/7/21 Danny Lesnik danny...@walla.co.il Hi Jean-Sébastien, Thank you for your reply i'm trying to do it by first method I implemented some code but it looks like this code does nothing: bool CameraMover::handle(const osgGA::GUIEventAdapter ea,osgGA::GUIActionAdapter us) { osg::Matrixd myCameraMatrix; osg::Matrixd cameraRotation; osg::Matrixd cameraTrans; cameraRotation.makeRotate( osg::DegreesToRadians(0.0), osg::Vec3(0,1,0), // roll osg::DegreesToRadians(60.0), osg::Vec3(1,0,0) , // pitch osg::DegreesToRadians( 45.0), osg::Vec3(0,0,1) ); // heading cameraTrans.makeTranslate( 1,5,1 ); myCameraMatrix = cameraRotation * cameraTrans; osg::Matrixd i = myCameraMatrix.inverse(myCameraMatrix); osgViewer::Viewer* viewer = dynamic_castosgViewer::Viewer*( us ); ... switch(ea.getKey()) { case osgGA::GUIEventAdapter::KEY_Down: viewer-getCamera()-setViewMatrix(i*osg::Matrix::rotate(-(osg::PI_2),1,0,0)); return false; break; .. } } int main() { .. viewer.addEventHandler(new CameraMover); viewer.realize(); while( !viewer.done() ) { viewer.frame(); } Could you tell me please why my event is not working? Thank you! Cheers, Danny -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15152#15152 ___ 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] Transformations
Hi Paul; So in OSG first of all I try to do it with a osg::Switch but seems that this node accumulate the transformations... is that right? What do you mean about osg::Switch. It's not specific feaute on accumulating trasformation for osg::Switch as I know. It actual target is switching node while rendering scene graph. What type gridOrientation is? Be careful while multiplying the matricies because precedence is important for kind of these operations : result = rotation * translation; Regards. Ümit Uzun 2009/7/17 Pau Moreno Font tekka...@gmail.com Hi, I'm trying to change my OGL code to OSG but I'm having really problems with the transformations... I have 174 data files that each contains a cloud of points, a vector3 with the translartion, and the matrix of rotation of each cloud. So in OGL, i just do: { LoadFile( x++) //Loads a diferent file in each iteration glPushMatrix(); glTranslate( x , y , z ) glMultMatrixf( rotation ); glBegin( GL_POINTS ) glEnd(); glPopMatrix(); } So in OSG first of all I try to do it with a osg::Switch but seems that this node accumulate the transformations... is that right?? So what I finally do is to attach a diferent node in each iteration and detach the previous one. But the real problem is that OSG is not doing the same as OGL. I do this for each node: { osg::Matrixf rotation; osg::Matrixf translation; osg::Matrixf result; rotation.set( gridOrientation.get( 0 , 0 ) , gridOrientation.get( 0 , 1 ) , gridOrientation.get( 0 , 2 ) , 0.0, gridOrientation.get( 1 , 0 ) , gridOrientation.get( 1 , 1 ) , gridOrientation.get( 1 , 2 ) , 0.0, gridOrientation.get( 2 , 0 ) , gridOrientation.get( 2 , 1 ) , gridOrientation.get( 2 , 2 ) , 0.0, 0.0f , 0.0f , 0.0f , 1.0f ); translation.setTrans( x , y , z ); result = rotation * translation; osg::MatrixTransform *transformation = new osg::MatrixTransform(); transformation-addChild( gNode ); transformation-setMatrix( result ); } rotationOGL.makeRotate( osg::DegreesToRadians(90.0) , osg::Vec3d( 0.0 , 1.0 , 0.0 )); transformationOGL-setMatrix(rotationOGL); transformationOGL-addChild(m_root); m_vViewer.setSceneData( transformationOGL ); m_root-addChild( transformation ); . What I'm doing wrong? I've tried a lot of combinations of creating rotation , translation, result, but no one is the correct!! I think I'm doing something wrong I cannot apreciate. Thanks!! ___ 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] what is the thread difference between MFC and console?
Hi Forest; We have same problem and I find that threading isn't actual problem. real one is rendering on specified HWND. And frame rate always gets down while enlarging the HWND size contrary if you collapse the HWND size you can see easily that frame rate gets upper degree than wide one. I suspect that low frame rate is caused by rendering on specified HWND. If you really need to render on MFC control(i.e PictureBox) you should narrow you HWND control size to get high frame rate. Regards. Ümit Uzun 2009/7/10 forest fores...@163.com hi all, I have a problem with OSG in MFC program:When I run my program in console, I get 60 frames per second .However,When I move my program into MFC, I get slow frames.I do this as the example osgviewerMFC does, creating a new thread for OSG drawing. One thing I have to mention is that there is some time-consuming algorithms in my event handler . What should I do to improve my program in MFC? Thanks in advance. Best regards. forest ___ 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] MatrixTransform accumulation
Hi Yang, Translation operation isn't same as rotation operation. While one object is rotating in every transformation node by traversing the scene graph from parent to child, every node can effect the current rotation state to the target child node. Distinctly in translation operation every node try to translate target child node to specified coordinate point which is every PAT node instantiate it with osg::Vec3(10.0f,10.0f,0.0f). Actually every PAT nodes effect the child node to locate it osg::Vec3(10.0f,10.0f,0.0f) but only last one is validate on this operation. Becase PAT4 is the last node before the child node. So you can't hope to accumulate traslation value as rotation value. I hope that I did't tell you wrong explanations. Ümit Uzun 2009/7/9 yang zhiyuan yangzy...@gmail.com Hi: I find something strange like this: osg::Matrix _matrix; osg::ref_prtosg::MatrixTransform PAT1 = new osg::MatrixTransform(); _matrix.setTrans(osg::Vec3(10.0f,10.0f,0.0f)); PAT1 -setMatrix(_matrix); osg::ref_prtosg::MatrixTransform PAT2 = new osg::MatrixTransform(); PAT2 -setMatrix(_matrix); osg::ref_prtosg::MatrixTransform PAT3= new osg::MatrixTransform(); PAT3 -setMatrix(_matrix); osg::ref_prtosg::MatrixTransform PAT4= new osg::MatrixTransform(); PAT4 -setMatrix(_matrix); PAT1-addChild(PAT2-get()); PAT2-addChild(PAT3-get()); PAT3-addChild(PAT4-get()); osg::Node* node = osgDB::readNodeFile(*.ive); PAT4-addChild(node); I think node's final position is (40,40,0),but the actual position in scene is(10,10,0).Do I have to accumulate the four MatrixTransform manually? tim.yan ___ 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] Any suggestion about OSG-ODE integration and collision detection.
Hi Sukeder, Thanks Sukender. I have decided to achieve Collision Detection in Physics Engine as you suggested. And I have searched about PhysX library and I found lots of paper which says we can only use PhsyX if we have geforce * or upper level graphics card. And so I don't think about using it. Regards. 2009/6/25 Sukender suky0...@free.fr Hi Ümit, About collisions, I agree you whould do it in the physics engine. (BTW, does PhysX *require* a NVidia card? I guess no) And if you wish to have something that doesn't hide OSG, and that is much simpler than Delta3D, then you may look at what I did in PVLE ( http://pvle.sourceforge.net ). For the moment, I must admit ODE is a bit hidden in PVLE, but I'm currently modifying it so it also shows ODE as it does for OSG. There are many other implementations that can bind physics and OSG (see osgPhysics too... but it's not finished yet), but if you wish something simple, then PVLE may suit your needs. Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ Le Thu, 18 Jun 2009 11:34:50 +0200, Ümit Uzun umituzu...@gmail.com a écrit: Hi Sergey; I have known about Delta3D. It uses ODE too, but I am in contradiction about using pure OSG and ODE or using Delta3D game engine. To use Delta3D I have to spend some to get the structure and wrappers all other library. But with using pure OSG and ODE I can adopt so quickly. Anyway I thanks for your suggestion, and I will try to understand Delta3D's integration way. Regards. 2009/6/18 Sergey Kurdakov sergey.fo...@gmail.com Hi Ümit, you may take a look at delta3d ode integration, they add their stuff which is particular to delta3d , still it is possible to extract useful ideas. Regards Sergey Kurdakov http: On Thu, Jun 18, 2009 at 10:35 AM, Ümit Uzunumituzu...@gmail.com wrote: Hi All, I am planing to create simple off road jeep-racing and I have looked at the libraries to create dynamics and choose ODE. But I can't decide use ODE's collision detection mechanism instead of osgUtil's polytopeintersector, planeintersector or linesegmentintersector classes. So if you were me, which collision detection system would choose? PostScript : I am noob on ODE, this experince will be the first introdution for me. Any suggestion appreciated with glad. Regards. -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] I can't load Released OSG library in Debug Mode.
Hi All, Until now, I have been using VS2003 in all project. But we have upgraded to VS2008. I don't know why can't load released OSG in Debug mode or vice versa. It throws and std::badalloc exception while using reading some model or images by osgDB's static functions(readNode, readImageFile etc...) But same code works when working same mode. VS2008 don't let us to use this interchangeability anymore or should I set some parameters? Regards. -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] I can't load Released OSG library in Debug Mode.
Thanks Vincent and JS; It is interesting no-no which is seen to me odd :) It always restrict us while using created dll project which uses osg. So I have to create my own dll project in two version (debug and release) for compiling new project which uses this dll in it for possibility of beeing different compilation mode. Best Regards. 2009/6/19 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com Hello Ümit, Until now, I have been using VS2003 in all project. But we have upgraded to VS2008. I don't know why can't load released OSG in Debug mode or vice versa. It throws and std::badalloc exception while using reading some model or images by osgDB's static functions(readNode, readImageFile etc...) But same code works when working same mode. VS2008 don't let us to use this interchangeability anymore or should I set some parameters? You mean you're trying to link an app compiled in debug with an OSG lib compiled in release, or vice versa? Yeah, that's a big no-no, and it's been discussed often on this list. You need to match the debug/release across your whole project, at least since VC++ 2005. Otherwise the standard library used is different and makes different assumptions about how to allocate memory and other things. This is true for any library that is coded in C++. If the dependency contains only C code, you can use only the release version of that lib with both release and debug applications if you want. The OSG dependencies packages contain both release and debug dependencies, and CMake will choose the right one when compiling OSG. You just need to make sure you do the same thing in your own apps/projects - when compiling your project in release, link to osg.lib/osgDB.lib/... and when compiling it in debug, link to osgd.lib/osgDBd.lib/... Hope this helps, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com 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 -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg OpenGL ES
Hi Hesanyuan; As I know there is no OSG distribution which support's OpenGL-ES yet. Regards. 2009/6/18 hsany330 hsany...@163.com Hi , I want to write a game for my phone with OSG.But i didn't find OSG lib which based on OpenGL ES.Who know something of this,please tell me.Thanks. hesanyuan -- 200万种商品,最低价格,疯狂诱惑你http://count.mail.163.com/redirect/footer.htm?f=http://gouwu.youdao.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgOcean 1.0 (LGPL) Released
RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x8cdd RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x8cdd RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x8cdd and just a blank screen shows up. If I change to 32 bit color at the same resolution, I get a couple frames that show up properly, then the window goes blank with the following printed to the console: Building scene... . Loading cubemaps: 0.213689s . Generating ocean surface: 1.89968e-005s . Creating ocean scene: 0.000278248s . Loading islands: 0.0593453s . Setting up lighting: 1.73206e-005s complete. Time Taken: 0.276148s RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x8cdd Warning: detected OpenGL error 'out of memory' after RenderBin::draw(,) Warning: detected OpenGL error 'out of memory' after RenderBin::draw(,) RenderStage::drawInner(,) FBO status= 0x8cd5 Warning: detected OpenGL error 'out of memory' after RenderBin::draw(,) Warning: detected OpenGL error 'out of memory' after RenderBin::draw(,) RenderStage::drawInner(,) FBO status= 0x8cd5 It works fine if I run at 1024x768. Is this likely a driver problem, or is there something I can tweak in the FBO setup? I'm not familiar with their use at all. Thanks Martins * 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 -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Any suggestion about OSG-ODE integration and collision detection.
Hi All, I am planing to create simple off road jeep-racing and I have looked at the libraries to create dynamics and choose ODE. But I can't decide use ODE's collision detection mechanism instead of osgUtil's polytopeintersector, planeintersector or linesegmentintersector classes. So if you were me, which collision detection system would choose? PostScript : I am noob on ODE, this experince will be the first introdution for me. Any suggestion appreciated with glad. Regards. -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Any suggestion about OSG-ODE integration and collision detection.
Hi Sergey; I have known about Delta3D. It uses ODE too, but I am in contradiction about using pure OSG and ODE or using Delta3D game engine. To use Delta3D I have to spend some to get the structure and wrappers all other library. But with using pure OSG and ODE I can adopt so quickly. Anyway I thanks for your suggestion, and I will try to understand Delta3D's integration way. Regards. 2009/6/18 Sergey Kurdakov sergey.fo...@gmail.com Hi Ümit, you may take a look at delta3d ode integration, they add their stuff which is particular to delta3d , still it is possible to extract useful ideas. Regards Sergey Kurdakov http: On Thu, Jun 18, 2009 at 10:35 AM, Ümit Uzunumituzu...@gmail.com wrote: Hi All, I am planing to create simple off road jeep-racing and I have looked at the libraries to create dynamics and choose ODE. But I can't decide use ODE's collision detection mechanism instead of osgUtil's polytopeintersector, planeintersector or linesegmentintersector classes. So if you were me, which collision detection system would choose? PostScript : I am noob on ODE, this experince will be the first introdution for me. Any suggestion appreciated with glad. Regards. -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Any suggestion about OSG-ODE integration and collision detection.
Hi Micheal; Thanks for your polite offer to helping me:) I have looked Bullet and Nvidia PhysX. I can't choose PhysX because I want to run my PhysX engine ATI. I think it's not support. Or do you think it can be modified to send the physics calculation to CPU instead of GPU on PhysX. I had tried to grasp the Bullet but it seems much complicated then ODE, so I choosed ODE. Yes as you said, I have to handle collision detection and create contact with physics dynamics if I choose another collision library instead of own one. So this is big problem, so the real solution seems to use main library of ODE. If you have any suggestion, I appreciate with glad :) Regards and Thanks. 2009/6/18 Michael Bosse' metis...@gmail.com One more thing, if you do your collision detection in OSG, you will need to handle the physical response yourself. The physics engine is already set up to handle that correctly. For starters, i'd just stick with physics. On Thu, Jun 18, 2009 at 2:54 AM, Sergey Kurdakovsergey.fo...@gmail.com wrote: Hi Ümit, you may take a look at delta3d ode integration, they add their stuff which is particular to delta3d , still it is possible to extract useful ideas. Regards Sergey Kurdakov http: On Thu, Jun 18, 2009 at 10:35 AM, Ümit Uzunumituzu...@gmail.com wrote: Hi All, I am planing to create simple off road jeep-racing and I have looked at the libraries to create dynamics and choose ODE. But I can't decide use ODE's collision detection mechanism instead of osgUtil's polytopeintersector, planeintersector or linesegmentintersector classes. So if you were me, which collision detection system would choose? PostScript : I am noob on ODE, this experince will be the first introdution for me. Any suggestion appreciated with glad. Regards. -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgOcean 1.0 (LGPL) Released
Hi Kim, Thanks you so much. But prompted screen wants username and password from me? Regards. 2009/6/18 Kim C Bale k.b...@hull.ac.uk Hi Umit, I’ve just applied a patch that should solve the samplerRect issue for you, I think I was being too hasty to blame your graphics drivers. Update your code from: *https://osgocean.googlecode.com/svn/tags/osgOcean-1.0/* Regards, Kim. *From:* osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *Ümit Uzun *Sent:* 18 June 2009 07:35 *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] osgOcean 1.0 (LGPL) Released Hi Kim and JS; Thanks for suggestion. I have tried again and as you said I really need new version GPU. This is only solution which will resolve kind of these problems. Regards. 2009/6/17 Kim C Bale k.b...@hull.ac.uk Martins, J-S, Here you go. If you zoom in to 400% or so you can see 3 pixels near the horizon that are really dark. They flicker during the simulation, sometimes individual pixels, other times it looks like larger groups. Yep it's a bug in the library. Looks like a polygon break to me, possibly a corner piece. I must have been trying to ignore it as it's a nightmare to debug that bit of code. I'll log it, but it could take a while to find that blighter. If you disable godrays, silt and dof (basically disable all underwater effects) then go underwater, you'll see a black like at the horizon. it looks like fog is not being applied for a line of pixels at the horizon. I think this is a fogging issue, the wave tops are probably going over the fog line and exposing unfogged geometry. Shouldn't be too bad that one. Cheers all. Kim. From: osg-users-boun...@lists.openscenegraph.org on behalf of Martins Innus Sent: Wed 17/06/2009 19:35 To: OpenSceneGraph Users Subject: Re: [osg-users] osgOcean 1.0 (LGPL) Released Kim, Here you go. If you zoom in to 400% or so you can see 3 pixels near the horizon that are really dark. They flicker during the simulation, sometimes individual pixels, other times it looks like larger groups. Sorry if this comes through twice, looks like the first one was too big for the list. Martins Kim C Bale wrote: Hi Martins, It now works at any resolution in 32 bit color, but with some shimmering black pixels where the sky meets the ocean. Kind of like you get if you had a bad DVI cable going to your monitor. Could you post a screen shot of that? Does sound a like it could be a bug in the rendering rather than a driver issue. At 16 bit color, I can get it to work if I toggle off glare. I still get the FBO setup errors, but it seems to look ok, and the out of memory errors are gone. I've jumped to conclusion on that one. I just tested that on mine and get the same RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x8cdd errors as yourself. I'll look into it. Cheers chap, Kim. From: osg-users-boun...@lists.openscenegraph.org on behalf of Martins Innus Sent: Wed 17/06/2009 17:56 To: OpenSceneGraph Users Subject: Re: [osg-users] osgOcean 1.0 (LGPL) Released Kim, OK, I upgraded the driver to the latest version (185.85) and have made some progress. It now works at any resolution in 32 bit color, but with some shimmering black pixels where the sky meets the ocean. Kind of like you get if you had a bad DVI cable going to your monitor. At 16 bit color, I can get it to work if I toggle off glare. I still get the FBO setup errors, but it seems to look ok, and the out of memory errors are gone. So I guess I'll chalk it up to drivers, I'll keep checking for newer ones. Thanks for the suggestions. Martins Kim C Bale wrote: Hi Martins, Sorry, little hasty with the send button there. This is an odd one, I don't understand why changing your screen resolution would affect the program, so, I *suspect* this is a driver problem. I had similar problems just a week ago with osgOcean when I updated to the latest set of drivers for my 8800GTS 512, and it was giving me the 'out of memory' errors you've got. Rolling back my drivers solved it. Perhaps J-S has some ideas on this one. In the mean time you should be able to disable all the effects that use FBOs with the following keys. r - reflections R - refractions o - depth of field g - glare G - godrays Regards, Kim. From: osg-users-boun...@lists.openscenegraph.org on behalf of Martins Innus Sent: Wed 17/06/2009 15:16 To: OpenSceneGraph Users Subject: Re: [osg-users] osgOcean 1.0 (LGPL) Released Hi, I'm having trouble getting this to run. Machine Specs: Windows XP Visual Studio 2003 NVIDIA Quadro
Re: [osg-users] osgOcean 1.0 (LGPL) Released
Hi Kim, I have same problem with samplerRect before when I wanted to try osgMovie example as you suggested to Robert. And I tried to use sampler2d instead of and was solved. And as this problem, osgWidget's Widget class texture operation was only supported with TextureRectange and I have implemented Texture2D to show my movie on it by myself. I think my GPU's main one problem is TextureRectangle implementation. Regards. 2009/6/18 Ümit Uzun umituzu...@gmail.com Hi Kim, Thanks you so much. But prompted screen wants username and password from me? Regards. 2009/6/18 Kim C Bale k.b...@hull.ac.uk Hi Umit, I’ve just applied a patch that should solve the samplerRect issue for you, I think I was being too hasty to blame your graphics drivers. Update your code from: *https://osgocean.googlecode.com/svn/tags/osgOcean-1.0/* Regards, Kim. *From:* osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *Ümit Uzun *Sent:* 18 June 2009 07:35 *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] osgOcean 1.0 (LGPL) Released Hi Kim and JS; Thanks for suggestion. I have tried again and as you said I really need new version GPU. This is only solution which will resolve kind of these problems. Regards. 2009/6/17 Kim C Bale k.b...@hull.ac.uk Martins, J-S, Here you go. If you zoom in to 400% or so you can see 3 pixels near the horizon that are really dark. They flicker during the simulation, sometimes individual pixels, other times it looks like larger groups. Yep it's a bug in the library. Looks like a polygon break to me, possibly a corner piece. I must have been trying to ignore it as it's a nightmare to debug that bit of code. I'll log it, but it could take a while to find that blighter. If you disable godrays, silt and dof (basically disable all underwater effects) then go underwater, you'll see a black like at the horizon. it looks like fog is not being applied for a line of pixels at the horizon. I think this is a fogging issue, the wave tops are probably going over the fog line and exposing unfogged geometry. Shouldn't be too bad that one. Cheers all. Kim. From: osg-users-boun...@lists.openscenegraph.org on behalf of Martins Innus Sent: Wed 17/06/2009 19:35 To: OpenSceneGraph Users Subject: Re: [osg-users] osgOcean 1.0 (LGPL) Released Kim, Here you go. If you zoom in to 400% or so you can see 3 pixels near the horizon that are really dark. They flicker during the simulation, sometimes individual pixels, other times it looks like larger groups. Sorry if this comes through twice, looks like the first one was too big for the list. Martins Kim C Bale wrote: Hi Martins, It now works at any resolution in 32 bit color, but with some shimmering black pixels where the sky meets the ocean. Kind of like you get if you had a bad DVI cable going to your monitor. Could you post a screen shot of that? Does sound a like it could be a bug in the rendering rather than a driver issue. At 16 bit color, I can get it to work if I toggle off glare. I still get the FBO setup errors, but it seems to look ok, and the out of memory errors are gone. I've jumped to conclusion on that one. I just tested that on mine and get the same RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x8cdd errors as yourself. I'll look into it. Cheers chap, Kim. From: osg-users-boun...@lists.openscenegraph.org on behalf of Martins Innus Sent: Wed 17/06/2009 17:56 To: OpenSceneGraph Users Subject: Re: [osg-users] osgOcean 1.0 (LGPL) Released Kim, OK, I upgraded the driver to the latest version (185.85) and have made some progress. It now works at any resolution in 32 bit color, but with some shimmering black pixels where the sky meets the ocean. Kind of like you get if you had a bad DVI cable going to your monitor. At 16 bit color, I can get it to work if I toggle off glare. I still get the FBO setup errors, but it seems to look ok, and the out of memory errors are gone. So I guess I'll chalk it up to drivers, I'll keep checking for newer ones. Thanks for the suggestions. Martins Kim C Bale wrote: Hi Martins, Sorry, little hasty with the send button there. This is an odd one, I don't understand why changing your screen resolution would affect the program, so, I *suspect* this is a driver problem. I had similar problems just a week ago with osgOcean when I updated to the latest set of drivers for my 8800GTS 512, and it was giving me the 'out of memory' errors you've got. Rolling back my drivers solved it. Perhaps J-S has some ideas on this one. In the mean time you should be able to disable all the effects that use FBOs with the following
Re: [osg-users] Help - StereoMode
Hello asdf; Firstly if you want to be member of OSG-Mail group you should address yourself by reasonable name and surname please. We need this requirements to be more personnel in the group. Regards. 2009/6/18 asdf asdf spamcorpeti...@gmail.com Hello, I'm working with a 3D model in openSceneGraph and I'm having difficulties configuring the Stereo Mode (Interlace). At first the vision of the scene is ok, but when I move through the scene it starts distorting and even if I go back to the orginal point the Stereo View stills distorted. The distortion consists in: When we move forward (we use Traslation movements) the two eye views start overlapping each other.* I attach The corresponding code of activating Stereo Mode: osg::DisplaySettings::instance()-setStereoMode(osg: :DisplaySettings::StereoMode::HORIZONTAL_INTERLACE); osg::DisplaySettings::instance()-setStereo(true); *About moving though the scene i use the TrackballManipulator Excuse me for my english and Thank you , CorPetit09 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgOcean 1.0 (LGPL) Released
Hi Kim, Actually I am sorry for not thinking it can be the svn adress :) You make the really good magic. It works perfect without any error as you can see from the attached screenshot:) Thanks so much :) But there is some dots flickering as JS and Martins's said about. And it's not problem I think :) This is really really good application. What did you do? You have only changed samplerRect to sampler2D? Regards and Congratulations :) 2009/6/18 Kim C Bale k.b...@hull.ac.uk Hi Umit, Sorry use svn checkout *http*://osgocean.googlecode.com/svn/tags/osgOcean-1.0/ osgocean-read-onlyhttp://osgocean.googlecode.com/svn/tags/osgOcean-1.0/%0Aosgocean-read-only or grab a copy of the tortoise client to download it. Regards, Kim. *From:* osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *Ümit Uzun *Sent:* 18 June 2009 11:45 *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] osgOcean 1.0 (LGPL) Released Hi Kim, Thanks you so much. But prompted screen wants username and password from me? Regards. 2009/6/18 Kim C Bale k.b...@hull.ac.uk Hi Umit, I’ve just applied a patch that should solve the samplerRect issue for you, I think I was being too hasty to blame your graphics drivers. Update your code from: *https://osgocean.googlecode.com/svn/tags/osgOcean-1.0/* Regards, Kim. *From:* osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *Ümit Uzun *Sent:* 18 June 2009 07:35 *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] osgOcean 1.0 (LGPL) Released Hi Kim and JS; Thanks for suggestion. I have tried again and as you said I really need new version GPU. This is only solution which will resolve kind of these problems. Regards. 2009/6/17 Kim C Bale k.b...@hull.ac.uk Martins, J-S, Here you go. If you zoom in to 400% or so you can see 3 pixels near the horizon that are really dark. They flicker during the simulation, sometimes individual pixels, other times it looks like larger groups. Yep it's a bug in the library. Looks like a polygon break to me, possibly a corner piece. I must have been trying to ignore it as it's a nightmare to debug that bit of code. I'll log it, but it could take a while to find that blighter. If you disable godrays, silt and dof (basically disable all underwater effects) then go underwater, you'll see a black like at the horizon. it looks like fog is not being applied for a line of pixels at the horizon. I think this is a fogging issue, the wave tops are probably going over the fog line and exposing unfogged geometry. Shouldn't be too bad that one. Cheers all. Kim. From: osg-users-boun...@lists.openscenegraph.org on behalf of Martins Innus Sent: Wed 17/06/2009 19:35 To: OpenSceneGraph Users Subject: Re: [osg-users] osgOcean 1.0 (LGPL) Released Kim, Here you go. If you zoom in to 400% or so you can see 3 pixels near the horizon that are really dark. They flicker during the simulation, sometimes individual pixels, other times it looks like larger groups. Sorry if this comes through twice, looks like the first one was too big for the list. Martins Kim C Bale wrote: Hi Martins, It now works at any resolution in 32 bit color, but with some shimmering black pixels where the sky meets the ocean. Kind of like you get if you had a bad DVI cable going to your monitor. Could you post a screen shot of that? Does sound a like it could be a bug in the rendering rather than a driver issue. At 16 bit color, I can get it to work if I toggle off glare. I still get the FBO setup errors, but it seems to look ok, and the out of memory errors are gone. I've jumped to conclusion on that one. I just tested that on mine and get the same RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x8cdd errors as yourself. I'll look into it. Cheers chap, Kim. From: osg-users-boun...@lists.openscenegraph.org on behalf of Martins Innus Sent: Wed 17/06/2009 17:56 To: OpenSceneGraph Users Subject: Re: [osg-users] osgOcean 1.0 (LGPL) Released Kim, OK, I upgraded the driver to the latest version (185.85) and have made some progress. It now works at any resolution in 32 bit color, but with some shimmering black pixels where the sky meets the ocean. Kind of like you get if you had a bad DVI cable going to your monitor. At 16 bit color, I can get it to work if I toggle off glare. I still get the FBO setup errors, but it seems to look ok, and the out of memory errors are gone. So I guess I'll chalk it up to drivers, I'll keep checking for newer ones. Thanks for the suggestions. Martins Kim C Bale wrote: Hi Martins, Sorry, little hasty
Re: [osg-users] osgOcean 1.0 (LGPL) Released
Hi Kim, Firsty congratulations for these awesome works. When I try to create solution file in cmake on VisualStudio2008 I get the errors; CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: FFTSS_INCLUDE_DIR used as include directory in directory C:/Projects/Ocean/osgOcean-Source/src/osgOcean FFTSS_LIBRARY linked by target osgOcean in directory C:/Projects/Ocean/osgOcean-Source/src/osgOcean OPENTHREADS_LIBRARY_DEBUG linked by target osgOcean in directory C:/Projects/Ocean/osgOcean-Source/src/osgOcean I have compiled the FFTSS library and locate it in same folder with osgOcean-Source folder. Should I declare specific Environment Variable to help cmake for finding right fftss include directory and library? And Do we have to OpenThreads library in debug mode? I have a OSG distiribution in only release mode. Regards. 2009/6/16 Kim C Bale k.b...@hull.ac.uk Hi Martin, This problem arises with two particular effects, the glare and the underwater dof which require special treatment of the alpha component in the framebuffer. You can disable those using: enableUnderwaterDOF(false) enableGlare(false) Then you need to disable the default scene shader with this: setUseDefaultSceneShader(false) In the OceanScene class. If you remove the default shader you'll also lose the underwater light scattering and fogging calculations on models below the surface. Trying to offer lots of out-of-the-box shader effects whilst also accommodating the fixed pipeline is a tricky problem and this area needs a little work, but that should work for you. Regards, Kim. -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Martin Scheffler Sent: 16 June 2009 15:18 To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] osgOcean 1.0 (LGPL) Released Hi, I compiled osgOcean and everything works fine here. I ran into trouble when integrating it with my existing application. When I used the last version of osgOcean, I could just put the ocean somewhere in the scene graph and it did not interact with my other stuff. Now osgOcean blocks my view onto the other objects in the scene. When I add the objects as children to the OceanScene, the objects are shown, but the ocean shaders are applied to the objects. This add some sparkling effects to my animations, which looks nice but is not really what I want. So how can I add my objects to the scene without interference? Thank you! Cheers, Martin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=14038#14038 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or ghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or%0Ag * 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 -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgOcean 1.0 (LGPL) Released
streak_shader_fragment_shader infolog: Fragment shader failed to compile with the following errors: ERROR: 0:4: 'samplerRect' : syntax error parse error ERROR: 1 compilation errors. No code generated. glLinkProgram FAILED Program infolog: Fragment shader(s) were not successfully compiled before glLinkProgram() was cal led. Link failed. FRAGMENT glCompileShader streak_shader_fragment_shader FAILED FRAGMENT Shader streak_shader_fragment_shader infolog: Fragment shader failed to compile with the following errors: ERROR: 0:4: 'samplerRect' : syntax error parse error ERROR: 1 compilation errors. No code generated. glLinkProgram FAILED Program infolog: Fragment shader(s) were not successfully compiled before glLinkProgram() was cal led. Link failed. FRAGMENT glCompileShader glare_composite_fragment_shader FAILED FRAGMENT Shader glare_composite_fragment_shader infolog: Fragment shader failed to compile with the following errors: ERROR: 0:2: 'samplerRect' : syntax error parse error ERROR: 1 compilation errors. No code generated. glLinkProgram FAILED Program infolog: Fragment shader(s) were not successfully compiled before glLinkProgram() was cal led. Link failed. I think these all related about driver because of my driver 2.5 years old and it's last updated driver support only opengl 2.1 and GLSL 1.20. I think I can't run osgOcean in my company computer. I have to use another newer one. Any suggestions? Regards. 2009/6/17 Kim C Bale k.b...@hull.ac.uk Hi Umit, Firsty congratulations for these awesome works. Thank you, still plenty to fix though it seems J CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: FFTSS_INCLUDE_DIR When you run CMake it should let you set these manually if they’re not found automatically. You will need to explicitly specify the path to the include directory and also the fftss.lib file (this is what I do when I run CMake) When you run the example application the fftss.dll will need to be in the same directory as the exe or by adding the directory it’s in to your PATH environment variable (if you’re in windows) OPENTHREADS_LIBRARY_DEBUG linked by target osgOcean in directory C:/Projects/Ocean/osgOcean-Source/src/osgOcean I think if you just point it to the release mode version of OpenThreads it will let you build the project. But be careful, if you try and build a debug version of the application/library it’s highly likely you’ll get errors. If that doesn’t solve it get back to me. Regards, Kim. *From:* osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *Ümit Uzun *Sent:* 17 June 2009 11:48 *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] osgOcean 1.0 (LGPL) Released Hi Kim, Firsty congratulations for these awesome works. When I try to create solution file in cmake on VisualStudio2008 I get the errors; CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: FFTSS_INCLUDE_DIR used as include directory in directory C:/Projects/Ocean/osgOcean-Source/src/osgOcean FFTSS_LIBRARY linked by target osgOcean in directory C:/Projects/Ocean/osgOcean-Source/src/osgOcean OPENTHREADS_LIBRARY_DEBUG linked by target osgOcean in directory C:/Projects/Ocean/osgOcean-Source/src/osgOcean I have compiled the FFTSS library and locate it in same folder with osgOcean-Source folder. Should I declare specific Environment Variable to help cmake for finding right fftss include directory and library? And Do we have to OpenThreads library in debug mode? I have a OSG distiribution in only release mode. Regards. 2009/6/16 Kim C Bale k.b...@hull.ac.uk Hi Martin, This problem arises with two particular effects, the glare and the underwater dof which require special treatment of the alpha component in the framebuffer. You can disable those using: enableUnderwaterDOF(false) enableGlare(false) Then you need to disable the default scene shader with this: setUseDefaultSceneShader(false) In the OceanScene class. If you remove the default shader you'll also lose the underwater light scattering and fogging calculations on models below the surface. Trying to offer lots of out-of-the-box shader effects whilst also accommodating the fixed pipeline is a tricky problem and this area needs a little work, but that should work for you. Regards, Kim. -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Martin Scheffler Sent: 16 June 2009 15:18 To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] osgOcean 1.0 (LGPL) Released Hi, I compiled osgOcean and everything works
Re: [osg-users] [build] Can't build libraries under windows
Hi Stefan, Could you be more specific about what you are talking about? I think none of OSG-User can understand your problem. So if you want a solution, firstly try to tell more understandable way. Regards. 2009/6/15 stefan nortd ste...@nortd.com Nice, I was just looking into using code::blocks. Unfortunately the rapidshar link is not working anymore. Any chance you can post the files again? Have they made it to the wiki? /stefanix -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13972#13972 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Some Fixes
Hi Robert, There is some fixes this is not critic, only for appearance ; osgpointsprites : there is needless inclusions #include osg/TexEnv #include osg/GLExtensions #include osg/TexEnv osgautocapture: Rendring time = should be Rendering time = Regards. -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Bug report
Hi Robert, Sometimes people may be need rainy snow as you can see from same problem this thread http://groups.google.com/group/osg-users/browse_thread/thread/79a8ad1aac24c013/c0cd14cf64986de0?lnk=gstq=selman+osgParticle#c0cd14cf64986de0 I think we should fix Tom's reported bug. Regards. 2009/6/11 Robert Osfield robert.osfi...@gmail.com Hi Tom, On Thu, Jun 11, 2009 at 2:28 PM, Jolley, Thomas Pthomas.p.jol...@boeing.com wrote: The last line in the block sets the previousTime to the currentTime. I think this is what causes the delta to be 0.0 on the other PrecipitationEffect instances for most uses. The location of ???'s comment that pointed out the bug was misleading. Ah... yes this will mean that there is real problem when two or more precipitation effects are active at the same time - as the wind will only affect the first PrecitpitationEffect. I'm curious how often this issue would effect end users apps, as typically one would have just one precipitation effect on at one time as the effect is global effect, and it generally doesn't rain and snow at the same time... Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ArgumentParser issues on Windows?
Hi Butler; It is well known problem :) I think your OSG system only compiled in release mode and you are trying to build this example in debug mode, so program throw bad_alloc exception. Try to build your example same build type as your OSG system. If it is released mode you build your example in released mode or vice versa. Regards. 2009/6/9 Butler, Lee Mr CIV USA USAMC lee.but...@us.army.mil The following code works on Linux/Mac but not Windows. Is there something I should realize about ArgumentParser and ApplicationUsage? Maybe it's some Windows/VS2008 thing I've missed? - #include osg/ArgumentParser #include string int main(int argc, char * argv[]) { std::string name(Fred); osg::ArgumentParser arguments(argc, argv); osg::ApplicationUsage *au; au = arguments.getApplicationUsage(); // the next two lines cause runtime errors on Window au-setApplicationName(name); std::string cmdLineName = arguments.getApplicationName(); return 0; } - The au-setApplicationName(name) line gives the error: Unhandled exception at 0x76bc42eb foo.exe MicrosoftC++ exception: std::bad_alloc at memory location 0x0018f37c.. commenting that line out results in the next line producing: arguments.getApplicationName() causes Unhandled Exception at 0xHexAddress in foo.exe 0xC005: Access violation reading location 0xccc0. This is setup as a Windows Console App in VS2008. I can set a breakpoint on the first line and see that argv[0] and argc are set reasonably. Stepping forward I note that the constructor for ApplicationUsage doesn't initialize _applicationName. Visual Studio debugger notes Bad Ptr on au-_applicationName before the call to: au-setApplicationName(name) Odd since _applicationName is declared: std::string _applicationName; Lee ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Load PlugIn Library in OsgDB::Registry
Hi Croperli; Look at the http://www.skew-matrix.com/bb/viewtopic.php?f=8t=3 Troubleshooting the Build Did osgdb_curl.dll fail to link? OSG creates several libraries during a build. One of the libraries, osgdb_curl.dll, has a special dependency on Windows. During the OSG build, if this library fails to link, and the link error indicates that wldap32.lib can’t be found, you’ll need to manually configure Visual Studio’s library search path and possibly install the missing library. Note that the compile works fine, or fails, depending on the compiler you are using. Currently, this is only an issue for some editions of VS8. All VS9 installations appear to include this library. Adding wldap32.dll is more art than science. If the file is already installed on your system, you can find it by doing a file search in C:\Program Files. Then, you simply add the directory to the library search path as described below. If you don’t have wldap32.dll already installed, download and install MS Windows SDK for MS Server 2008http://msdn.microsoft.com/en-us/windows/bb980924.aspx(do a web search to find it). After this is installed, enter the VS IDE options. In Projects and Solutions VC++ Directories, select Library files from the Show Directories For menu, then add this directory to the list: C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib Regards. 2009/6/9 crope...@sohu.com Hello All, Is there something wrong in OsgDB::Registry::LoadLibrary(std::string libname) when i load the .curl plugin in debug , it is shown that the .curl plugin con't be found.However,it works well in release mode. when i open osgDb_curld.dll in depends_22, msvcr80d.dll con't be found.The ThirdParty depencies in svn dotn't have osgDb_curld.dll file in its child folder Bin,I move msvcm80d.dll msvcp80d.dll msvcr80d.dll Microsoft..manifeVC80.DebugCRTst files to thirdPary/Bin ,however it doesn't work! my osg version is osg 2.6,ide Vs2005! Take Care Please! -- 寻找童趣 好游戏让你停不下来 http://goto.mail.sohu.com/goto.php?code=ecard_jiaozhu 抽奖换礼,好运有你! http://goto.mail.sohu.com/goto.php?code=090601jifen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Texture coords
Hi Joseba; You should try to use GLSL to accomplish dynamic texture coordinate changing in pretty straightforward way. Regards. 2009/6/8 Joseba Rodriguez jrodrig...@landersimulation.com Hi, Im trying to do some texture animations in different objects (billboards). For this purpose im using Geometry::setTexCoordArray(unsigned int unit,Array*) in a Update callback. I found out that using this function is quite expensive, making my app slow down from 120 fps to 40 fps with 2000 billboards (quads). Is there any other cheaper way to dinamically change the texture coords? Thank you! Cheers, Joseba -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13668#13668 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] vertex shader help: compare position against plane
Hi Paul; Watch the video. It can tell you much of dot and cross product :) http://video.google.com/videosearch?q=cross+productoe=utf-8rls=org.mozilla:en-US:officialclient=firefox-aum=1ie=UTF-8ei=LE4dSreZCpLt_AbS4OGxDQsa=Xoi=video_result_groupresnum=4ct=title# Regards. 2009/5/27 Paul Griffiths gaffe...@gmail.com Kim C Bale wrote: I presume this line: n = (pos1 -pos0) ^ (pos2 - pos1); is a cross product of two vectors. i.e. the normal, also known as the vector perpendicular to the two vectors that define the plane. In which case you would want to use the glsl function cross(vec3,vec3) as on the reference sheet I sent previously. You should have a read about the geometry math being used here. Blindy copying code without understanding it is a good way to shoot yourself in the foot later on. Kim. -Original Message- From: [mailto:] On Behalf Of Paul Griffiths Sent: 27 May 2009 13:40 To: Subject: Re: vertex shader help: compare position against plane ok, i got the world position with: Code: mat4 ToWorldMatrix= osg_ViewMatrixInverse* gl_ModelViewMatrix; vec3 worldPos = ToWorldMatrix * gl_Vertex; now i need to check which side of the plane the worldPos is. I googled and found some code for this but its not for glsl, ive came up with this but i get errors. the code is: Code: vec3 n; float d; n = (pos1 -pos0) ^ (pos2 - pos1); d = -n * pos0; inside = 1.0; if (dot(n, gl_Position) + w) { inside = 0.0; } the errors i get are: Code: VERTEX glCompileShader FAILED VERTEX Shader infolog: 0(46) : error C1021: operands to ^ must be integral glLinkProgram eroded FAILED Program eroded infolog: Vertex info --- 0(46) : error C1021: operands to ^ must be integral Warning: detected OpenGL error 'invalid operation' after RenderBin::draw(,) so i tried Code: vec3 n; float w; int p0 = (pos1 -pos0); int p1 = (pos2 - pos1); n = p0 ^ p1; w = -n * pos0; inside = 1.0; if (dot(n, worldPos) + w) { inside = 0.0; } but it alway returns inside = 0.0; any ideas? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13031#13031 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g * 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 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum Thanks kim. am new to this 3d math stuff. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=13051#13051 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Direction vector to Rotation (Attitude) Quaternion
Hi Sergey; osg::Quat quad; osg::Matrix matrix; matrix.makeLookAt(headVector, directionVector, upVector); matrix.get(quad); Hope this helps. Regards. 2009/5/21 Sergey Bocharov osgfo...@tevs.eu Hi, All I have direction vector , how can I convert it to rotation quat? As I know I need also Up vector, I can take Z_AXIS. So I need formula to convert direction and Up vectors into Attitude quat. Thank you! Cheers, Sergey -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12648#12648 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osg2cpp sample needs a tweak?
Hi Robert; I have realized that when using --shader option in osg2cpp it parses shader file in cpp but it add unneccessary endline sign(\n) every line's end. I think every shaderSource.substr(startOfLine,endOfLine-startOfLine) command should be shaderSource.substr(startOfLine,endOfLine-startOfLine-1) Regards. -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg2cpp sample needs a tweak?
Hi Robert; Yes I know we need endline sign on every line break. Actually we put endline sign by foutvariableString\shaderSource.substr(startOfLine,endOfLine-startOfLine) *\\n\*std::endl; So there is one \n sign in shaderSource.substr(startOfLine,endOfLine-startOfLine) substring. Could you look at the attached samples and converted type of vertex shader. Do you see shadow_vert.cpp files distorted format? If I am wrong, so sorry for inconvenience. Regards. 2009/5/21 Robert Osfield robert.osfi...@gmail.com Hi Umit, The \n is used to make sure that the warnings you get back from the OpenGL driver map to distrinct line numbers, without this all the lines would be treated as a whole program ecoded in a single line. Robert. On Thu, May 21, 2009 at 3:49 PM, Ümit Uzun umituzu...@gmail.com wrote: Hi Robert; I have realized that when using --shader option in osg2cpp it parses shader file in cpp but it add unneccessary endline sign(\n) every line's end. I think every shaderSource.substr(startOfLine,endOfLine-startOfLine) command should be shaderSource.substr(startOfLine,endOfLine-startOfLine-1) Regards. -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ümit Uzun shadows.vert Description: Binary data char shadows_vert[] = //hogbox standardised shadowmappig functions \n \n \n varying vec4 ShadowCood; \n \n void GenShadowCoords(in vec4 ecPosition) \n { \n ShadowCood.s = dot( ecPosition, gl_EyePlaneS[0] ); \n ShadowCood.t = dot( ecPosition, gl_EyePlaneT[0] ); \n ShadowCood.p = dot( ecPosition, gl_EyePlaneR[0] ); \n ShadowCood.q = dot( ecPosition, gl_EyePlaneQ[0] ); \n } \n \n \n; ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Bad OSG geometry
Hi Andrew; osgviewer, take the scene graph and start to accumulate all nodes bounding boxes, by this all accumulated boundingboxes it configure it's viewing area to show you all nodes which are in the screen. So as a result there is some nodes which are not visible on the screen, but viewer take these nodes bounding box on accumulated boundingbox. This is my humble opinion :) Regards. 2009/5/22 Andrew Cunningham o...@a-cunningham.com Hi, There seems to be something wrong with this geometry I have created that seems to cause OSG some problems. It should be 4 squares centered around the origin in a cross like pattern. When I load it into a standard viewer the viewer seems to have problems centering it. Anyone OSG gurus who can look at this? ... Thank you! Cheers, Andrew -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12719#12719 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to increase rotation
Hi Fadi; There is no concise way to do it besides of scratching the osgGA's MatrixManipulator codes as I knew. So look at the built in example first if you are newbie. Try and examine how TrackballManipulator's behave your cursor's movements. Best Regards. 2009/5/14 Fadi Chehimi f_cheh...@maktoob.com Thanks for the reply. What i am doing is using osgviewer.exe to display my model. So i just want to adjust the rotation speed of the model when i click the left mouse button and move the button. I am not creating anything from scratch, too early for me to do that yet :) It seems that the osgviewer takes the mouse x,y values and add them to an EventQueue which is processed later on (dont know which component is responsible of the processing though!). I tried changing the magnitude of these x,y values by multiplying them by a coefficient but did not make any difference. I hope this clarifies my case Fadi Thank you! Cheers, Fadi -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=12080#12080 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problem with my cubemap
Hi Kevin; If you have problem creation on cubeMap you can use Cube Map Generater to create your dds file on http://developer.amd.com/gpu/cubemapgen/pages/default.aspx But as Jean said I don't know you can success on loading dds formated cubemap on OSG, it might not be supported. HTH, Regards. 2009/5/15 Chris 'Xenon' Hanson xe...@alphapixel.com Jean-Sébastien Guay wrote: You can flip images with osg::Image::flipHorizontal() or osg::Image::flipVertical(). I don't know why they come out that way by default though. Perhaps your BMPs assume (0,0) is at the top-left corner instead of the bottom-left? I don't know if there's something in the format that specifies this. There is an option in BMP to specify this, if I recall. I don't know if the OSG BMP loader understands it. -- Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com PixelSense Landsat processing now available! http://www.alphapixel.com/demos/ There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Taking it easy for a couple of days
Hi Robert; God Bless You :) Take care.. Regards. 2009/5/13 neil.hug...@tesco.net Hi Robert, Hope you get well soon. Coincidently, this article appeared on the bbc today. So manflu does exist :-) http://news.bbc.co.uk/1/hi/health/8047321.stm Kind regards Neil. Robert Osfield robert.osfi...@gmail.com wrote: Hi All, I've gone down with a bad cold, so am struggling to focus, read and think clearly today. So... please don't expect much support from me today, some active threads will just have do without my contribution for a couple of days. Luckily human virus can't be transmitted by email/forums just yet. 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 -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] how to get a city's image data?
Hi Forest; You can download elevation Dem files and textures from http://seamless.usgs.gov/index.php easily. Or http://geoengine.nga.mil/geospatial/SW_TOOLS/NIMAMUSE/webinter/rast_roam.html Regards. 2009/5/12 forest fores...@163.com hi all I want to use vpb to build a terrain and I have got the digital elevation data from ftp://ftp.glcf.umiacs.umd.edu/glcf/SRTM/Degree_Tiles/ Now I want to find some corresponding texture image data for free, where can I get them? Thanks in advance. best regards forest ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgOcean release
Hi Kim; After last updates I don't see any error about vertex shader as before I saw. But now I have checked the OpenGL and GLSL driver version and saw that OpenGL is 2.0 and GLSL is 1.1 so when I opened up the osgOceanExample I see Error: glUniform1uiv not supported by OpenGL driver. Because of glUniform1uiv function is in GLSL 1.3. I have tried to update my driver for 2 hours but can't find anything because of my card is about 2 years old :( Is there any way to update my driver to OpenGL 3.0 seperate from Graphic Card driver? Or what can I do for this trouble? My Graphic Card : ATI Radeon Mobility HD 2300 256 MB OS : Windows XP Best Regards. 2009/5/6 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com Hi David, I would suggest that an all GPU FFT would just be one in a selection of possible ocean surface techniques. An architecture that supports many such techniques would be a good goal for this kind of project ! I totally agree. I'll be looking into how feasible this is, not just for offloading surface generation to the GPU, but in general for allowing selecting the surface generation technique from a list of possible techniques with different tradeoffs. As soon as there's a non-GPL alternative integrated instead of FFTW, I can start working on that. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com 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 -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgOcean release
Hi Kim; Thanks for your help but I think when you attach the water vertex and fragment shadr you had made a mistake and you attached two of them in vertex there is no fragment shader. Now I have achieved to GLSL 1.2 and OpenGL 2.1 but it still not enough. I am trying to update to 3.0. Now previous Error gone away but now application send fragment shader not supported as you can see from command screen; glLinkProgram FAILED Program infolog: Fragment shader(s) failed to link, vertex shader(s) linked. Fragment Shader not supported by HW Warning: detected OpenGL error 'invalid operation' after RenderBin::draw(,) RenderStage::drawInner(,) FBO status= 0x8cd5 Could you attach water.f please? :) Best regards and Thanks. 2009/5/7 Kim C Bale k.b...@hull.ac.uk David,J-S,Art, Yes this the direction I envisaged for it, I attempted to pull out some common variables into an OceanTechnique base class, but as you can see in the code, that all went a bit pear shaped as I didn't really know how the others were going to be implemented.. The CUDA implementation is certainly something to look at but should be seen as an alternative rather than a main route as it excludes people with lesser graphics cards and, dare I say, it the ATI contingent. There's a nice video here if people are interested. http://www.youtube.com/watch?v=K1I4kts5mqc K. -Original Message- From: osg-users-boun...@lists.openscenegraph.org on behalf of Jean-Sébastien Guay Sent: Wed 06/05/2009 20:07 To: OpenSceneGraph Users Subject: Re: [osg-users] osgOcean release Hi David, I would suggest that an all GPU FFT would just be one in a selection of possible ocean surface techniques. An architecture that supports many such techniques would be a good goal for this kind of project ! I totally agree. I'll be looking into how feasible this is, not just for offloading surface generation to the GPU, but in general for allowing selecting the surface generation technique from a list of possible techniques with different tradeoffs. As soon as there's a non-GPL alternative integrated instead of FFTW, I can start working on that. J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com 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 * 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 -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgOcean release
Hi Jean; As you said I know there will not be any difference for OSG in OpenGL 3.0 but I have tried to upgrade to make my GLSL support to 1.3 or upper(1.4). Anyway at last I have already realized that my 2.5 years old GPU doesn't support to OpenGL 3.0 in any drivers. So as you suggest to Kim about controlling OpenGL and GLSL version by preprocessor definitions should be implemented to osgOcean before making this nodekit part of OSG built in nodekit. Best Regards. 2009/5/7 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com Hi Umit, Now I have achieved to GLSL 1.2 and OpenGL 2.1 but it still not enough. I am trying to update to 3.0. Whether or not your driver supports OpenGL 3.0 won't make any difference, OSG does not use OpenGL 3.0 at all (you need to explicitly create an OpenGL 3.0 context in order to use it, and OSG doesn't yet). It's strange that ATI's drivers do not support GLSL 1.3 though - the latest versions of their drivers should, as it's been a while since it's been released now. Anyways, I see that Kim's modified shaders work for you by not using GLSL 1.3 features, but I still think it's strange... :-) J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com 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 -- Ümit Uzun ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org