[osg-users] The new osg format and the serialiser plugins
I all I'm interested in using the new osg formats, a new xml and binary format I believe. I was wondering if there is any information on using the new system, Example questions being What plugins do I need? osgdb_osg? osgdb_serializers_osg? Do any of the exporters support it? Especially 3DS Max osgExp Are these Static import functions related USE_DOTOSGWRAPPER(AlphaFunc)? What are the biggest benefits of the new system? Any advice would be appreciated Tom ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] The new osg format and the serialiser plugins
Hi Thomas, 2010/11/4 Thomas Hogarth thomas.hoga...@googlemail.com: What plugins do I need? osgdb_osg? osgdb_serializers_osg? You will need osgdb_osg and osgdb_serializers_... for reading/writing with the new formats Do any of the exporters support it? Especially 3DS Max osgExp At present, no one as I've known. But it will be easy to convert any osg supported formats to the new serialization ones, for example: osgconv cow.osg cow.osgb // convert to binary format Are these Static import functions related USE_DOTOSGWRAPPER(AlphaFunc)? No relation. USE_DOTOSGWRAPPER is only used in the .osg format. ADD_SERIALIZER macros are used in the new formats. What are the biggest benefits of the new system? Have a look at: http://www.openscenegraph.org/projects/osg/wiki/Support/KnowledgeBase/SerializationSupport Hope these can help you. The serialization support is still young. It is always appreciated if you can help test and improve it. :-) Cheers, Wang Rui ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG, bullet physics, collada and sketchup models on Ubuntu
Hi all, for completeness i share here a site [¹] that allows to convert sketchup models into 3ds, obj and other formats. I found and tried it yesterday evening and sees to work well. I hope this post can help those who had my own doubts and problems. Thanks again to all, best regards, Axel [1] http://www.babel3d.com -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33415#33415 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Get texcoord form PolytopeIntersector intersection
Hi Aitor, The PolytopeIntersector doesn't record this information, and one could interpret intersections with a polytope in many ways, certainly nothing a simple as a index and ratio like you can with a line or planar intersection. Intersecting a mesh with a polytope is very different than with a line segment, you can't just apply the same expectations, just have think about it, there isn't one intersection point when a triangle intersects a polytope, you simply can't suddenly apply a point intersection style approach. Robert. On Wed, Nov 3, 2010 at 11:21 AM, Aitor Ardanza aitoralt...@terra.es wrote: Hi, I have the code to do with LineSegmentIntersector, but I don't know how can I get the IndexList and RatioList to do the same with PolytopeIntersector. Code: osg::Drawable* drawable = intersection.drawable.get(); osg::Geometry* geometry = drawable ? drawable-asGeometry() : 0; osg::Vec3Array* vertices = geometry ? dynamic_castosg::Vec3Array*(geometry-getVertexArray()) : 0; if (vertices) { // get the vertex indices. const osgUtil::LineSegmentIntersector::Intersection::IndexList indices = intersection.indexList; const osgUtil::LineSegmentIntersector::Intersection::RatioList ratios = intersection.ratioList; if (indices.size()==3 ratios.size()==3) { unsigned int i1 = indices[0]; unsigned int i2 = indices[1]; unsigned int i3 = indices[2]; float r1 = ratios[0]; float r2 = ratios[1]; float r3 = ratios[2]; osg::Array* texcoords = (geometry-getNumTexCoordArrays()0) ? geometry-getTexCoordArray(0) : 0; osg::Vec2Array* texcoords_Vec2Array = dynamic_castosg::Vec2Array*(texcoords); if (texcoords_Vec2Array) { // we have tex coord array so now we can compute the final tex coord at the point of intersection. osg::Vec2 tc1 = (*texcoords_Vec2Array)[i1]; osg::Vec2 tc2 = (*texcoords_Vec2Array)[i2]; osg::Vec2 tc3 = (*texcoords_Vec2Array)[i3]; osg::Vec2 tc = tc1*r1 + tc2*r2 + tc3*r3; } } Any idea Thank you! Cheers, Aitor -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33375#33375 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] problem with osgshadow compilation in osgshadow example
Hi Juan, Using mingw with the OSG is not often done so you'll best testing something that few others do so if you spot problems then you'll need to pitch in to help resolve. As a general note, this error with linking against OpenThreads points to a an issue with how the OSG/OpenThreads was built and what the example is linking against. Normally the OSG is able to keep this all consistent, but if you build the OpenThreads with one configuration, change the configuration and build your application against that new configuration but link against the OpenThreads with the old configuration you might see problems. The include/OpenThreads/Config file is autogenerated and should be consistent. Robert. 2010/11/3 Juan S. Valverde García j.valve...@virtualmech.com: Hi, Thank you very much in advance for any help! So I'm trying to cast some shadows on my OSG virtual world. I started looking for the osgshadow example and manual to have a clue about this. When I try to compile the example, using mingww gcc 4.4.0, i get the followeing error: debug/osgshadow.o: In function `ViewData': C:\devtools\projects\OSG\pruebas ascensor\shadow/../../../../library/OpenSceneGraph-2.9.8/include/osgShadow/ViewDependentShadowTechnique:176: undefined reference to `_imp___ZN11OpenThreads5MutexC1ENS0_9MutexTypeE' C:\devtools\projects\OSG\pruebas ascensor\shadow/../../../../library/OpenSceneGraph-2.9.8/include/osgShadow/ViewDependentShadowTechnique:176: undefined reference to `_imp___ZN11OpenThreads5MutexD1Ev' debug/osgshadow.o: In function `~ViewData': C:\devtools\projects\OSG\pruebas ascensor\shadow/../../../../library/OpenSceneGraph-2.9.8/include/osgShadow/ViewDependentShadowTechnique:152: undefined reference to `_imp___ZN11OpenThreads5MutexD1Ev' C:\devtools\projects\OSG\pruebas ascensor\shadow/../../../../library/OpenSceneGraph-2.9.8/include/osgShadow/ViewDependentShadowTechnique:152: undefined reference to `_imp___ZN11OpenThreads5MutexD1Ev' collect2: ld returned 1 exit status Of course, first thing I tried was understanding the problem. No way. Second googled it. No trace of it in the www. So I came to the forum. Any clue about it? Again, any help would be much appreciated. My world is sad without a shadow! Best regards Juan ___ 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] Integrating OSG with freevr
Hi Mohammad, Use osgViewer::Viewer along with the GraphicsWindowEmbedded support to provide similar functionality to SceneView. See the osgviewerGLUT and osgviewerSDL examples. Robert. On Wed, Nov 3, 2010 at 4:16 PM, Mohammad Reza Shakouri mimreza...@yahoo.com wrote: Hi everybody, I have assigned to a task which I should integrate freevr to osg in order to create an interactive graphical world. I have a sample using osgUtil::sceneView to make it possible . But I have to do this task using osgViewer::Viewer .. I tried to modify the code but it seems the procedure in osgUtil::sceneView and osgViewer::Viewer are different. Recently , I have bee study these two namespace and their classes. But so far no luck with integration. I really appreciate if somebody would help me by giving me a hint or a sample code. Thank you! Cheers, Mohammad Reza shakouri -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33394#33394 ___ 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] How to show all objects
Hi Robert, On Wed, Nov 3, 2010 at 9:35 PM, Robert Gosztyla robert.goszt...@gmail.com wrote: I have i think a simple question. If i'm adding new objects on scene and they are invisible (culled) or partialy invisible, how to force view or camera to show all objects (whole scene). Is there any simple method? Is it simply that you want to change the viewers master Camera to look at the newly expanded scene? Are you wanting to reset the camera manipulators home position? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSGs OpenGLES 2.0 status
Hi Thomas, Interesting investigation and fix. Does this issue occur on the target hardware and software emulators of it? Robert. On Thu, Nov 4, 2010 at 5:56 AM, Thomas Hogarth thomas.hoga...@googlemail.com wrote: Fixed it, So after a bit of thinking I realised that the default buffer must be re binded at some point so did another search and found 3 calls to fbo_ext-glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0); And my earlier hunch was correct that ios' default buffer id is actually 1 so changing to the below makes it work fbo_ext-glBindFramebuffer(GL_FRAMEBUFFER_EXT, 1); So now I need to add a DEFAULT_FRAMEBUFFER define or something in the FrameBufferObject header file that is set it to 1 on ios Over all though, good news. Performance seems great too. Tom ___ 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] The new osg format and the serialiser plugins
Hi Thomas Wang Rui, On Thu, Nov 4, 2010 at 6:16 AM, Thomas Hogarth thomas.hoga...@googlemail.com wrote: Are these Static import functions related USE_DOTOSGWRAPPER(AlphaFunc)? This reminds me of an item on the TODO list for serializers - support for statically linking the serializers. To achieve this the osg plugin itself will have to directly reference the serializers, so have something like USE_OSGSERIALIZERS(osg), USE_OSGSERIALIZERS(osgDB) etc, ideally we'd have the list automatically generated. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to show all objects
Hi, ...that you want to change the viewers master Camera to look at the newly expanded scene?... I want to do this. Regarding home position probably i could use home() method, right? I have a case that i'm expanding my terrain with new tiles (i'm building it) and after adding new tile i would like to see whole terrain (of course if it is possible (camera ranges etc.)). Thank you! Cheers, Robert -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33427#33427 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] The new osg format and the serialiser plugins
Hi Robert, I've just made a compatibility fix of the serializers which allows specifying the working OSG version while developing class wrappers. I'll have more tests and try to add the static link support as well. All are hoped to be finished tomorrow. Cheers, Wang Rui 2010/11/4 Robert Osfield robert.osfi...@gmail.com: Hi Thomas Wang Rui, On Thu, Nov 4, 2010 at 6:16 AM, Thomas Hogarth thomas.hoga...@googlemail.com wrote: Are these Static import functions related USE_DOTOSGWRAPPER(AlphaFunc)? This reminds me of an item on the TODO list for serializers - support for statically linking the serializers. To achieve this the osg plugin itself will have to directly reference the serializers, so have something like USE_OSGSERIALIZERS(osg), USE_OSGSERIALIZERS(osgDB) etc, ideally we'd have the list automatically generated. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Generate mipmaps from arbitrary image
Hi all, I need to generate mipmaps from an osg::Image (a 2D image actually, which may be S3TC-DXTC compressed or not), and I have no OpenGL context. I just want my image to have mipmaps. Do you know anything that may help me? - Something to get a context without having to realize something, or with an invisible window? - Something to allocate mipmap memory, compute mipmaps, and store them in the osg::Image? I guess osg::gluBuild2DMipmaps() is the key, but it needs a context and process does not appear to be straightforward to me. Thanks. Cheers, Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Generate mipmaps from arbitrary image
Hi Sukender, My plan is to add a Image::buildMipmaps() functions that will use the new local gluScaleImage function that no longer requires a graphics context. However, this function won't support compressed textures as GLU has never support texture compression, and our integration of GLU parts into the OSG hasn't magically changed this. I am also planning to integrate NVidiaTextureTools as an OSG plugin/extension which will be able to compliment the GLU functions and add support for compressed texture formats. This will however require the NVTT as external dependency. I may be able to get on to these tasks next week. Robert. On Thu, Nov 4, 2010 at 11:47 AM, Sukender suky0...@free.fr wrote: Hi all, I need to generate mipmaps from an osg::Image (a 2D image actually, which may be S3TC-DXTC compressed or not), and I have no OpenGL context. I just want my image to have mipmaps. Do you know anything that may help me? - Something to get a context without having to realize something, or with an invisible window? - Something to allocate mipmap memory, compute mipmaps, and store them in the osg::Image? I guess osg::gluBuild2DMipmaps() is the key, but it needs a context and process does not appear to be straightforward to me. Thanks. Cheers, Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.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] Generate mipmaps from arbitrary image
Hi Robert, Having a Image::buildMipmaps() would be nice to me. I'd handle compressed textures by myself. Please let me know via osg-users... And having NVTT as an extension could be nice too. What about the KTX/ETC format ( http://www.khronos.org/opengles/sdk/tools/KTX/ )? Are there plans to integrate Khronos' format using libktx? Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ - Robert Osfield robert.osfi...@gmail.com a écrit : Hi Sukender, My plan is to add a Image::buildMipmaps() functions that will use the new local gluScaleImage function that no longer requires a graphics context. However, this function won't support compressed textures as GLU has never support texture compression, and our integration of GLU parts into the OSG hasn't magically changed this. I am also planning to integrate NVidiaTextureTools as an OSG plugin/extension which will be able to compliment the GLU functions and add support for compressed texture formats. This will however require the NVTT as external dependency. I may be able to get on to these tasks next week. Robert. On Thu, Nov 4, 2010 at 11:47 AM, Sukender suky0...@free.fr wrote: Hi all, I need to generate mipmaps from an osg::Image (a 2D image actually, which may be S3TC-DXTC compressed or not), and I have no OpenGL context. I just want my image to have mipmaps. Do you know anything that may help me? - Something to get a context without having to realize something, or with an invisible window? - Something to allocate mipmap memory, compute mipmaps, and store them in the osg::Image? I guess osg::gluBuild2DMipmaps() is the key, but it needs a context and process does not appear to be straightforward to me. Thanks. Cheers, Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Integrating OSG with Qt: QOSGWidget memory consumption
Hi, I'm new to OSG and trying to create a Qt-based application with OSG windows inside. To do this, I'm following the osgviewerQT example using the multi-threaded CompositeViewer mode (--MTCompositeViewer). When I start the example with a model it seems to be loaded 6 times, which is also the number of views. This makes the memory consumption much larger than the other modes in that example. Why is the model loaded multiple times? Is it possible to load it once for all views? OSG version - 2.9.9, Qt version - 4.5.1 Command line parameters: osgviewerQT.exe -- QOSGWidget --MTCompositeViewer my_model.ive Thank you! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33181#33181 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] include obj, camera fov, complex texture formats
Hi all, I am new to OpenSceneGraph. My goal is to create an osg input file for use with osgviewer demonstrating some complex GLSL shaders. Since I cannot easily find documentation for the osg file format, I am posting some quick questions here. I appreciate any quick pointers, the answer does not have to be detailed, I'll figure it out. * Which node do I need to load geometry from an external obj file? My geometry is in separate OBJ files, which I want to include in a single osg file. * Which node do I need to set the properties of a perspective camera, including the field of view? * One of my GLSL shaders uses a usampler1D sampler and a corresponding glTexImage1D with GL_LUMINANCE8UI_EXT as internal format and GL_LUMINANCE_INTEGER_EXT as format. What do I need to do to support this texture? If the Texture2D node can handle the internal format and formats above then I should be fine? * One of my GLSL shaders uses a sampler3D sampler and a corresponding glTexImage3D with GL_LUMINANCE32F_ARB as internal format and GL_LUMINANCE as format. Same question as above. Are 3D textures supported? Thanks, Ares -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33431#33431 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Generate mipmaps from arbitrary image
Hi Sukender, On Thu, Nov 4, 2010 at 12:13 PM, Sukender suky0...@free.fr wrote: What about the KTX/ETC format ( http://www.khronos.org/opengles/sdk/tools/KTX/ )? Are there plans to integrate Khronos' format using libktx? I'm not familiar with libktx and don't have any plans w.r.t to it. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Generate mipmaps from arbitrary image
Hi Robert, I recently implemented a shader technique in FlightGear that needed to compute the mipmaps levels with the min operator on the alpha channel instead of the classical average that is usually used. For that technique, I computed the mipmaps on the CPU. If you design a new function that can compute mipmaps, would it be possible to choose the operation that merge the four source pixels into the pixel of the next level ? By providing a callback or a function object that default to average on all channels ? My implementation is here : http://gitorious.org/fg/simgear/blobs/next/simgear/scene/material/mipmap.cxx The technique implemented is shown in this short video : http://www.youtube.com/watch?v=lwVrKb2yShk Regards, -Fred - Robert Osfield a écrit : Hi Sukender, My plan is to add a Image::buildMipmaps() functions that will use the new local gluScaleImage function that no longer requires a graphics context. However, this function won't support compressed textures as GLU has never support texture compression, and our integration of GLU parts into the OSG hasn't magically changed this. I am also planning to integrate NVidiaTextureTools as an OSG plugin/extension which will be able to compliment the GLU functions and add support for compressed texture formats. This will however require the NVTT as external dependency. I may be able to get on to these tasks next week. Robert. On Thu, Nov 4, 2010 at 11:47 AM, Sukender suky0...@free.fr wrote: Hi all, I need to generate mipmaps from an osg::Image (a 2D image actually, which may be S3TC-DXTC compressed or not), and I have no OpenGL context. I just want my image to have mipmaps. Do you know anything that may help me? - Something to get a context without having to realize something, or with an invisible window? - Something to allocate mipmap memory, compute mipmaps, and store them in the osg::Image? I guess osg::gluBuild2DMipmaps() is the key, but it needs a context and process does not appear to be straightforward to me. Thanks. Cheers, Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSGs OpenGLES 2.0 status
Hi Robert I occurs on the hardware,I haven't tried the emulator yet as it takes so long to build everything :( (Stephan, do you have the emulator running at the mo). I got suspicious when I noticed the rtt fbo id was 2, after a little reading it became clear this issue had tripped a few people up. In terms of fixing it with a define, where would you feel the best place for the define is as the 0 id is used in FrameBufferObject.cpp and RenderStage.cpp. The reason I ask is that you need to #include TargetConditionals.h to determine we are on the IOS platform and this is already done in GL header. So I was wondering if perhaps I should put it into GL header. On a slightly different note. I'm starting to feel the need for an OSG_TARGET_PLATFORM or something similar. As we do more gles platforms I think determining the platform we are building for is going to become more difficult and at the moment it can be a problem for things like IPhone as CMake and XCode may just think we are building for OSX, since thats the platform we are on. An OSG_TARGET_PLATFORM define would give us a one stop shop for that information. Cheers Tom On 4 November 2010 09:29, Robert Osfield robert.osfi...@gmail.com wrote: Hi Thomas, Interesting investigation and fix. Does this issue occur on the target hardware and software emulators of it? Robert. On Thu, Nov 4, 2010 at 5:56 AM, Thomas Hogarth thomas.hoga...@googlemail.com wrote: Fixed it, So after a bit of thinking I realised that the default buffer must be re binded at some point so did another search and found 3 calls to fbo_ext-glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0); And my earlier hunch was correct that ios' default buffer id is actually 1 so changing to the below makes it work fbo_ext-glBindFramebuffer(GL_FRAMEBUFFER_EXT, 1); So now I need to add a DEFAULT_FRAMEBUFFER define or something in the FrameBufferObject header file that is set it to 1 on ios Over all though, good news. Performance seems great too. Tom ___ 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] Integrating OSG with Qt: QOSGWidget memory consumption
Eventually I went with a modified version of the --CompositeViewer part of the example. I'm still not sure what is wrong with the other approach - the number of GraphicsContext and View objects is the same. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33445#33445 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Generate mipmaps from arbitrary image
Hi Frederic, On Thu, Nov 4, 2010 at 2:00 PM, Frederic Bouvier fredlis...@free.fr wrote: If you design a new function that can compute mipmaps, would it be possible to choose the operation that merge the four source pixels into the pixel of the next level ? By providing a callback or a function object that default to average on all channels ? My plan is to to simply use gluScaleImage to compute the mipmaps, with this it won't be possible to introduce any custom callbacks. To do what you are asking about we'd need to refactor the internals of the the glu functions which will be no small task. Having compute mipmap code in osg::Image doesn't preclude users having their own mipmap code, all you need to do is precompute the mipmaps, something you'll already being doing so the new code shouldn't affect you. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Animation end callback
Does osgAnimation has some sort of AnimationEndCallback? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33450#33450 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VPB How to add geometry to an existing terrain
Thanks. The next natural question is, how do I know which levels belongs to higher resolution texture and which to geometry, given that my previous high resolution data was 3 for geometry and 1 for texture? Regards, -- A. On Fri, Oct 29, 2010 at 2:13 AM, J.P. Delport jpdelp...@csir.co.za wrote: http://www.openscenegraph.org/projects/VirtualPlanetBuilder/wiki/PatchExisting On 29/10/10 08:05, Alejandro Aguilar Sierra wrote: Hello: A year ago we built a terrain of Mexico using data from GTopo30 (30) and SRTM (3) for the geometry and Bluemarble (15) and Landsat (near 1) for the texture. It took a complete weekend and 100GB IVE database in a Dell Precision T5400 with 8GB RAM and 1TB HD. Today we want to refine the terrain with data for specific regions (1 from INEGI) without rebuilding everything. After all we would not change the existing data (levels 1 to 12), just add finer geometry creating upper levels. Is that possible with current VPB? How? Thanks in advance. -- A. ___ 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 mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Crash with new StatsHandler?
Hi all, [Config: MSVC9, 32 bits, latest OSG trunk] I got a strange crash when launching osgViewer. StatsHandler allocates a new Camera, and the Camera allocates a StateSet... and this crashes. Stack trace looks like: std::mapstd::pairenum osg::StateAttribute::Type,unsigned int,std::pairosg::ref_ptrosg::StateAttribute,unsigned int,std::lessstd::pairenum osg::StateAttribute::Type,unsigned int ,std::allocatorstd::pairstd::pairenum osg::StateAttribute::Type,unsigned int const ,std::pairosg::ref_ptrosg::StateAttribute,unsigned int ::mapstd::pairenum osg::StateAttribute::Type,unsigned int,std::pairosg::ref_ptrosg::StateAttribute,unsigned int,std::lessstd::pairenum osg::StateAttribute::Type,unsigned int ,std::allocatorstd::pairstd::pairenum osg::StateAttribute::Type,unsigned int const ,std::pairosg::ref_ptrosg::StateAttribute,unsigned int () Ligne 104 C++ osg::StateSet::StateSet() Ligne 89 + 0x7a octets C++ osg::Camera::Camera() Ligne 40 + 0x22 octets C++ osgViewer::StatsHandler::StatsHandler() Ligne 51 + 0x25 octets C++ main(int argc=2, char * * argv=0x00f49808) Ligne 119 + 0x30 octets C++ Any idea? Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Crash with new StatsHandler?
Hi Sukender, The pointer values suggest to be a dangling pointer of somekind, so perhaps an uninitialized variables. Another possibility is simply that you've compiled against one version of the OSG and are now linking at runtime to another, so perhaps a clean build and purge of all install OSG libs would do the trunk. Robert. On Thu, Nov 4, 2010 at 3:38 PM, Sukender suky0...@free.fr wrote: Hi all, [Config: MSVC9, 32 bits, latest OSG trunk] I got a strange crash when launching osgViewer. StatsHandler allocates a new Camera, and the Camera allocates a StateSet... and this crashes. Stack trace looks like: std::mapstd::pairenum osg::StateAttribute::Type,unsigned int,std::pairosg::ref_ptrosg::StateAttribute,unsigned int,std::lessstd::pairenum osg::StateAttribute::Type,unsigned int ,std::allocatorstd::pairstd::pairenum osg::StateAttribute::Type,unsigned int const ,std::pairosg::ref_ptrosg::StateAttribute,unsigned int ::mapstd::pairenum osg::StateAttribute::Type,unsigned int,std::pairosg::ref_ptrosg::StateAttribute,unsigned int,std::lessstd::pairenum osg::StateAttribute::Type,unsigned int ,std::allocatorstd::pairstd::pairenum osg::StateAttribute::Type,unsigned int const ,std::pairosg::ref_ptrosg::StateAttribute,unsigned int () Ligne 104 C++ osg::StateSet::StateSet() Ligne 89 + 0x7a octets C++ osg::Camera::Camera() Ligne 40 + 0x22 octets C++ osgViewer::StatsHandler::StatsHandler() Ligne 51 + 0x25 octets C++ main(int argc=2, char * * argv=0x00f49808) Ligne 119 + 0x30 octets C++ Any idea? Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.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] The new osg format and the serialiser plugins
Thanks for the info Wang,Robert The ability to easily extend wrappers looks very interesting. I might have a little look at recompiling the 3ds max exporter to add ability to export to the new formats. I'll let you know if I get round to it :) Tom On 4 November 2010 09:32, Robert Osfield robert.osfi...@gmail.com wrote: Hi Thomas Wang Rui, On Thu, Nov 4, 2010 at 6:16 AM, Thomas Hogarth thomas.hoga...@googlemail.com wrote: Are these Static import functions related USE_DOTOSGWRAPPER(AlphaFunc)? This reminds me of an item on the TODO list for serializers - support for statically linking the serializers. To achieve this the osg plugin itself will have to directly reference the serializers, so have something like USE_OSGSERIALIZERS(osg), USE_OSGSERIALIZERS(osgDB) etc, ideally we'd have the list automatically generated. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] does LiSPSM cull the objects in the scene?
Thanks for your answer :) I knew you were going to reply :-D Thanks for your advise, those are the values I am playing with. I was also tried to give the ShadowScene the objects I want to cast shadows (by applying the castShadowMask on selected objects). that actually worked, but performance was still slow. The problem appears to be that our scene is too big and too complex (in terms of tri count). I believe that's where the problem is, scene has a very large tri count and the shadow almost doubles it which is an overkill for the GPU. So I will look into trying to simplify the scene then having another go. Are there any shadowing techniques that can help? Or is LiSPSM the best in my case? thanks ramy -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33460#33460 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] problem with osgshadow compilation in osgshadow example
Hi Robert, Thanks for your quick response. I really appreciatte that. So it happen that I fixed the problem just adding the following include: #includeOpenThreads/Mutex How does this sound to you? Does it make sense? Regards Juan El 04/11/2010 10:15, Robert Osfield escribió: Hi Juan, Using mingw with the OSG is not often done so you'll best testing something that few others do so if you spot problems then you'll need to pitch in to help resolve. As a general note, this error with linking against OpenThreads points to a an issue with how the OSG/OpenThreads was built and what the example is linking against. Normally the OSG is able to keep this all consistent, but if you build the OpenThreads with one configuration, change the configuration and build your application against that new configuration but link against the OpenThreads with the old configuration you might see problems. The include/OpenThreads/Config file is autogenerated and should be consistent. Robert. 2010/11/3 Juan S. Valverde Garcíaj.valve...@virtualmech.com: Hi, Thank you very much in advance for any help! So I'm trying to cast some shadows on my OSG virtual world. I started looking for the osgshadow example and manual to have a clue about this. When I try to compile the example, using mingww gcc 4.4.0, i get the followeing error: debug/osgshadow.o: In function `ViewData': C:\devtools\projects\OSG\pruebas ascensor\shadow/../../../../library/OpenSceneGraph-2.9.8/include/osgShadow/ViewDependentShadowTechnique:176: undefined reference to `_imp___ZN11OpenThreads5MutexC1ENS0_9MutexTypeE' C:\devtools\projects\OSG\pruebas ascensor\shadow/../../../../library/OpenSceneGraph-2.9.8/include/osgShadow/ViewDependentShadowTechnique:176: undefined reference to `_imp___ZN11OpenThreads5MutexD1Ev' debug/osgshadow.o: In function `~ViewData': C:\devtools\projects\OSG\pruebas ascensor\shadow/../../../../library/OpenSceneGraph-2.9.8/include/osgShadow/ViewDependentShadowTechnique:152: undefined reference to `_imp___ZN11OpenThreads5MutexD1Ev' C:\devtools\projects\OSG\pruebas ascensor\shadow/../../../../library/OpenSceneGraph-2.9.8/include/osgShadow/ViewDependentShadowTechnique:152: undefined reference to `_imp___ZN11OpenThreads5MutexD1Ev' collect2: ld returned 1 exit status Of course, first thing I tried was understanding the problem. No way. Second googled it. No trace of it in the www. So I came to the forum. Any clue about it? Again, any help would be much appreciated. My world is sad without a shadow! Best regards Juan ___ 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 -- Juan S. Valverde García Director Ejecución de Proyectos virtualmech Parque Científico y Tecnológico Cartuja'93 c/ Leonardo da Vinci 18 Planta 4ª, Módulo A.2 41092 Sevilla web: www.virtualmech.com email: j.valve...@virtualmech.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] problem with osgshadow compilation in osgshadow example
HI Juan, 2010/11/4 Juan S. Valverde García j.valve...@virtualmech.com: So it happen that I fixed the problem just adding the following include: #include OpenThreads/Mutex How does this sound to you? Does it make sense? Wow, no I can't make any of sense of it yet. One normally fixing linking errors by adding in libs to your link line, not changes to headers that should have been read in anyway - otherwise how would the code compile in the first place? What code did you add the #include OpenThreads/Mutex to? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSGs OpenGLES 2.0 status
Hi Stephan One other note on getting FBO rtt to work. Seems you have to wait for the uiview to be launched before the context is actually ready. At the moment I'm doing this by attaching the rtt camera to the graph after the first call to update, but i'm guessing this would be very device and frame rate specific. I currently have my timer set at around 30 fps. I think I might be able to move the call to createframebuffers in the iphone viewer to happen during realize rather then waiting for the view itself to be displayed. But i'm unsure if it is framebuffer or context related at this time. Cheers Tom On 4 November 2010 09:29, Robert Osfield robert.osfi...@gmail.com wrote: Hi Thomas, Interesting investigation and fix. Does this issue occur on the target hardware and software emulators of it? Robert. On Thu, Nov 4, 2010 at 5:56 AM, Thomas Hogarth thomas.hoga...@googlemail.com wrote: Fixed it, So after a bit of thinking I realised that the default buffer must be re binded at some point so did another search and found 3 calls to fbo_ext-glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0); And my earlier hunch was correct that ios' default buffer id is actually 1 so changing to the below makes it work fbo_ext-glBindFramebuffer(GL_FRAMEBUFFER_EXT, 1); So now I need to add a DEFAULT_FRAMEBUFFER define or something in the FrameBufferObject header file that is set it to 1 on ios Over all though, good news. Performance seems great too. Tom ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] OSG and OpenGL version testing and OpenGL extension testing
Greetings all! I was wondering if there is any OpenGL version checks and/or OpenGL extension testing that goes on in the background in OSG. I'm having a problem that while using a GeForce 7800 card (that uses OpenGL 2.0) that some of my models come up half way alpha channeled at times. I don't have anything that changes that part of the color in the code. I go to the card that I'm developing with, a GeForce 8600 card (that uses OpenGL 2.1) and I don't have the problem. Is there some issues that come up when you use OpenGL 2.0? I know that we are talking about the difference between 4 year old and 5 year old cards and the easy answer would be Get a Newer Card, Dummy, but I have to get a handle of what is going on to explain to my bosses what is going on! ... Thank you! D Glenn D Glenn (a.k.a David Glenn) - Join the Navy and See the World ... from your Desk! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33470#33470 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG and OpenGL version testing and OpenGL extension testing
Hi David, The has lots of GL checks when setting up use of advanced features - anything above what is in OpenGL 1.1 is checked for! In your case it's very likely that the difference you are seeing has nothing to do with the graphics card unless you are using a feature that the 7800 doesn't support and the 8600 card does. Much more likely is a driver bug. Robert. On Thu, Nov 4, 2010 at 5:59 PM, David Glenn david.e.glenn@navy.mil wrote: Greetings all! I was wondering if there is any OpenGL version checks and/or OpenGL extension testing that goes on in the background in OSG. I'm having a problem that while using a GeForce 7800 card (that uses OpenGL 2.0) that some of my models come up half way alpha channeled at times. I don't have anything that changes that part of the color in the code. I go to the card that I'm developing with, a GeForce 8600 card (that uses OpenGL 2.1) and I don't have the problem. Is there some issues that come up when you use OpenGL 2.0? I know that we are talking about the difference between 4 year old and 5 year old cards and the easy answer would be Get a Newer Card, Dummy, but I have to get a handle of what is going on to explain to my bosses what is going on! ... Thank you! D Glenn D Glenn (a.k.a David Glenn) - Join the Navy and See the World ... from your Desk! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33470#33470 ___ 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] how to transform bounding sphere
Hi how can i reposition the bounding sphere of a Node, when i reposition a node, it's bounding sphere does not relocate. i need help. :S thanks in advance abdo ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] how to transform bounding sphere
On 11/4/2010 1:31 PM, abdelrahman.salah...@gmail.com wrote: Hi how can i reposition the bounding sphere of a Node, when i reposition a node, it's bounding sphere does not relocate. i need help. :S thanks in advance Normally you don't need to do this, as any parent Transforms take care of this automatically. But sometimes you do need to do it. OSG does it in Transform::computeBound, so you could copy that code. But as it turns out I've already done that for you. The svn trunk of osgWorks (osgworks.googlecode.com) contains a utility function for performing this task, based on the code in Trancform.cpp: namespace osgwTools { osg::BoundingSphere transform( const osg::Matrix m, const osg::BoundingSphere sphere ) } The osgWorks header for this is: #include osgwTools/Transform.h -- -Paul Martz Skew Matrix Software http://www.skew-matrix.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] undefined symbol: _ZN11OpenThreads6AtomicmmEv
Hi Yurii, I followed your instructions and rebuilt OSG libraries. Then I rebuilt my app and tried it. It worked. Thank you! Cheers, Huron -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33476#33476 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [forum] TranslateAxisDragger constructor warnings
Hi, I'm getting a couple warnings while constructing a osgManipulator::TranslateAxisDragger: ObjectWrapperManager::addCompressor(): 'null' already exists. ObjectWrapperManager::addCompressor(): 'zlib' already exists. I also get a segfault when closing the application at the deconstructor of RegisterCompressorProxy I think as a result of having the TranslateAxisDragger in my program. Does anyone know anything about this? If I just leave these alone, are they going to cause any errors in my program? Thank you! Scott -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33477#33477 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG and OpenGL version testing and OpenGL extension testing
Greetings Robert! Well if it is a driver bug, then it's a persistent one since I've tried just about all of the Nvidia Linux drivers from 195.36 up to the latest and it still happens. Yet when I try it on a card that supports OGL 2.1 and the problem goes away - and in that case, at least wonce, I was using the same driver on both cards. The only thing I can figure that there is a function that I go in and change the color of an object. I used a variant of the example osgtexture1D to set the color of the whole object, rather than rainbow it. Looking at the OGL spec book, I found that there were two improvements that were made in OGL 2.1. One on Pixel Buffer Objects and another about sRGB. ... D Glenn D Glenn (a.k.a David Glenn) - Join the Navy and See the World ... from your Desk! -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33478#33478 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [build] How to use the DatabasePager
Hi, I am converting an application that uses Performer to work with OpenSceneGraph in place of Performer. In my application, the paging is done by adding a Callback using pfDBaseFunc in which all paging is performed. I looked for a similar Callback in the DatabasePager class and could not find one. So, how can I convert the functionality of my pfDBaseFunc callback? Thank you! Cheers, Huron -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33480#33480 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] TranslateAxisDragger constructor warnings
I'm writting a qt 4.6 application by the way and it turns out the error shows up before constructing the dragger, but didn't show up before having the dragger in the program. Thanks Scott -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=33481#33481 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org