[osg-users] Dependencies links are dead
Hi, The dependencies "links" are dead for VisualStudio 2013. I tried both the small and full and get an invalid page. page with links: http://www.openscenegraph.org/index.php/download-section/dependencies dead pages: http://download.osgvisual.org/3rdParty_VS2013_v120_x86_x64_V9_small.7z http://download.osgvisual.org/3rdParty_VS2013_v120_x86_x64_V9_full.7z I think the other links are dead too. anyone? Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=66514#66514 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] osgAnimation with bvh and model
Hi, I got a little further with the bvh problem. I know have a valid bvh file from daz3d... it appears that daz3d needs to bake the keys into it's timeline before exporting. I can now successfully load the bvh file with the option solids and see the animation working. So, now I'm stuck on the part that should animate the model. No animation going on here. This is my basic procedure: 1. I load the bvh, let's call that nodeBvh 2. I load the model, let's cal lthat nodeModel 3. I location the osgAnimation::Animation in the nodeBvh, let's call that nodeAnim 4. I create a new BasicAnimationManager (let's call that bamCallback) and register nodeAnim and call buildTargetReferrence 5. I create a group and this group gets a setUpdateCallback with bamCallback 6. I add the model to the group note the model contains skeleton and riggeometry. so am I missing a point? Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55917#55917 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] osgAnimation with bvh and model
Hi, I'm not giving up on this (but I'm sure am tired of failing). I can see that that the bvh reader actually plays the animation and I can add the option solids to the loader... this basically should show the bvh file animating which it doesn't: Code: osg::Node* createScene() { osgDB::ReaderWriter::Options* o = new osgDB::ReaderWriter::Options; o-setOptionString( solids ); osg::Node* bvh = osgDB::readNodeFile( osgDB::findDataFile( test.bvh ), o ); return bvh; } Something is just not right here... the poor documentation makes this even harder to figure out? I'm starting to think that the bvh reader is the problem. Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55860#55860 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] osgAnimation with bvh and model
Hi Sebastian Messerschmidt, Thanks for your info. it is correct that the model containing the geometry does not have the animation,.. this is as designed. the bvh file contains the animation but no geometry also as designed. I don't want geometry and animation in the same files, because I will have 100's of bvh files that all use one character geometry. What I want is the ability to play what I want and blend what I want. back to the subject at hand... I found out that the bvh file I have does not work well with openscenegraph, this file was exported from Daz3D. I exported a bvh file from 3dsmax and I got the animation to work (somewhat). apparently there are many variations of the bvh files and openscenegraph only supports a subset of these. How I'm going to fix this is a good question... but at least now I know where the problem is. Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55865#55865 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] osgAnimation with bvh and model
Hi Sebastian, The bvh file should be able to play without having to rename anything. there is no name matching in there. if you supply the option solids when loading they you will see a stick figure of the bones. so why the bvh files doesn't animate is what I'm looking into now... Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55867#55867 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] osgAnimation with bvh and model
Hi, I'm still having problems with this.. I have saved the group node to a file here: http://osghelp.com/wp-content/uploads/2013/08/mymodel.osg perhaps somebody can see why it doesn't animate. I'm a little lost here. Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55854#55854 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] osgAnimation with bvh and model
Hi, still need help: I have tried to look only at the bvh file now, you can see the data here: http://osghelp.com/wp-content/uploads/2013/08/testbvh.osg here is the code that adds a little sphere to each bone, but again when I run this no animation. anybody!?!? Code: class CAddDummyObject : public osg::NodeVisitor { public: CAddDummyObject() : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {} void apply( osg::Node node ) { osgAnimation::Bone* bone = dynamic_castosgAnimation::Bone*(node); if ( bone ) { osg::Sphere* shape = new osg::Sphere( osg::Vec3(0, 0, 0), 1.0f ); osg::ShapeDrawable* d = new osg::ShapeDrawable( shape ); osg::Geode* geodeSphere = new osg::Geode; geodeSphere-addDrawable(d); bone-addChild( geodeSphere ); } traverse(node); } }; osg::Node* createScene() { osg::Node* bvh = osgDB::readNodeFile( osgDB::findDataFile( test.bvh ) ); bvh-accept( *new CAddDummyObject ); osg::ref_ptrosgAnimation::BasicAnimationManager manager = dynamic_castosgAnimation::BasicAnimationManager*(bvh-getUpdateCallback()); osgAnimation::Animation* anim = manager-getAnimationList()[0]; anim-setPlayMode( osgAnimation::Animation::LOOP ); manager-playAnimation( anim ); return bvh; } Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55856#55856 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [forum] osgAnimation with bvh and model
Hi, I'm trying to animate a character with data from a bvh I have tried a lot of different setups.. but none work. The osgAnimation seems to have what it needs to get this working, but there isn't enough documentation to make sense of it. This is where I am at now: Code: osg::Node* createScene() { // convenience variables osg::Node* bvh = osgDB::readNodeFile( osgDB::findDataFile( test.bvh ) ); osg::Node* model = osgDB::readNodeFile( osgDB::findDataFile( test.dae ) ); osgAnimation::BasicAnimationManager* manager = new osgAnimation::BasicAnimationManager; // get animation from bvh osgAnimation::AnimationManagerBase* animationManager = dynamic_castosgAnimation::AnimationManagerBase*(bvh-getUpdateCallback()); osgAnimation::Animation* anim = animationManager-getAnimationList()[0]; anim-setPlayMode( osgAnimation::Animation::LOOP ); osg::Group* group = new osg::Group; group-setUpdateCallback( manager ); group-addChild( model ); manager-registerAnimation(anim); manager-buildTargetReference(); manager-playAnimation( anim ); return group; } The BVH contains Skeleton and Bones The Model contains Skeleton, Bones, RigGeometry so,.. what I basically do is create my own BasicAnimationManager extract the animation from bvh and register it. I can see the character clearly being render, but with no animation. Am I missing something? Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55853#55853 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [forum] Android - NDK Compiling fails
Hi, This has been a long process trying to get android to work with OpenSceneGraph and I'm still not there. Some Info: Windows 7 OpenSceneGraph 3.2 Where I'm at: OpenSceneGraph 3.2 compiled/links ok. Now I'm trying to run ndk-make in the JNI directory for the osgAndroidExampleGLES2 and it fails here. 100's of errors that look like this: C:/Android/android-ndk-r8e/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ ld.exe: C:\Android\OpenSceneGraph-3.2\osginstall/obj/local/armeabi/libosg.a(Notify.o): in function vtable for osg::NotifyStreamBuffer:Notify.cpp(.data.rel.ro._Z TVN3osg18NotifyStreamBufferE+0x3c): error: undefined reference to 'std::basic_stringbufchar, std::char_traitschar, std::allocatorchar ::overflow(int)' collect2: ld returned 1 exit status this of course looks like the famous stl problem mentioned on this forum with 10 different ways to solve it. I tried all 10 ways putting the -lgnustl-static in the LOCAL_LDLIBS and/or in the LOCAL_LDFLAGS as mention in different forums... no success. I'm kinda' stumped and do not know how I should proceed to solve this problem. Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55426#55426 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] Android - NDK Compiling fails
sure here it is... but like i mentioned i tried many different combinations also the one you described. Code: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE:= osgNativeLib ### Main Install dir OSG_ANDROID_DIR := C:\Android\OpenSceneGraph-3.2\osginstall LIBDIR := $(OSG_ANDROID_DIR)/obj/local/armeabi ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) LOCAL_ARM_NEON := true LIBDIR := $(OSG_ANDROID_DIR)/obj/local/armeabi-v7a endif ### Add all source file names to be included in lib separated by a whitespace LOCAL_C_INCLUDES:= $(OSG_ANDROID_DIR)/include LOCAL_CFLAGS:= -Werror -fno-short-enums LOCAL_CPPFLAGS := -DOSG_LIBRARY_STATIC ### which one, I would think the static, but some people in the forum say the shared.. makes no sense?... libgnustl_shared lgnustl_static LOCAL_LDLIBS:= -llog -lGLESv2 -ldl -lz -lgnustl_static LOCAL_SRC_FILES := osgNativeLib.cpp OsgMainApp.cpp OsgAndroidNotifyHandler.cpp LOCAL_LDFLAGS := -L $(LIBDIR) \ -losgdb_dds \ -losgdb_openflight \ -losgdb_tga \ -losgdb_rgb \ -losgdb_osgterrain \ -losgdb_osg \ -losgdb_ive \ -losgdb_deprecated_osgviewer \ -losgdb_deprecated_osgvolume \ -losgdb_deprecated_osgtext \ -losgdb_deprecated_osgterrain \ -losgdb_deprecated_osgsim \ -losgdb_deprecated_osgshadow \ -losgdb_deprecated_osgparticle \ -losgdb_deprecated_osgfx \ -losgdb_deprecated_osganimation \ -losgdb_deprecated_osg \ -losgdb_serializers_osgvolume \ -losgdb_serializers_osgtext \ -losgdb_serializers_osgterrain \ -losgdb_serializers_osgsim \ -losgdb_serializers_osgshadow \ -losgdb_serializers_osgparticle \ -losgdb_serializers_osgmanipulator \ -losgdb_serializers_osgfx \ -losgdb_serializers_osganimation \ -losgdb_serializers_osg \ -losgViewer \ -losgVolume \ -losgTerrain \ -losgText \ -losgShadow \ -losgSim \ -losgParticle \ -losgManipulator \ -losgGA \ -losgFX \ -losgDB \ -losgAnimation \ -losgUtil \ -losg \ -lOpenThreads include $(BUILD_SHARED_LIBRARY) -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55429#55429 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] Android - NDK Compiling fails
Hi Jordi, that worked! thanks it only needs to be more generic and perhaps committed to the repository.. it seems that everybody gets stuck here. thanks, Peter Jordi Torres wrote: Try this: LOCAL_LDLIBS := -llog -lGLESv2 -ldl -lz /path-to-your-android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/libgnustl_static.a I think it should be enough. 2013/7/25 Peter Wraae Marino () sure here it is... but like i mentioned i tried many different combinations also the one you described. Code: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := osgNativeLib ### Main Install dir OSG_ANDROID_DIR := C:AndroidOpenSceneGraph-3.2osginstall LIBDIR := $(OSG_ANDROID_DIR)/obj/local/armeabi ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) LOCAL_ARM_NEON := true LIBDIR := $(OSG_ANDROID_DIR)/obj/local/armeabi-v7a endif ### Add all source file names to be included in lib separated by a whitespace LOCAL_C_INCLUDES:= $(OSG_ANDROID_DIR)/include LOCAL_CFLAGS := -Werror -fno-short-enums LOCAL_CPPFLAGS := -DOSG_LIBRARY_STATIC ### which one, I would think the static, but some people in the forum say the shared.. makes no sense?... libgnustl_shared lgnustl_static LOCAL_LDLIBS := -llog -lGLESv2 -ldl -lz -lgnustl_static LOCAL_SRC_FILES := osgNativeLib.cpp OsgMainApp.cpp OsgAndroidNotifyHandler.cpp LOCAL_LDFLAGS := -L $(LIBDIR) -losgdb_dds -losgdb_openflight -losgdb_tga -losgdb_rgb -losgdb_osgterrain -losgdb_osg -losgdb_ive -losgdb_deprecated_osgviewer -losgdb_deprecated_osgvolume -losgdb_deprecated_osgtext -losgdb_deprecated_osgterrain -losgdb_deprecated_osgsim -losgdb_deprecated_osgshadow -losgdb_deprecated_osgparticle -losgdb_deprecated_osgfx -losgdb_deprecated_osganimation -losgdb_deprecated_osg -losgdb_serializers_osgvolume -losgdb_serializers_osgtext -losgdb_serializers_osgterrain -losgdb_serializers_osgsim -losgdb_serializers_osgshadow -losgdb_serializers_osgparticle -losgdb_serializers_osgmanipulator -losgdb_serializers_osgfx -losgdb_serializers_osganimation -losgdb_serializers_osg -losgViewer -losgVolume -losgTerrain -losgText -losgShadow -losgSim -losgParticle -losgManipulator -losgGA -losgFX -losgDB -losgAnimation -losgUtil -losg -lOpenThreads include $(BUILD_SHARED_LIBRARY) -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55429#55429 (http://forum.openscenegraph.org/viewtopic.php?p=55429#55429) ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) -- Jordi Torres -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55432#55432 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] Android - NDK Compiling fails
Hi Jordi, a little follow up: this is what it does when it works: C:\Android\OpenSceneGraph-3.2\examples\osgAndroidExampleGLES2\jnindk-build Compile++ thumb : osgNativeLib = osgNativeLib.cpp Compile++ thumb : osgNativeLib = OsgMainApp.cpp Compile++ thumb : osgNativeLib = OsgAndroidNotifyHandler.cpp SharedLibrary : libosgNativeLib.so Install: libosgNativeLib.so = libs/armeabi/libosgNativeLib.so Compile++ thumb : osgNativeLib = osgNativeLib.cpp Compile++ thumb : osgNativeLib = OsgMainApp.cpp Compile++ thumb : osgNativeLib = OsgAndroidNotifyHandler.cpp SharedLibrary : libosgNativeLib.so Install: libosgNativeLib.so = libs/armeabi-v7a/libosgNativeLib.so what I do not understand is why is it creating the dynamic libraries and not the static... the documentation says we should be working with the static. Is there something wrong or is everything as it should be? Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55433#55433 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] Android with Openscenegraph3.2
Hi Robert, I just updated openscenegraph3.2 and everything compiles fine for th android: == Build: 1 succeeded, 0 failed, 2 up-to-date, 2 skipped == now on to the ndk and adt part. thanks for the fix, Peter robertosfield wrote: On 23 July 2013 16:21, Robert Osfield () wrote: Do you know if Android supports the Posix API that the non Win32 path uses? If so I can checkin the NOT ANDROID and cross my fingers that it'll work. Rather than wait I've looked up the various #include that the osc non Win32 path uses and these headers all seem to appear in various Android sources so I'm hopefully it'll work. I've check in the AND NOT ANDROID to svn/trunk and the OSG-3.2 branch. Could you test out the OSG-3.2 branch and let me know how you get on. Cheers, Robert. -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55404#55404 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] Android with Openscenegraph3.2
Hi, a little unsure if I should now create a new topic? ADT: When creating a new android project with existing files and using the osgAndroidExampleGLES2 the first thing that appears in the ADT is: [2013-07-24 08:40:27 - Unable to launch cygpath. Is Cygwin on the path?] java.io.IOException: Cannot run program cygpath: CreateProcess error=2, The system cannot find the file specified [2013-07-24 08:41:36 - osgViewer] Unable to resolve target 'android-8' the strange part is that I do not have cygwin on my computer and as I understand it... it isn't necessary to get an Android project working or am I wrong? Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55405#55405 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [forum] Android with Openscenegraph3.2
Hi, when compiling for android with oopenscenegraph 3.2 i get this error: C:/Android/OpenSceneGraph-3.2/src/osgPlugins/osc/ip/win32/NetworkingUtils.cpp:32:77: fatal error: winsock2.h: No such file or directory where do I remove or fix this? Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55368#55368 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [forum] Android with Openscenegraph3.2
Hi Robert, I'm at home now and will first be at work tomorrow to test it.. sorry. regards, Peter robertosfield wrote: Hi Peter. On 23 July 2013 14:52, Peter Wraae Marino () wrote: when compiling for android with oopenscenegraph 3.2 i get this error: C:/Android/OpenSceneGraph-3.2/src/osgPlugins/osc/ip/win32/NetworkingUtils.cpp:32:77: fatal error: winsock2.h: No such file or directory where do I remove or fix this? Are posix API's available under Android? If so we should be able to change the osc/CMakeLists.txt to select the non Win32 part. The part of the osc/CMakeLists.txt of interest is: if(WIN32) SET(TARGET_SRC ${TARGET_SRC} ip/win32/NetworkingUtils.cpp ip/win32/UdpSocket.cpp ) SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES};Ws2_32.lib;winmm) ELSE() SET(TARGET_SRC ${TARGET_SRC} ip/posix/NetworkingUtils.cpp ip/posix/UdpSocket.cpp ) ENDIF() replacing the IF(WIN32) with: IF(WIN32 AND NOT ANDROID) Might be sufficient, could you try this? If this works I'll check this change into OSG-3.2 branch and svn/trunk. A quick turnaround on this will allow me to roll this in the next release candidate that I'll be making this afternoon. Cheers, Robert. -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55372#55372 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] particles
Hi, does anyone know whay the particlesystem.org is dead? has it moved? Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53539#53539 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Explosion Effect removal
Hi, can see this was posted in 2011... and no reply. well,... i have the same question? is there a flag we can set or do we really need to poll the particle system if it's alive and remove it ourselves? Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53449#53449 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgParticle restart...
Hi, I think this is a really good question. Right now I'm just creating new instances and I would really like to a have a pool of instances for better performance. I can see this question was asked in 2010... can anyone answer this question? Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53450#53450 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] particles
Hi, apparently nobody has an answer. I have tried to follow the links supplied in the code for David McAllister's Particle System API at http://www.particlesystems.org, but it seems that this site is dead... so documentation for the particle system used by osg is almost non existent. Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53370#53370 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] particles
Hi hybr, smoke trails isn't what I want. It extrudes the particles. right now I have create a simple particle system of my own which throws out particles like an explosion and I create 5-10 osg particle systems and set the placer's for these. This works,.. but is kinda heavy duty way of doing it. It would be nice if I could connect a particle system to a particle in osg and was optimized for it. This would create a more realistic debris explosion. Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53139#53139 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] particles
Hi, Is there a way to create particles from particles position? let me explain... I would like to create an explosion with debris. The way I would create it is one particle system shooting particles that represent debris and another particle system creating smoke as the debris is flying (at the position of the first particle systems debris particle). I know this might sound confusing. If it isn't understood then ask and I'll create a longer message. Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=53121#53121 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Qt version for osg 3.0.1
Hi, Where can I find information about which Qt version is working with osg 3.0.1? Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52964#52964 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Qt version for osg 3.0.1
robertson1 wrote: Hi, I've had no problems using Qt4.8 with 3.0.1, (Qt 5 wont work with it though). Cheers, jamie thanks.. I know that that Qt4.8 works... but my question was where can I see what version works with what I tried to use Qt5 and run into a bunch of problems... I would have like to save a days work if I can just read what version works with what. regards, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52966#52966 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [build] wrong libraries used in debug version for QT
Hi, fyi: The osgviewerQt debug build is using release version of QT, which results in failure when you start the application. I change the libraries to debug and all looks well. info: OS: Windows 7 OSG: 3.0.1 Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=52967#52967 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [ANN] osgHelp website online
Hello dear OSG-community, finally got around putting the osgHelp site back online. see it here: http://osghelp.com/ Best regards, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=51631#51631 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] kdTree and sphere intersection
Hi, I have create a sphereintersector which works fine, but goes through all triangles on the geometry. I would like to use the kdTree to help me to do a sphere - triangle intersection tests on as few triangles as possible. Is this possible? When I look at the kdTree object it looks like it is hardcoded to handle only line segments? anyone have some comments on this? Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43908#43908 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [forum] bug in ShapeDrawable.cpp
Hi, void PrimitiveShapeVisitor::createCylinderBody(unsigned int numSegments, float radius, float height, const osg::Matrix matrix) has a bug.. it doesn't transform the last two points: // do last point by hand to ensure no round off errors. _functor.vertex(osg::Vec3(r,0.0f,topz)); _functor.vertex(osg::Vec3(r,0.0f,basez)); missing * matrix osg version 2.8.3 Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43827#43827 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Polytope
Hi, I just started to use the polytope and polytopeintersect and have some results I did not expect. In the code there are 3 cases that creates an osg::Box which is the cube I want to intersect with the plane. The 3 cases have each a different solution, where I expect them all to have the same solution which is 4 intersections. There is a comment next to each osg::Box being created.. can someone explain to me why I don't get 4 intersections in all cases? the only difference in each case is that I create the box in a different location. here is the code: Code: #include stdafx.h #include osg/group #include osg/geometry #include osgViewer/Viewer #include osg/Polytope #include osg/ShapeDrawable #include osgUtil/PolytopeIntersector #include osg/shape #include iostream osg::Group* createScene() { osg::Group* root = new osg::Group; // create group for objects we want to collide against osg::Group* pGroup = new osg::Group; root-addChild( pGroup ); osg::Geometry* pTest = osg::createTexturedQuadGeometry( osg::Vec3(-2.0f,-2.0f,0.0), osg::Vec3(4.0f,0.0f,0.0), osg::Vec3(0.0f,4.0f,0.0f) ); osg::Geode* pGeodeTest = new osg::Geode; pGeodeTest-addDrawable( pTest ); pGroup-addChild( pGeodeTest ); // create a cube osg::Geode* pGeode = new osg::Geode; //osg::ShapeDrawable* pShape = new osg::ShapeDrawable( new osg::Box(osg::Vec3(0.0f,0.0f,0.0f),0.2f) ); // 4 intersections, but 2 of them in the same place (not expected) //osg::ShapeDrawable* pShape = new osg::ShapeDrawable( new osg::Box(osg::Vec3(0.2f,0.0f,0.0f),0.2f) ); // only two intersections (not expected) osg::ShapeDrawable* pShape = new osg::ShapeDrawable( new osg::Box(osg::Vec3(0.5f,0.0f,0.0f),0.2f) ); // 4 intersections (expected) pShape-setColor( osg::Vec4( 0,1,0,1 ) ); pGeode-addDrawable( pShape ); root-addChild( pGeode ); osg::Polytope* p = new osg::Polytope; p-setToBoundingBox( pGeode-getBoundingBox() ); osgUtil::PolytopeIntersector* intersector = new osgUtil::PolytopeIntersector( osgUtil::Intersector::MODEL, *p ); osgUtil::IntersectionVisitor* iv = new osgUtil::IntersectionVisitor; iv-setIntersector( intersector ); pGroup-accept( *iv ); if ( iv-getIntersector()-containsIntersections() ) { std::cout COUNT: intersector-getIntersections().size() std::endl; std::cout FIRST COUNT: intersector-getFirstIntersection().numIntersectionPoints std::endl; osgUtil::PolytopeIntersector::Intersection firstIntersection = intersector-getFirstIntersection(); for ( unsigned int i=0; ifirstIntersection.numIntersectionPoints; i++ ) { osg::Vec3 pos = firstIntersection.intersectionPoints[i]; std::cout POS i : pos.x() , pos.y() , pos.z() std::endl; std::cout max dist firstIntersection.maxDistance std::endl; std::cout distance firstIntersection.distance std::endl; osg::Geode* pGeode = new osg::Geode; osg::ShapeDrawable* pTestSphere = new osg::ShapeDrawable( new osg::Sphere(pos,0.02f) ); pTestSphere-setColor( osg::Vec4(1,0,0,1) ); pGeode-addDrawable( pTestSphere ); root-addChild( pGeode ); } } return root; } int _tmain(int argc, _TCHAR* argv[]) { // construct the viewer osg::ref_ptrosgViewer::Viewer rViewer = new osgViewer::Viewer; rViewer-setUpViewInWindow( 32, 32, 800, 600 ); rViewer-setSceneData( createScene() ); return rViewer-run(); } Thank you! Cheers, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43093#43093 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] flt file not working
Hej Andreas, the test.flt comes from TerraVista export :( regards, Peter On Fri, Mar 25, 2011 at 12:28 PM, Andreas Ekstrand andreas.ekstr...@remograph.com wrote: Hi Peter, I think your FLT file is invalid. There doesn't seem to be any push record between the header node with its ancillary records and the following group node. Where does test.flt come from? Regards, Andreas Ekstrand On 2011-03-25 11:45, Peter Wraae Marino wrote: Hej osgUsers, I have attached an flt file which will not load with osgviewer. I have also tried to convert it to a .osg file and it becomes: Group { name db nodeMask 0x cullingActive TRUE } which is pretty much empty? we are using osg version 2.8.3 on windows 7 the flt file loads fine in a terravista buildt in viewer and polytrans. any ideas why it doesn't work with osgviewer? regards, Peter -- Bellinge Gymnasterne: http://www.bellingegymnasterne.dk Power Tumbling: http://www.powertumbling.dk OSG-Help: http://code.google.com/p/sigmaosg Personal Site: http://www.marino.dk ___ osg-users mailing listosg-users@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- *__* *Andreas Ekstrand* *CEO / Co-founder* Phone: +46 708 490697 Fax: +46 13 9913093 andreas.ekstr...@remograph.com *Remograph AB* Norrbergavägen 58 SE-590 54 Sturefors SWEDEN www.remograph.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Bellinge Gymnasterne: http://www.bellingegymnasterne.dk Power Tumbling: http://www.powertumbling.dk OSG-Help: http://code.google.com/p/sigmaosg Personal Site: http://www.marino.dk ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] depthbuffer question
Hi osgUsers, I've been trying to read some values from the DepthBuffer and I don't seem to get what I would expect. Here is a cut down version of my code (should be able to run): class CTestDrawCallback : public osg::Camera::DrawCallback { public: void operator()( const osg::Camera cam ) const { osg::Image* pTest = new osg::Image; pTest-readPixels( 256,256,1,1, GL_DEPTH_COMPONENT, GL_FLOAT ); float f = (*(float*)pTest-data()); osg::notify(osg::ALWAYS) f = f std::endl; } }; osg::Node* CreateScene() { osg::Group* pGroup = new osg::Group; osg::Geode* pGeode = new osg::Geode(); pGeode-addDrawable( new osg::ShapeDrawable( new osg::Box(osg::Vec3(0.0f,0.0f,0.0f),2.0f) ) ); pGroup-addChild( pGeode ); return pGroup; } int _tmain(int argc, _TCHAR* argv[]) { osg::ref_ptrosgViewer::Viewer rViewer; // construct the viewer rViewer = new osgViewer::Viewer; // make the viewer create a 512x512 window and position it at 32, 32 rViewer-setUpViewInWindow( 32, 32, 512, 512 ); // set the scene-graph data the viewer will render rViewer-setSceneData( CreateScene() ); rViewer-getCamera()-setPostDrawCallback( new CTestDrawCallback ); // execute main loop return rViewer-run(); } I get a value of 0.0642448 and this is not what I expect. I would expect that the near and far plane are automatically computed to fit the box, which should mean the near plane is collinear with front of the box.. which should result with a value of 0 can someone explain to me what I'm doing wrong? regards, Peter Wraae Marino -- Bellinge Gymnasterne: http://www.bellingegymnasterne.dk Power Tumbling: http://www.powertumbling.dk OSG-Help: http://osghelp.com Personal Site: http://www.marino.dk ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] depthbuffer question
Hi Ulrich, on an earlier test of the near and far plane we saw a difference of the far and near plane values to be the size of the box.. so I assumed that the near and far is computed to fit the objects in the scene. or is this wrong? Peter On Tue, Sep 21, 2010 at 2:12 PM, Ulrich Hertlein u.hertl...@sandbox.dewrote: Hi Peter, On 21/09/10 21:52 , Peter Wraae Marino wrote: I've been trying to read some values from the DepthBuffer and I don't seem to get what I would expect. Here is a cut down version of my code (should be able to run): ... I get a value of 0.0642448 and this is not what I expect. I would expect that the near and far plane are automatically computed to fit the box, which should mean the near plane is collinear with front of the box.. which should result with a value of 0 can someone explain to me what I'm doing wrong? The auto-computed near/far planes would fit the bounding sphere around the box, which is larger than the box itself. Would that fit? Maybe you're assumptions are off? Cheers, /ulrich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Bellinge Gymnasterne: http://www.bellingegymnasterne.dk Power Tumbling: http://www.powertumbling.dk OSG-Help: http://osghelp.com Personal Site: http://www.marino.dk ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgText::Text and screen
Hi osgUsers, I'm trying to create a gui and would like to have my coordinates system 0, 0 at the upper, left of the screen. To do this I decided to create a matrix that has an ortho view as follows: osg::Matrix::ortho2D( 0, viewW, viewH, 0) where viewH is bottom and top has zero This works great when drawing my gui stuff.. but when I use osgText::Text as follows: m_rText = new osgText::Text; m_rText-setAxisAlignment( osgText::Text::SCREEN ); the text is at the correct position, but is upside down. I've searched the osgText if it was possible to set the drawing direction, but couldn't find anything. is there a way to solve this? I would really like to avoid having to use a osg::Matrix::ortho2D( 0, viewW, 0, viewH ), because this would mean that all my gui components would have to compensate for the viewH and reverse direction. any suggestions?, Peter Wraae Marino -- Bellinge Gymnasterne: http://www.bellingegymnasterne.dk Power Tumbling: http://www.powertumbling.dk OSG-Help: http://osghelp.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgText::Text and screen
Hi Robert, I've removed the AxisAlignment... the text is the same. the reason for it being upside down is because of my ortho matrix.. I've set bottom to the pixel height of the view and top to zero. this way I get a coordinate system for the gui that is in the upper, left regards, Peter On Tue, Jul 27, 2010 at 11:27 AM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Peter, If you are using an orthographic projection then you will just need to align the text to the XY plane, which is the default, there is no need to set the AxisAlignment to SCREEN. It's likely upside down as you've inverted the coordinates w.r.t OpenGL. Robert. On Tue, Jul 27, 2010 at 9:32 AM, Peter Wraae Marino marino.pe...@gmail.com wrote: Hi osgUsers, I'm trying to create a gui and would like to have my coordinates system 0, 0 at the upper, left of the screen. To do this I decided to create a matrix that has an ortho view as follows: osg::Matrix::ortho2D( 0, viewW, viewH, 0) where viewH is bottom and top has zero This works great when drawing my gui stuff.. but when I use osgText::Text as follows: m_rText = new osgText::Text; m_rText-setAxisAlignment( osgText::Text::SCREEN ); the text is at the correct position, but is upside down. I've searched the osgText if it was possible to set the drawing direction, but couldn't find anything. is there a way to solve this? I would really like to avoid having to use a osg::Matrix::ortho2D( 0, viewW, 0, viewH ), because this would mean that all my gui components would have to compensate for the viewH and reverse direction. any suggestions?, Peter Wraae Marino -- Bellinge Gymnasterne: http://www.bellingegymnasterne.dk Power Tumbling: http://www.powertumbling.dk OSG-Help: http://osghelp.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Bellinge Gymnasterne: http://www.bellingegymnasterne.dk Power Tumbling: http://www.powertumbling.dk OSG-Help: http://osghelp.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgText::Text and screen
Hi Robert, yep.. did that .. .did a -1 scaling on the y-axis... works like a charm now. thanks, Peter On Tue, Jul 27, 2010 at 1:43 PM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Peter, Try flipping the view matrix. Robert. On Tue, Jul 27, 2010 at 11:31 AM, Peter Wraae Marino marino.pe...@gmail.com wrote: Hi Robert, I've removed the AxisAlignment... the text is the same. the reason for it being upside down is because of my ortho matrix.. I've set bottom to the pixel height of the view and top to zero. this way I get a coordinate system for the gui that is in the upper, left regards, Peter On Tue, Jul 27, 2010 at 11:27 AM, Robert Osfield robert.osfi...@gmail.com wrote: Hi Peter, If you are using an orthographic projection then you will just need to align the text to the XY plane, which is the default, there is no need to set the AxisAlignment to SCREEN. It's likely upside down as you've inverted the coordinates w.r.t OpenGL. Robert. On Tue, Jul 27, 2010 at 9:32 AM, Peter Wraae Marino marino.pe...@gmail.com wrote: Hi osgUsers, I'm trying to create a gui and would like to have my coordinates system 0, 0 at the upper, left of the screen. To do this I decided to create a matrix that has an ortho view as follows: osg::Matrix::ortho2D( 0, viewW, viewH, 0) where viewH is bottom and top has zero This works great when drawing my gui stuff.. but when I use osgText::Text as follows: m_rText = new osgText::Text; m_rText-setAxisAlignment( osgText::Text::SCREEN ); the text is at the correct position, but is upside down. I've searched the osgText if it was possible to set the drawing direction, but couldn't find anything. is there a way to solve this? I would really like to avoid having to use a osg::Matrix::ortho2D( 0, viewW, 0, viewH ), because this would mean that all my gui components would have to compensate for the viewH and reverse direction. any suggestions?, Peter Wraae Marino -- Bellinge Gymnasterne: http://www.bellingegymnasterne.dk Power Tumbling: http://www.powertumbling.dk OSG-Help: http://osghelp.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Bellinge Gymnasterne: http://www.bellingegymnasterne.dk Power Tumbling: http://www.powertumbling.dk OSG-Help: http://osghelp.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Bellinge Gymnasterne: http://www.bellingegymnasterne.dk Power Tumbling: http://www.powertumbling.dk OSG-Help: http://osghelp.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] using camera for intersection
Hi osgUsers, We have created huge forests using shapefiles to preprocess textures with positions where trees should be located. Then we instance all the trees using a shader, this works very well and we can have over 10 trees without any framerate drop. Because all the trees are instanced on the GPU we have no way of using intersection, because the geometry doesn't really exist. To solve this problem we decided to use a camera as a form of intersection. By setting the camera at a certain location and pointing it in the direction you want to intersect we render the scene, but instead of rendering an image of the scene we use a shader to save the positions for everything rendered, then we do a simple inverse view matrix on the position in the texture (center position) and we have a collision hitpoint in world coordinates. This works very well too, but but but because the camera is in it's own thread (multithreading) we are always a frame or two out of sync. So this is not a good solution for realtime :( we could of course change to single threaded,,.. by why? Is there another method of intersecting with instanced geometry in the GPU? any suggestions, anyone, regards, Peter Wraae Marino -- Bellinge Gymnasterne: http://www.bellingegymnasterne.dk Power Tumbling: http://www.powertumbling.dk OSG-Help: http://osghelp.com http://code.google.com/p/sigmaosg/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] using camera for intersection
Hi Robert, I could use the osgUtil::Intersector and create a relationship to the texture (that contains the positions of the trees) and do some kind of lookup. This would give me a rough estimation if there is a intersection. If I want to test between two branches on the same tree then there should be no intersection with that tree but with whatever is behind it. The camera method solves this problem. I have attached an image to clarify how the trees are rendered.. They are quads with images of the trees and we need to intersect with the tree and not the quad. regards, Peter On Tue, Jun 22, 2010 at 10:34 AM, Robert Osfield robert.osfi...@gmail.comwrote: Hi Peter, I would use a custom osgUtil::Intersector/IntersectionVisitor that knows about your custom use of osg::Geometry and do all the work on the CPU. Using the GPU for intersections requires a round trip to the GPU which is very expensive which will totally dominate the actual cost of the intersection. Robert. On Tue, Jun 22, 2010 at 8:30 AM, Peter Wraae Marino marino.pe...@gmail.com wrote: Hi osgUsers, We have created huge forests using shapefiles to preprocess textures with positions where trees should be located. Then we instance all the trees using a shader, this works very well and we can have over 10 trees without any framerate drop. Because all the trees are instanced on the GPU we have no way of using intersection, because the geometry doesn't really exist. To solve this problem we decided to use a camera as a form of intersection. By setting the camera at a certain location and pointing it in the direction you want to intersect we render the scene, but instead of rendering an image of the scene we use a shader to save the positions for everything rendered, then we do a simple inverse view matrix on the position in the texture (center position) and we have a collision hitpoint in world coordinates. This works very well too, but but but because the camera is in it's own thread (multithreading) we are always a frame or two out of sync. So this is not a good solution for realtime :( we could of course change to single threaded,,.. by why? Is there another method of intersecting with instanced geometry in the GPU? any suggestions, anyone, regards, Peter Wraae Marino -- Bellinge Gymnasterne: http://www.bellingegymnasterne.dk Power Tumbling: http://www.powertumbling.dk OSG-Help: http://osghelp.com http://code.google.com/p/sigmaosg/ ___ 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 -- Bellinge Gymnasterne: http://www.bellingegymnasterne.dk Power Tumbling: http://www.powertumbling.dk OSG-Help: http://osghelp.com attachment: example_tree.jpg___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] glow
Hi Nick, there are many types of glows? I have created this god ray postfilter effect, you can see it here: http://www.youtube.com/watch?v=GFwhqxZz6qg is this what you are looking for? Peter Wraae Marino On Thu, Feb 11, 2010 at 9:55 AM, Trajce Nikolov nikolov.tra...@gmail.com wrote: Hi Community, has anyone experimented with glow effect? I have spent some time with research and I found only implementation as image post processing that requires having your scene rendered into a frame buffer. I dont like this way though, so I am looking for some alternative. Please let me know Thanks -Nick ___ 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
Re: [osg-users] glow
Hi Nick, there are many types of glows? I have created this god ray postfilter effect, you can see it here: http://www.youtube.com/watch?v=GFwhqxZz6qg is this what you are looking for? Peter Wraae Marino On Thu, Feb 11, 2010 at 9:55 AM, Trajce Nikolov nikolov.tra...@gmail.comwrote: Hi Community, has anyone experimented with glow effect? I have spent some time with research and I found only implementation as image post processing that requires having your scene rendered into a frame buffer. I dont like this way though, so I am looking for some alternative. Please let me know Thanks -Nick ___ 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
Re: [osg-users] osg::TextureCubeMap and HDR
Hi David, i have a very new graphics card that supports floating point textures. Peter On Mon, Jan 11, 2010 at 4:45 PM, David Spilling david.spill...@gmail.com wrote: Dear Peter, I think that some (older) graphics cards support floating point 2D textures, but not cube maps. I'm also aware that even if you do support floating point cube maps, many older cards can't do interpolation on them. Can you turn it to GL_NEAREST and see if that makes a difference? Regards, David ___ 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
Re: [osg-users] osg::TextureCubeMap and HDR
Hi osgUsers, followup: been debugging the texturecubemap because it seems like it was the sinner. my debugging has brought forth that the texture given must be squared for cube-maps .. i did not know that.. the texturecubemap does some rescaling and when it does this it destroys all hdr values. Apparently the rescalling the texturecubemap uses can't handle textures with floats. is this correct? Peter Wraae Marino On Fri, Jan 8, 2010 at 2:22 PM, Peter Wraae Marino osgh...@gmail.com wrote: Hi osgUsers, I've been doing some testing on HDR with a backdrop with a .hdr image using osg::Texture2D for the backdrop works great.. really nice HDR effects. using osg::TextureCubeMap results with textures loosing values over 1.0 and resulting with a rainbow effect of colors in those areas in short: this doesn't work: osg::TextureCubeMap* texture = new osg::TextureCubeMap; osg::Image* pImage = osgDB::readImageFile(vinesunset.hdr); texture-setInternalFormat( GL_RGB16F_ARB ); texture-setResizeNonPowerOfTwoHint(false); texture-setImage( 0, pImage ); texture-setImage( 1, pImage ); texture-setImage( 2, pImage ); texture-setImage( 3, pImage ); texture-setImage( 4, pImage ); texture-setImage( 5, pImage ); this works: osg::ref_ptrosg::Texture2D texture = new osg::Texture2D( osgDB::readImageFile(vinesunset.hdr) ); texture-setInternalFormat( GL_RGB16F_ARB ); texture-setResizeNonPowerOfTwoHint(false); texture-setImage( pImage ); can anyone spot what I'm missing? -- Regards, Peter Wraae Marino www.osghelp.com - OpenSceneGraph support site -- 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
Re: [osg-users] osg::TextureCubeMap and HDR
Hi Robert, yes.. just completed the test now.. and using squared hdr textures does work. regards, Peter Wraae Marino On Tue, Jan 12, 2010 at 10:06 AM, Robert Osfield robert.osfi...@gmail.com wrote: Hi Peter, The scaling is done with glu and it probably doesn't support the all new float formats so this may well be the issue. Have you been able to correct your texture dimensions and get it working? Robert. On Tue, Jan 12, 2010 at 8:51 AM, Peter Wraae Marino osgh...@gmail.com wrote: Hi osgUsers, followup: been debugging the texturecubemap because it seems like it was the sinner. my debugging has brought forth that the texture given must be squared for cube-maps .. i did not know that.. the texturecubemap does some rescaling and when it does this it destroys all hdr values. Apparently the rescalling the texturecubemap uses can't handle textures with floats. is this correct? Peter Wraae Marino On Fri, Jan 8, 2010 at 2:22 PM, Peter Wraae Marino osgh...@gmail.com wrote: Hi osgUsers, I've been doing some testing on HDR with a backdrop with a .hdr image using osg::Texture2D for the backdrop works great.. really nice HDR effects. using osg::TextureCubeMap results with textures loosing values over 1.0 and resulting with a rainbow effect of colors in those areas in short: this doesn't work: osg::TextureCubeMap* texture = new osg::TextureCubeMap; osg::Image* pImage = osgDB::readImageFile(vinesunset.hdr); texture-setInternalFormat( GL_RGB16F_ARB ); texture-setResizeNonPowerOfTwoHint(false); texture-setImage( 0, pImage ); texture-setImage( 1, pImage ); texture-setImage( 2, pImage ); texture-setImage( 3, pImage ); texture-setImage( 4, pImage ); texture-setImage( 5, pImage ); this works: osg::ref_ptrosg::Texture2D texture = new osg::Texture2D( osgDB::readImageFile(vinesunset.hdr) ); texture-setInternalFormat( GL_RGB16F_ARB ); texture-setResizeNonPowerOfTwoHint(false); texture-setImage( pImage ); can anyone spot what I'm missing? -- Regards, Peter Wraae Marino www.osghelp.com - OpenSceneGraph support site -- 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 -- 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
Re: [osg-users] osg::TextureCubeMap and HDR
Hi Robert, two additions... 1. the hdr values also get destroyed by texturecubemap if you allow the default texture filter to be used. I had to change this to osg::Texture::Linear or else texturecubemap creates mipmaps and rescale the texture and destroys the hdr values. 2. it seems that texture2D has by default not to make mipmaps and texturecubemap by default makes them??? which makes things a little confusing. hope this helps, Peter Wraae Marino On Tue, Jan 12, 2010 at 11:07 AM, Peter Wraae Marino osgh...@gmail.com wrote: Hi Robert, yes.. just completed the test now.. and using squared hdr textures does work. regards, Peter Wraae Marino On Tue, Jan 12, 2010 at 10:06 AM, Robert Osfield robert.osfi...@gmail.com wrote: Hi Peter, The scaling is done with glu and it probably doesn't support the all new float formats so this may well be the issue. Have you been able to correct your texture dimensions and get it working? Robert. On Tue, Jan 12, 2010 at 8:51 AM, Peter Wraae Marino osgh...@gmail.com wrote: Hi osgUsers, followup: been debugging the texturecubemap because it seems like it was the sinner. my debugging has brought forth that the texture given must be squared for cube-maps .. i did not know that.. the texturecubemap does some rescaling and when it does this it destroys all hdr values. Apparently the rescalling the texturecubemap uses can't handle textures with floats. is this correct? Peter Wraae Marino On Fri, Jan 8, 2010 at 2:22 PM, Peter Wraae Marino osgh...@gmail.com wrote: Hi osgUsers, I've been doing some testing on HDR with a backdrop with a .hdr image using osg::Texture2D for the backdrop works great.. really nice HDR effects. using osg::TextureCubeMap results with textures loosing values over 1.0 and resulting with a rainbow effect of colors in those areas in short: this doesn't work: osg::TextureCubeMap* texture = new osg::TextureCubeMap; osg::Image* pImage = osgDB::readImageFile(vinesunset.hdr); texture-setInternalFormat( GL_RGB16F_ARB ); texture-setResizeNonPowerOfTwoHint(false); texture-setImage( 0, pImage ); texture-setImage( 1, pImage ); texture-setImage( 2, pImage ); texture-setImage( 3, pImage ); texture-setImage( 4, pImage ); texture-setImage( 5, pImage ); this works: osg::ref_ptrosg::Texture2D texture = new osg::Texture2D( osgDB::readImageFile(vinesunset.hdr) ); texture-setInternalFormat( GL_RGB16F_ARB ); texture-setResizeNonPowerOfTwoHint(false); texture-setImage( pImage ); can anyone spot what I'm missing? -- Regards, Peter Wraae Marino www.osghelp.com - OpenSceneGraph support site -- 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 -- Regards, Peter Wraae Marino www.osghelp.com - OpenSceneGraph support site -- 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] osg::TextureCubeMap and HDR
Hi osgUsers, I've been doing some testing on HDR with a backdrop with a .hdr image using osg::Texture2D for the backdrop works great.. really nice HDR effects. using osg::TextureCubeMap results with textures loosing values over 1.0 and resulting with a rainbow effect of colors in those areas in short: this doesn't work: osg::TextureCubeMap* texture = new osg::TextureCubeMap; osg::Image* pImage = osgDB::readImageFile(vinesunset.hdr); texture-setInternalFormat( GL_RGB16F_ARB ); texture-setResizeNonPowerOfTwoHint(false); texture-setImage( 0, pImage ); texture-setImage( 1, pImage ); texture-setImage( 2, pImage ); texture-setImage( 3, pImage ); texture-setImage( 4, pImage ); texture-setImage( 5, pImage ); this works: osg::ref_ptrosg::Texture2D texture = new osg::Texture2D( osgDB::readImageFile(vinesunset.hdr) ); texture-setInternalFormat( GL_RGB16F_ARB ); texture-setResizeNonPowerOfTwoHint(false); texture-setImage( pImage ); can anyone spot what I'm missing? -- 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] Trees, Grass and Shadows
Hi osgUsers, I have question about rendering shadows on grass billboards. This is not a question about anything missing or not working in OpenSceneGraph, but a question how to solve a problem with shadows and grass. The problem is the grass are created using a shader that creates billboard instances, so all grass you see in the video are billboards. When the shadowmap is applied to the grass billboard I get streaks at certain camera angles. Does anyone know how to fix this problem so the grass looks more natural on a grass billboard. Here is the video: http://www.youtube.com/watch?v=iuEVJ-2xQO0 regards, Peter Wraae Marino -- 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
Re: [osg-users] texture to file
Hi osgUsers, I'm still battling with the luminance texture to file. The problem is I need to save a texture with 32bit floating point value for each pixel in the texture as a file and load it in at a later time. (16bit can also be used if 32bit isn't supported). I have tried all these combinations: m_rImage = new osg::Image; //m_rImage-allocateImage( 1024, 1024, 1, GL_LUMINANCE, GL_BYTE ); // fails //m_rImage-allocateImage( 1024, 1024, 8, GL_LUMINANCE, GL_BYTE ); // fails //m_rImage-allocateImage( 1024, 1024, 24, GL_LUMINANCE, GL_BYTE ); // fails //m_rImage-allocateImage( 1024, 1024, 16, GL_LUMINANCE, GL_FLOAT );// fails //m_rImage-allocateImage( 1024, 1024, 32, GL_LUMINANCE, GL_FLOAT );// fails //m_rImage-allocateImage( 1024, 1024, 24, GL_LUMINANCE, GL_4_BYTES ); // fails with crash //m_rImage-allocateImage( 1024, 1024, 24, GL_RGB, GL_BYTE ); // works ( image 8bit in each RGB ) //m_rImage-allocateImage( 1024, 1024, 24, GL_RGB, GL_FLOAT ); // works ( image 8bit in each RGB ), but all values zero //m_rImage-allocateImage( 1024, 1024, 24, GL_RGB, GL_4_BYTES ); // fails with crash //m_rImage-allocateImage( 1024, 1024, 32, GL_RED, GL_FLOAT ); // works, but fails when writing image to file the only one that gave anykind of result was the GL_RGB, GL_BYTE ... am I missing something? anyone? Peter On Wed, Aug 26, 2009 at 1:57 PM, Peter Wraae Marinoosgh...@gmail.com wrote: Hi Rafa, thanks.. i used your suggestion and it works. my only problem now is that the RTT i have created generates a GL_LUMINANCE image, which format do I use? I would like to load and use this texture again as luminance texture. any suggestions, Peter On Tue, Aug 25, 2009 at 12:25 PM, Rafa Gaitanrafa.gai...@gmail.com wrote: Hi Peter You can attach an image to the camera doing the rtt. osg::Image *image = new osg::Image; image-allocateImage(tex_width, tex_height, 1, GL_RGBA, GL_UNSIGNED_BYTE); // attach the image so its copied on each frame. camera-attach(osg::Camera::COLOR_BUFFER, image); Rafa. On Tue, Aug 25, 2009 at 12:22 PM, Peter Wraae Marinoosgh...@gmail.com wrote: Hi Maxim , I believe the readPixels is reading from the framebuffer and not the texture (or am I mistaken??) remember a RTT usually means I have 2 or more cameras in my scene... where one is used to do the RTT... so this can lead to a question how would osg::Image know which buffer to read from? Peter On Tue, Aug 25, 2009 at 12:16 PM, Maxim Gammermaxgam...@gmail.com wrote: Hi... osg::ref_ptrosg::Image image = new osg::Image; image-readPixels. example if (osgDB::writeImageFile(*image,_filename)) { std::cout Saved screen image to `_filename` std::endl; } 2009/8/25 Peter Wraae Marino osgh...@gmail.com Hi osgUsers, I have a question about texture to file. Currently I have render to texture (RTT) and would like to save this texture to a file. Is there a straight forward method of doing this? anyone? -- 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 -- Maxim Gammer ___ 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 -- Rafael Gaitán Linares Instituto de Automática e Informática Industrial http://www.ai2.upv.es Ciudad Politécnica de la Innovación Universidad Politécnica de Valencia ___ 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 -- 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
Re: [osg-users] texture to file
Hi jp, If I was to post the entire render setup it would be so big.. but I'll try and break it up into pseudo form: -osg::Camera setSourceType GL_FLOAT -osg::Camera setInternalFormat GL_LUMINANCE32F_ARB -osg::Camera detaches osg::Camera::COLOR_BUFFER -osg::Camera attaches osg:::Camera::COLOR_BUFFER with osg::Image -the RTT uses the above camera to render an image -use osgDB::writeImageFile using image as input and file test.png png supports 16bit grayscale hope this helps, Peter On Thu, Aug 27, 2009 at 10:01 AM, J.P. Delportjpdelp...@csir.co.za wrote: What format are you trying to write the file to? How are you attaching the image to your camera? i.e. where are the luminance values coming from? jp Peter Wraae Marino wrote: Hi osgUsers, I'm still battling with the luminance texture to file. The problem is I need to save a texture with 32bit floating point value for each pixel in the texture as a file and load it in at a later time. (16bit can also be used if 32bit isn't supported). I have tried all these combinations: m_rImage = new osg::Image; //m_rImage-allocateImage( 1024, 1024, 1, GL_LUMINANCE, GL_BYTE ); // fails //m_rImage-allocateImage( 1024, 1024, 8, GL_LUMINANCE, GL_BYTE ); // fails //m_rImage-allocateImage( 1024, 1024, 24, GL_LUMINANCE, GL_BYTE ); // fails //m_rImage-allocateImage( 1024, 1024, 16, GL_LUMINANCE, GL_FLOAT ); // fails //m_rImage-allocateImage( 1024, 1024, 32, GL_LUMINANCE, GL_FLOAT ); // fails //m_rImage-allocateImage( 1024, 1024, 24, GL_LUMINANCE, GL_4_BYTES ); // fails with crash //m_rImage-allocateImage( 1024, 1024, 24, GL_RGB, GL_BYTE ); // works ( image 8bit in each RGB ) //m_rImage-allocateImage( 1024, 1024, 24, GL_RGB, GL_FLOAT ); // works ( image 8bit in each RGB ), but all values zero //m_rImage-allocateImage( 1024, 1024, 24, GL_RGB, GL_4_BYTES ); // fails with crash //m_rImage-allocateImage( 1024, 1024, 32, GL_RED, GL_FLOAT ); // works, but fails when writing image to file the only one that gave anykind of result was the GL_RGB, GL_BYTE ... am I missing something? anyone? Peter On Wed, Aug 26, 2009 at 1:57 PM, Peter Wraae Marinoosgh...@gmail.com wrote: Hi Rafa, thanks.. i used your suggestion and it works. my only problem now is that the RTT i have created generates a GL_LUMINANCE image, which format do I use? I would like to load and use this texture again as luminance texture. any suggestions, Peter On Tue, Aug 25, 2009 at 12:25 PM, Rafa Gaitanrafa.gai...@gmail.com wrote: Hi Peter You can attach an image to the camera doing the rtt. osg::Image *image = new osg::Image; image-allocateImage(tex_width, tex_height, 1, GL_RGBA, GL_UNSIGNED_BYTE); // attach the image so its copied on each frame. camera-attach(osg::Camera::COLOR_BUFFER, image); Rafa. On Tue, Aug 25, 2009 at 12:22 PM, Peter Wraae Marinoosgh...@gmail.com wrote: Hi Maxim , I believe the readPixels is reading from the framebuffer and not the texture (or am I mistaken??) remember a RTT usually means I have 2 or more cameras in my scene... where one is used to do the RTT... so this can lead to a question how would osg::Image know which buffer to read from? Peter On Tue, Aug 25, 2009 at 12:16 PM, Maxim Gammermaxgam...@gmail.com wrote: Hi... osg::ref_ptrosg::Image image = new osg::Image; image-readPixels. example if (osgDB::writeImageFile(*image,_filename)) { std::cout Saved screen image to `_filename` std::endl; } 2009/8/25 Peter Wraae Marino osgh...@gmail.com Hi osgUsers, I have a question about texture to file. Currently I have render to texture (RTT) and would like to save this texture to a file. Is there a straight forward method of doing this? anyone? -- 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 -- Maxim Gammer ___ 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 -- Rafael Gaitán Linares Instituto de Automática e Informática Industrial http://www.ai2.upv.es Ciudad Politécnica de la Innovación Universidad Politécnica de Valencia ___ 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
Re: [osg-users] texture to file
Hi Rafa, thanks.. i used your suggestion and it works. my only problem now is that the RTT i have created generates a GL_LUMINANCE image, which format do I use? I would like to load and use this texture again as luminance texture. any suggestions, Peter On Tue, Aug 25, 2009 at 12:25 PM, Rafa Gaitanrafa.gai...@gmail.com wrote: Hi Peter You can attach an image to the camera doing the rtt. osg::Image *image = new osg::Image; image-allocateImage(tex_width, tex_height, 1, GL_RGBA, GL_UNSIGNED_BYTE); // attach the image so its copied on each frame. camera-attach(osg::Camera::COLOR_BUFFER, image); Rafa. On Tue, Aug 25, 2009 at 12:22 PM, Peter Wraae Marinoosgh...@gmail.com wrote: Hi Maxim , I believe the readPixels is reading from the framebuffer and not the texture (or am I mistaken??) remember a RTT usually means I have 2 or more cameras in my scene... where one is used to do the RTT... so this can lead to a question how would osg::Image know which buffer to read from? Peter On Tue, Aug 25, 2009 at 12:16 PM, Maxim Gammermaxgam...@gmail.com wrote: Hi... osg::ref_ptrosg::Image image = new osg::Image; image-readPixels. example if (osgDB::writeImageFile(*image,_filename)) { std::cout Saved screen image to `_filename` std::endl; } 2009/8/25 Peter Wraae Marino osgh...@gmail.com Hi osgUsers, I have a question about texture to file. Currently I have render to texture (RTT) and would like to save this texture to a file. Is there a straight forward method of doing this? anyone? -- 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 -- Maxim Gammer ___ 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 -- Rafael Gaitán Linares Instituto de Automática e Informática Industrial http://www.ai2.upv.es Ciudad Politécnica de la Innovación Universidad Politécnica de Valencia ___ 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] texture to file
Hi osgUsers, I have a question about texture to file. Currently I have render to texture (RTT) and would like to save this texture to a file. Is there a straight forward method of doing this? anyone? -- 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
Re: [osg-users] texture to file
Hi Maxim , I believe the readPixels is reading from the framebuffer and not the texture (or am I mistaken??) remember a RTT usually means I have 2 or more cameras in my scene... where one is used to do the RTT... so this can lead to a question how would osg::Image know which buffer to read from? Peter On Tue, Aug 25, 2009 at 12:16 PM, Maxim Gammermaxgam...@gmail.com wrote: Hi... osg::ref_ptrosg::Image image = new osg::Image; image-readPixels. example if (osgDB::writeImageFile(*image,_filename)) { std::cout Saved screen image to `_filename` std::endl; } 2009/8/25 Peter Wraae Marino osgh...@gmail.com Hi osgUsers, I have a question about texture to file. Currently I have render to texture (RTT) and would like to save this texture to a file. Is there a straight forward method of doing this? anyone? -- 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 -- Maxim Gammer ___ 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] AttributeBinding clarification needed
Hi Users, We encountered a bug with some geometry (lets call it geomA) acting weird (disappearing) and found out that it was another geometry (lets call it geomB) setColorBinding was effecting geomA. It turns out that geomA did not use the method setColorBinding at all but of course geomB did. So this brought up a question we need answered: Q: When we looked at the enum values possible we found that there is a BIND_OFF, is this the default value if not specified? and does this mean that the geom will use the last binding value used from the last rendered geom? -- 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] ANN: OsgHelp site now fully open
Hi users, The www.osghelp.com is now fully open. We have removed any plans on paid subscription to the site. Please note this site has nothing to do directly with OpenSceneGraphs website. The site is create to help people to get started with simple articles about how to use OSG. The official OpenSceneGraph website already has a lots of great articles and our site is just an alternative. Articles at the www.osghelp.com are created in their most simple form so we can keep our attention on the subject at hand. enjoy, Peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=8422#8422 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ANN: OsgHelp site now fully open
Brian R Hill wrote: Peter, I don't want to come across as being critical, but wouldn't the OSG community be better served if your info/effort went into the OSG site? Brian Hi Brian, short answer no. long answer... if it went into the osg site then it should follow the standards defined by the osg website and like I already mentioned they have great articles already... I'm writting some that are done differently and perhaps can help another type of audience using osg. Just because it's osg related doesn't mean everything should be on the osg site. two cents, peter -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=8444#8444 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] updating osg::TexMat relative to camera position
Hi users, We are having some troubles setting the osg::TexMat relative to the current camera position. The problem arises when we have multiple cameras. We have for example a main camera and a RTT camera. We tried to use the setCullCallback expecting that before the object that uses the texture is drawn we could modify the osg::TexMat,... but... it appears that following is what happens (when running single threaded): -Camera Main: cull callback -Camera RTT: cull callback -Draw -Draw what we would like to have happen is -Camera Main: cull callback -Draw -Camera RTT: cull callback -Draw Apparently (of course we assuming here) this is how osg is designed. Can someone tells us if we understand this correctly now? and if someone has an idea how to solve this would be much appreciated. -- 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] near far plane
Hi all, At are company we are using huge terrains and have problem with the near plane for our character walking around on the ground. we use the setComputeNearFarMode to COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES if we turn it off and set a hardcoded value then this solves the problem for the near plane but gives us a whole new set of problems. is there a way to use the auto computed method but lock the near plane closer to the camera. I have messed around a little with the setNearFarRatio but it seems to adjust at both ends. any suggestions? -- 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
Re: [osg-users] Forum with Mailing list connection (Christmas Gift ; ) )
Hi Art, great job you've done. now I don't want to be a party pooper,.. but without categories the forum isn't that powerful. having posts in the right categories is where the power of the forum comes into play. or do you have plans on solving that? Right now you only have General but I do appreciate that someone is trying to solve this problem mailinglist vs forum my two cents, Peter PS: merry xmas On Mon, Dec 22, 2008 at 7:55 PM, Art Tevs stud_in...@yahoo.de wrote: Oh yeah, I forgot, one of the main features one has to implement now is a scan of all old messages and compare the sender names with registered user names (of course real names of the users) so that users registering on the forum get links to their posts ;) -- Read this topic online here: http://osgforum.tevs.eu/viewtopic.php?p=3792#3792 ___ 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] setUpdateCallback fails under slave-camera
Hi Users, We have a strange error (perhaps bug).. when we have a geode that has a setUpdateCallback and that geode is a child of a slave camera then the callback is never called. This is also valid for drawables update callbacks anyone? -- 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
Re: [osg-users] GL Books
Hi, I would recommend the red-book and opengl super-bible. the blue book is a reference book and most of the information in it is available on the net. Peter On Mon, Nov 10, 2008 at 1:13 PM, Can T. Oguz [EMAIL PROTECTED] wrote: Hi, As an intermediate openGL and OSG user I'm just about to order an openGL book. Is there any favorite one in your bookshelf to advice me? Thanks for reading, P.S. Please let me state that there's no intention of advertising any author's book before the discussion cheers up :) Can ___ 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] Using slave cameras for composite rendering (part II)
Hi users, I have create a little test code here: http://www.osghelp.com/downloads/SlaveCameras.txt basically I add two slave games the application runs and the view is doing what I expect but I get the following messags: The interface is unknown. A null context handle was passed from the client to the host during a remote procedure call. The binding handle is invalid. anyone know what's wrong? also an added note: if I addSlave twice and try to remove them then the application is unstable and crashes. seems to be something broken here? anyone? -- 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] GraphicsContext
Hi users, In our attempt to make a composite view using slave camera.. we have had some succes but also failure. Biggest problem is getting the render order of the cameras to work. We tried adding them in the correct order, but we needed to use the removeSlave (which seems to be broken) Now we tried to use the GraphicsContext render order, but had a problem that they did not sort correctly. looking into the code: struct CameraRenderOrderSortOp { inline bool operator() (const Camera* lhs,const Camera* rhs) const { if (lhs-getRenderOrder()rhs-getRenderOrder()) return true; if (rhs-getRenderOrder()lhs-getRenderOrder()) return false; return lhs-getRenderOrderNum()lhs-getRenderOrderNum(); } }; if you notice the last line, it is using lhs for both getRenderOrderNum() which will result in a constant return false value. I believe this is a bug, correct me if I'm wrong. -- 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] pragma warnings disabled in headers
Hi Users (Robert), I noticed that the include file export has the following #if defined(_MSC_VER) #pragma warning( disable : 4244 ) #pragma warning( disable : 4251 ) #pragma warning( disable : 4267 ) #pragma warning( disable : 4275 ) #pragma warning( disable : 4290 ) #pragma warning( disable : 4786 ) #pragma warning( disable : 4305 ) #pragma warning( disable : 4996 ) #endif there is no push/pop for the warning in the header file which will make these warnings disabled in my own code too. I would like to catch this warnings in my own code and I shouldn't be forced to enabling them. the only reason I see for having them grouped here in the header is a convience method so osg doesn't have to disable them all places that gives these warnings? is this correct? or is there a better reason? -- 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] composite view and cameras question
Hi Users, 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... -- 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
Re: [osg-users] Migrating to a forum?
Hi Jan, like you said just to forums instead.. every descent forum has thread notifications. So no need to track down forums, you will get an email when someone has answered or posted in your forum thread. Peter On Tue, Nov 4, 2008 at 3:18 PM, Jan Ciger [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter Wraae Marino wrote: Hi Patrick, I agree 100% mailing lists are old school forums are more structured and makes it easier to find already answered questions also forums won't spam my email box. A lot of projects use mailing lists and think that they are the only mailing list people use, but the fact is I am on 4 different mailing list which makes me use too much time sorting out what is important and not. Set up e-mail filters. Every decent e-mail client supports them. That's is what one does to deal with lots of e-mail. That also solves the spamming issue. I am receiving 800+ e-mails a day (with spam filtered out already) and yet my inbox is empty because everything gets sorted out automatically - mailing lists to their own folders, work-related stuff to another folder, private mail has a separate set of folders too. Sorry, but I personally cannot imagine having to chase down 4-5 forums every day to check for new messages for projects I am involved in and then another 2-3 related to the office. That would be simply impossible to keep up with. Forums simply do not work once you have a certain volume of traffic to follow. If this is still not enough, you can always read the list via GMane or something similar and not be subscribed to it. Or create a GMail account just for the list traffic (with great search to boot, forum searches cannot compete with GMail's) and you have a forum-like interface. Regards, Jan -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFJEFm6n11XseNj94gRAqfvAJ4iBfBri+ed4d8cLlB7UaPyTb3olwCgxHMO Ug9zTwEBk8z4REQQN7s0mxQ= =ARcB -END PGP SIGNATURE- ___ 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
Re: [osg-users] composite view and cameras question
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
Re: [osg-users] Migrating to a forum?
Hi Robert, 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. You are never going to please everyone by going for a forum or by going for mailing list only. The only way to appease everyone is to have a system where users can subscribe as a mailing list or visit a forum to interact with the same materials in their own preferred way. If such a system has been developed that is viable, and can import all our mailman history, and we have expert volunteers that can make it happen, i.e. do the work on the server, then great, but until that day we'll be sticking with a Mailman based mailing list. If you can't make such as system happen then please take heed I'm not taking votes, migrating from a mailing list is not up for debate until we have the above solution that deployable and we have the manpower to make it happen. 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
Re: [osg-users] Migrating to a forum?
Hi Patrick, I agree 100% mailing lists are old school forums are more structured and makes it easier to find already answered questions also forums won't spam my email box. A lot of projects use mailing lists and think that they are the only mailing list people use, but the fact is I am on 4 different mailing list which makes me use too much time sorting out what is important and not. my two cents, Peter On Tue, Nov 4, 2008 at 1:08 PM, Patrick Castonguay [EMAIL PROTECTED]wrote: Hi everybody, I am just new to OSG and currently am just using but would hope to do some development in the future. I was wondering if there has been any thoughts given recently to moving to a forum structure instead of the full mailing list. I believe it would be much better to be able to subscribe to a certain thread if you are interested in it instead of receiving a long email with everybody's comment on something that one may not be interested about. Is there anybody else that feels the same way? *Patrick Castonguay* ___ 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
Re: [osg-users] RenderBin understanding
thanks, this helped. the nested makes perfect sense.. i'm on track again, once again thanks, peter On Mon, Nov 3, 2008 at 3:06 PM, Lionel Lagarde [EMAIL PROTECTED]wrote: Hi Peter, Peter Wraae Marino wrote: Hi Users, trying to clarify some specs on the renderbin, perhaps someone could help: what I'm assuming: -there are two default renderbins created at startup RenderBin and DepthSortedBin -DepthSortedBin is always render after RenderBin -DepthSortedBin sorts objects from back to front -higher renderbin number means rendering is done later -renderbins are sorted by states what I'm asking: -if an object has a parent osg::Group that has been set to RenderBin with a value of 10 and the object itself uses RenderBin with a value of 20 then which is used? RenderBins are nested. If a node has a bin number different from the current render bin (or its StateSet render bin mode is set to override), a new render bin is created and is added to the current render bin. It become the current render bin. So, if a node has a bin number of 20 and it is different from the current bin number, a render bin 20 is added to the current render bin. -an .osg file can have renderbin values too? so if I load an .osg file and set it to have RenderBin 10 do I override the renderbin values in the file? or are they pushed relative to my given value 10? sometimes the .osg file consist of many renderbin values. An osg file can contain render bin values. If you load an osg file and set the render bin number of the root node to 10, you don't override the render bin numbers of the nodes (or just the render bin number of the root node). Because render bins are nested during the scene culling, it will force the cull visitor to create a specific render bin for the whole sub-graph. -- Regards, Peter Wraae Marino www.osghelp.com - OpenSceneGraph support site -- ___ osg-users mailing [EMAIL PROTECTED]://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 -- 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] AutoTransform and small feature culling
Hi, We have searched the archive and already found a post about this subject: http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg15948.html First our build setup: OS: Windows (sorry robert) OSG: osg2.6.0 DELTA3D: 2.1.0 Ok,.. our problem is that AutoTransform nodes get culled and disabling small feature culling fixes it. We do see the paradox here,.. because AutoTransform uses the CullVisitor and this does not get called because at startup the AutoTransform node bounding(sphere) is too small. To our application we don't need our AutoTransform objects to be small feature culled, so we would like to ask is there a reason why there isn't a flag on all nodes to enabled/disable small feature culling? -- 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] 3ds plugin scale bug?
Hi user, There seems to be a minor bug in the 3ds plugin ... I have an example where the wheels on a landrover have been scaled negative but when loaded in OpenSceneGraph with the 3ds format... they are not scaled negative. Here is a .max anad .3ds example http://osghelp.com/downloads/Recon_LandRover.zip can anyone confirm this bug? and who maintains the 3ds plugin format for OpenSceneGraph? and sorry if this is the wrong maillist -- 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] osg::Material and shapes
Hi users, I'm trying to apply a material color to a shape. I assume material color is a state and can be applied to the group that contains the shape. This being said the basic code looks like this: osg::Group* pGroup = new osg::Group; osg::Geode* pGeode = new osg::Geode(); pGeode-addDrawable( new osg::ShapeDrawable( newosg::Capsule(osg::Vec3(8.0f,0.0f,1.0f),0.5f,3.0f) ) ); pGroup-addChild( pGeode ); osg::Material* mat = new osg::Material(); mat-setColorMode( osg::Material::DIFFUSE ); mat-setDiffuse( osg::Material::FRONT_AND_BACK, osg::Vec4(0.0, 1.0, 0.0, 1.0) ); pGroup-getOrCreateStateSet()-setAttribute( mat, osg::StateAttribute::ON ); I would expect my capsule to be green.. but it's still gray? searching the archive I fould this: http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg04463.html and he states at the bottom that osg::Material can be used with shapes so,.. am I missing something? Can someone shed a little light and give me a push in the right direction. -- 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] osgPPU
Hi users, I have some questions related to the osgPPU, but don't know if this mailing-list is the right place to post these questions? It seems that osgPPU is a 3rd party software and not directly an OpenSceneGraph implementation and the site that has osgPPU has a helpdesk ticket system... so do I ask questions related to osgPPU here or do I use the ticket system on the osgPPU website? -- 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
Re: [osg-users] osgPPU
Hi Art, thanks.. I actually tried to use the ticket system 10 minutes ago.. but it crashes and couldn't find an email on the website... so I'll post my question here: some code first (point of reference): HDRRendering* pHDRSetup = new HDRRendering; osgPPU::Unit* firstUnit = NULL; osgPPU::Unit* lastUnit = NULL; pHDRSetup-createHDRPipeline( pProcessor, firstUnit, lastUnit ); pProcessor-addChild( firstUnit ); what I wanted was the output result in a texture so I can apply it to a quad. my first attempt was to use the lastUnit-getOuputTexture() but this gave nothing. my second attempt was to use the lastUnit-getOrCreateOutputTexture(0) and this works... but doesn't this mean I have now have two texture instances in the PPU framework of the final scene? Thats why I wanted to use the first attempt method lastUnit-getOutputTexture() any suggestions or am I doing it correctly. regards, Peter On Thu, Sep 18, 2008 at 11:32 AM, Art Tevs [EMAIL PROTECTED] wrote: Hi Peter, I think nobody would complain if you ask your questions here. There are already some users using osgPPU successfully in their projects. What is your question? Best regards, art --- Peter Wraae Marino [EMAIL PROTECTED] schrieb am Do, 18.9.2008: Von: Peter Wraae Marino [EMAIL PROTECTED] Betreff: [osg-users] osgPPU An: osg-users@lists.openscenegraph.org Datum: Donnerstag, 18. September 2008, 10:53 Hi users, I have some questions related to the osgPPU, but don't know if this mailing-list is the right place to post these questions? It seems that osgPPU is a 3rd party software and not directly an OpenSceneGraph implementation and the site that has osgPPU has a helpdesk ticket system... so do I ask questions related to osgPPU here or do I use the ticket system on the osgPPU website? -- 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 __ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com ___ 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
Re: [osg-users] freetype problem
Hi Forest, Have you setup your environment variables for osg? regards, Peter http://osghelp.com 2008/8/11 forest37 [EMAIL PROTECTED] hi all I build osg-2.6.0 and the latest 3rdparty ,when i run the example osgtext,the program could not find plugin to read objects from file. When i debugged the program,i found that the function LoadLibrary() failed to load freetype.dll. but i can find the dll file follow the file path. As a result ,I can't change the text's font,what should i do to slove the problem? thanks for any help! best regards forest -- 想免费升级vip邮箱吗? http://popme.163.com/link/004572_0806_4537.html 快来参加喝汇源游网易活动吧! ___ 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
Re: [osg-users] Perspective Camera Question
Hi Yuen, magnification is easier to use if you change the field of view. this also has the advantage that your camera doesn't have to change position, just like in the real world you don't move a telescope closer to an object. Peter http://osghelp.com On Fri, Aug 1, 2008 at 6:05 PM, Helbig, Yuen [EMAIL PROTECTED] wrote: Hello, I'm trying to do magnification operations with a perspective camera lens by adjusting the camera's distance from the object. Ex. Given a magnification factor of 3x I would multiply my current camera distance by 1/3. However, the results are not what I expect, objects become much larger than 3 times there old screen size. Can anyone point me towards a resource for better understanding the use of Perspective Cameras? Yuen ___ 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
Re: [osg-users] locking 3d text in front of camera
Hi, if you look at this tutorial: http://osghelp.com/readarticle.php?article_id=3 get an account here (it's free): http://osghelp.com you must have an account before you can view the tutorial. the tutorial has an example how to place 3D text infront of the camera using projection matrix and view matrix. Of course the osgText can be aligned to the camera using methods it has in it's own class, but the tutorial above will also work for other 3D objects if you need to align them to the camera. please note that the tutorial isn't really about object placement and camera, but it uses that technique as an example and it sound like it's what you need. regards, Peter Wraae Marino http://osghelp.com On Sun, Jul 27, 2008 at 2:06 AM, Joe Lyga [EMAIL PROTECTED] wrote: Hi osg-users. I'm kind of new to openscenegraph and 3d programming, and I'm having a problem. I'm trying to position a 3d text object to be in a fixed position directly in front of the camera, so it's always in the same position in the lower left corner of the screen. It would be much easier to do this as a 2d overlay, but in this case it needs to be 3d. I have the camera's view matrix to work with, and I can get the eye, look, and up vectors from that to position the text. I have a feeling that I have to do some vector math here, but I haven't been able to find anything that helps yet. Does anyone have any ideas? ___ 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
Re: [osg-users] setViewMatrixAsLookAt where is center?
Hi Ariasgore, are you sure you want a up vector 0,1,0 ? osg uses z up 0,0,1 but of course if you have changed the coordinate system then it's ok. my two cents, Peter http://osghelp.com On Sat, Jul 26, 2008 at 5:04 PM, Ariasgore [EMAIL PROTECTED] wrote: Hello, I was trying to use the setViewMatrixAsLookAt matrix like I would use gluLookAt (since they are similar), my intention is to create a rotation around a point. So first I selected the eye position which should be (0,-25,25) and wanted to point the camera towards (0,0,0) where my object is placed, so basically the code looks like this: viewer.getCamera()-setViewMatrixAsLookAt(osg::Vec3(0,-25,25), osg::Vec3(0,0,0), osg::Vec3(0,1,0) ); but rendering this scene creates some confusing perspective, the position of the camera seems right but even if I am looking at (0,0,0) the object I am looking at is at the top of the screen and not centered, as I supposed. While placing the object at scene's origin, shouldn't this setup center this object since I am looking at (0,0,0) ? Greetings ___ 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
Re: [osg-users] Is it possible to know when the node-graph is 'dirty'?
Hi Viggo, This is only a suggestion (you may have other reasons). To avoid the human error as you called it, meaning that if someone forgets to call the reformat code... then you should have a method that 3rd party code/humans must use when adding to your scene, for example void CMySceneManagerThingy::AddToScene( osg::Node* pNode ) { // add to wherever you want the pNode to be added in the scene code here // reformat your scene as you want code here } on the other subject about rendering multitimes the same object.. you should just create a new group and add your objects to that group and the group to the scene (do this as many times as you want).. don't know why you should be messing around with the renderbins? unless you are trying somekind of render pass? regards, Peter http://osghelp.com On Wed, Jul 23, 2008 at 11:00 AM, Viggo Løvli [EMAIL PROTECTED] wrote: Hi Peter, What you say is true in most cases. The 'simplest' way to do this would be to tell my system that the node-tree need re-formatting each time we call OSG to add children. That would require two calls each time, and also requre humans to remember to implement both calls. This opens for human errors, which at least I dont want (I am lazy). I want to make my module (the one that need to format the node-masks) independent of the rest of the system, and to ensure that the rest of the system will not need to know about my module. I also want to be able to add 3rd party libraries to my application without re-writing them to do special calls to my module when they add nodes to the tree. So, the conclusion I have is that I need to automatically know when I need to format the node-masks. The osg::Group has a callback function named osg::Group::childInserted. I can make my root-node into a sub-class og osg::Group where I implement the childInserted function. This way I will get a callback each time someone add nodes to my root-node. If a module create it's own osg::Group and add children to it dymically then I would not know anything about that. I also saw Roberts reply and I agree that a dirty system on the node-tree would be very expensive. I knew that my question was a longshot. I am now thinking about other solutions to achieve my goal. The goal is to render the world with 3 slave cameras. One shall render all render-bins up to bin 9. One shall render bin 10. And the 3rd shall render bin 10 and up. So bin 10 is rendered twice. This is to fix some glitches on transparent polygons that intersect each other while needing to write to the depth-buffer. Ok, so another solution would be to force a camera to only render a certain number of bins. I have not seen any place in the code around camera or cull-settings that you can specify a camera to stay within a limited range of render-bins, so I guess this won't be as easy either? Do you have any suggestions on how to be able to render one bin twice in the same frame. The first and second render of the bin shall have a few render-states set differently. Regards, Viggo -- Date: Wed, 23 Jul 2008 07:58:37 +0200 From: [EMAIL PROTECTED] To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Is it possible to know when the node-graph is 'dirty'? Hi Viggo, Don't know the details of your code, but if you are adding a sub-node then you have code already that is called for adding the sub-node and thereby you know when the scene-graph has been modified? regards, Peter http://osghelp.com On Wed, Jul 23, 2008 at 7:51 AM, Viggo Løvli [EMAIL PROTECTED] wrote: Hi, My code is currently formatting the node-masks of the whole scene-graph before we start rendering. The formatting code is only ran once. If a sub-node is added to the node-tree afterwards then I want to run my formatting code again. Is there any way to know whether or not the scene-graph has been modified? Regards, Viggo -- Windows Live Hotmail på mobilen. Ha alltid e-posten din tilgjengelig.http://windowslivemobile.msn.com/BrowserServiceHotmail.aspx?lang=nb-NOocid=30032 ___ 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 -- Få Hotmail du også. Windows Live Hotmail nå med 5000 MB gratis lagringsplass.http://clk.atdmt.com/GBL/go/msnnkdre001005gbl/direct/01/ ___ 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
Re: [osg-users] Is it possible to know when the node-graph is 'dirty'?
Hi Viggo, Don't know the details of your code, but if you are adding a sub-node then you have code already that is called for adding the sub-node and thereby you know when the scene-graph has been modified? regards, Peter http://osghelp.com On Wed, Jul 23, 2008 at 7:51 AM, Viggo Løvli [EMAIL PROTECTED] wrote: Hi, My code is currently formatting the node-masks of the whole scene-graph before we start rendering. The formatting code is only ran once. If a sub-node is added to the node-tree afterwards then I want to run my formatting code again. Is there any way to know whether or not the scene-graph has been modified? Regards, Viggo -- Windows Live Hotmail på mobilen. Ha alltid e-posten din tilgjengelig.http://windowslivemobile.msn.com/BrowserServiceHotmail.aspx?lang=nb-NOocid=30032 ___ 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
Re: [osg-users] Combining Textures
Hi Ming, I wrote something about multitexturing here: http://osghelp.com/articles.php?cat_id=3rowstart=15 good luck, Peter http://osghelp.com On Mon, Jul 21, 2008 at 3:04 PM, ka Ming [EMAIL PROTECTED] wrote: Hi, I am trying to combine two or more Textures. I read an OSG File in. After that I try to add a new Texture Attribute to my StateSet. E.g. the first Texture is a RGB Texture in the second one has some Alpha values. As result I want to see only the first texture at the texel where texture two the alpha value is set to transparent. Are there any Examples or can someone help me out? Cheers Ming -- Gesendet von Yahoo! Mailhttp://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52427/*http://de.overview.mail.yahoo.com. Dem pfiffigeren Posteingang. ___ 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
Re: [osg-users] osg::Light Simple Question ?
Hi, isnt there missing a *setMode*( GL_LIGHT1, osg::StateAttribute::ON ); for your terrain group? (or did I miss something?) Peter http://osghelp.com On Sat, Jul 19, 2008 at 12:39 AM, Ümit Uzun [EMAIL PROTECTED] wrote: Hi All, I have an simple question about light the terrain model problem. I have added two sphere(osg::Sphere) and one terrain(JoeDirt.flt) to the scene. I am trying to effect the components of scene with green light. Although green light could effected two of sphere, couldn't get success on the terrain model. What can I do to effect the terrain with green light? I have tried this code block; -- *int main() { osgViewer::Viewer viewer; osg::ref_ptrosg::Group root (new osg::Group); osg::ref_ptrosg::MatrixTransform terrainScaleMAT (new osg::MatrixTransform); osg::Matrix terrainScaleMatrix; terrainScaleMatrix.makeScale(0.05f,0.05f,0.03f); //Lighting code osg::ref_ptrosg::Group lightGroup (new osg::Group); osg::ref_ptrosg::StateSet lightSS (root-getOrCreateStateSet()); osg::ref_ptrosg::LightSource lightSource1 = new osg::LightSource; // create a local light. osg::Vec4f lightPosition (osg::Vec4f(0.0,0.0,3.0,1.0f)); osg::ref_ptrosg::Light myLight = new osg::Light; myLight-setLightNum(1); myLight-setPosition(lightPosition); myLight-setAmbient(osg::Vec4(0.2f,0.2f,0.2f,1.0f)); myLight-setDiffuse(osg::Vec4(0.1f,0.4f,0.1f,1.0f)); myLight-setConstantAttenuation(1.0f); lightSource1-setLight(myLight.get()); lightSource1-setLocalStateSetModes(osg::StateAttribute::ON); lightSource1-setStateSetModes(*lightSS,osg::StateAttribute::ON); lightGroup-addChild(lightSource1.get()); //Light markers: small spheres osg::ref_ptrosg::Geode lightMarkerGeode (new osg::Geode); lightMarkerGeode-addDrawable(new osg::ShapeDrawable(new osg::Sphere(osg::Vec3f(-5.0f,-2.0f,3.0f),0.5f))); //lightMarkerGeode-getOrCreateStateSet()-setMode(GL_LIGHTING,osg::StateAttribute::OFF); //Second light marker lightMarkerGeode-addDrawable(new osg::ShapeDrawable(new osg::Sphere(osg::Vec3f(2.0f,-1.0f,3.0f),0.5f))); //Loading the terrain node osg::ref_ptrosg::Node terrainnode (osgDB::readNodeFile(JoeDirt.flt)); terrainScaleMAT-addChild(terrainnode.get()); terrainScaleMAT-setMatrix(terrainScaleMatrix); //adding the terrain node to the root node root-addChild(terrainScaleMAT.get()); //lighting code root-addChild(lightGroup.get()); //Adding the light marker geode root-addChild(lightMarkerGeode.get()); // add the state manipulator viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()-getOrCreateStateSet()) ); viewer.setSceneData( root.get() ); return (viewer.run()); }* -- ___ 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
Re: [osg-users] text appearing flipped and backwards
Hi, have you created your own viewmatrix? I assume the red text is just photoshopped in, right? Peter http://osghelp.com On Fri, Jul 18, 2008 at 10:49 PM, James Dickson [EMAIL PROTECTED] wrote: Hi, I am having an issue with osgText::Text in that the text appears flipped and backwards relative to the other geometry in the scene. (Please see screenshot for what I mean) In the attached screen shot I have written on the coords. of the billboard geometry so hopefully the following code will make some sense: // Go through data and plot lines. for (_i = _testTimeLine.begin(); _i != _testTimeLine.end(); ++_i) { std::stringstream _caption; _caption *_j; int _y = static_castint(((*_j) + _minY) * (( _height - 20) / (_maxY - _minY))); int _x = static_castint(((*_i) + _minX) * (( _width - 20) / (_maxX - _minX))); _x = _x + 10; _y = _y + 10; // If not at the beginning of the vector, draw a line, otherwise // colour a pixel. if (_i != _testTimeLine.begin()) { m_graphImage-DrawLine(osg::Vec2(_prevx, _prevy), osg::Vec2(_x, _y), osg::Vec4(0.0f, 0.0f, 1.0f, 1.0f)); } else { m_graphImage-SetPixel(osg::Vec2(_x, _y), osg::Vec3(0.0f, 0.0f, 1.0f)); } _prevx = _x; _prevy = _y; // Convert texture coordinates to uv's to use as offsets. float _u = ((float)_x) / ((float)_width); float _v = ((float)_y) / ((float)_height); osg::Vec3 _xoffset(_u, 0.0f, 0.0f); osg::Vec3 _zoffset(0.0f, 0.0f, _v); // Use offsets to create world space coordinates. osg::Vec3 _pos = m_corner + _xoffset + _yoffset + _zoffset; // Create and position text displaying data point value. osgText::Text * _text = new osgText::Text; _text-setFont(_font); _text-setCharacterSize(characterSize); _text-setPosition(_pos); _text-setAxisAlignment(osgText::Text::XZ_PLANE); _text-setText(_caption.str()); _captions-addDrawable(_text); ++ _j; } I have managed to fix it by changing the alignment setting to REVERSE_XZ_PLANE and switching the sign of the offset coords. However I feel this is a slight hack and wondered if there is some other 'proper' setting? Many thanks, James ___ 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
Re: [osg-users] 回复: Re: multi translucent g eometry
Hi Rick, I agree with Paul. Turn off your z-buffer. If this effect is for thrusters then you should perhaps look into additive blending instead and this should create a better effect.. the more thrusters the brighter the become. A screenshot of your problem would help a lot (if possible). regards, Peter http://osghelp.com 2008/7/14 Paul Speed [EMAIL PROTECTED]: I'm no expert in this area but have had to do some pretty weird things in the past to get transparency working right for some odd scenes... One thing you might try is to disable z-buffer writes (not tests) for the flares. Depending on your blending, this can add other types of artifacts but I think in your case they will be very subtle... versus the z-fighting you are seeing. (You will obviously want them to be drawn last just like normal transparency.) Just an idea... -Paul Rick Pingry wrote: That reminds me of an issue I have not resloved yet. Our space ships have thruster engines and I use an image map with transparency and point it back at the camera to make a pretty glow around it. (First off, is this the best way to do it? I have thought that perhaps a shader would work better, but I have not had a chance to learn about how to write shaders yet. So much to learn, so little time). Anyway, In some ships there are banks of engines, and it is pretty easy to get the problem where these transparent images intersect with each other, and you get depth sorting issues that way. I did work out a way to make these engine flare images point, rather than right at the camera, all along parallel lines with the camera's line of sight, and that helped tremendously, but you can still get in positions where the images happen to line up along the same depth, and you see some funky tearing and the like due to depth fighting. Is there a way to handle this better? Should I try to apply other bins to the different engines? What are the rules wrt that? It sounds like I need to read up on the glDepth and osg::Depth. Any other recommendations? I was running into problems rendering planet halos too. Should the halo be in front of the planet or behind it? probably the same kind of thing going on. Regards, -- Rick 2008/7/13 小 杨 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Thanks! I'll try it! */Peter Wraae Marino [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]/* 写道: Hi ?? (can't see your name), Are you sure zbuffer isn't falling for your 2nd geometry object? Also having equal depths is probably not a good idea? You need to render your objects from back to front order. When you have transparent objects you should set the stateset stateset-setRenderBinDetails(10,DepthSortedBin); this will render the objects from back to front order... but note they will not sort the polygons for the individual geometry. 2008/7/13 小 杨 [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: multi translucent geometry with equal depth but alpha value is not equal. when i render these geometry ,i can not see all geometry! Why ? Can everyone give me some advice! Thanks! 雅虎邮箱,您的终生邮箱! http://cn.mail.yahoo.com/ ___ 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 -- Regards, Peter Wraae Marino www.osghelp.com http://www.osghelp.com/ - OpenSceneGraph support site ___ 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 雅虎邮箱,您的终生邮箱! http://cn.mail.yahoo.com/ ___ 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 -- Rick Check us out at http://fringe-online.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users
Re: [osg-users] Drawing to Texture2D
Hi James, I believe you have to: texture-setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::NEAREST); texture-setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::NEAREST); -- Regards, Peter Wraae Marino www.osghelp.com - OpenSceneGraph support site On Sat, Jul 12, 2008 at 11:29 PM, James Dickson [EMAIL PROTECTED] wrote: I decided to go down the route of writting my own line, circle etc algorithms as I only need a few, but I have hit a slight snag. :-( I have attached an image to show the effect I am getting, ideally I would like the Texture2D which is projected onto the billboard to be sharper? I.e the lines drawn on the white billboard not to have blurred edges. The texture resolution is 256x256, and increasing it only partially helps, are there any filters I can turn on\off for the texture to help fix it? Many thanks, James 2008/7/11 Jean-Sébastien Guay [EMAIL PROTECTED]: Hi James, I was wondering if it is possible to draw on a Texture2D instance. I know this isn't possible, but I am wondering if you can do the equivalent of: Texture2Dinstance-DrawCircle(x,y,r); OSG does not do 2D drawing to images. You can do your own by getting the data pointer from an osg::Image and drawing pixels into that (if you feel the need to write your own line, circle, flood-filling etc. algorithms :-) ), or you can use an imaging library (ImageMagick, etc.) to make the image and then get the data from that library and copy it into an osg::Image (or perhaps even use the same pointer if it's a raw format). No need to save the image to disk and re-read it with OSG. 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 -- James Dickson ___ 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
Re: [osg-users] multi translucent geometry
Hi ?? (can't see your name), Are you sure zbuffer isn't falling for your 2nd geometry object? Also having equal depths is probably not a good idea? You need to render your objects from back to front order. When you have transparent objects you should set the stateset stateset-setRenderBinDetails(10,DepthSortedBin); this will render the objects from back to front order... but note they will not sort the polygons for the individual geometry. 2008/7/13 小 杨 [EMAIL PROTECTED]: multi translucent geometry with equal depth but alpha value is not equal. when i render these geometry ,i can not see all geometry! Why ? Can everyone give me some advice! Thanks! -- 雅虎邮箱,您的终生邮箱! http://cn.mail.yahoo.com/ ___ 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
Re: [osg-users] StartingOpenSceneGraphinVisualStudio
Hi Victor, you need to use cmake Peter On Fri, Jul 11, 2008 at 5:18 PM, Victor Chilekwa [EMAIL PROTECTED] wrote: I am a new user. I have downloaded zip file OpenSceneGraph-2.4.0.zip to run open scene graph from the visual studio environment. Can any one tell me where I can find the open scene graph project files i.e. .vcproj for .net or .dsw for visual studio 6. thanks, Victor This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. ___ 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
Re: [osg-users] RE : multitextureing coordinates
Hi Jason, Yes it does work.. just fine. thanks, Peter On Thu, Jul 10, 2008 at 6:05 PM, Jason Daly [EMAIL PROTECTED] wrote: Peter Wraae Marino wrote: Hi Franclin, Yea doing it using a shader is easier and more flexible, but is there a reason why we don't get access to do multitexture coordinates? Jasons suggestion: osg::Geometry::setTexCoordArray() is not for multitexture coordinates, so I can't really use that. I use it for multitexture coordinates all of the time. Why would you think it doesn't work? --J ___ 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
Re: [osg-users] RE : Re: RE : multitexturing coordinates
Hi Franclin, yes shaders is better.. . but I wanted to solve this using old multitexturing method. I have succesfully done this and it works just fine on my quad (which of course if from the geometry class). doing it using a shader is not a problem (actually easier for me).. but like I said I purposely wanted to use the above method without shaders. regards, Peter On Fri, Jul 11, 2008 at 12:00 AM, Franclin Foping [EMAIL PROTECTED] wrote: Hi Peter, You can achieve a multitexture effect quite easily again look at my tutorials. The problem is all about defining the geometry of objects yourself and in order to do this you will need to rely on the geometry class. But for shape drawable, geometry information is hidden to clients (and I don't know why but I suspect performance issues) that is why you need to use shaders for them. Because by making use of shaders you are actually changing the graphics pipeline. Talk to you soon. F. *Jason Daly [EMAIL PROTECTED]* a écrit : Peter Wraae Marino wrote: Hi Franclin, Yea doing it using a shader is easier and more flexible, but is there a reason why we don't get access to do multitexture coordinates? Jasons suggestion: osg::Geometry::setTexCoordArray() is not for multitexture coordinates, so I can't really use that. I use it for multitexture coordinates all of the time. Why would you think it doesn't work? --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Envoyé avec Yahoo! Mailhttp://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52423/*http://fr.docs.yahoo.com/mail/overview/index.html . Une boite mail plus intelligente. ___ 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] multitextureing coordinates
Hi users, I have create simple quad using osg::Geometry and I would like to apply multitextering to it. I'm missing a way to set glMultiTexCoord using OpenSceneGraph. Is there a way one can set glMultiTexCoord? regards, Peter ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] RE : multitextureing coordinates
Hi Franclin, Yea doing it using a shader is easier and more flexible, but is there a reason why we don't get access to do multitexture coordinates? Jasons suggestion: osg::Geometry::setTexCoordArray() is not for multitexture coordinates, so I can't really use that. regards, Peter On Thu, Jul 10, 2008 at 1:27 AM, Franclin Foping [EMAIL PROTECTED] wrote: Hi Peter, I have addressed this issue in my tutorial entitled Tutorial 7: Texturing, multitexturing and positioning objects ( http://www.openscenegraph.org/projects/osg/attachment/wiki/Support/Tutorials/Tuto7.zip ). For your information, please note that it is not possible to apply a multitexturing on built-in shape drawable objects as texture coordinates are not accessible to coders. The easiest way around this problem will be to use shaders. Again, I have achieved this in tutorial 14. All these tutorials are available in the official webpage in the Tutorial section. ''Yet Another Set of Beginner Tutorials' Hope to have answered your question. Regards, Franclin. *Peter Wraae Marino [EMAIL PROTECTED]* a écrit : Hi users, I have create simple quad using osg::Geometry and I would like to apply multitextering to it. I'm missing a way to set glMultiTexCoord using OpenSceneGraph. Is there a way one can set glMultiTexCoord? regards, Peter ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Envoyé avec Yahoo! Mailhttp://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52423/*http://fr.docs.yahoo.com/mail/overview/index.html . Une boite mail plus intelligente. ___ 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] Performance hit caused by porting from VS 7.1 to VS 9
The express editions does full optimizations,.. same compiler. The express version just doesn't have features for web, MFC and stuff like that. regards, Peter On Wed, Jul 2, 2008 at 9:33 AM, Robert Osfield [EMAIL PROTECTED] wrote: Hi Rick, Do the express editions do full optimizations? I recall previously MS used to cap the optimization on the give away versions of VS. Robert. On Tue, Jul 1, 2008 at 10:13 PM, Rick Pingry [EMAIL PROTECTED] wrote: Hello All, We have succesfully ported from OSG 1.2 to the newest SVN version (well, almost newest, I think we are on 8512 at the moment). Thanks again for all the fantastic forum support. We have been using VS 7.1 for all of our work so far, but since we were missing a well build freetype library, I figured it was time to make the jump there as well. I downloaded VS 9 express and ran CMake to build OSG. All built just fine. The converter in VS 9 converted all of the projects without fuss, and I was able to get it all compiling and running pretty easily. Unfortunately, I am seeing this 30% drop in framerate :(. I was seeing about 28-30 fps (yes, I know, I have some scene optimizing to do) with the VS 7.1 build, which dropped to 20-21 fps using VS 9 express. Has anyone seen anything like that before? Am I missing some setting somewhere? Perhaps the converter in VS 9 does not like me? Any ideas? -- Thanks Rick Check us out at http://fringe-online.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Problems with loading model in OSG 2.2
Hi Ricky, it sounds like you are using software rendering and not hardware. Why your system defaults to software I have no clue. If your project is small and you don't mind sharing.. you can zip and send it to me at [EMAIL PROTECTED] and I'll have a look at it on my machine. Peter On Wed, Jul 2, 2008 at 2:29 PM, Ricky [EMAIL PROTECTED] wrote: I still can't solve this problem: Error: [screen #0] ChooseMatchingPixelFormat() - Unable to choose the requested pixel format I just loaded a simple model but the program run really slowly (in debug mode), it's better in release mode. I used osg1.2 and it run so fast, even in debug mode. Please support me with this problem, is it because of that error? My code is simply like this: #include osg/PositionAttitudeTransform #include osg/Group #include osg/Node #include osgDB/ReadFile #include osgViewer/Viewer int main() { osg::ref_ptrosg::Node m_node = new osg::Node(); osg::ref_ptrosg::Group root = new osg::Group(); osgViewer::Viewer viewer; osg::Vec3 m_nodePosit; osg::ref_ptrosg::PositionAttitudeTransform nodeXform = new osg::PositionAttitudeTransform(); m_node = osgDB::readNodeFile(baitap.flt); root-addChild(nodeXform.get()); m_nodePosit.set(5,0,0); nodeXform-setPosition( m_nodePosit ); nodeXform-addChild(m_node.get()); viewer.setSceneData( root.get() ); viewer.setUpViewInWindow(32,32,512,512); return viewer.run(); } ___ 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] Problems with loading model in OSG 2.2
Hi Ricky, ok.. i think we should have asked this first. have you updated your graphic-card driver? Peter On Wed, Jul 2, 2008 at 8:37 PM, Ricky [EMAIL PROTECTED] wrote: Thanks for your supports! I'm using the OSG binaries downloaded from http://www.mew.cx/osg/. I run this program on Windows XP SP2, VS2005 SP1, video card: ATI Mobility Radeon 2400XT 256MB, RAM DDR2 1GB. When I run osgviewer in command line: osgviewer --window 32 32 512 512 cow.osg, I had the same problem, of course it run faster than in the debug mode. Could it because of my hardware? but i run well with the old version! ___ 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] error in tutorial Loading Models from Files...
Hi Zamo, you can try this article if you like: http://osghelp.com/readarticle.php?article_id=6 it's a simplified version how to load models. and this article is a simplified version how to transform your models: http://osghelp.com/readarticle.php?article_id=7 hope this helps, Peter On Wed, Jul 2, 2008 at 3:04 AM, Zamo Cédrik [EMAIL PROTECTED] wrote: Hi, in tutorial Loading Models from Files and Positioning Them in a Scene there is : osgViewer::Viewer viewer; viewer.addCameraManipulator(new osgGA::TrackballManipulator); compiler errors ; error C2039: 'addCameraManipulator' : is not a member of 'osgViewer::Viewer' and error C2039: 'TrackballManipulator' : n'est pas membre de 'osgGA' is there up to date tutorials ? thanks. -- Envoyé avec Yahoo! Mailhttp://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52423/*http://fr.docs.yahoo.com/mail/overview/index.html . Une boite mail plus intelligente. ___ 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 Help Website
Hi users, I have tried to create some tutorials on how people can get started with OpenSceneGraph. I have open the site for registration today.. only the beginner articles are available right now. Later more advanced articles will come, but for the time being I need to get the website in usable form so it's easy to use and understand. The site is here: http://osghelp.com If some of my explanitions should be wrong, missing, too little, too much.. then I would appriciate feedback. Some might be asking the question.. www.openscenegraph.com already has many tutorials and this is correct, but I have tried to simplify most of the toturials on my site so it should be easy to use/understand. I will be updating them constantly too. I haven't gone into the linux getting started tutorials yet... will come later (sorry for linux people out there... and yes I do love linux) enjoy, Peter ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osg-submissions] API configurations in aseparateConfig include file
Hi Bob, I will have to disagree with you on that point. I have worked in the computer industry for 15 years now (hitman, freedom fighters just to name a couple).. To this extent I have worked with 4 different gaming companies that all have made there own scenegraph/engine .. and I have to say that OpenSceneGraph is the best designed project I have ever worked with! and yes everything is well :) my two cents, Peter On Wed, Jun 25, 2008 at 3:40 PM, Bob Kuehne [EMAIL PROTECTED] wrote: quite the interesting change, eh? gets back to a point of problem i have with this project - that it isn't designed, but mostly just implemented. and even that is done without a lot of thought as to the larger consequences... sigh. anyway, how's your new thing going? well? b -- Forwarded message -- From: Brian R Hill [EMAIL PROTECTED] Date: Wed, Jun 25, 2008 at 9:10 AM Subject: Re: [osg-users] [osg-submissions] API configurations in aseparateConfig include file To: OpenSceneGraph Users osg-users@lists.openscenegraph.org I second Paul's statement - it breaks every other project that uses osg. Brian [EMAIL PROTECTED] wrote: - To: 'OpenSceneGraph Users' osg-users@lists.openscenegraph.org From: Paul Martz [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] Date: 06/25/2008 08:47AM Subject: Re: [osg-users] [osg-submissions] API configurations in aseparateConfig include file This is most definitely not a transparent change. It is not backwards compatible with application projects designed to build against an OSG source/build tree. -Paul -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James Killian Sent: Tuesday, June 24, 2008 10:18 PM To: OpenSceneGraph Users Subject: Re: [osg-users] [osg-submissions] API configurations in aseparateConfig include file What was suppose to happen is that all of the changes were to be transparent in such a way where he need not write additional info. The problem of course is that when the code was checked in it was not tested for the windows platform, and now that I finally understand how it is suppose to work there are two known issues: 1. On my setup using 2.4.8 and VS 7.1 platform the cmake fails to identify that I can use interlocked and threaded environment, and so the config files written are for single threaded, and some of my bounding variables were defined as float. 2. I suspect that cmake scripts included the *build* include for only OpenThreads and OSG (and these could build fine)... problem is that all projects dependent on either of these will also need to add the build path to search, and this triggered the why can't my application find the Config header? issues. It should be easy to fix #2 if in fact that is the intended direction (and to the best of my knowledge) it was. If these things are working properly, it should be a transparent workflow. I will certainly test this and provide feedback once the windows.h issues are resolved. James Killian - Original Message - From: Paul Martz [EMAIL PROTECTED] To: 'OpenSceneGraph Submissions' [EMAIL PROTECTED] Cc: 'OpenSceneGraph Users' osg-users@lists.openscenegraph.org Sent: Tuesday, June 24, 2008 4:56 PM Subject: Re: [osg-users] [osg-submissions] API configurations in a separateConfig include file I was surprised to see a change with such widespread ramifications discussed only on osg-submissions, so I'm cross-posting. I think I've now waded through enough of the posts in this thread to understand why this was done, and how to cope with the fact that OSG header files are now in the build directory. Mathias, could you take the time to enter a FAQ on the wiki regarding this? I foresee many posts when people upgrade to the latest OSG of the form: why can't my application find the Config header?. Users will need to know the following: * OSG now generates headers in the build tree. If your app links with OSG from a source/build tree, your app will now need to look for headers in multiple locations. * You can get around this by installing OSG. You can customize the install location with an OSG cmake variable. * Any other info you think is relevant. A FAQ on the wiki would be better than having people search the osg-submissions archives. Thanks, -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce negraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce negraph.org ___ osg-users mailing list
[osg-users] fog
hi users, i have tried to create a simple example using fog. As I understand it the start and end values define where the fog starts and ends relative to the camera? but not matter what values I use it doesn't effect my rendering. I seem to always get the same fog rendering. can someone explain/clarifiy what I'm not understanding? Here is the code if you need to test: #include osg/ShapeDrawable #include osg/fog osg::Node* CreateScene() { osg::Geode* pGeode = new osg::Geode(); for ( int x=0; x10; x++ ) { for ( int y=0; y10; y++ ) { pGeode-addDrawable( new osg::ShapeDrawable( new osg::Sphere(osg::Vec3(x,y,0.0f),0.3f) ) ); } } osg::Fog* pFog = new osg::Fog(); pFog-setMode( osg::Fog::EXP2 ); pFog-setColor( osg::Vec4( 1, 1, 1, 1) ); pFog-setStart( 5 ); pFog-setEnd( 20 ); pFog-setDensity( 0.08f ); pGeode-getOrCreateStateSet()-setAttribute( pFog, osg::StateAttribute::ON ); pGeode-getOrCreateStateSet()-setMode( GL_FOG, osg::StateAttribute::ON ); return pGeode; } regards, Peter Wraae Marino http://osghelp.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] lod and txp
Hi Robert, it indeed does work but when I try using it on a camera doing RTT it has no effect? basically what I do is: m_rCamTex-GetCamera()-setInheritanceMask( m_rCamTex-GetCamera()-getInheritanceMask() ~osg::CullSettings::LOD_SCALE ); m_rCamTex-GetCamera()-setLODScale( parameters.GetFloat(0) ); note: m_rCamTex-GetCamera() returns an osg::CameraNode* Am I missing something? Peter On Mon, Jun 23, 2008 at 10:10 AM, Robert Osfield [EMAIL PROTECTED] wrote: Hi Peter, What you'll need to do is adjust the viewers Camera's LODScale as you do the zoom i.e. viewer.getCamera()-setLODScale(scale); // scale = 1.0 is default Robert On Mon, Jun 23, 2008 at 8:12 AM, Peter Wraae Marino [EMAIL PROTECTED] wrote: Hi users, In our application we are using txp file format from terravista. We have a problem when zooming with the camera and level of details. Zooming in our application is done by changing the field of view and the problem is that the level of details used by txp is dependent on distance from the camera. we don't seem to have any method to change the behavior of the txp lod, so what I'm asking is.. does anyone know of any other technique we can use to solve this problem? regards, Peter ___ 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] lod and txp
HI Robert, no problem. the setLODScale was the help that was needed.. I know and can see that you are very *busy*... i'm actually amazed that you can reply to so many people, work on the scenegraph, update the website... you have full respect from me :) about the snippets.. it's on purpose I only use snippets because I don't help in the form of a complete solution and neither should I waste your time looking at 1 lines of code. I just posted the snippet in the hope that people get a rough idea of what I did and perhaps have had the same problem before. anyway... Robert I appreciate all that you have done. kind regards, Peter On Mon, Jun 23, 2008 at 1:59 PM, Robert Osfield [EMAIL PROTECTED] wrote: Hi Peter, I'm afraid I can only point you in what I think it probably in the right direction, I can't get my head around all your code, especially given tiny snippets of code out of context and I am *busy*. Robert. On Mon, Jun 23, 2008 at 12:54 PM, Peter Wraae Marino [EMAIL PROTECTED] wrote: Hi Robert, it indeed does work but when I try using it on a camera doing RTT it has no effect? basically what I do is: m_rCamTex-GetCamera()-setInheritanceMask( m_rCamTex-GetCamera()-getInheritanceMask() ~osg::CullSettings::LOD_SCALE ); m_rCamTex-GetCamera()-setLODScale( parameters.GetFloat(0) ); note: m_rCamTex-GetCamera() returns an osg::CameraNode* Am I missing something? Peter On Mon, Jun 23, 2008 at 10:10 AM, Robert Osfield [EMAIL PROTECTED] wrote: Hi Peter, What you'll need to do is adjust the viewers Camera's LODScale as you do the zoom i.e. viewer.getCamera()-setLODScale(scale); // scale = 1.0 is default Robert On Mon, Jun 23, 2008 at 8:12 AM, Peter Wraae Marino [EMAIL PROTECTED] wrote: Hi users, In our application we are using txp file format from terravista. We have a problem when zooming with the camera and level of details. Zooming in our application is done by changing the field of view and the problem is that the level of details used by txp is dependent on distance from the camera. we don't seem to have any method to change the behavior of the txp lod, so what I'm asking is.. does anyone know of any other technique we can use to solve this problem? regards, Peter ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Artefacts in transparent objects
add sphereGeode-getOrCreateStateSet()-setMode( GL_CULL_FACE, osg::StateAttribute::ON ); peter On Tue, Jun 17, 2008 at 1:24 PM, Juan Casanueva [EMAIL PROTECTED] wrote: Hi there, I am having some problems with transparent objects. They have some artefacts (slices) depending on the view point. To illustrate the problem, I have done a simple example that draws a transparent red sphere with a box inside it. I have attached screenshots showing the strange slices appearing in the sphere. I must be missing something… any help would be appreaciated. Here is the code: #include osg/Geode #include osg/ShapeDrawable #include osg/Material #include osgViewer/Viewer #include osgViewer/ViewerEventHandlers int main( int argc, char **argv ) { osgViewer::Viewer viewer; viewer.addEventHandler(new osgViewer::StatsHandler); viewer.addEventHandler(new osgViewer::WindowSizeHandler); osg::Group *root = new osg::Group; // transparent sphere osg::Geode *sphereGeode = new osg::Geode; sphereGeode-addDrawable(new osg::ShapeDrawable(new osg::Sphere(osg:: Vec3(0.0f,0.0f,0.0f),40.0f))); osg::StateSet* pStateSet = sphereGeode-getOrCreateStateSet(); pStateSet-setMode(GL_BLEND,osg::StateAttribute::ON); pStateSet-setRenderingHint(osg::StateSet::TRANSPARENT_BIN); osg::Material *pMat = new osg::Material; pMat-setDiffuse(osg::Material::FRONT_AND_BACK, osg::Vec4(1, 0, 0, 0.5)); pMat-setAlpha(osg::Material::FRONT_AND_BACK, 0.5); sphereGeode-getOrCreateStateSet()-setAttributeAndModes(pMat, osg:: StateAttribute::ON); root-addChild(sphereGeode); // box inside sphere osg::Geode *boxGeode = new osg::Geode; boxGeode-addDrawable(new osg::ShapeDrawable(new osg::Box(osg::Vec3(0.0f,0.0f,10.0f),10.0f))); root-addChild(boxGeode); viewer.setSceneData( root ); return viewer.run(); } Thanks 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] Problem loading plugins
Hi Gael, A couple of things.. i can see it's a dll so I'm assuming windows. 1. Have you compiled the plugins? see if they actually do exist. 2. Have you set your environment variables so osg can find the plugins? regards Peter Wraae Marino http://osghelp.com On Fri, Jun 13, 2008 at 11:29 PM, [EMAIL PROTECTED] wrote: Hello, Here is what the DEBUG log says when I try to load a 3DS file: DynamicLibrary::failed loading osgPlugins-2.4.0/osgdb_3ds.dll Warning: Could not find plugin to read objects from file .\minotaur.3ds. It is the same message with the other plugins... Thanks in advance for your any help! Gael ___ 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