Re: [osg-users] Transformations using Quat and Mat
Hi, Maurus, I think it's the order of the multiplies. It should be like vec*MatA*MatB, If you want to apply an osg::Matrix on a osg::Vec. But I do not quiet know why osg::Quat does not obey this: for a osg::Quat, the form quat * vec is used.___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] "Memory: Colors" game from scratch
Hi. I've published the 5th (and final) tutorial of the guide, which describes actual gameplay implementation for "Memory: Colors". Here is the link to the guide's main page: https://bitbucket.org/ogstudio-games/memory-colors Here is web version of the result: https://ogstudio.github.io/game-memory-colors/tutorial-5.3/mjin-player.html On 5 November 2017 at 17:55, michael kapelko wrote: > Hi. > > I've published the 4th tutorial of the guide. It talks about > displaying text, animating text, and creating a good look background. > https://bitbucket.org/ogstudio-games/memory-colors/src/tip/readme/04.StartFinish/04.StartFinish.md > > > On 31 October 2017 at 08:40, tianzjyh wrote: >> wonderful ! >> >> >> -- >> Cheers, >> TianZJ >> >> >> At 2017-10-28 19:18:01, "michael kapelko" wrote: >>>Hi. >>> >>>You may remember that some time earlier this year I've posted about >>>OpenSceneGraph cross-platform guide ( >>>https://github.com/OGStudio/openscenegraph-cross-platform-guide ) that >>>describes how to render a simple cube on desktop, mobile, and web. >>> >>>Once that was over, I headed straight to creating the first >>>cross-platform game with OpenSceneGraph. This gave birth to MJIN >>>project ( https://bitbucket.org/ogstudio/mjin ), which builds on >>>OpenSceneGraph. >>> >>>I have successfully built the game based on Memory board game. >>>Here's web version: >>>https://ogstudio.github.io/game-memory-colors/0.3/mjin-player.html >>>Note the famous OpenSceneGraph background :) >>> >>>Once the game was done I decided to describe how to create it from scratch. >>>I've just finished the third article. All articles are in the game's >>>home repository: >>>https://bitbucket.org/ogstudio-games/memory-colors >>> >>>If you wanted to create a simple game for a long time but did not know >>>where to start, now is a good chance. >>> >>>Thanks. >>>___ >>>osg-users mailing list >>>osg-users@lists.openscenegraph.org >>>http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> >> >> >> 【网易自营|30天无忧退货】仅售同款价1/4!MUJI制造商“2017秋冬舒适家居拖鞋系列”限时仅34.9元>> >> >> ___ >> 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] OpenSceneGraph-3.5.8 dev release tagged
Hi All, This afternoon I tagged the 3.5.8 developer release: https://github.com/openscenegraph/OpenSceneGraph/tree/OpenSceneGraph-3.5.8 This dev release wraps up recent improvements to osgText and osgAnimation as well as range of other build and bug fixes. This dev release also contains fixes to outstanding issues picked up by CoverityScan - we now have a defect density of 0.00 per 1000 lines according to Coverity's webpage for the OpenSceneGraph. Coverity can only pick up certain types of bugs it's really not like the OSG is now completely free of bugs... but as far as we can take this tool for improving quality we have done so now and should be easy to keep on top of going forward. Thanks to all those that have contributed to the OSG in this dev cycle. Cheers, Robert. -- ChangeLog since 3.5.7 Tue, 14 Nov 2017 10:38:18 + Author : Raymond de Vries attached fixes for configuring and building the osgPlugin exr with Visual Studio and using out-of-the-box builds of ilmbase and openexr, i.e. without manual/extra config for using these 2 libs with the OSG.Previously, the assumption was made that ilmbase and openexr were installed in a common directory and hence the header files and libs were both found in that common directory. That is not consistent with other libs and this submission makes it consistent and therefore the OSG configures out of the box. I made this work for ilmbase-2.1.0.tar.gz / openexr-2.1.0.tar.gz and ilmbase-2.2.0.tar.gz / openexr-2.2.0.tar.gz Mon, 13 Nov 2017 13:08:39 + Author : Robert Osfield Fixed typo Mon, 13 Nov 2017 13:06:12 + Author : Robert Osfield Fixed CoverityScan reported errors Mon, 13 Nov 2017 12:49:33 + Author : Robert Osfield FIxed two CoverityScan detected memory leaks Mon, 13 Nov 2017 10:24:31 + Author : Andre Normann Attached is a fix in GLExtension, which is based on latest git version, that fixes the usage of uniform buffer objects on macOS. Under macOS core OpenGL features aren't exported as extension. OpenGL 3.1 includes the GL_ARB_uniform_buffer_object as core feature for example. On macOS a simple osg::isGLExtensionSupported() call would fail. It is required to use the isGLExtensionOrVersionSupported() method. This is what my fix does. Sat, 11 Nov 2017 14:50:55 + Author : Robert Osfield Updated SO version to 152 to reflect the resent API changes to osgAnimation. Sat, 11 Nov 2017 14:43:10 + Author : OpenSceneGraph git repository Merge pull request #382 from openscenegraph/osganimationOsganimation improvements Sat, 11 Nov 2017 13:27:43 + Author : OpenSceneGraph git repository Build fix Sat, 11 Nov 2017 13:08:42 + Author : OpenSceneGraph git repository Readbility improvements and updating version to 152 Sat, 11 Nov 2017 13:04:34 + Author : OpenSceneGraph git repository Added versioning to the new serialization additions Sat, 11 Nov 2017 13:00:56 + Author : OpenSceneGraph git repository Code readability improvements Sat, 11 Nov 2017 12:58:52 + Author : OpenSceneGraph git repository Code readability improvements Sat, 11 Nov 2017 12:54:28 + Author : OpenSceneGraph git repository Code readability improvements Sat, 11 Nov 2017 12:46:48 + Author : OpenSceneGraph git repository Code readability improvement Sat, 11 Nov 2017 12:45:55 + Author : OpenSceneGraph git repository Small readability improvements Sat, 11 Nov 2017 12:42:34 + Author : OpenSceneGraph git repository Fix of incorrect Program assignment bug and coding style Sat, 11 Nov 2017 12:33:44 + Author : OpenSceneGraph git repository coding style/readability fixes Sat, 11 Nov 2017 12:29:45 + Author : OpenSceneGraph git repository coding style/readability fixes Sat, 11 Nov 2017 12:27:56 + Author : OpenSceneGraph git repository coding style/readability fixes Sat, 11 Nov 2017 12:24:27 + Author : OpenSceneGraph git repository coding style fix Sat, 11 Nov 2017 11:17:34 + Author : Robert Osfield Restructed the ref counting of the rawImageRec structure so that it's done with a separate refImageRec struct so it doesn't interfer with the writing of the rawImageRec as a header when writing to .rgb Sat, 11 Nov 2017 10:19:09 + Author : Andreas Ekstrand I have implemented readObject to make loading objects from SceneLoader in the LWS plugin work. I'm not sure about other implications from changes leading up to this problem (readRefFile instead of readNodeFile in SceneLoader) but this fix works for me. Fri, 10 Nov 2017 17:12:20 + Author : Robert Osfield Fixed handling of GL_TEXTURE_CUBE_MAP when using glTextureStorage. Fri, 10 Nov 2017 17:00:52 + Author : OpenSceneGraph git repository Merge pull request #381 from openscenegraph/revert-379-osganimbugfixRevert "following guidance from OpenGL Common Mistakes:" Fri, 10 Nov 2017 16:58:29 + Author : OpenSceneGraph git repository Revert "following guidance from OpenGL Common Mistakes:" Fri, 10 Nov 2017 14:49:54 + Author : OpenSceneGraph git rep
[osg-users] Transformations using Quat and Mat
Hello everyboy, currently, I am trying to get some transformations working to display a cylinder as a line of sight. As you can see in the code below, I want to get the rotation represented by the Quaternion q into the Matrix mat, but neither preMultRotate using the quat nor multiplying as a Matrix won't give the expected results. Any ideas/clues? I am using OpenSceneGraph 3.5.5, commit from 7.10.2016 (6142ea1d4671c18ff1cb51bc49ba74c11df0d15b) Code: osg::Vec3 dir(1,1,1); osg::Vec3 z(0,0,1); dir.normalize(); osg::Quat q = getQuaternionFromTwoVectors(z, dir); //q*z == dir.normalize() => TRUE (0.57735, 0.57735, 0.57735) osg::Matrixd MV = getModelViewmatrix(); osg::Matrixd invMV = osg::Matrix::inverse(MV); //invMV * MV * z == z => TRUE //q * (invMV * MV * z) == dir.normalize() => true osg::Matrixd mat = invMat; mat.preMultRotate(q); //mat * MV * u == dir.normalize() => false (-0.57735, -0.57735, 0.57735) instead of (0.57735, 0.57735, 0.57735) mat = osg::Matrixd(q) * mat; //mat * MV * u == dir.normalize() => false (-0.57735, -0.57735, 0.57735) instead of (0.57735, 0.57735, 0.57735) Thank you! Cheers, Michael -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=72384#72384 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Correct way to modify scene graph [SEC=UNCLASSIFIED]
Hi Russel, On 13 November 2017 at 23:45, Thamm, Russell wrote: > The viewer is single-threaded. Furthermore, I now make all modifications to > the scene tree in the render thread (prerender) but I still get the > occasional crash in the render thread: If you are running the viewer SingleThreaded then there isn't a dedicated rendering thread, there will by just the main application thread doing update, event, rendering traversals (cull and draw dispatch). So are you running single threaded or multi-threaded? Also why modify the scene graph in rendering traversal? It's really hard to know what you are doing and why you are doing it. The only thing I can get a strong impression is that you are doing something in an odd way and getting a crash. I would suggest taking a big step back from the problem and explain to us what you are trying to achieve with updating the scene graph and we can point you in the right direction of how to do it efficiently. Robert ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org