Re: [osg-users] Camera rotation on three axes
- From: John Vidar Larring at 2008-10-30 21:42- Hi Steven, Here is a snipplet of code from the osgautocapture example that I just sent to osg-submissions (if my email got through?), provided as is. I hope it might be of help: Hi John, Thanks for the code. I tried it (and it also rekindled my interest in ViewMatrixLookAt) but I still got gimbal-lock. Perhaps my implementation of your code is faulty. I've spent days now trying to learn enough about quaternions. This almost works but my calculation for the rotation angle is still wrong. Is there a function in OSG for calculating a quaternion from euler angles ? I've searched but haven't found anything. The standard code to calculate a quaternion uses w = cosx * cosy * cosz + sinx * siny * sinz. This doesn't seem right to me and it doesn't work in my testing. I would expect the final rotation to be between the largest input rotation and PI. I hope this post is sufficiently on-topic for the osg-users list. I apologise if I should be looking elsewhere. Thanks, Steven ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgDB loader question
Hi Sean, As Wang Rui pointed out the osgDB::ReaderWriter's have a readNode/writeNode(std::istream,Options*) interface that a number of plugins support. The easiest way to use it in the case of a byte buffer is to create a std::stringstream, populate this than pass it in. Have a look at the src/osgPlugin/curl for an example of this in action. Robert. On Tue, Nov 4, 2008 at 10:28 PM, Sean Spicer [EMAIL PROTECTED] wrote: Is there a way to load files from a byte-buffer? I'd like to be able to store certain shape-files as resources and load them with something similar to: osgDB::readNodeFile(shapeFile) something like: osgDb::readFromByteBuffer(char *buffer, size_t size); I can't find anything like this in the API, does it exist? cheers, sean ___ 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] reseting position/rotation/scale
HI could you sign the name you wish to be addressed with on your mails As for you errors, have you done any debugging??? Like looked at the values of the matrix you are setting? Does it contain invalid values? Robert. On Wed, Nov 5, 2008 at 5:36 AM, GMD GammerMaxyandex.ru [EMAIL PROTECTED] wrote: G'Day. I have some questions about osg. There is function MatrixTransform for reseting position/rotation/scale. [code] osg::Matrix mat; if (!position) mat.preMult (osg::Matrix::translate(MyTransformMatrix-getMatrix().getTrans())); if (!rotate) mat.preMult (osg::Matrix::rotate(MyTransformMatrix-getMatrix().getRotate())); if (!scale) mat.preMult (osg::Matrix::scale(MyTransformMatrix-getMatrix().getScale())); MyTransformMatrix-setMatrix (mat); [/code] When call this function often ,time by time objects disappeare from the screen and OpenGL writes many errors. Whyt can this happens? OSG 2.6.x, 2.7.x; MS VS2009 ___ 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 rotation on three axes
Hi, Steven Saunderson wrote: - From: John Vidar Larring at 2008-10-30 21:42- Hi Steven, Here is a snipplet of code from the osgautocapture example that I just sent to osg-submissions (if my email got through?), provided as is. I hope it might be of help: Hi John, Thanks for the code. I tried it (and it also rekindled my interest in ViewMatrixLookAt) but I still got gimbal-lock. Perhaps my implementation of your code is faulty. I've spent days now trying to learn enough about quaternions. This almost works but my calculation for the rotation angle is still wrong. Is there a function in OSG for calculating a quaternion from euler angles ? I've searched but haven't found anything. You can make a quat from three angles and three axes: osg::Quat lori = osg::Quat(osg::DegreesToRadians(heading), osg::Vec3d(0,0,1), osg::DegreesToRadians(pitch), osg::Vec3d(0,1,0), osg::DegreesToRadians(roll), osg::Vec3d(1,0,0)); Make sure the order is what you need. The standard code to calculate a quaternion uses w = cosx * cosy * cosz + sinx * siny * sinz. This doesn't seem right to me and it doesn't work in my testing. I would expect the final rotation to be between the largest input rotation and PI. I hope this post is sufficiently on-topic for the osg-users list. I apologise if I should be looking elsewhere. Thanks, Steven jp -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Camera rotation on three axes
Hi Steven, Steven Saunderson wrote: - From: John Vidar Larring at 2008-10-30 21:42- Here is a snipplet of code from the osgautocapture example that I just sent to osg-submissions (if my email got through?), provided as is. I hope it might be of help: Thanks for the code. I tried it (and it also rekindled my interest in ViewMatrixLookAt) but I still got gimbal-lock. Perhaps my implementation of your code is faulty. I've spent days now trying to learn enough about quaternions. This almost works but my calculation for the rotation angle is still wrong. Is there a function in OSG for calculating a quaternion from euler angles ? I've searched but haven't found anything. Maybe the following is an easier way to accomplish what you want, as I don't see why you are trying to calculate angles... Assume that you want to apply the pitch, roll and yaw rotations to your plane in that order. Also assume that you have your plane centered at the origin with its nose looking down the positive Y axis and its top-side pointing in direction of the positive Z axis. The pitch rotation can then simply be around the global X axis. However, the roll and yaw rotations will need to be around axes other than the global Y and Z, as otherwise they don't take the changed plane orientation due to pitch (and roll for the yaw rotation) into account. For this, keep track of two helper points (osg::Vec3's): the first one, p1, is at (0, 1, 0), the second one, p2, is at (0, 0, 1). When you have calculated your pitch transformation, using for example, osg::Quat(pitch_angle /* in radians */, osg::X_AXIS), you also transform p1 with this quaternion. Let's call this transformed point p1t, and you can simply p1t = q * p1 to get the transformed point. To apply the roll rotation to the plane we then need to rotate around the vector that goes through pt1 and the origin. This vector is simply p1t. So the roll rotation would then be osg::Quat(roll_angle, p1t). To apply the yaw rotation we need to transform p2 first by the pitch rotation followed by the roll rotation: p2t = pitch_transform * roll_transform * p2. Then the yaw rotation will be osg::Quat(yaw_angle, p2t). We now have three rotations defined by three quaternions. We only have to combine these into a single transformtion to get the final plane transformation: q_final = q_pitch * q_roll * q_yaw To convert q_final to a transformation matrix that you can pass to e.g. osg::MatrixTransform::setMatrix() you can use osg::Matrix m; q_final.get(m); // m will now contain the quaternion in matrix form Hope this helps, Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] reseting position/rotation/scale
Hi ?, as Robert suggested, print out some values of the matrices to make sure that they are valid and that the multiplication order you are using is correct. OSG has functions for printing matrix values to screen, see / search for osg/io_utils. jp GMD GammerMaxyandex.ru wrote: G'Day. I have some questions about osg. There is function MatrixTransform for reseting position/rotation/scale. [code] osg::Matrix mat; if (!position) mat.preMult (osg::Matrix::translate(MyTransformMatrix-getMatrix().getTrans())); if (!rotate) mat.preMult (osg::Matrix::rotate(MyTransformMatrix-getMatrix().getRotate())); if (!scale) mat.preMult (osg::Matrix::scale(MyTransformMatrix-getMatrix().getScale())); MyTransformMatrix-setMatrix (mat); [/code] When call this function often ,time by time objects disappeare from the screen and OpenGL writes many errors. Whyt can this happens? OSG 2.6.x, 2.7.x; MS VS2009 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Tone mapping algorithms
Hi, I just would like to know if some persons have implemented some tone mapping algorithms in OSG (others that the one in OSG PPU, like Reinhard in Photographic Tone Reproduction for Digital Images in 2002 or others algorithms), using OSG PPU or not. I would like to know if you have some problems with these algorithms (like me...), particulary with the computation of the log-average luminance of the high dynamic range image. Else, what results have you ? Nice rendering ? Good frame rate ? Thanks in advance, Josselin Petit. This message was sent using IMP, the Internet Messaging Program. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] composite view and cameras question
Hi Peter, You usage is very much a case of two cameras that contribute to build a single view. David suggests the osgdepthpartion example, this is a good place to start, it creates two cameras in the scene graph for the purpose of partitioning the scene for better z precision. This was written before osgViewer came into being, and these days it'd actually be better to implement the same functionality but as two slave Camera's in a single View. The Camera settings for in scene graph or in viewer will be very similar, the main difference will be the conceptual element - the Camera configuration is really related to the viewer rather than something related to the scene so this particular task is most naturally suited to a Camera in the viewer. Practicalities also favour the slave Camera in the Viewer approach. In terms of Camera setup, have a look at the osgwindow example - this shears the projection matrix by doing a post translate. You are doing something kinda similar - but modifying the depth range of the projection matrix instead for each of the Camera, and the other difference would be that you'd disable the compute of near/far and enable culling of the near/far planes, and share the same graphics context between the two cameras. Robert. On Tue, Nov 4, 2008 at 7:25 PM, Peter Wraae Marino [EMAIL PROTECTED] wrote: Hi Robert, To answer the question about the two views, i'll have to explain the problem that made us to use the two views. We have a terrain and an airplane... the problem is the terrain has a lot of decals and was giving z-fighting problems. The terrain is generated by a 3rd party software so we are limited in adding anykind of bias to the decals or objects causing the z-problem. To solve this problem we decided to render the plane in one we and the terrain in another. This way the near-far plane is shorter for each view allowing us greater z precision. The z fighting problem disappeared and we are happy, but we never really did find an elegant way of syncing the two cameras. Perhaps there is a better solution to this problem, if so I would love to hear it. We talked about using slave cameras to solve the problem, don't know if this is the way but I was going to do some testing with it tommorow. You last suggestion about copying all view setting is also something we have talked about, but again before taking that direction I wanted to hear if there was an elegant way instead of the more hacked way of doing it. regards, Peter Wraae Marino On Tue, Nov 4, 2008 at 3:52 PM, Robert Osfield [EMAIL PROTECTED] wrote: Hi Peter, On Tue, Nov 4, 2008 at 2:21 PM, Peter Wraae Marino [EMAIL PROTECTED] wrote: when having a composite view I have two camera, one for each view. Is there an elegant way of syncing these two cameras? so they have the same fov, position, direction, and so on... What is different between the two Views? I do wonder if a single View with two slave Cameras might not be more suitable. If you do have two different View's such as with two different scene graphs then perhaps sharing a single CameraManipulator between the two views might do the trick - I've never tried this though so odd things might happen. The other approach would be to attach a CameraManipulator to one View, then on each frame copy the first view's Camera settings to the second View. You'd need to break the viewer.frame() up into it's parts so you could do the sync just before the call to renderingTraversals(). Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Regards, Peter Wraae Marino www.osghelp.com - OpenSceneGraph support site ___ osg-users mailing list osg-users@lists.openscenegraph.org 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] scale bug?
Hi ?? Scaling works just fine in the OSG, it's code that has been used for many years in many different ways, and there are no bugs with it I'm aware of. As to what the problem is are you end, can't really say given your code segment and the lack of context. Robert. On Wed, Nov 5, 2008 at 5:35 AM, GMD GammerMaxyandex.ru [EMAIL PROTECTED] wrote: G'Day. I have some questions about osg. 1. I have 2 functions: first sets relative scalation, second - absolute. First function works [code] osg::Matrix matrix = MyTransformMatrix-getMatrix(); matrix.preMult(osg::Matrix::scale(dx,dy,dz)); MyTransformMatrix-setMatrix(matrix); [/code] Second doesn't - scalation works, but rotation of object changes too (casually). [code] osg::Matrix mat; mat.preMult (osg::Matrix::translate(MyTransformMatrix-getMatrix().getTrans())); mat.preMult (osg::Matrix::rotate (MyTransformMatrix-getMatrix().getRotate())); mat.preMult (osg::Matrix::scale (ax,ay,az)); MyTransformMatrix-setMatrix (mat); [/code] Where can be mistake? OSG 2.6.x, 2.7.x; MS VS2009. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Is there paid OSG-user support?
Hi, If you want services on osg, you can find a list of contractors here http://www.openscenegraph.org/projects/osg/wiki/Community/Contractors Cheers, Cedric GMD GammerMaxyandex.ru wrote: Is there paid OSG-user support? I have question like How may it be done better?, and can pay for consulting (for example througth WebMoney). Is it real? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- +33 (0) 6 63 20 03 56 Cedric Pinson mailto:[EMAIL PROTECTED] http://www.plopbyte.net ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Character animation in OSG
Hi Jan, On Wed, Nov 5, 2008 at 7:05 AM, Jan Ciger [EMAIL PROTECTED] wrote: From what I understand, in addition to OSG/Cal, OSG has some animation features built in. Which animation libraries or extensions are ideal for handling .3ds models with skeletal animation? You can use osgCal or ReplicantBody. Both are based on the Cal3D library for skeletal animation and allow you to provide custom skeleton. There are mature exporters for all major modelers and animation packages - 3DS Max, Maya, Blender. However, both Replicant and osgCal have their advantages and drawbacks, especially Replicant has quite slow rendering - if you need only few characters it will work, but will not scale very well. Your experience on CAL/OSG integration would be useful a guide for the osgAnimation development. My hope is that osgAnimation would be able to replace osgCal usage, but without any experience with osgCal I can't say how easy as step this is right now, or how easy this can be made, so... it would be useful to get feedback from those who've been using osgCal/ReplicantBody as to what is missing/needs improving on osgAnimation to make it possible to move apps over to osgAnimation. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VirtualPlantBuilder Ubuntu 64bit Quad Core only using single core
Hi Mark, You don't make any mention of what tools you are invoking in VPB. At a guess you are probably just running osgdem with is for the most part single threaded. If you want multi-threaded usage then use vpbmaster, which you provide a machines text file which outline your cluster or without this it'll just run on all the cores available. Robert. On Tue, Nov 4, 2008 at 9:56 PM, Mark Yantek [EMAIL PROTECTED] wrote: OSG-USERS, My build of VirtualPlanetBuilder(VPB) 0.9.1 only utilizes one core out of the available four. Is there a way to tell VPB to use more than one core? I'm using Ubuntu 8.10 64-bit with an Intel quad core CPU. Thanks -Mark Yantek ___ 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] animtk release 0.0.9 - Win32 SUCCESS
Hi, Sorry i misunderstood, yes you can do it like you describe. Cheers, Cedric Sukender wrote: Hi again, Err... I think I missed something. What I plan to do is: - Check out osgWidget-dev branch - Use osgAnimation from the branch in my project (under Win32) - Send back *potential* modifications as an archive of modified sources on the osg-submissions list. These sources would always be made from the HEAD revision, since I only have to update my working copy. Is that okay for both of you? Sincerely, -- +33 (0) 6 63 20 03 56 Cedric Pinson mailto:[EMAIL PROTECTED] http://www.plopbyte.net ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Character animation in OSG
Hi, Yes it would be great to have feedback. After writing osgCal (the gpl version) i decided to re design everything to make something new now called osgAnimation. I would like very much to have report from osgCal community and replicant body. osgAnimation is young and need lot of work. Don't hesitate to contrib or to comment it Cheers, Cedric Jan Ciger wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dusten Sobotta wrote: Hello, From what I understand, in addition to OSG/Cal, OSG has some animation features built in. Which animation libraries or extensions are ideal for handling .3ds models with skeletal animation? You can use osgCal or ReplicantBody. Both are based on the Cal3D library for skeletal animation and allow you to provide custom skeleton. There are mature exporters for all major modelers and animation packages - 3DS Max, Maya, Blender. However, both Replicant and osgCal have their advantages and drawbacks, especially Replicant has quite slow rendering - if you need only few characters it will work, but will not scale very well. Regards, Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFJEUWwn11XseNj94gRAnuXAKC9+EbaOmNrPIgWFIOS4R5T6kih3ACgy7CU z0zEpJf5YPnnUG9WGTwgPsQ= =3rO4 -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- +33 (0) 6 63 20 03 56 Cedric Pinson mailto:[EMAIL PROTECTED] http://www.plopbyte.net ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Character animation in OSG
Cedric Pinson a écrit : Hi, Yes it would be great to have feedback. After writing osgCal (the gpl version) i decided to re design everything to make something new now called osgAnimation. I would like very much to have report from osgCal community and replicant body. My main issue with osgCal (osgCal2 actually, the not GPL'd one) is with regards export format and error handling. It's very common for my graphist to make a model, animate it in 3ds, export it and then it just doesn't work, usually due to material-related errors, which are extremely hard to understand (particularly for a graphist). So whatever osgAnimation does and whatever format it uses, I'd say the most important things are: - Not GPL - Reliable export tools (cal3d xml/compiled versions are nice since xml is easier to debug) (ideally import too) - Verbose/understandable error reporting when a model doesn't load so you can know what part of the model (sekeleton, material, ...) fails osgAnimation is young and need lot of work. Don't hesitate to contrib or to comment it Cheers, Cedric Jan Ciger wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dusten Sobotta wrote: Hello, From what I understand, in addition to OSG/Cal, OSG has some animation features built in. Which animation libraries or extensions are ideal for handling .3ds models with skeletal animation? You can use osgCal or ReplicantBody. Both are based on the Cal3D library for skeletal animation and allow you to provide custom skeleton. There are mature exporters for all major modelers and animation packages - 3DS Max, Maya, Blender. However, both Replicant and osgCal have their advantages and drawbacks, especially Replicant has quite slow rendering - if you need only few characters it will work, but will not scale very well. Regards, Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFJEUWwn11XseNj94gRAnuXAKC9+EbaOmNrPIgWFIOS4R5T6kih3ACgy7CU z0zEpJf5YPnnUG9WGTwgPsQ= =3rO4 -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG MFC Fullscreen
Hi The attached code snippet should help. Regards Alan Harris Albino Rodrigues wrote: Hi Simon, Thanks for the reply. I didn’t have much luck with ChangeDisplaySettingsEx However, I found this http://www.codeguru.com/forum/showthread.php?t=363365 and it’s worked quite well. It’s a “fake” fullscreen where you hide components of your GUI and stretch the drawing window. It needs a bit of tweaking here and there. Bino *From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of *Simon Hammett *Sent:* Monday, 3 November 2008 7:11 PM *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] OSG MFC Fullscreen Try ChangeDisplaySettingsEx Not sure how that interacts with MFC though. 2008/11/3 Albino Rodrigues [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Hi, I've created an application based off the OSG MFC example. Does anyone know how to swap the rendering context between non full screen and full screen (where no GUI is visible)? I haven't had much luck researching on MSDN. Bino ___ 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 -- The truth is out there. Usually in header files. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org / // CPhomFrame full screen functions void CPhomFrame::OnViewFullScreen() { RECT rectDesktop; WINDOWPLACEMENT wpNew; if (!m_bFullScreen) { m_bToolBarVis = m_wndToolBar.IsWindowVisible(); m_bStatBarVis = m_wndStatusBar.IsWindowVisible(); // need to hide all status bars m_wndStatusBar.ShowWindow(SW_HIDE); m_wndToolBar.ShowWindow(SW_HIDE); // We'll need these to restore the original state. GetWindowPlacement (m_wpPrev); m_wpPrev.length = sizeof m_wpPrev; //Adjust RECT to new size of window ::GetWindowRect ( ::GetDesktopWindow(), rectDesktop ); ::AdjustWindowRectEx(rectDesktop, GetStyle(), TRUE, GetExStyle()); // Remember this for OnGetMinMaxInfo() m_FullScreenWindowRect = rectDesktop; wpNew = m_wpPrev; wpNew.showCmd = SW_SHOWNORMAL; wpNew.rcNormalPosition = rectDesktop; m_wndFullScrnBar.SetWindowPos(0, 100,100, 0,0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_SHOWWINDOW); FloatControlBar(m_wndFullScrnBar, CPoint(100,100)); m_bFullScreen=TRUE; } else { m_wndFullScrnBar.SetWindowPos(0, 100,100, 0,0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_HIDEWINDOW); DockControlBar(m_wndFullScrnBar); m_bFullScreen=FALSE; // restore status and tool bars if (m_bStatBarVis) m_wndStatusBar.ShowWindow(SW_SHOWNORMAL); if (m_bToolBarVis) m_wndToolBar.ShowWindow(SW_SHOWNORMAL); wpNew = m_wpPrev; } SetWindowPlacement ( wpNew ); if (m_bFullScreen) FullScreenSplit(); } void CPhomFrame::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI) { if (m_bFullScreen) { lpMMI-ptMaxSize.y = m_FullScreenWindowRect.Height(); lpMMI-ptMaxTrackSize.y = lpMMI-ptMaxSize.y; lpMMI-ptMaxSize.x = m_FullScreenWindowRect.Width(); lpMMI-ptMaxTrackSize.x = lpMMI-ptMaxSize.x; } } BOOL CPhomFrame::IsFullScreen() { return m_bFullScreen; } void CPhomFrame::OnUpdateViewFullScreen(CCmdUI* pCmdUI) { pCmdUI-Enable(!m_pHView-m_bAnimate); pCmdUI-SetCheck(m_bFullScreen); } // respond to escape key void CPhomFrame::OnViewFullScreenEsc() { // only for switching out of full screen mode if (m_bFullScreen) OnViewFullScreen(); } ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How should I reset position/rotation/scale usingMatrixTransform?
See http://www.openscenegraph.org/projects/osg/wiki/Community/Contractors for a list of users who provide OSG services and paid technical support Gordon __ Gordon Tomlinson Product Manager 3D Email : gtomlinson @ overwatch.textron.com __ Self defence is not a function of learning tricks but is a function of how quickly and intensely one can arouse one's instinct for survival - Master Tambo Tetsura -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of GMD GammerMaxyandex.ru Sent: Wednesday, November 05, 2008 7:45 AM To: osg-users@lists.openscenegraph.org; Robert Osfield Subject: Re: [osg-users] How should I reset position/rotation/scale usingMatrixTransform? Thanks Robert, PositionAttitudeTransform works as I nedded. But can I reset matrix transformation using MatrixTransform? Robert, answer please, is there any paied technical support of OSG which can helps me do some things with OSG or give advices about how can I realize some of my ideas better? If there is some thing like this could you give me they contacts. Thanks, Max. 05.11.08, 13:17, Robert Osfield [EMAIL PROTECTED]: Hi ??? Please use the mailing list convention of signing with the name you wish to be addressed with, Might I recommend you use osg::PositionAttitudeTransform? This manages the potioning, scaling, rotation and pivot point all as separate variables so there is no need to try an decompose a Matrix into its part and recombine. Robert. On Wed, Nov 5, 2008 at 5:47 AM, GMD GammerMaxyandex.ru [EMAIL PROTECTED] wrote: Hi. I have question about MatrixTransform. How should I reset position/rotation/scale using MatrixTransform? [code] { osg::Matrix mat; osg::Vec3d _Trans = MyMatrixTransform-getMatrix().getTrans(); osg::Quat _Rotate =MyMatrixTransform-getMatrix().getRotate(); osg::Vec3d _Scale = MyMatrixTransform-getMatrix().getScale(); MyMatrixTransform-setMatrix(osg::Matrix::scale(1.0f,1.0f,1.0f) * osg::Matrix::rotate(0.0f,0.0f,0.0f,1.0f)* osg::Matrix::translate(0.0f,0.0f,0.0f)); mat = osg::Matrix::scale(1.0f,1.0f,1.0f) * osg::Matrix::rotate(0.0f,0.0f,0.0f,1.0f) * osg::Matrix::translate(0.0f,0.0f,0.0f); if (!scale) mat.preMult (osg::Matrix::scale(_Scale)); if (!rotate) mat.preMult (osg::Matrix::rotate(_Rotate)); if (!position) mat.preMult (osg::Matrix::translate(_Trans)); MyMatrixTransform-setMatrix (mat); } [/code] After that rotation ( MyMatrixTransform-getMatrix().preMult(osg::Matrix::rotate(angle3,osg::Vec3d(0,0,1))); ) depends from scale (when scale is 10.0, rotation (angle3 = 0.2) visually works like angle3=0). How should I reset position/rotation/scale correctly? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegrap h.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph. org -- Яндекс.Открытки. От всей души http://cards.yandex.ru/ ___ 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] Character animation in OSG
Cedric, Thanks for you contributions! The biggest issue I have with osgCal is that you have to load models differently, you can't use osgDB::readNodeFiles and you can't clone existing models. It complicates the applications loading routines. We typically preprocess all our models and convert them to .ive format, which we deliver and use for runtime. It would be nice to be able to do the same with the animation models. Brian [EMAIL PROTECTED] wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: Cedric Pinson [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] Date: 11/05/2008 06:21AM Subject: Re: [osg-users] Character animation in OSG Hi, Yes it would be great to have feedback. After writing osgCal (the gpl version) i decided to re design everything to make something new now called osgAnimation. I would like very much to have report from osgCal community and replicant body. osgAnimation is young and need lot of work. Don't hesitate to contrib or to comment it Cheers, Cedric Jan Ciger wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dusten Sobotta wrote: Hello, From what I understand, in addition to OSG/Cal, OSG has some animation features built in. Which animation libraries or extensions are ideal for handling .3ds models with skeletal animation? You can use osgCal or ReplicantBody. Both are based on the Cal3D library for skeletal animation and allow you to provide custom skeleton. There are mature exporters for all major modelers and animation packages - 3DS Max, Maya, Blender. However, both Replicant and osgCal have their advantages and drawbacks, especially Replicant has quite slow rendering - if you need only few characters it will work, but will not scale very well. Regards, Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFJEUWwn11XseNj94gRAnuXAKC9+EbaOmNrPIgWFIOS4R5T6kih3ACgy7CU z0zEpJf5YPnnUG9WGTwgPsQ= =3rO4 -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- +33 (0) 6 63 20 03 56 Cedric Pinson mailto:[EMAIL PROTECTED] http://www.plopbyte.net ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgAnimation
Hi, I forget to mention you have to unpack http://www.plopbyte.net/tmp/osgAnimation-data.tar.gz in osg-data directory, because it's not yet in the repository. It contains the bitmap for the interface of the osganimationviewer, it will work if you dont do it, you will just dont see the button images. Robert, can i put files in the svn osg-data ? am i allowed to do that ? Cheers, Cedric Cedric Pinson wrote: Hi All, I commited all work of animtk in osgAnimation, so now you should be able to compile the few example and run the osganimationviewer with some examples files. I remember the repository to get the branch with osgAnimation: svn co http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/OpenSceneGraph-osgWidget-dev/ or hg clone http://hg.plopbyte.net/osg-branch/ i made a new repository for the blender exporter, now you can get it like that, it's easy to install follow the instructions hg clone http://hg.plopbyte.net/osgexport I put some osg files ready to use with the osganimationviewer as example, i guess those files could go in osg-data in futur. osganimationviewer http://www.plopbyte.net/tmp/osgAnimation/Jansens.osg osganimationviewer http://www.plopbyte.net/tmp/osgAnimation/nathan.osg osganimationviewer http://www.plopbyte.net/tmp/osgAnimation/avatar.osg osganimationviewer http://www.plopbyte.net/tmp/osgAnimation/example.osg osganimationviewer http://www.plopbyte.net/tmp/osgAnimation/robot.osg or get the file http://www.plopbyte.net/tmp/osgAnimation.tar.gz If somes could test on windows, it would be helpful Cheers, Cedric -- +33 (0) 6 63 20 03 56 Cedric Pinson mailto:[EMAIL PROTECTED] http://www.plopbyte.net ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgAnimation
Hi Cedric, If somes could test on windows, it would be helpful Grabbed the SVN branch, compiling now. I'll keep you posted. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgAnimation
Hi Cedric, On Wed, Nov 5, 2008 at 2:16 PM, Cedric Pinson [EMAIL PROTECTED] wrote: Robert, can i put files in the svn osg-data ? am i allowed to do that ? It depends upon what Jose gave your permission for. I believe it's just the branches section of the OpenSceneGraph repository, not the OpenSceneGraph-Data. I can easily add them to OpenSceneGraph-Data. I have a chunk of work to complete right now, but once this is done I'll pull down the osgWidget branch and test your examples and get the data checked in. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgAnimation
Hi Cedric, Grabbed the SVN branch, compiling now. I'll keep you posted. I get this error when configuring with CMake: CMake Warning (dev) at CMakeModules/OsgMacroUtils.cmake:244 (ADD_EXECUTABLE): Policy CMP0002 is not set: Logical target names must be globally unique. Run cmake --help-policy CMP0002 for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): CMakeModules/OsgMacroUtils.cmake:298 (SETUP_EXE) examples/osganimationnode/CMakeLists.txt:8 (SETUP_EXAMPLE) This warning is for project developers. Use -Wno-dev to suppress it. examples/osganimationnode/CMakeLists.txt line 8 is: SETUP_EXAMPLE(osganimationmakepath) but I don't see any other place where osganimationmakepath is used, so I can't see why it would not be unique... Any ideas? For now I just ignored the error and generated the project files anyway, it's compiling now. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How should I reset position/rotation/scale using MatrixTransform?
Hi Max, But can I reset matrix transformation using MatrixTransform? I think you need to brush up on some basic math concepts. matrixTransform-setMatrix(osg::Matrix::identity()); The identity matrix is a matrix where scale = (1,1,1), translation = (0,0,0) and there is no rotation. Robert, answer please, is there any paied technical support of OSG which can helps me do some things with OSG or give advices about how can I realize some of my ideas better? If there is some thing like this could you give me they contacts. Cedric and Gordon already answered. Check the list of contractors on the wiki. Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] question about KDTREE
Hi as far as i understand, the osg databasepager runs in a different thread to load data from disk i´m starting to use kdtree´s in our project and as far as i know it´s as easy as writing this osgDB::Registry::instance()-setBuildKdTreesHint(osgDB::ReaderWriter::Options::BUILD_KDTREES); Although the intersection solver speed has increased a lot, the pagelod data loading is now slower and we get some framedrops when loading huge amount of data Is the kdtree being built in the same thread as the databasepager or is it built in the main osg thread during some traversal??? thanks _ ¡Este Otoño reta a tus amigos con el nuevo juego de preguntas LiveQuiz! http://www.vivelive.com/LiveQuiz/___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Migrating to a forum?
Hi guys, Sorry for opening this can of worms... After looking at the different links people have posted I see this has already been pondered over. But I guess there is always value in re-visiting an old idea once a while... Cheers Patrick Castonguay H: 613 435 2235 C: 613 325 1341 Technology Innovation Management (TIM) Student - Modeling and Simulation stream Carleton University, Ottawa, ON - Original Message From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Sent: Tuesday, November 4, 2008 6:08:30 PM Subject: osg-users Digest, Vol 17, Issue 15 Send osg-users mailing list submissions to osg-users@lists.openscenegraph.org To subscribe or unsubscribe via the World Wide Web, visit http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than Re: Contents of osg-users digest... Today's Topics: 1. Re: animtk release 0.0.9 - Win32 SUCCESS (Sukender) 2. Re: animtk release 0.0.9 - Win32 SUCCESS (Jeremy Moles) 3. Re: animtk release 0.0.9 - Win32 SUCCESS (Cedric Pinson) 4. Re: animtk release 0.0.9 (Robert Osfield) 5. Re: animtk release 0.0.9 - Win32 SUCCESS (Sukender) 6. Re: composite view and cameras question (Peter Wraae Marino) 7. Re: animtk release 0.0.9 - Win32 SUCCESS (Cedric Pinson) 8. Re: Migrating to a forum? (Peter Wraae Marino) 9. Re: animtk release 0.0.9 - Win32 SUCCESS (Sukender) 10. Re: Migrating to a forum? (Jean-S?bastien Guay) 11. Re: composite view and cameras question (David Spilling) 12. VirtualPlantBuilder Ubuntu 64bit Quad Core only usingsingle core (Mark Yantek) 13. Character animation in OSG (Dusten Sobotta) 14. Re: Character animation in OSG (Cedric Pinson) 15. osgDB loader question (Sean Spicer) 16. Re: Migrating to a forum? (Ulrich Hertlein) To answer the question about the two views, i'll have to explain the problem that made us to use the two views. We have a terrain and an airplane... the problem is the terrain has a lot of decals and was giving z-fighting problems. The terrain is generated by a 3rd party software so we are limited in adding anykind of bias to the decals or objects causing the z-problem. To solve this problem we decided to render the plane in one we and the terrain in another. This way the near-far plane is shorter for each view allowing us greater z precision. The z fighting problem disappeared and we are happy, but we never really did find an elegant way of syncing the two cameras. Perhaps there is a better solution to this problem, if so I would love to hear it. We talked about using slave cameras to solve the problem, don't know if this is the way but I was going to do some testing with it tommorow. You last suggestion about copying all view setting is also something we have talked about, but again before taking that direction I wanted to hear if there was an elegant way instead of the more hacked way of doing it. regards, Peter Wraae Marino On Tue, Nov 4, 2008 at 3:52 PM, Robert Osfield [EMAIL PROTECTED] wrote: Hi Peter, On Tue, Nov 4, 2008 at 2:21 PM, Peter Wraae Marino [EMAIL PROTECTED] wrote: when having a composite view I have two camera, one for each view. Is there an elegant way of syncing these two cameras? so they have the same fov, position, direction, and so on... What is different between the two Views? I do wonder if a single View with two slave Cameras might not be more suitable. If you do have two different View's such as with two different scene graphs then perhaps sharing a single CameraManipulator between the two views might do the trick - I've never tried this though so odd things might happen. The other approach would be to attach a CameraManipulator to one View, then on each frame copy the first view's Camera settings to the second View. You'd need to break the viewer.frame() up into it's parts so you could do the sync just before the call to renderingTraversals(). Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Regards, Peter Wraae Marino www.osghelp.com - OpenSceneGraph support site I can see that having both systems at the same time would be nice, but how would you solve the problem about catagory, topics, threads, subjects.. in a mailing list you only have a subject. so if we parsed the mailist and got the forum in sync then all posts would just come in one catorory (not much of a win there). Peter On Tue, Nov 4, 2008 at 4:00 PM, Robert Osfield [EMAIL PROTECTED] wrote: Guys. Please re-read the previous thread on this discussion. Everything has been said before, everything has be rehashed to death.
Re: [osg-users] osgAnimation
Hi Jean Sebastien I guess it's because there are two examples in the same directory. I could split it if necessary. Cheers, Cedric Jean-Sébastien Guay wrote: Hi Cedric, Grabbed the SVN branch, compiling now. I'll keep you posted. I get this error when configuring with CMake: CMake Warning (dev) at CMakeModules/OsgMacroUtils.cmake:244 (ADD_EXECUTABLE): Policy CMP0002 is not set: Logical target names must be globally unique. Run cmake --help-policy CMP0002 for policy details. Use the cmake_policy command to set the policy and suppress this warning. Call Stack (most recent call first): CMakeModules/OsgMacroUtils.cmake:298 (SETUP_EXE) examples/osganimationnode/CMakeLists.txt:8 (SETUP_EXAMPLE) This warning is for project developers. Use -Wno-dev to suppress it. examples/osganimationnode/CMakeLists.txt line 8 is: SETUP_EXAMPLE(osganimationmakepath) but I don't see any other place where osganimationmakepath is used, so I can't see why it would not be unique... Any ideas? For now I just ignored the error and generated the project files anyway, it's compiling now. J-S -- +33 (0) 6 63 20 03 56 Cedric Pinson mailto:[EMAIL PROTECTED] http://www.plopbyte.net ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgAnimation
Hi Cedric, I guess it's because there are two examples in the same directory. I could split it if necessary. I'll try that locally and see if it makes things better. A few other problems: ___ In include/osgAnimation/Export: #if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined( __BCPLUSPLUS__) || defined( __MWERKS__) # if defined( OSG_LIBRARY_STATIC ) #define OSGANIMATION_EXPORT # elif defined( OSGANIMATION_LIBRARY ) #define OSGANIMATION_EXPORT __declspec(dllexport) # else #define OSGANIMATION_EXPORT __declspec(dllimport) #endif #else #define OSGANIMATION_EXPORT #endif Did you mean to use OSG_LIBRARY_STATIC, but OSGANIMATION_LIBRARY? Perhaps both should be OSG_*, or both should be OSGANIMATION_*? And the src/osgAnimation/CMakeLists.txt defines -DOSG_LIBRARY but not -DOSGANIMATION_LIBRARY. So I get inconsistent DLL linkage warnings, and it will later not link when it comes to linking executables. Using OSG_LIBRARY in the defined() tests works, but perhaps you want to name it differently for OSGANIMATION. Just make sure it's defined in the CMakeLists.txt and that it's consistent. ___ In src/osgAnimation/Timeline.cpp: void RunTimeline::RunTimeline::operator()(Timeline* timeline) should be: void RunTimeline::operator()(Timeline* timeline) ___ In src/osgAnimation/AnimationManager.cpp: On Windows, sys/time.h does not exist. You should probably use osg::Timer for this, it already uses gettimeofday on Linux and QueryPerformanceCounter on Windows, so it will work cross-platform. ___ That's it for now, I'll wait till these are fixed before continuing. Thanks, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Displaying a scene in the background of a QGraphicsView
Hi everybody, I managed to use osg in a Qt QGraphicsView with the information that Eric Zeremba and Rene Molenaar posted some weeks ago. I still have some troubles though... Things work fine when I display the cow.osg scene from the OpenSceneGraph example files, but nothing is displayed when I use cessna.osg. The only way to display it is to enable display lists (it is set to false by default). Anybody has a clue about what's going on? Yvon ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How should I reset position/rotation/scale using MatrixTransform?
Hi ??? Please use the mailing list convention of signing with the name you wish to be addressed with, Might I recommend you use osg::PositionAttitudeTransform? This manages the potioning, scaling, rotation and pivot point all as separate variables so there is no need to try an decompose a Matrix into its part and recombine. Robert. On Wed, Nov 5, 2008 at 5:47 AM, GMD GammerMaxyandex.ru [EMAIL PROTECTED] wrote: Hi. I have question about MatrixTransform. How should I reset position/rotation/scale using MatrixTransform? [code] { osg::Matrix mat; osg::Vec3d _Trans = MyMatrixTransform-getMatrix().getTrans(); osg::Quat _Rotate =MyMatrixTransform-getMatrix().getRotate(); osg::Vec3d _Scale = MyMatrixTransform-getMatrix().getScale(); MyMatrixTransform-setMatrix(osg::Matrix::scale(1.0f,1.0f,1.0f) * osg::Matrix::rotate(0.0f,0.0f,0.0f,1.0f)* osg::Matrix::translate(0.0f,0.0f,0.0f)); mat = osg::Matrix::scale(1.0f,1.0f,1.0f) * osg::Matrix::rotate(0.0f,0.0f,0.0f,1.0f) * osg::Matrix::translate(0.0f,0.0f,0.0f); if (!scale) mat.preMult (osg::Matrix::scale(_Scale)); if (!rotate) mat.preMult (osg::Matrix::rotate(_Rotate)); if (!position) mat.preMult (osg::Matrix::translate(_Trans)); MyMatrixTransform-setMatrix (mat); } [/code] After that rotation ( MyMatrixTransform-getMatrix().preMult(osg::Matrix::rotate(angle3,osg::Vec3d(0,0,1))); ) depends from scale (when scale is 10.0, rotation (angle3 = 0.2) visually works like angle3=0). How should I reset position/rotation/scale correctly? ___ 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] osgAnimation
Hi Cedric, I guess it's because there are two examples in the same directory. I could split it if necessary. I'll try that locally and see if it makes things better. Yep, that worked. The error is gone. Could you do that please? Thanks, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] HMD_Tracker_Synchronization
Dear All, I've some questions regarding tracker data synchronization with OSG. Here they are: For tracker hardware read/write/control events, a seperate thread is spawned from the main thread and that thread handles all the hardware related communication via interrupt driven way and converts the binary readings to that of radian angle values. For the purpose of thread synchronization, I use Windows OS synchronization objects. This is also needed because in the lack of synchronization the original frame rate of the application and the yaw/pitch/roll values acquired from the tracker may go out of sync. My questions are: 1) (As I haven't noticed up to now), does OSG have synchronization objects for the purpose above? 2) After obtaining the yaw/pitch/roll values in sync, is updating the virtual camera's viewmatrix correct way of proceeding or does OSG has some specialized functions for this? Best regards, Ugras ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgAnimation
Hi All, I commited all work of animtk in osgAnimation, so now you should be able to compile the few example and run the osganimationviewer with some examples files. I remember the repository to get the branch with osgAnimation: svn co http://www.openscenegraph.org/svn/osg/OpenSceneGraph/branches/OpenSceneGraph-osgWidget-dev/ or hg clone http://hg.plopbyte.net/osg-branch/ i made a new repository for the blender exporter, now you can get it like that, it's easy to install follow the instructions hg clone http://hg.plopbyte.net/osgexport I put some osg files ready to use with the osganimationviewer as example, i guess those files could go in osg-data in futur. osganimationviewer http://www.plopbyte.net/tmp/osgAnimation/Jansens.osg osganimationviewer http://www.plopbyte.net/tmp/osgAnimation/nathan.osg osganimationviewer http://www.plopbyte.net/tmp/osgAnimation/avatar.osg osganimationviewer http://www.plopbyte.net/tmp/osgAnimation/example.osg osganimationviewer http://www.plopbyte.net/tmp/osgAnimation/robot.osg or get the file http://www.plopbyte.net/tmp/osgAnimation.tar.gz If somes could test on windows, it would be helpful Cheers, Cedric -- +33 (0) 6 63 20 03 56 Cedric Pinson mailto:[EMAIL PROTECTED] http://www.plopbyte.net ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How should I reset position/rotation/scale using MatrixTransform?
Thanks Robert, PositionAttitudeTransform works as I nedded. But can I reset matrix transformation using MatrixTransform? Robert, answer please, is there any paied technical support of OSG which can helps me do some things with OSG or give advices about how can I realize some of my ideas better? If there is some thing like this could you give me they contacts. Thanks, Max. 05.11.08, 13:17, Robert Osfield [EMAIL PROTECTED]: Hi ??? Please use the mailing list convention of signing with the name you wish to be addressed with, Might I recommend you use osg::PositionAttitudeTransform? This manages the potioning, scaling, rotation and pivot point all as separate variables so there is no need to try an decompose a Matrix into its part and recombine. Robert. On Wed, Nov 5, 2008 at 5:47 AM, GMD GammerMaxyandex.ru [EMAIL PROTECTED] wrote: Hi. I have question about MatrixTransform. How should I reset position/rotation/scale using MatrixTransform? [code] { osg::Matrix mat; osg::Vec3d _Trans = MyMatrixTransform-getMatrix().getTrans(); osg::Quat _Rotate =MyMatrixTransform-getMatrix().getRotate(); osg::Vec3d _Scale = MyMatrixTransform-getMatrix().getScale(); MyMatrixTransform-setMatrix(osg::Matrix::scale(1.0f,1.0f,1.0f) * osg::Matrix::rotate(0.0f,0.0f,0.0f,1.0f)* osg::Matrix::translate(0.0f,0.0f,0.0f)); mat = osg::Matrix::scale(1.0f,1.0f,1.0f) * osg::Matrix::rotate(0.0f,0.0f,0.0f,1.0f) * osg::Matrix::translate(0.0f,0.0f,0.0f); if (!scale) mat.preMult (osg::Matrix::scale(_Scale)); if (!rotate) mat.preMult (osg::Matrix::rotate(_Rotate)); if (!position) mat.preMult (osg::Matrix::translate(_Trans)); MyMatrixTransform-setMatrix (mat); } [/code] After that rotation ( MyMatrixTransform-getMatrix().preMult(osg::Matrix::rotate(angle3,osg::Vec3d(0,0,1))); ) depends from scale (when scale is 10.0, rotation (angle3 = 0.2) visually works like angle3=0). How should I reset position/rotation/scale correctly? ___ 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 -- Яндекс.Открытки. От всей души http://cards.yandex.ru/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Character animation in OSG
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Cedric, Cedric Pinson wrote: Hi, Yes it would be great to have feedback. After writing osgCal (the gpl version) i decided to re design everything to make something new now called osgAnimation. I would like very much to have report from osgCal community and replicant body. osgAnimation is young and need lot of work. Don't hesitate to contrib or to comment it What is the license for the code (cannot use GPL, LGPL is OK) and where to get it? I would give it shot. Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFJEbhln11XseNj94gRAns/AKCfOdSj2qQkhSCpsZ/Ds1zYmJFWwgCg6cgs fddf4PwGkxyDG8UNJpUXWcY= =FRua -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Character animation in OSG
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Laurent Di Cesare wrote: - Verbose/understandable error reporting when a model doesn't load so you can know what part of the model (sekeleton, material, ...) fails I think this can be fixed - did you report the issues to Vladimir or Ruben who are maintaining the library? Regards, Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFJEbjIn11XseNj94gRAkAGAKC/b6FLFVkTKbEkdGb0RgDZjn06KgCaAtVq lfeVl/23wltowavJ8EM+NkQ= =5ZvP -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How should I reset position/rotation/scale using MatrixTransform?
Thank you. How should I reset position *OR* rotation *OR* scale using MatrixTransform How should I reset position or How should I reset position scale or How should I reset scale rotation ... 05.11.08, 16:54, Jean-Se'bastien Guay [EMAIL PROTECTED]: Hi Max, But can I reset matrix transformation using MatrixTransform? I think you need to brush up on some basic math concepts. matrixTransform-setMatrix(osg::Matrix::identity()); The identity matrix is a matrix where scale = (1,1,1), translation = (0,0,0) and there is no rotation. Robert, answer please, is there any paied technical support of OSG which can helps me do some things with OSG or give advices about how can I realize some of my ideas better? If there is some thing like this could you give me they contacts. Cedric and Gordon already answered. Check the list of contractors on the wiki. Hope this helps, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Яндекс.Открытки. Дорого внимание http://cards.yandex.ru/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] auto-capture example: capturing an image from a PagedLOD Database
Hi Robert et. al., A custom cull visitor wouldn't be related to the osgViewer, rather it's something you'd instantiate and call yourself on demand. The custom cull visitor needn't even subclass from CullVisitor. The subclass from IntersectionVisitor with a Polytope representing the view frustum way actually be the best place to start. I setup a osgUtil::PolytopeIntersector with a custom osgUtil::IntersectionVisitor::ReadCallback for loading as you suggested, but I have two new independent problems with this approach: 1) If I set the PolytopeIntersector to represent the view frustum (as below), then the IntersectionVisitor will try to load an insane amount of tiles (i.e. does not work. For the purpose of testing the method of loading PagedLOD this way I have just set the polytope to a fraction of the view). I think(?) the problem here is that I don't need the highest level of detail available - I need the correct level of detail for the specified camera. viewport = getCamera()-getViewport(); intersector = new osgUtil::PolytopeIntersector( osgUtil::Intersector::WINDOW, viewport-x(), viewport-y(), viewport-width(), viewport-height() ); osgUtil::IntersectionVisitor iv(intersector,_readCallback.get()); getCamera()-accept(iv); 2) The DatabasePager does not pick up on the fact that some PagedLODs have already been explicitly loaded with: osgDB::readNodeFile(filename, new osgDB::ReaderWriter::Options(CACHE_ALL)) in my implementation of osgUtil::IntersectionVisitor::ReadCallback. I found the earlier thread between Robert and Wojtek titled Passing explicitly loaded model to DatabasePager for expiry management http://groups.google.com/group/osg-users/browse_thread/thread/b4f1a0abf7f72353/fcd3955ed3e0384e?lnk=gstq=DatabasePager+IntersectionVisitor#fcd3955ed3e0384e However, I didn't get the double caching trick to work (Wojtek, do you have any code sample to share?). I even tried to derive DatabasePager and add code (i.e.: ugly hacks) for making the DatabasePager aware of explicitly loaded tiles, but with no luck:( Furthermore, even if I succeed in making the DatabasePager aware of already loaded tiles, I'm not sure that the intersector approach to loading the correct level of detail will fare any better than the CustomRenderer approach presented in an earlier posting. Profiling (callgrind) of both the osgautocapture and the osgintersection example with LineOfSight enabled shows that it is osgTerrain::GeometryTechnique::generateGeometry() that takes 60-78% for CPU time (rendering is disabled in both cases). So the challenge seems to be: 1) Load necessary tiles down to appropriate level of detail _without_ generating geometry. 2) Discard tiles that are that are not needed for specific camera setting (excluding tiles that already have geometry) 3) Generate geometry for remaining tiles. 4) Render scene, capture image, and exit. Thanks in advance for any suggestions, idea or relevant code samples:) Apologies for the lengthy post. Best regards, John Robert Osfield wrote: Hi John, A custom cull visitor wouldn't be related to the osgViewer, rather it's something you'd instantiate and call yourself on demand. The custom cull visitor needn't even subclass from CullVisitor. The subclass from IntersectionVisitor with a Polytope representing the view frustum way actually be the best place to start. Robert. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] need to port an application from OSG v1.2 (OSG::Producer based) to OSG 2.0 (OsgViewer based)
Is there any tutorial that explains how to do that without any pain? Thanks, Gianluca ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How should I reset position/rotation/scale using MatrixTransform?
Hi Max, How should I reset position *OR* rotation *OR* scale using MatrixTransform Decomposing the matrix is not that reliable. Keep them separately, or use PositionAttitudeTransform. Remember that mt-setMatrix(osg::Matrix::scale(...) * osg::Matrix::rotate(...) * osg::Matrix::translate(...)) is functionally equivalent to one MatrixTransform with scale, with a child MatrixTransform with rotation, and another child MatrixTransform with translate (or some permutation, I can never remember). J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgAnimation
Hi Jean Sebastien, Thank you for the report i will fix that Cheers, Cedric Jean-Sébastien Guay wrote: Hi Cedric, I guess it's because there are two examples in the same directory. I could split it if necessary. I'll try that locally and see if it makes things better. Yep, that worked. The error is gone. Could you do that please? Thanks, J-S -- +33 (0) 6 63 20 03 56 Cedric Pinson mailto:[EMAIL PROTECTED] http://www.plopbyte.net ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Question about osgMovie sample
Hi All, I have an pretty easy question. I am digging osgMovie example and in this example there is a s_imageStream global variable. But I can't understand the usage meaning this variable because it is used only one place. Is it used any where in the osgMovie sample? I can't see and I don't find out where. Best 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] osgAnimation
Hi Jean-Sebastien, I fixed the issue it compiles fine on my plateform. Can you try on windows ? Cheers, Cedric Jean-Sébastien Guay wrote: Hi Cedric, I guess it's because there are two examples in the same directory. I could split it if necessary. I'll try that locally and see if it makes things better. Yep, that worked. The error is gone. Could you do that please? Thanks, J-S -- +33 (0) 6 63 20 03 56 Cedric Pinson mailto:[EMAIL PROTECTED] http://www.plopbyte.net ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgOcean(?)
Hi Kim, It's amazing think :) I want to help you if you need any help about any think on this rearrangement and creation of osgOcean very much. I don't know nodekit sample as you want but I can help you different needing on this operation. Best Regards. Umit Uzun 2008/11/5 Kim C Bale [EMAIL PROTECTED] I'm working on an EU funded research project aimed at surveying and visualizing underwater archaeological sites. As part of the grant we've been tasked with developing a sort of rudimentary submarine simulator designed to allow the general public to explore underwater archaeological sites firsthand (reference screenshots attached). One of the final deliverables of this work package is to release all the graphical effects that went into making the simulator into an open source library so that others may use our work for future underwater rendering projects. Our aim was to do this in the form of a library for the OSG, since we used it to develop the simulator. I've now reached a stage where I am ready to start thinking about how to untangle the big heap of spaghetti that is my code and turn it into something that might be of use to someone. So, I was wondering what would be the best way to go about this. The code comprises of a range of effects such as god-rays, particle systems for floating particulate matter, seabed silt and bubbles, many shader effects (single and multipass) and an FFT ocean simulation. I think what would be most useful to me is to see a nodekit that does something similar and see how it is structured so that I can get a good idea of how to bring all of this code together in a useable form. Does anybody have any good examples or pointers on where to start? Regards, Kim. * 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, Environmental Tectonics Corporation Turkey ODTU Teknokent Gumus Bloklar A Blok Zemin Kat Bati Cephe Suit 1 06531 ODTU Ankara, Turkey Tel: 90 (312) 210 17 80 Fax: 90 (312) 210 17 84 E-Mail: umituzun84atgmaildotcom Website: http://www.etc-turkey.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Question about osgMovie sample
Hi Umit, I've just looked at the example and there is no reason for the s_imageStream variable - I can only guess that it was required for a previous hardwired version of osgmovie, and was carried unused in later incarnations. I've removed the redundent variable and checked in this change into svn/trunk. Robert. On Wed, Nov 5, 2008 at 3:41 PM, Ümit Uzun [EMAIL PROTECTED] wrote: Hi All, I have an pretty easy question. I am digging osgMovie example and in this example there is a s_imageStream global variable. But I can't understand the usage meaning this variable because it is used only one place. Is it used any where in the osgMovie sample? I can't see and I don't find out where. Best 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
Re: [osg-users] Character animation in OSG
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Brian, Brian R Hill wrote: Cedric, Thanks for you contributions! The biggest issue I have with osgCal is that you have to load models differently, you can't use osgDB::readNodeFiles and you can't clone existing models. It complicates the applications loading routines. We typically preprocess all our models and convert them to .ive format, which we deliver and use for runtime. It would be nice to be able to do the same with the animation models. Unfortunately, that probably cannot be really helped. The osgCal characters are really only a thin front-end to the Cal3D animation library, it is not an OSG project and not something developed for OSG. It is possible to fork Cal3D and convert it to use extensions to osg/ive formats (osg/ive do not have anything for character animation/skeletons), but that would also mean redoing the whole production pipeline - exporters, loaders, etc. I am not sure the benefit would outweigh the cost, especially because you would have to maintain a forked version. Feel free to go ahead and do that, but I do not see much benefit in it. If you want to distribute a single binary file to the end-users, I would look at things like loading from zip/pak files containing all your assets together instead of shoehorning everything into an ive file. Moreover, the ive format is more-or-less a dead end according to Robert, not designed to be really extensible and will be probably replaced sometime in the future. Regards, Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFJEbo1n11XseNj94gRAq1LAJ9raq+e+U/IrYciaXekrlUC4lfcrACg6Pw5 SDQ/6SS2cVX5ghKlBQFThZ8= =s/TS -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] MAX to COLLADA or which format ?
Hi Kim, Thanks for explanation. I will try to understand gerstner method. I would I achieve very soon :) When I search the old mail-archive I saw a question asked by you about Error: [Screen #0] GraphicsWindowWin32::requestWarpPointer() - Window not reali ed; cannot warp pointer I have same problem and there no message except this. Have you found the reason this error Kim? Best Regards. Umit Uzun 2008/11/4 Kim C Bale [EMAIL PROTECTED] I'm afraid I can't recall the interpolation method used for generating the normals from the gerstner model, it is detailed in the book. I personally didn't use the gerstner approach since I had already built an FFT simulation for the wave surface and wanted to use that for the the normal computation instead. The extrusion of the parallelpepids is done within the vertex shader, you store the length of the extrusion as a texture coordinate for each vertex. So inside the vertex shader you have something along the lines of: newVertex = oldVertex + (gl_TexCoord[0] * refractionVector); That way you can differentiate between vertices that lie on the water surface and those that need to extruded downward. Finally, everything in the screen shot is simulated, no real world objects. Sorry the screenshot was deliberatly small as I didn't want to bloat peoples inboxes. Regards, Kim. From: [EMAIL PROTECTED] on behalf of Ümit Uzun Sent: Tue 04/11/2008 12:35 To: OpenSceneGraph Users Subject: Re: [osg-users] MAX to COLLADA or which format ? Hi Kim, Thanks for detailed explanation. I grasp the method of sun-beams and I will read in ShaderX5 too. But could you clarify me at some point before I have started to search about this topic? I will create my own water surface and waves algorithm. And then with using sun light I will calculate the reflection and refraction angles for every vertex point. Then I will use this interpolated refraction angle and vertex position I will create a grided parallelepiped volume which is going downward this point under the sea with attenuating the glowing degree. But At that point I can't understand the creation of this parallelepiped volume creation on FragmentShader. How this grid of parallelepiped volumes geometry can be interpolated ? And I like so much your posted screen shot :) This is I think VENUS submarine and I have some question about it. Is there all simulation environment or with pilot cabin? I can't realize joysticks, another screen which is showing above the water surface and sonar gauge are real objects or simulated environment. Thanks for your advices Kim. Best Regards. 2008/11/4 Kim C Bale [EMAIL PROTECTED] Hi Umit, Rendering God-rays is pretty easy. The approach I used is described in the book ShaderX5, although I have to say it's quite badly written. Basically you model the god-rays as a grid of parallelepipeds positioned at the ocean surface, relative to the position of the camera. To create the god-ray geometry you then need to extrude the base points downward along the angle of refraction from the sea surface. In order to compute the angle of refraction you'll need to create a simulation of the ocean surface itself. The technique described in ShaderX5 details a Gerstner wave surface partially computed on the GPU. Using this you can interpolate between the vertex normals to get the normals you need to compute the refraction angles. Finally, you render these god-rays into a FBO and then render that texture to the screen with additive blending. A final stage which would look nice is to apply some sort of blur to the rays texture so the edges aren't quite so crisp. You can see the effect in the attached screenshot. Regards, Kim. From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] On Behalf Of Ümit Uzun Sent: 31 October 2008 15:42 To: OpenSceneGraph Users Subject: Re: [osg-users] MAX to COLLADA or which format ? Hi Kim, 2008/10/31 Kim C Bale [EMAIL PROTECTED] Hi Umit, Yes, I am employed on the VENUS project, how on earth do you know that? I have searched on internet and so know VENUS project and your MSc student Franclin Foping and another student Philip Apery who worked same project before. I have read these student thesis and implement in my animation. (caustics, fish motion, aquatic floara, silt on sea bed, water refraction and so on...) Now I only want to much realistic fish motion as I said. So I learned that I should try different tools like animetk or just like it. I want to ask another question about god-rays. Did you implement god-rays to VENUS? I want to create god-rays in my simulation, so is there any advices and searh path you can give me? Thanks for all advices Kim. Best Regards. Umit Uzun I,
Re: [osg-users] MAX to COLLADA or which format ?
I didn't find a solution to that. However, it doesn't seem to cause any problems. Kim. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ümit Uzun Sent: 05 November 2008 15:46 To: OpenSceneGraph Users Subject: Re: [osg-users] MAX to COLLADA or which format ? Hi Kim, Thanks for explanation. I will try to understand gerstner method. I would I achieve very soon :) When I search the old mail-archive I saw a question asked by you about Error: [Screen #0] GraphicsWindowWin32::requestWarpPointer() - Window not reali ed; cannot warp pointer I have same problem and there no message except this. Have you found the reason this error Kim? Best Regards. Umit Uzun 2008/11/4 Kim C Bale [EMAIL PROTECTED] I'm afraid I can't recall the interpolation method used for generating the normals from the gerstner model, it is detailed in the book. I personally didn't use the gerstner approach since I had already built an FFT simulation for the wave surface and wanted to use that for the the normal computation instead. The extrusion of the parallelpepids is done within the vertex shader, you store the length of the extrusion as a texture coordinate for each vertex. So inside the vertex shader you have something along the lines of: newVertex = oldVertex + (gl_TexCoord[0] * refractionVector); That way you can differentiate between vertices that lie on the water surface and those that need to extruded downward. Finally, everything in the screen shot is simulated, no real world objects. Sorry the screenshot was deliberatly small as I didn't want to bloat peoples inboxes. Regards, Kim. From: [EMAIL PROTECTED] on behalf of Ümit Uzun Sent: Tue 04/11/2008 12:35 To: OpenSceneGraph Users Subject: Re: [osg-users] MAX to COLLADA or which format ? Hi Kim, Thanks for detailed explanation. I grasp the method of sun-beams and I will read in ShaderX5 too. But could you clarify me at some point before I have started to search about this topic? I will create my own water surface and waves algorithm. And then with using sun light I will calculate the reflection and refraction angles for every vertex point. Then I will use this interpolated refraction angle and vertex position I will create a grided parallelepiped volume which is going downward this point under the sea with attenuating the glowing degree. But At that point I can't understand the creation of this parallelepiped volume creation on FragmentShader. How this grid of parallelepiped volumes geometry can be interpolated ? And I like so much your posted screen shot :) This is I think VENUS submarine and I have some question about it. Is there all simulation environment or with pilot cabin? I can't realize joysticks, another screen which is showing above the water surface and sonar gauge are real objects or simulated environment. Thanks for your advices Kim. Best Regards. 2008/11/4 Kim C Bale [EMAIL PROTECTED] Hi Umit, Rendering God-rays is pretty easy. The approach I used is described in the book ShaderX5, although I have to say it's quite badly written. Basically you model the god-rays as a grid of parallelepipeds positioned at the ocean surface, relative to the position of the camera. To create the god-ray geometry you then need to extrude the base points downward along the angle of refraction from the sea surface. In order to compute the angle of refraction you'll need to create a simulation of the ocean surface itself. The technique described in ShaderX5 details a Gerstner wave surface partially computed on the GPU. Using this you can interpolate between the vertex normals to get the normals you need to compute the refraction angles. Finally, you render these god-rays into a FBO and then render that texture to the screen with additive blending. A final stage which would look nice is to apply some sort of blur to the rays texture so the edges aren't quite so crisp. You can see the effect in the attached screenshot. Regards, Kim. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ümit Uzun Sent: 31 October 2008 15:42 To: OpenSceneGraph Users Subject: Re: [osg-users] MAX to COLLADA or which format ? Hi Kim, 2008/10/31 Kim C Bale [EMAIL PROTECTED] Hi Umit, Yes, I am employed on the VENUS project, how on earth do you know that? I have searched on internet and so know VENUS project and your MSc student Franclin Foping and another student Philip Apery who worked same project before. I have read these student thesis and implement in my animation. (caustics, fish motion, aquatic floara, silt on sea bed, water refraction and so on...) Now I only want to much realistic fish motion as I said. So I learned that I should try different tools like animetk or just like it. I want to ask another question about
Re: [osg-users] osgAnimation
On Wed, 2008-11-05 at 11:10 -0500, Jean-Sébastien Guay wrote: Hi Cedric, I fixed the issue it compiles fine on my plateform. Can you try on windows ? Good preliminary result: 1osgAnimation - 0 error(s), 0 warning(s) :-) Waiting for the examples to compile, I'll check back in with the results soon. Thanks, I just checked in a bug fix to the viewer; you'll want to get this before trying it out. :) So, be sure and rebuild quick after running 'svn update' :) J-S ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Question about osgMovie sample
Hi Robert, Thanks for quick reply. Regards. Umit Uzun 2008/11/5 Robert Osfield [EMAIL PROTECTED] Hi Umit, I've just looked at the example and there is no reason for the s_imageStream variable - I can only guess that it was required for a previous hardwired version of osgmovie, and was carried unused in later incarnations. I've removed the redundent variable and checked in this change into svn/trunk. Robert. On Wed, Nov 5, 2008 at 3:41 PM, Ümit Uzun [EMAIL PROTECTED] wrote: Hi All, I have an pretty easy question. I am digging osgMovie example and in this example there is a s_imageStream global variable. But I can't understand the usage meaning this variable because it is used only one place. Is it used any where in the osgMovie sample? I can't see and I don't find out where. Best 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.orhttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] MAX to COLLADA or which format ?
Hi Kim, It doesn't damage but gives me a bit bothersome when I compile the project. Thanks. Best Regards. Umit Uzun 2008/11/5 Kim C Bale [EMAIL PROTECTED] I didn't find a solution to that. However, it doesn't seem to cause any problems. Kim. *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *On Behalf Of *Ümit Uzun *Sent:* 05 November 2008 15:46 *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] MAX to COLLADA or which format ? Hi Kim, Thanks for explanation. I will try to understand gerstner method. I would I achieve very soon :) When I search the old mail-archive I saw a question asked by you about Error: [Screen #0] GraphicsWindowWin32::requestWarpPointer() - Window not reali ed; cannot warp pointer I have same problem and there no message except this. Have you found the reason this error Kim? Best Regards. Umit Uzun 2008/11/4 Kim C Bale [EMAIL PROTECTED] I'm afraid I can't recall the interpolation method used for generating the normals from the gerstner model, it is detailed in the book. I personally didn't use the gerstner approach since I had already built an FFT simulation for the wave surface and wanted to use that for the the normal computation instead. The extrusion of the parallelpepids is done within the vertex shader, you store the length of the extrusion as a texture coordinate for each vertex. So inside the vertex shader you have something along the lines of: newVertex = oldVertex + (gl_TexCoord[0] * refractionVector); That way you can differentiate between vertices that lie on the water surface and those that need to extruded downward. Finally, everything in the screen shot is simulated, no real world objects. Sorry the screenshot was deliberatly small as I didn't want to bloat peoples inboxes. Regards, Kim. From: [EMAIL PROTECTED] on behalf of Ümit Uzun Sent: Tue 04/11/2008 12:35 To: OpenSceneGraph Users Subject: Re: [osg-users] MAX to COLLADA or which format ? Hi Kim, Thanks for detailed explanation. I grasp the method of sun-beams and I will read in ShaderX5 too. But could you clarify me at some point before I have started to search about this topic? I will create my own water surface and waves algorithm. And then with using sun light I will calculate the reflection and refraction angles for every vertex point. Then I will use this interpolated refraction angle and vertex position I will create a grided parallelepiped volume which is going downward this point under the sea with attenuating the glowing degree. But At that point I can't understand the creation of this parallelepiped volume creation on FragmentShader. How this grid of parallelepiped volumes geometry can be interpolated ? And I like so much your posted screen shot :) This is I think VENUS submarine and I have some question about it. Is there all simulation environment or with pilot cabin? I can't realize joysticks, another screen which is showing above the water surface and sonar gauge are real objects or simulated environment. Thanks for your advices Kim. Best Regards. 2008/11/4 Kim C Bale [EMAIL PROTECTED] Hi Umit, Rendering God-rays is pretty easy. The approach I used is described in the book ShaderX5, although I have to say it's quite badly written. Basically you model the god-rays as a grid of parallelepipeds positioned at the ocean surface, relative to the position of the camera. To create the god-ray geometry you then need to extrude the base points downward along the angle of refraction from the sea surface. In order to compute the angle of refraction you'll need to create a simulation of the ocean surface itself. The technique described in ShaderX5 details a Gerstner wave surface partially computed on the GPU. Using this you can interpolate between the vertex normals to get the normals you need to compute the refraction angles. Finally, you render these god-rays into a FBO and then render that texture to the screen with additive blending. A final stage which would look nice is to apply some sort of blur to the rays texture so the edges aren't quite so crisp. You can see the effect in the attached screenshot. Regards, Kim. From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] On Behalf Of Ümit Uzun Sent: 31 October 2008 15:42 To: OpenSceneGraph Users Subject: Re: [osg-users] MAX to COLLADA or which format ? Hi Kim, 2008/10/31 Kim C Bale [EMAIL PROTECTED] Hi Umit, Yes, I am employed on the VENUS project, how on earth do you know that? I have searched on internet and so know VENUS project and your MSc student Franclin Foping and another student Philip Apery who worked same project before. I have read these student thesis and implement in my animation. (caustics, fish motion, aquatic floara, silt on sea
Re: [osg-users] Displaying a scene in the background ofa QGraphicsView
Hi, I have tested the integration between Qt GraphicsView and OSG too. To have better results, don't use drawBackground() to do OSG drawing but overload the paint event of QGraphicsView, somthing like that : void MyGraphicsView::paintEvent( QPaintEvent* event ) { QGLWidget* widget = dynamic_castQGLWidget*( viewport() ); if (widget) { widget-makeCurrent(); getCanvas()-frame(); } QGraphicsView::paintEvent( event ); } Using drawBackground() is a bad idea because Qt has already initialized some OpenGL state for its needs. I have much better result this way. I still have some problems when using osgEphemeris. Mixing Qt and OSG rendering in the same OpenGL context does not seems very robust. Maybe it is needed to clear OSG state before calling QGraphicsView::paintEvent() but i stop my investigations there. Hope that helps Fabien -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yvon Halbwachs Sent: mercredi 5 novembre 2008 15:49 To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Displaying a scene in the background ofa QGraphicsView Hi everybody, I managed to use osg in a Qt QGraphicsView with the information that Eric Zeremba and Rene Molenaar posted some weeks ago. I still have some troubles though... Things work fine when I display the cow.osg scene from the OpenSceneGraph example files, but nothing is displayed when I use cessna.osg. The only way to display it is to enable display lists (it is set to false by default). Anybody has a clue about what's going on? Yvon ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] need to port an application from OSG v1.2 (OSG::Producer based) to OSG 2.0 (OsgViewer based)
HI Gianluca, On Wed, Nov 5, 2008 at 3:22 PM, Gianluca Natale [EMAIL PROTECTED] wrote: Is there any tutorial that explains how to do that without any pain? I'm afraid that isn't a tutorial for porting across. We have a porting page but it isn't filled out enough to help too much: http://www.openscenegraph.org/projects/osg/wiki/Support/Porting Porting across may be very quick if you just using osgProducer::Viewer, but if you use Producer extensively then the port is likely to be a bit more difficult. A few pointers to help you on your way (I'll be adding this to the above pages): 1) osgViewer supports Producer .cfg configuration files via the cfg plugin. So you can do: osgviewer cow.osg -c MyProducer.cfg You can also invoke the configuration programatically. Via Viewer::readConfiguration(filename); 2) osgProducer::Viewer maps to osgViewer::Viewer 3) Producer::Camera is kinda equivilant to an osg::Camera 4) Producer::CameraGroup is roughly equivilant to an osgViewer::View, althoug the later defers the threading to the Viewer/CompositeViewer. 5) Producer's ThreadPerCamera threading model is equivlant to osgViewer's CullDrawThreadPerContext. 6) With osgProducer::Viewer/Producer::CameraGroup the master the camera is a viewer, but also has a list of one or more slave cameras. You must have at least one slave Camera in Producer. With osgViewer::View, the view has a master Camera , and an optional list on slave Cameras. 7) Producer has a KeyboardMouse class that manages all events, while osgViewer uses osgGA event support, and manages it on a per View basis. 8) osgViewer handles complex viewer arrangements conveniently via the CompositeViewer class, there is no direct equivalent in Producer - the best you could do is have a CameraGroup with unsync'd slaves and have the app manage each slave camera manually, and if the cameras had different scenes then the shared DatabasePager would things screw up for paged databases. CompositeViewer solves this mess with an API that uses the same ViewerBase and View classes as the standard osgViewer::Viewer. osgViewer::View is a View. osgVewer::CompositeView has a list of View 9) osgProducer::Viewer contained many event handling features by default, but made it awkward to disable these. osgViewer::Viewer doesn't have any default event handlers, save for a TrackballManipulator that is only added as a fallback if you don't specify your own when you call run(). Rather than have lots of defaults the event handling features are added manually. The examples, including osgviewer illustrate how this is done. 10) The osgViewer library adds DrawThreadPerContext and CullThreadPerCameraDrawThreadPerContext threading models that allow the draw thread to run in a parallel with the update, event and cull traversals, and the by default the threading model is chosen to suit your hardware - so if you have dual core you'll end up with DrawThreadPerContext. The gotcha with this is that you need to set the DataVariance to DYNAMIC on any Drawable and StateSet's that contain data that vary. 11) Lots has been discussed about osgViewer over the past two years so the archives are good source to mine. 12) The osgcamera, osgwindows, osgcompositeviewer and osgviewer examples are all good places to learn about setting up osgViewer. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgAnimation
Hi Cedric, Waiting for the examples to compile, I'll check back in with the results soon. There's a missing OSGANIMATION_EXPORT on the osgAnimation::Bone::UpdateBone class. With that added, all compiles correctly. Running osganimationviewer osgAnimation/example.osg gives a window with buttons at the bottom. If I click on the 2 left-most buttons some text comes in and fades out. If I click on the right-most button, a box in the bottom right corner comes in, and if I click on it again it goes out of the screen. Is that the expected behavior? I tried running osganimationviewer osgAnimation/avatar.osg but I get a disk error, and debugging I see that it's looking for a file called f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/brow.l.tga Those paths should probably be relative to the .osg file? I didn't check other files in the .tar.gz. One comment I have which applies to the osgWidget examples too (and I've said this before, when testing the osgWidget examples): the window shows up with its title bar outside the screen. It's very annoying. In general, don't use viewer.setUpViewInWindow(0, 0, WIDTH, HEIGHT); and just let the viewer set itself up, or use viewer.setUpViewInWindow(50, 50, WIDTH, HEIGHT); so that it comes up in a sane place on the screen. (but I really suggest to not use it, so that the user can use command-line args or environment variables to set where the viewer will show up if he wants) J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Character animation in OSG
Jan Ciger wrote : -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Laurent Di Cesare wrote: - Verbose/understandable error reporting when a model doesn't load so you can know what part of the model (sekeleton, material, ...) fails I think this can be fixed - did you report the issues to Vladimir or Ruben who are maintaining the library? Actually I think it's more of a cal3d issue than an osgcal issue. Regards, Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFJEbjIn11XseNj94gRAkAGAKC/b6FLFVkTKbEkdGb0RgDZjn06KgCaAtVq lfeVl/23wltowavJ8EM+NkQ= =5ZvP -END PGP SIGNATURE- ___ 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] osgAnimation
Hi Cedric, I've pulled down your .osg and image files and have started testing. Most of the .osg files do things, but the example.osg just seems to be a static box. The avatar.osg also references textures that you haven't supplied. grep file *.osg avatar.osg:file F:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/skin.tga avatar.osg: file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/brow.l.tga avatar.osg: file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/nose.tga avatar.osg: file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/mouth.tga avatar.osg: file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/eye.l.tga avatar.osg: file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/brow.l.tga avatar.osg: file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/eye.l.tga avatar.osg: file F:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/skin.tga avatar.osg:file F:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/dark_grey.tga avatar.osg:file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/red.tga avatar.osg:file F:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/dark_grey.tga avatar.osg:file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/red.tga avatar.osg:file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/red.tga Could you provide these files? What is the license associated with these models? Cheers, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgAnimation
Hi Jean-Sebastien, In order to see buttons in osganimationviewer you need to unpack http://www.plopbyte.net/tmp/osgAnimation-data.tar.gz in the directory of osg-data (or in the same directory of the .exe) else you will not see the buttons. So it's normal, it will be not a problem when commited in the osg-data repository. I know that in the avatar sample there are textures like f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/brow.l.tga but i did not know it will be a problem like doing an error disk it's weird. I fixed the missing OSGANIMATION_EXPORT for Bone, and the setupViewInWindow. I recommand the nathan model as sample, it's a good sample. But you will understand better when using images buttons in the viewer ;) Thanks for your help Cheers, Cedric Jean-Sébastien Guay wrote: Hi Cedric, Waiting for the examples to compile, I'll check back in with the results soon. There's a missing OSGANIMATION_EXPORT on the osgAnimation::Bone::UpdateBone class. With that added, all compiles correctly. Running osganimationviewer osgAnimation/example.osg gives a window with buttons at the bottom. If I click on the 2 left-most buttons some text comes in and fades out. If I click on the right-most button, a box in the bottom right corner comes in, and if I click on it again it goes out of the screen. Is that the expected behavior? I tried running osganimationviewer osgAnimation/avatar.osg but I get a disk error, and debugging I see that it's looking for a file called f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/brow.l.tga Those paths should probably be relative to the .osg file? I didn't check other files in the .tar.gz. One comment I have which applies to the osgWidget examples too (and I've said this before, when testing the osgWidget examples): the window shows up with its title bar outside the screen. It's very annoying. In general, don't use viewer.setUpViewInWindow(0, 0, WIDTH, HEIGHT); and just let the viewer set itself up, or use viewer.setUpViewInWindow(50, 50, WIDTH, HEIGHT); so that it comes up in a sane place on the screen. (but I really suggest to not use it, so that the user can use command-line args or environment variables to set where the viewer will show up if he wants) J-S -- +33 (0) 6 63 20 03 56 Cedric Pinson mailto:[EMAIL PROTECTED] http://www.plopbyte.net ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgAnimation
Hi Robert, All licences can be checked in the original blender files http://hg.plopbyte.net/osgexport/file/311bb37a11ab/data/ Here the licence by files: nathan.osg - creative common sa http://creativecommons.org/licenses/by-sa/3.0/ avatar.osg - creative common sa http://creativecommons.org/licenses/by-sa/3.0/ example.osg - creative common sa http://creativecommons.org/licenses/by-sa/3.0/ robot.os - jeremy's file he has to choice it Janses - Blender Artistic License - www.blender.org Yes i can provide those textures. I will adjust some stuff on thoses example to look better. Cheers, Cedric Robert Osfield wrote: Hi Cedric, I've pulled down your .osg and image files and have started testing. Most of the .osg files do things, but the example.osg just seems to be a static box. The avatar.osg also references textures that you haven't supplied. grep file *.osg avatar.osg:file F:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/skin.tga avatar.osg: file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/brow.l.tga avatar.osg: file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/nose.tga avatar.osg: file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/mouth.tga avatar.osg: file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/eye.l.tga avatar.osg: file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/brow.l.tga avatar.osg: file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/eye.l.tga avatar.osg: file F:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/skin.tga avatar.osg:file F:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/dark_grey.tga avatar.osg:file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/red.tga avatar.osg:file F:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/dark_grey.tga avatar.osg:file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/red.tga avatar.osg:file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/red.tga Could you provide these files? What is the license associated with these models? Cheers, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- +33 (0) 6 63 20 03 56 Cedric Pinson mailto:[EMAIL PROTECTED] http://www.plopbyte.net ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Character animation in OSG
Jan, My comments were directed towards the osgAnimation discussion - Robert asked for feedback on what people thought would be useful for an integrated animation capability. They weren't directed at osgCal or cal3d and aren't meant to be critiques of either. I appreciate both osgCal and cal3d and the work people put into their development - I use them all the time with great success - Thanks! Brian [EMAIL PROTECTED] wrote: - To: OpenSceneGraph Users osg-users@lists.openscenegraph.org From: Jan Ciger [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] Date: 11/05/2008 10:22AM Subject: Re: [osg-users] Character animation in OSG -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Brian, Brian R Hill wrote: Cedric, Thanks for you contributions! The biggest issue I have with osgCal is that you have to load models differently, you can't use osgDB::readNodeFiles and you can't clone existing models. It complicates the applications loading routines. We typically preprocess all our models and convert them to .ive format, which we deliver and use for runtime. It would be nice to be able to do the same with the animation models. Unfortunately, that probably cannot be really helped. The osgCal characters are really only a thin front-end to the Cal3D animation library, it is not an OSG project and not something developed for OSG. It is possible to fork Cal3D and convert it to use extensions to osg/ive formats (osg/ive do not have anything for character animation/skeletons), but that would also mean redoing the whole production pipeline - exporters, loaders, etc. I am not sure the benefit would outweigh the cost, especially because you would have to maintain a forked version. Feel free to go ahead and do that, but I do not see much benefit in it. If you want to distribute a single binary file to the end-users, I would look at things like loading from zip/pak files containing all your assets together instead of shoehorning everything into an ive file. Moreover, the ive format is more-or-less a dead end according to Robert, not designed to be really extensible and will be probably replaced sometime in the future. Regards, Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFJEbo1n11XseNj94gRAq1LAJ9raq+e+U/IrYciaXekrlUC4lfcrACg6Pw5 SDQ/6SS2cVX5ghKlBQFThZ8= =s/TS -END PGP SIGNATURE- ___ 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] osgAnimation
Hi Cedric, In order to see buttons in osganimationviewer you need to unpack http://www.plopbyte.net/tmp/osgAnimation-data.tar.gz in the directory of osg-data (or in the same directory of the .exe) else you will not see the buttons. So it's normal, it will be not a problem when commited in the osg-data repository. OK, I only had the .osg files (osgAnimation.tar.gz), not the images (osgAnimation-Data.tar.gz). Now it looks better indeed :-) I know that in the avatar sample there are textures like f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/brow.l.tga but i did not know it will be a problem like doing an error disk it's weird. I agree. I don't have an F: drive, and the error happens deep in Windows code, so I don't think it's a problem you have to fix (other than putting relative paths in the osg file and providing the textures...) I fixed the missing OSGANIMATION_EXPORT for Bone, and the setupViewInWindow. Excellent, thanks. I recommand the nathan model as sample, it's a good sample. But you will understand better when using images buttons in the viewer ;) Yep, looks good. Though if I switch animation loops it looks like it gets stuck on one animation loop sometimes. I'll see if I can get more concrete reproduction steps later. Good work, definitely a great addition to OSG! J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgAnimation
On Wed, 2008-11-05 at 13:31 -0500, Jean-Sébastien Guay wrote: Hi Cedric, In order to see buttons in osganimationviewer you need to unpack http://www.plopbyte.net/tmp/osgAnimation-data.tar.gz in the directory of osg-data (or in the same directory of the .exe) else you will not see the buttons. So it's normal, it will be not a problem when commited in the osg-data repository. OK, I only had the .osg files (osgAnimation.tar.gz), not the images (osgAnimation-Data.tar.gz). Now it looks better indeed :-) I know that in the avatar sample there are textures like f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/brow.l.tga but i did not know it will be a problem like doing an error disk it's weird. I agree. I don't have an F: drive, and the error happens deep in Windows code, so I don't think it's a problem you have to fix (other than putting relative paths in the osg file and providing the textures...) I fixed the missing OSGANIMATION_EXPORT for Bone, and the setupViewInWindow. Excellent, thanks. I recommand the nathan model as sample, it's a good sample. But you will understand better when using images buttons in the viewer ;) Yep, looks good. Though if I switch animation loops it looks like it gets stuck on one animation loop sometimes. I'll see if I can get more concrete reproduction steps later. What is happening is that both animations are being played simultaneously and mixing over each other; for the time being, you have to explicitly stop any existing animations (if you want to just see one at a time). However, this behavior is great when you want to play two animations that affect two wholly different parts of your rig. :) Good work, definitely a great addition to OSG! J-S ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgAnimation
On Wed, 2008-11-05 at 11:53 -0500, Jean-Sébastien Guay wrote: Hi Cedric, Waiting for the examples to compile, I'll check back in with the results soon. There's a missing OSGANIMATION_EXPORT on the osgAnimation::Bone::UpdateBone class. With that added, all compiles correctly. Running osganimationviewer osgAnimation/example.osg gives a window with buttons at the bottom. If I click on the 2 left-most buttons some text comes in and fades out. If I click on the right-most button, a box in the bottom right corner comes in, and if I click on it again it goes out of the screen. Is that the expected behavior? I tried running osganimationviewer osgAnimation/avatar.osg but I get a disk error, and debugging I see that it's looking for a file called f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/brow.l.tga Those paths should probably be relative to the .osg file? I didn't check other files in the .tar.gz. One comment I have which applies to the osgWidget examples too (and I've said this before, when testing the osgWidget examples): the window shows up with its title bar outside the screen. It's very annoying. In general, don't use Everyone asks about this, so I'll try and put a comment in the code somewhere to explain it. The bottom line is that it simply isn't possible to create a pixel-aligned 2D interface in OSG without at least initially forcing a window size. Sure, I could rely on whatever size the user sets in their environment, but I need some way to keep the orthorgraphic camera in sync with the actual dimensions of the application window itself. Normally, you rely on the RESIZE event in osgGA to inform you of this, and for the most part it works (see src/osgWidget/ViewerEventHandlers) for keeping you in sync with the size of the window. However, a RESIZE event isn't generate for the initial size of the window, nor is it generated when the window is asked to go into fullscreen mode. Until there is some global way of hooking into the intial (and any subsequent changes thereafter) window dimensions in a reliable way, we simply have no choice. I spent an afternoon trying to get around this with no avail. If someone can tell me how to get the initial window size, I'll be more than happy to patch osgWidget. :) (I've posted asking about this in the past with no response.) Until then, I do the best I can with what I've got. Now, if you don't care about having a truly pixel-aligned WindowManager (GUI) then it doesn't matter, of course. But this results in very poor interface quality. viewer.setUpViewInWindow(0, 0, WIDTH, HEIGHT); and just let the viewer set itself up, or use viewer.setUpViewInWindow(50, 50, WIDTH, HEIGHT); so that it comes up in a sane place on the screen. (but I really suggest to not use it, so that the user can use command-line args or environment variables to set where the viewer will show up if he wants) J-S ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgOcean(?)
Hello Kim, So, I was wondering what would be the best way to go about this. The code comprises of a range of effects such as god-rays, particle systems for floating particulate matter, seabed silt and bubbles, many shader effects (single and multipass) and an FFT ocean simulation. I'm very curious about your work and your screenshots look great. I'm wondering, could you give a more detailed feature list (effects supported both below and above the ocean surface, etc.). In particular, do the waves on the ocean react to objects on the surface (boats etc.)? Do you simulate breaking waves (or whitecaps) in a realistic fashion? Is the shoreline rendered realistically? Is the wave motion just a direction or can it be affected by objects, wind, etc.? (as you can see, I'm most interested in top-sea rendering, and your list above contains most of the items I would look for below the surface...) Also, does this all work properly in multi-monitor / multi-camera / multi-view setups? (I see the little inset camera you have in the second shot, so I assume yes. How is the performance? Thanks in advance, J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgAnimation
Hi All, Jeremy Moles wrote: On Wed, 2008-11-05 at 13:31 -0500, Jean-Sébastien Guay wrote: Hi Cedric, In order to see buttons in osganimationviewer you need to unpack http://www.plopbyte.net/tmp/osgAnimation-data.tar.gz in the directory of osg-data (or in the same directory of the .exe) else you will not see the buttons. So it's normal, it will be not a problem when commited in the osg-data repository. OK, I only had the .osg files (osgAnimation.tar.gz), not the images (osgAnimation-Data.tar.gz). Now it looks better indeed :-) I know that in the avatar sample there are textures like f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/brow.l.tga but i did not know it will be a problem like doing an error disk it's weird. I agree. I don't have an F: drive, and the error happens deep in Windows code, so I don't think it's a problem you have to fix (other than putting relative paths in the osg file and providing the textures...) In fact it's the blender exporter that does not handle this correctly i will fix it. I adjusted nathan.osg to have color for each part, it's really better. I fix the avatar.osg and i post the new files. I fixed the missing OSGANIMATION_EXPORT for Bone, and the setupViewInWindow. Excellent, thanks. I recommand the nathan model as sample, it's a good sample. But you will understand better when using images buttons in the viewer ;) Yep, looks good. Though if I switch animation loops it looks like it gets stuck on one animation loop sometimes. I'll see if I can get more concrete reproduction steps later. What is happening is that both animations are being played simultaneously and mixing over each other; for the time being, you have to explicitly stop any existing animations (if you want to just see one at a time). However, this behavior is great when you want to play two animations that affect two wholly different parts of your rig. :) Exact in fact bheind this part there is only basics logic. If you play two animation then it takes the bones and divide / 2, there is no priority or stuff like that. So it's a part i have to work in a near futur. Cheers, Cedric Good work, definitely a great addition to OSG! J-S ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- +33 (0) 6 63 20 03 56 Cedric Pinson mailto:[EMAIL PROTECTED] http://www.plopbyte.net ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgAnimation
Hi Jeremy, Everyone asks about this, so I'll try and put a comment in the code somewhere to explain it. The bottom line is that it simply isn't possible to create a pixel-aligned 2D interface in OSG without at least initially forcing a window size. Sure, I could rely on whatever size the user sets in their environment, but I need some way to keep the orthorgraphic camera in sync with the actual dimensions of the application window itself. Normally, you rely on the RESIZE event in osgGA to inform you of this, and for the most part it works (see src/osgWidget/ViewerEventHandlers) for keeping you in sync with the size of the window. However, a RESIZE event isn't generate for the initial size of the window, nor is it generated when the window is asked to go into fullscreen mode. Until there is some global way of hooking into the intial (and any subsequent changes thereafter) window dimensions in a reliable way, we simply have no choice. I spent an afternoon trying to get around this with no avail. If someone can tell me how to get the initial window size, I'll be more than happy to patch osgWidget. :) (I've posted asking about this in the past with no response.) Until then, I do the best I can with what I've got. The requirement to have the size at startup makes sense. I have no problem with that. (but thanks for explaining, it's always useful to have a better understanding of the why). What I have problems with is putting the window's top-left corner at (0,0). You can change that without affecting the window's size... viewer.setUpViewInSingleScreen(50, 50, w, h); As for letting the viewer set itself up, there should be ways of getting the size of the window after viewer.realize(): * Get the viewport of the main viewer camera (viewer.getCamera()-getViewport()). * Or get the graphics context and get the size from there. * Or ... But as I said, my major concern is putting the window at (0,0). I would find it more polite if your examples let the viewer decide, but if that's just not possible, at the very least place the window in a sane initial position. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgAnimation
On Wed, 2008-11-05 at 13:53 -0500, Jean-Sébastien Guay wrote: Hi Jeremy, Everyone asks about this, so I'll try and put a comment in the code somewhere to explain it. The bottom line is that it simply isn't possible to create a pixel-aligned 2D interface in OSG without at least initially forcing a window size. Sure, I could rely on whatever size the user sets in their environment, but I need some way to keep the orthorgraphic camera in sync with the actual dimensions of the application window itself. Normally, you rely on the RESIZE event in osgGA to inform you of this, and for the most part it works (see src/osgWidget/ViewerEventHandlers) for keeping you in sync with the size of the window. However, a RESIZE event isn't generate for the initial size of the window, nor is it generated when the window is asked to go into fullscreen mode. Until there is some global way of hooking into the intial (and any subsequent changes thereafter) window dimensions in a reliable way, we simply have no choice. I spent an afternoon trying to get around this with no avail. If someone can tell me how to get the initial window size, I'll be more than happy to patch osgWidget. :) (I've posted asking about this in the past with no response.) Until then, I do the best I can with what I've got. The requirement to have the size at startup makes sense. I have no problem with that. (but thanks for explaining, it's always useful to have a better understanding of the why). What I have problems with is putting the window's top-left corner at (0,0). You can change that without affecting the window's size... viewer.setUpViewInSingleScreen(50, 50, w, h); Yeah, that's no problem. :) I can add this easy. As for letting the viewer set itself up, there should be ways of getting the size of the window after viewer.realize(): That's the key though--I wouldn't want to rely on the viewer being realized, and it would make the code tricky to do properly in the right order. The answer, I think, is me hacking osgViewer to report this data via the RESIZE event properly, I'm just so overwhelmed with a sense of wanting to get this done I haven't had a chance. :) It is something I will do eventually, of course. (Wasn't trying to be inflammatory, if it sounded that way. :)) * Get the viewport of the main viewer camera (viewer.getCamera()-getViewport()). * Or get the graphics context and get the size from there. * Or ... But as I said, my major concern is putting the window at (0,0). I would find it more polite if your examples let the viewer decide, but if that's just not possible, at the very least place the window in a sane initial position. J-S ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgAnimation
Hi Jeremy, viewer.setUpViewInSingleScreen(50, 50, w, h); Yeah, that's no problem. :) I can add this easy. OK good, that's at least a good start. As for letting the viewer set itself up, there should be ways of getting the size of the window after viewer.realize(): That's the key though--I wouldn't want to rely on the viewer being realized, and it would make the code tricky to do properly in the right order. I don't think it's a problem. You have to pass the size anyways when creating the WindowManager right? So you'll just defer creating your WindowManager until the viewer is realized. Just calling viewer.realize() yourself before viewer.run() does the trick... Anyways, we're talking about examples here, where the polite thing is to let osgViewer::Viewer set itself up however it likes. So if you need to go through a few more hoops to do this, that's fine IMHO. In the case of a real application, the user will probably know the size of their window in advance, so the problem is non-existent. The answer, I think, is me hacking osgViewer to report this data via the RESIZE event properly, I'm just so overwhelmed with a sense of wanting to get this done I haven't had a chance. :) It is something I will do eventually, of course. Perhaps hacking isn't the right word, I would say fixing instead :-) (Wasn't trying to be inflammatory, if it sounded that way. :)) Nah, don't worry about it. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgAnimation
Hi Jeremy, What is happening is that both animations are being played simultaneously and mixing over each other; for the time being, you have to explicitly stop any existing animations (if you want to just see one at a time). When multiple animations are mixing, should the stop button stop them all? If I just click multiple animations in the list (eject button), it seems to do what you say (play them all at the same time, mixing) but then clicking the stop button seems to have no effect. J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How should I reset position/rotation/scale using MatrixTransform?
Thank you! it works) 05.11.08, 18:27, Jean-Se'bastien Guay [EMAIL PROTECTED]: Hi Max, How should I reset position *OR* rotation *OR* scale using MatrixTransform Decomposing the matrix is not that reliable. Keep them separately, or use PositionAttitudeTransform. Remember that mt-setMatrix(osg::Matrix::scale(...) * osg::Matrix::rotate(...) * osg::Matrix::translate(...)) is functionally equivalent to one MatrixTransform with scale, with a child MatrixTransform with rotation, and another child MatrixTransform with translate (or some permutation, I can never remember). J-S -- __ Jean-Sebastien Guay[EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Яндекс.Почта. Поищите спам где-нибудь еще http://mail.yandex.ru/nospam ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgAnimation
On Wed, 2008-11-05 at 14:26 -0500, Jean-Sébastien Guay wrote: Hi Jeremy, What is happening is that both animations are being played simultaneously and mixing over each other; for the time being, you have to explicitly stop any existing animations (if you want to just see one at a time). When multiple animations are mixing, should the stop button stop them all? It only stops the last animation played. I think I put that code together in about 45 seconds tops, so... it's pretty crappy .:) If I just click multiple animations in the list (eject button), it seems to do what you say (play them all at the same time, mixing) but then clicking the stop button seems to have no effect. J-S ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Character animation in OSG
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robert Osfield wrote: On Wed, Nov 5, 2008 at 3:14 PM, Jan Ciger [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- What is the license for the code (cannot use GPL, LGPL is OK) and where to get it? I would give it shot. Cedric's has changed the licensing of osgAnimation so that it's OSGPL, compatible with the rest of the OSG. OK, great. I will try to get it working here. Indeed, something newer and better integrated than the venerable Cal3D would be good to have. our experience on CAL/OSG integration would be useful a guide for the osgAnimation development. My hope is that osgAnimation would be able to replace osgCal usage, but without any experience with osgCal I can't say how easy as step this is right now, or how easy this can be made, so... it would be useful to get feedback from those who've been using osgCal/ReplicantBody as to what is missing/needs improving on osgAnimation to make it possible to move apps over to osgAnimation. Well, I didn't see the new library yet, but as always, the main problem is not to make the code work - basic keyframe playing and skinning is not that difficult to do. The problem is to have the full pipeline from the modeler to the screen and a way to use existing data. I will try to get the osgAnimation to work and look at what would need to be done. Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFJEgWFn11XseNj94gRAkqkAJ4i4IqWr01PkRyAwx6x0c09vEBdxwCdE3Zt f0PsfNktAwqPm1NJB+6CwmY= =icJe -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Character animation in OSG
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Laurent Di Cesare wrote: Actually I think it's more of a cal3d issue than an osgcal issue. Well, the loading is done via osgCal, so if the underlying library barfs on the data, it should report the error better. Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFJEgZYn11XseNj94gRAt8hAJ9FPp9MnFp4K3XhwNkqxaF38YW9OACdE7lm BVWrsi+VeK+6pjgpaPndueI= =Gu/g -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgOcean(?)
Hello Kim, you might take a look at http://www.ogre3d.org/phpBB2/viewtopic.php?t=38148 it is free but uses different engine. Sergey Kurdakov ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Help with Positiong a Camera
http://stderr.org/doc/openscenegraph-doc/openscenegraph/classosg_1_1Camera.htmlprovides the method for doing just that void setViewMatrixAsLookAthttp://stderr.org/doc/openscenegraph-doc/openscenegraph/classosg_1_1Camera.html#ffdfac8750ae789faa395d3e8d4e(const osg::Vec3http://stderr.org/doc/openscenegraph-doc/openscenegraph/classosg_1_1Vec3f.htmleye, const osg::Vec3http://stderr.org/doc/openscenegraph-doc/openscenegraph/classosg_1_1Vec3f.htmlcenter, const osg::Vec3http://stderr.org/doc/openscenegraph-doc/openscenegraph/classosg_1_1Vec3f.htmlup) It sounds like that would be more appropriate for your situation. On Wed, Nov 5, 2008 at 4:03 PM, Allen [EMAIL PROTECTED] wrote: Hi, I'm new to OSG and am in need of assistance with how to position a camera in a scene. I am using OSG 2.6.1 on linux (centos4). Here's my setting: 1) I've setup my scene (only one node - terrain). 2) I've setup my 1 and only 1 camera in my only viewer by calling: setProjectionMatrixAsPerspective ( 30.0f, static_castdouble ( width ) /static_castdouble ( height ), 1.0f, 1.0f ); 3) I CAN add a slave camera translate it in ONLY the x y planes. I can scale too but this still is not what I'm looking for. My Question: How to I get my Camera to be positioned at a certain spot over my terrain and looking at a particular spot on my terrain? For the life of me, I can't figure this out Ive been pouring through dozens of examples, the API, and trying all sorts of experiments with EVERY camera method I can find, view viewer method I can find that might help me. Thx everyone for your help. I really appreciate this. -- Sincerely, Allen ___ 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] need to port an application from OSG v1.2 (OSG::Producer based) to OSG 2.0 (OsgViewer based)
Gianluca Natale wrote: Is there any tutorial that explains how to do that without any pain? No pain, no gain. :) All joking aside, it really is not that painful. I migrated my OSG 1.2 application (using old Producer libraries) to new osgViewer in a couple of hours. There was some functionality that was lost (Producer config files don't work properly yet, hiding the mouse pointer is not supported, multimonitor strangeness), but for the most part the port was straightforward. I just recommend checking out a copy of your application out of your source control (you do use source control, don't you?) and compiling it against OSG 2.6, fixing the errors along the way. I didn't keep good notes of my own experience, but if you have specific questions about porting functionality, email the list and I'll do my best to answer. -Eric ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Character animation in OSG
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Robert (and all), Robert Osfield wrote: Your experience on CAL/OSG integration would be useful a guide for the osgAnimation development. My hope is that osgAnimation would be able to replace osgCal usage, but without any experience with osgCal I can't say how easy as step this is right now, or how easy this can be made, so... it would be useful to get feedback from those who've been using osgCal/ReplicantBody as to what is missing/needs improving on osgAnimation to make it possible to move apps over to osgAnimation. I have managed to compile the branch with osgAnimation and it works OK on my Linux system. Here are few things I have observed, Cedric feel free to correct me if I am wrong here: - - The animation format seems to be not very practical/efficient. The animation is stored as a special node in the .osg file, with each bone having every key specified, even if it is not moving. It is simple, but leads to huge files. Cal3D and most animation toolkits are able to interpolate the keyframes between points in time - i.e. I specify a time when certain key pose should be set, not a set of samples at fixed intervals. If the bone is not moving, only one sample is set at the beginning. Also, from a practical point of view it is better to separate animations, skeleton and mesh files. The same skeleton and animations are often reused for several different meshes (e.g. with different textures or even shapes). This could be probably handled by loading several osg files, but it needs to be kept in mind. This is why Cal3D has these data separate. - - Is there support for different frame rates of the animation? This is a very important feature, together with the capability to resample/interpolate the animations on the fly. E.g. a motion capture system can give you an animation file at a frame rate being anything between 20-120 Hz. You cannot rely on having all animations at the same frame rate, because assets are often reused and pre-converting everything every time is simply not practical. - - How many bones can be influencing one vertex of the mesh? The data seems to be stored as skeleton bone having a list of vertices affected by it + weight. I wonder how practical this is from the exporter/design tool point of view - you typically paint weights over the mesh and assign bones to vertices, not vertices to the skeleton bones. This is a detail, though, but it leads to long lists of vertices that are duplicated several times, for each bone affecting the vertex. A more usual way is to have a vertex id followed by a list: bone id weight bone id weight ... That allows to have the long list only once. A pathological worst case would be a mesh where every vertex is affected by all bones. With the current format one would have e.g. 2000 vertices x 15 bones = 3 vertex entries. With the format I have mentioned, one would have only 2000 entries. - - Support for animation priorities - an absolutely essential thing, but doesn't seem to be there yet (I may be wrong). If there are multiple animations playing and influencing the same parts of the rig, they need to be weighted. For example a waiter carrying a tray with drinks - you have a walk cycle animating the whole skeleton and a raised arm holding the drink tray steady. The arm animation would have higher priority, overriding the walk cycle for the part of the skeleton. Cal3D does this using an animation mixer. One cannot rely on having two animations affecting only distinct portions of the rig - this is not feasible unless one animates everything by hand and it doesn't look natural anyway - e.g. even the waiter's hand above will be bobbing up and down a little in the rhythm of the walk cycle, otherwise he would look like having a terrible cramp in that hand and holding it completely stiff. - - Support for animation blending - there needs to be a possibility to transition smoothly from e.g. walking to jump and again to walking. This is done using animation blending - interpolating between the end pose of one key frame to the start pose of the next one. Without this jumps will occur and it will look bad. - - Hardware accelerated skinning - at the moment the skinning seems to be done all in software, not using vertex shaders. There is code in osgCal that does this already. I believe that there was also the osgCharacter nodekit doing skinning in hardware. Regards, Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFJEiFPn11XseNj94gRAp7zAJ9GfVItg9/yMumJqKSG+vv6I/pLywCgq3X0 /K4ldjB6H5SMwfNCLyJJWEo= =pJFv -END PGP SIGNATURE- ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Need explanation about a strange behaviour with RenderBin
Hi, I found a strange behavior, and I would like someone to explain, if possible. In an .osg model (exported from Blender) the rendering_hint OPAQUE_BIN line in some StateSets causes my model to be lit in a funky way. It is sometimes correctly lit, sometimes not (looks like diffuse got away). In my app, I have: - a pStateset-setRenderBinDetails(11,RenderBin) used to render HUD components, - and a pStateset-setRenderBinDetails(-1, RenderBin) elsewhere for my sky sphere. But if I change OPAQUE_BIN to DEFAULT_BIN, then my model is correctly lit... Can someone explains what happened? Thanks. Sincerely, -- Sukender ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Character animation in OSG
Hi Jan, Thank you taking time to read code and test it. I will try to answer to your remarks. Jan Ciger wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Robert (and all), Robert Osfield wrote: Your experience on CAL/OSG integration would be useful a guide for the osgAnimation development. My hope is that osgAnimation would be able to replace osgCal usage, but without any experience with osgCal I can't say how easy as step this is right now, or how easy this can be made, so... it would be useful to get feedback from those who've been using osgCal/ReplicantBody as to what is missing/needs improving on osgAnimation to make it possible to move apps over to osgAnimation. I have managed to compile the branch with osgAnimation and it works OK on my Linux system. Here are few things I have observed, Cedric feel free to correct me if I am wrong here: - - The animation format seems to be not very practical/efficient. The animation is stored as a special node in the .osg file, with each bone having every key specified, even if it is not moving. It is simple, but leads to huge files. Cal3D and most animation toolkits are able to interpolate the keyframes between points in time - i.e. I specify a time when certain key pose should be set, not a set of samples at fixed intervals. If the bone is not moving, only one sample is set at the beginning. You are right, but it's not the job of osgAnimation to make this assumption, osgAnimation interpolate bewteen keyframes. The optimization of key is the responsiblity of the exporter instead. In the osg exporter i bake everything without optimization yet, that's why it produces a big amount of data. To work quickly i just exported all baked animation. If you want you can just put one key for a channel or two with 40 seconds between them. So it's not a blocker. But in the futur you could want to separate each channel like PosX PosY PosZ because sometimes it vary only on one value and you can save space like espacialy if you have to bake animation. Also, from a practical point of view it is better to separate animations, skeleton and mesh files. The same skeleton and animations are often reused for several different meshes (e.g. with different textures or even shapes). This could be probably handled by loading several osg files, but it needs to be kept in mind. This is why Cal3D has these data separate. Yes i am completely agree with that. Here more info how it's splitted. RigGeometry Animation/Channel Skeleton/Bone So those 3 elements can be splitted in different file, and in animtk it was like that before, the .osg is just a container of those three elements. - - Is there support for different frame rates of the animation? This is a very important feature, together with the capability to resample/interpolate the animations on the fly. E.g. a motion capture system can give you an animation file at a frame rate being anything between 20-120 Hz. You cannot rely on having all animations at the same frame rate, because assets are often reused and pre-converting everything every time is simply not practical. There is no framerate, you specify your keyframes in seconds so more your put keyframes in a short range of time and better the resolution is. - - How many bones can be influencing one vertex of the mesh? The data seems to be stored as skeleton bone having a list of vertices affected by it + weight. I wonder how practical this is from the exporter/design tool point of view - you typically paint weights over the mesh and assign bones to vertices, not vertices to the skeleton bones. the format stored is VertexGroup. For a geometry you have a set of VertexGroup, a vertex group is a list of 'id of the vertex' and its 'weight'. The name of vertex group identify the target typically the bone. Using this format is generic. For example if you want to extend the mesh, like adding new vertexes, you can add a group for them and give it the name to the new bone or other elements that could influence those vertexes. Then rebuild the association on the fly. I choiced this format for genericity it's easier to manipulate, but i know sometime it's less readable in the osg file. This is a detail, though, but it leads to long lists of vertices that are duplicated several times, for each bone affecting the vertex. A more usual way is to have a vertex id followed by a list: bone id weight bone id weight ... That allows to have the long list only once. A pathological worst case would be a mesh where every vertex is affected by all bones. With the current format one would have e.g. 2000 vertices x 15 bones = 3 vertex entries. With the format I have mentioned, one would have only 2000 entries. It's the same amount of data. it just differents way, you suggest 2000 x 15 and it's currently 15 x 2000 but i am agree your solution produces less lines. - - Support for animation priorities - an absolutely essential thing, but
Re: [osg-users] osgAnimation
Hi Robert, I updated the file http://www.plopbyte.net/tmp/osgAnimation-data.tar.gz so there is everything needed. You just need to depack in osg-data, then use the osganimationviewer. The osg exporter for blender is updated too Cheers, Cedric Robert Osfield wrote: Hi Cedric, I've pulled down your .osg and image files and have started testing. Most of the .osg files do things, but the example.osg just seems to be a static box. The avatar.osg also references textures that you haven't supplied. grep file *.osg avatar.osg:file F:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/skin.tga avatar.osg: file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/brow.l.tga avatar.osg: file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/nose.tga avatar.osg: file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/mouth.tga avatar.osg: file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/eye.l.tga avatar.osg: file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/brow.l.tga avatar.osg: file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/eye.l.tga avatar.osg: file F:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/skin.tga avatar.osg:file F:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/dark_grey.tga avatar.osg:file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/red.tga avatar.osg:file F:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/dark_grey.tga avatar.osg:file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/red.tga avatar.osg:file f:/Sync_to_H-Drive/Animation_Jobs/Plopbyte/Blend/Textures/red.tga Could you provide these files? What is the license associated with these models? Cheers, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- +33 (0) 6 63 20 03 56 Cedric Pinson mailto:[EMAIL PROTECTED] http://www.plopbyte.net ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Setting number of Cull, Draw threads
Just a simple question, is there a limit on the number of threads I set for one graphics Context? Does OSG set this limit and can't be over -ridden ? Regards IMPORTANT: This email remains the property of the Australian Defence Organisation and is subject to the jurisdiction of section 70 of the CRIMES ACT 1914. If you have received this email in error, you are requested to contact the sender and delete the email. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] my problem with VPB 0.9.9
Hi Robert Thanks for replying. Sorry for my poor explanation. It happens like this, after i execute the command, nothing happened, even crash. I will try figure it out, maybe i have some wrong configurations. Cheers Logeo 2008/11/4 Robert Osfield [EMAIL PROTECTED] Hi Legeo, Could please explain what you mean by it just stop there as it's totally meaningless. Does it crash? Does it hang? Does time freeze? Does a bell ring and the bus conductor tell you to get off at the next stop? Robert. On Tue, Nov 4, 2008 at 2:36 PM, legeochen [EMAIL PROTECTED] wrote: Hi all I have just managed to compile VPB 0.9.9. But there is a problem: when run the applications like osgdem, vpbmaster, it just stop there. osgdem --xx 10 --yy 10 -t ps_texture_16k.tif \ --xx 10 --yy 10 -d ps_height16.tif \ -l 8 -v 0.1 -o puget.ive -a pegout.osga I have osg 2.7.4 installed under my Deiban lenny. Quite confusing. It worked fine when I was using VPB 0.9.1. Any idear? Thanks! Best Regards legeo ___ 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] vpbmaster seg faults on my build
Hi, I remember some segfault problems I had at some stage, but it was on Debian Lenny 32-bit and had something to do with the compiler/optims. Could you try one of the following (just a hunch): first clean out all local libs (OSG and OpenThreads) 1) try g++-4.2 2) run ccmake, press t to toggle advanced, look in the compiler flags and modify -O3 to -O2. jp Mark Yantek wrote: OSG-USERS, I’m Using, “..OpenSceneGraph (rev 8413) and VirtualPlanetBuilder (rev 914) checked out from svn around June 2008..” Everything built fine, but when I try to run vpbmaster it only says “Segmentation Fault”. How do I get around this problem? The system I’m using is running Ubuntu Linux 8.10 64-bit and GCC 4.3.2. I have been following the cluster example here http://www.openscenegraph.org/projects/VirtualPlanetBuilder/wiki/ExampleClusterJPD . Thanks -Mark Yantek ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org