Re: [osg-users] Serialization of osg::Image data into OSGT
Hi, It might be interesting other models seems to be saved and loaded without problems into OSGT including texture data. I've tested it with the OSG-Data clock.osgt, for example. But actually I didn't yet get the difference. Thank you! Cheers, Johannes -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55180#55180 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] qmlosg (QtQuick + osg integration)
Hi René, sorry I forgot to reply my own thread when I found the solution. I was simply missing a glFlush() call after rendering the osg frame in its own gl context! I still haven't update the code on github, will do it tonight. Cheers, ricky On Fri, Jul 5, 2013 at 10:19 AM, René Schmitz r...@biosolveit.de wrote: Hi, after trying to create a osgQML item myself and finding both of your projects, I thought I'd let you know that I ended up using QuickPaintedItem as it can draw to a FBO (I had to use the y-inverted one). This solution works charming and spares me the hussle of creating FBOs myself or switch contexts. I have to admit though that I don't need permanent updates of the scene, just reacting to mouse and keyboard events and that there might be a drawback in performance if the scene is updated permanently using a timer. For that maybe the textureinthread example coming with the Qt sources might offer a better way. Hope that helps. Cheers, René -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55146#55146 ___ 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] Serialization of osg::Image data into OSGT
Hi, I have some objections. The textual format in my understanding is for portability and debugging. Texture data can be saved as reference to a file, so textures are included but not as a BLOB. I simply do not like the idea of scrolling through a 100Mb textfile looking for some stateset when there is garbage binary data obfuscating the structure. Why do you need to have the textures saved directly into the file? Personally I prefer keeping references, this makes the data exchangeable. If your problem stems from wanting a compact archive (i.e. single file) containing a bigger data set, then use the archiving capabilities of OSG. Nevertheless: As long as serializing into the text file stays strictly optional I don't have real issues with it. cheers Sebastian Hi guys, some time ago I discoverd that inlining osg::Image data into the native OpenSceneGraph serializer formats is possible for the binary format (OSGB), only. Now that we also need to support inling osg::Image data in the .osgt format, I am curious to ask why this is currently not supported by the OSG? As there is at least one Public Domain Base64 encoder/decoder available, one might consider including that into OSG and using it to put the binary osg::Image data into the osg-text stream. Thoughts? Best regards, Johannes lightweight-replace-engine: A lightweight C++ template based text document preprocessor - https://code.google.com/p/lightweight-replace-engine/ -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55126#55126 ___ 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] Serialization of osg::Image data into OSGT
Hi Sebastian, I get your points. The situation we come from is: We have Image data that is produced during application runtime that never existed on disk separately. So our osg::Image has no filename defined. So we decided to inline the data rather than pushing them to disk. When writing our data into OSGT, the WriteImageHint=IncludeData gets accepted, but nothing will get written as OutputStream.cpp checks for binary mode. Then the result is an empty definition of osg::Image inside the OSGT. As far as I remember that does not even produce a warning. Now if you would like to have OSGT and OSGB have to behave equivalently, one might consider, to never use “IncludeData” or to extend OSGT to inline the data regardless of its file size. In the end the users must choose whether they are fine with increasing their file sizes by image data when using IncludeData in ASCII mode. But at least then the OSG behavior is consistent with its plugin options. Cheers, Johannes -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55187#55187 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Two weeks until the SIGGRAPH OSG BOF
Hello, Two weeks until the SIGGRAPH OSG BOF. Robert will be presenting via Google Hangouts [video chat]. There are still all physical slots available. Note: If people wish to present remotely, since we will have Google hangouts at the BOF, let me know. Also, if there are some OSG people attending, the BOF has had a panel scheduled every year, so that is a participation possibility. John F. Richardson smime.p7s Description: S/MIME cryptographic signature ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Android osgAndroidExampleGLES2 compiler errors
Jordi Torres wrote: Hi, This bug is fixed in recent versions. So try the svn trunk. Cheers El 09/07/2013 18:16, John Moore () escribió: Jorge Izquierdo Ciges wrote: The message its pretty clear: couldn't load osgNativeLib: findLibrary returned null Probably the library has not been copied. This usually happens when compiling armeabi-v7 and the device doesn't support it.It is also possible that the apk was generated without the .so open the apk first to check it. -- Post generated by Mail2Forum Ok, so the problem could be the warnings that I ignored by removing -Werror flag. In fact these are the pieces of code in the osgNativeLib.cpp that gives me warnings: Code: 78 const char *nativeAddress = env-GetStringUTFChars(address, false); 87 const char *nativeAddress = env-GetStringUTFChars(address, false); 88 const char *nativeName = env-GetStringUTFChars(name, false); the warning (which is considered as error if I don't remove -Werror flag) is about#058; converting 'false' to pointer type for argument 2 of 'char const* _JNIEnv::GetStringUTFChars(jstring, jboolean*)' [-Werror=conversion-null] osgNativeLib.cpp /osgViewer/jni line 78 C/C++ Problem I didn't write this code. It was in the osgAndroidExampleGLES2. What do you think about it? Thanks again for your time. John -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55170#55170 (http://forum.openscenegraph.org/viewtopic.php?p=55170#55170) ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) Dear Jordi Torres, thank you for your suggestion. I downloaded the SVN version of OpenSceneGraph and built it for Android. Now I am able to run the Example without crash. However I get some errors and I can't see any rendered 3d model. This is the log of the app. Code: 07-10 23:02:52.770: W/EGLview(14138): creating OpenGL ES 2.0 context 07-10 23:02:52.790: E/OSGANDROID(14138): Initializing geometry 07-10 23:02:52.790: E/Osg Viewer(14138): Testing 07-10 23:02:52.800: W/Osg Viewer(14138): Warning: detected OpenGL error 'invalid enumerant' at Before Renderer::compile 07-10 23:02:52.830: E/OSGANDROID(14138): Initializing geometry 07-10 23:02:52.830: E/Osg Viewer(14138): Testing 07-10 23:02:52.840: W/Osg Viewer(14138): Warning: detected OpenGL error 'invalid enumerant' at Before Renderer::compile 07-10 23:08:08.958: W/SurfaceView(14138): CHECK surface infomation creating=false formatChanged=false sizeChanged=false visible=false visibleChanged=true surfaceChanged=true realSizeChanged=false redrawNeeded=false left=false top=false 07-10 23:08:09.278: W/IInputConnectionWrapper(14138): showStatusIcon on inactive InputConnection 07-10 23:08:53.751: D/libEGL(15910): loaded /system/lib/egl/libEGL_mali.so 07-10 23:08:53.761: D/libEGL(15910): loaded /system/lib/egl/libGLESv1_CM_mali.so 07-10 23:08:53.761: D/libEGL(15910): loaded /system/lib/egl/libGLESv2_mali.so 07-10 23:08:53.771: W/EGLview(15910): creating OpenGL ES 2.0 context 07-10 23:08:53.781: D/dalvikvm(15910): Trying to load lib /data/data/osg.AndroidExample/lib/libosgNativeLib.so 0x41a44740 07-10 23:08:53.901: D/dalvikvm(15910): Added shared lib /data/data/osg.AndroidExample/lib/libosgNativeLib.so 0x41a44740 07-10 23:08:53.901: D/dalvikvm(15910): No JNI_OnLoad found in /data/data/osg.AndroidExample/lib/libosgNativeLib.so 0x41a44740, skipping init 07-10 23:08:53.911: E/OSGANDROID(15910): Initializing geometry 07-10 23:08:53.911: E/Osg Viewer(15910): Testing 07-10 23:08:53.921: W/Osg Viewer(15910): Warning: detected OpenGL error 'invalid enumerant' at Before Renderer::compile In attachment you can see a screenshot of the app running on my Galaxy S III mini. As you can see from the screenshot there's nothing rendered on the screen. The buttons seem to work correctly because when I press them a label on the screen appears indicating the status of the button. Thank you, John -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55192#55192 attachment: schermata osgAndroidExample.png___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OpenSceneGraph Oculus Rift integration
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, If someone is interested in using Oculus Rift with OSG, there is a first shot at a nodekit with an example on Github: https://github.com/bjornblissing/osgoculusviewer We have been working on this together with Björn Blissing from the Swedish National Road and Transport Research Institute, who published the first draft of it. The code is still a bit rough, but it seems to work. Any improvements and bug reports are very welcome. Best regards, Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iD8DBQFR3dbdn11XseNj94gRAtVXAJ4oB0W7kwa4iHgC1z9m25Z+yVRjmwCgnQKd uvse4wXzMuSl3KF7MV+rXYE= =+PyX -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] Crash in LightSpacePerspectiveShadowMap
Hi Jan, This looks like interesting problem to debug ;-P but unfortunately I am really swamped. At least for month if not more. My hypothesis: ConvexPolyhedron is bascially a frustum sculpted into convex volume which is build from many cuts by various planes defined by scene bounding boxes, main and light camera frusta etc. Real problem with ConvexPolyhedron is a math precision of plane intersections. Even though its done with doubles it often may result in some precision errors which effectively make the volume non convex. When it becomes non-convex weird problems start to appear. That one may be also related to some precision error. There is one thing you may try to improve that precision. Especially if you use geocentric earth model. Try setting up modelling frame. osgshadow example shows how to do that. If this not helps ... I will not be able to help otherwise too soon. Sorry. Cheers, Wojtek 2013/7/9 Jan Ciger jan.ci...@gmail.com Hello, I am playing with the LightSpacePerspectiveShadowMap and all of those techniques crash on me like this: --- Debug Assertion Failed! Program: C:\Windows\system32\MSVCP110D.dll File: C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\deque Line: 1418 Expression: deque subscript out of range Typically zooming around the scene for a bit triggers this crash. --- This is using a 64bit debug build, with Visual Studio 2012. Stack: osg98-osgShadowd.dll!std::dequeosg::Vec3d,std::allocatorosg::Vec3d ::operator[](unsigned __int64 _Pos=2) Line 1421 C++ osg98-osgShadowd.dll!osgShadow::ConvexPolyhedron::transformClip(const osg::Matrixd matrix={...}, const osg::Matrixd inverse={...}) Line 604 + 0x12 bytesC++ osg98-osgShadowd.dll!osgShadow::ConvexPolyhedron::transform(const osg::Matrixd matrix={...}, const osg::Matrixd inverse={...}) Line 307 C++ osg98-osgShadowd.dll!osgShadow::MinimalShadowMap::ViewData::frameShadowCastingCamera(const osg::Camera * cameraMain=0x00110af0, osg::Camera * cameraShadow=0x0012add0, int pass=1) Line 254 + 0x4b bytes C++ osg98-osgShadowd.dll!osgShadow::ProjectionShadowMaposgShadow::MinimalCullBoundsShadowMap,osgShadow::LightSpacePerspectiveShadowMapAlgorithm::ViewData::frameShadowCastingCamera(const osg::Camera * cameraMain=0x00110af0, osg::Camera * cameraShadow=0x0012add0, int pass=1) Line 77 C++ osg98-osgShadowd.dll!osgShadow::MinimalCullBoundsShadowMap::ViewData::aimShadowCastingCamera(const osg::Light * light=0x03270b40, const osg::Vec4f lightPos={...}, const osg::Vec3f lightDir={...}, const osg::Vec3f lightUp={...}) Line 58 C++ osg98-osgShadowd.dll!osgShadow::StandardShadowMap::ViewData::cull() Line 458C++ osg98-osgShadowd.dll!osgShadow::ViewDependentShadowTechnique::cull(osgUtil::CullVisitor cv={...}) Line 84 + 0x10 bytes C++ osg98-osgShadowd.dll!osgShadow::ShadowTechnique::traverse(osg::NodeVisitor nv={...}) Line 88 + 0x20 bytes C++ osg98-osgShadowd.dll!osgShadow::ViewDependentShadowTechnique::traverse(osg::NodeVisitor nv={...}) Line 43C++ osg98-osgShadowd.dll!osgShadow::ShadowedScene::traverse(osg::NodeVisitor nv={...}) Line 65C++ osg98-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Line 194C++ osg98-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Line 314 C++ osg98-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Line 1220 C++ osg98-osgShadowd.dll!osgShadow::ShadowedScene::accept(osg::NodeVisitor nv={...}) Line 36 + 0x62 bytes C++ osg98-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Line 62 + 0x32 bytesC++ osg98-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Line 194C++ osg98-osgUtild.dll!osgUtil::CullVisitor::handle_cull_callbacks_and_traverse(osg::Node node={...}) Line 314 C++ osg98-osgUtild.dll!osgUtil::CullVisitor::apply(osg::Group node={...}) Line 1220 C++ osg98-osgd.dll!osg::Group::accept(osg::NodeVisitor nv={...}) Line 38 + 0x60 bytes C++ osg98-osgd.dll!osg::Group::traverse(osg::NodeVisitor nv={...}) Line 62 + 0x32 bytesC++ osg98-osgd.dll!osg::NodeVisitor::traverse(osg::Node node={...}) Line 194C++ osg98-osgUtild.dll!osgUtil::SceneView::cullStage(const osg::Matrixd projection={...}, const osg::Matrixd modelview={...}, osgUtil::CullVisitor * cullVisitor=0x0012e370, osgUtil::StateGraph * rendergraph=0x0012d720, osgUtil::RenderStage * renderStage=0x0012d8b0, osg::Viewport * viewport=0x042e17d0) Line 906 C++ osg98-osgUtild.dll!osgUtil::SceneView::cull() Line 767 + 0xf4 bytesC++ osg98-osgViewerd.dll!osgViewer::Renderer::cull() Line 638 C++ osg98-osgViewerd.dll!osgViewer::ViewerBase::renderingTraversals() Line 807