Re: [osg-users] Current state of GLES2
On Tue, Apr 24, 2012 at 4:44 AM, Robert Osfield robert.osfi...@gmail.com wrote: However, you can use the OSG with OpenGL 2.0 with a purely shader based state and if you do this the actual shaders you use for OpenGL or OpenGL ES 2.0 will be very similar. This similarity means you can prototype an OpenGL ES application in OpenGL just be using the shaders and avoiding all built in state. I'm fuzzy on the shader stuff. For all my 3d dev, I just jumped into using osg, and whatever I've built has been derived from tutorials/examples given online. With the level of abstraction osg provides, I haven't had to make any OpenGL calls directly, so when you say using the shaders and avoiding all built in state... I don't understand what avoiding all built in state is in an osg context. Does it mean I shouldn't be using osg::StateSet? You can also build the OSG so that it doesn't compile in the fixed function state, something that you do when you want to compile against the core profile of OpenGL 3.x. I'm using http://www.openscenegraph.org/projects/osg/wiki/Community/OpenGL-ES to set the environment up... and since I'd like to develop for OpenGL ES 2, I'll be using Cmake settings for Emulating OpenGL ES 2.0 when you only have standard OpenGL available to build osg to create my app. When it comes time to actually deploy, I'm guessing I'd rebuild osg against Cmake settings for OpenGL ES 2.0? I also downloaded an emulator/sdk for OpenGL ES 2 from PowerVR, and ran a bunch of default examples they provided. Does that factor in at all? They provide libEGL.so and libGLESv2.so libs for linking as well. On Mon, Apr 23, 2012 at 6:19 PM, Chris Hanson xe...@alphapixel.com wrote: Yes, with ShaderGen. What exactly is involved in using ShaderGen? From the osgshadergen example, it looks like all that's done it is attaching it as a node visitor to your scene graph. Does it just automagically go through your scene and convert fixed function pipeline stuff to shader pipeline stuff? Which OS? OSG really only has ES2/EGL windowing interfaces for Xwindows -- Win32 is not implemented. I'm on Linux Sorry for all the questions and thanks for the valuable feedback/support Preet ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Frame Event Button Mask Bug?
HI James, On 24 April 2012 18:31, James Adkison jadki...@ara.com wrote: Just curious if you ever got around to looking at this and if so what your conclusions/thoughts were. I'm afraid I haven't yet had a chance - been tackling the server/website side and now even have the build of a new office space to juggle so won't be able to look at it right away. Please ping me about it though, make sure I don't overlook it once I get back to a more normal working day. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Why no games with OSG?
Hi Michael, On 25 April 2012 04:14, michael kapelko korn...@gmail.com wrote: Seeing games that actually exist I wonder why is Games - Album empty then. Are you referring to a specific link on openscenegraph.org that is empty, or just a general comment that Games and OSG aren't well advertised? If the former could you point to the place where you are looking. Its emptiness gives false impression of abandonment. Our old Trac wiki is a little under loved. OGRE forums has Showcase forum where people advertise their work. I see Announcments here, but it's 99% of job postings. Also, the site posts monthly updates on people work progress which gives good impression of what one can do with OGRE. Why not do the same for OSG? Good suggestion. Our Screenshots is kinda of showcase, but not a great one given that it's not really keeping up to date, rather it's got populated a number of years ago and hasn't been updated much since. With the new Joomla website in the works we can work on making the content easier to use and find information for end users, as well make it easier for the community to contribute to it, and for it to keep track of latest news etc. Feel free to chip in with the discussions on the new site. -- As a general note about Games and OSG vs Ogre, I suspect it's partly down the roots of each project and the culture that grew up around it. OSG grew from the vis-sim world and over the years grew into a general purpose and highly portable scene graph library, with it's community coming form the professional simulator, large scale visualization, VR and scientific markets. Whereas Ogre from the start was graphics API for Games, it too though can be used for more things than games but and culturally games looks to have remained it's heartland. Perhaps one aspect to our project websites that reflects the cultural differences might be the professional non games market tends to not put much effort in advertising results, major projects can roll out ontop of the OSG and no one in the public ever gets to know about it - even though they might see it on TV every day! Whereas in the Game centric communities their is a demo scene sub-culture, great artwork, effects and dynamic game sequences is what gets your work noticed. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Current state of GLES2
Hi Preet, I'm afraid I too busy with other tasks to go into detail discussion about this stuff right now. My personally recommendation would be to take things steadily with learning and experimenting with different elements one at a time. Rather than dive into OpenGL ES 2 right away I would suggest getting to know GLSL and how you the associated shaders, uniforms and programs in the OSG - it's all driven via osg::StateSet as with the fixed function pipeline so the usuge of the OSG stays pretty similar - you just have to replace the fixed function pipeline state with shaders. Examples the osgshader* and osg*shader examples will all be good starting places to learn how the OSG manages working with shaders. Also do a search through the whole OSG to see where osg::Shader/osg::Program and osg::Uniform are used to see other codes us it. When using OpenGL 2.0 + GLSL you can still use built-in uniform state such as gl_ModelViewMatrix etc but once you go fully over to OpenGL 3.x and OpenGL ES 2.0 you'll need to provide uniforms for these yourself, in special cases like gl_ModelViewMatrix the osg::State has support for automatically setting an osg_ModelViewMatrix for you. However with the later work I wouldn't recommend diving in until you are very comfortable with the OpenGL 2.0 + GLSL usage of shaders. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Compile problem on Mac Os Lion
Ok, I fixed it myself and also added the developer version 3.1.1 to homebrew. More information about this on https://github.com/mxcl/homebrew/issues/11391#issuecomment-5328097 On Apr 24, 2012, at 17:44 , Moritz, Dominik wrote: Hello, I am new to Open Scene Graph and have some installing problems. First I tried the 3.0.1 version from homebrew with some custom fixes to make it compile (https://github.com/mxcl/homebrew/issues/11391). However, the osgDB::readNodeFile function got stuck in an infinite loop when loading files. Since the 3.0.1 version is quite outdated on Lion I decided to use the latest version from the repository. So much for the background. I wanted to compile the latest version. 1. Download http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.1.1.zip 2. extract it 3. cmake -D BUILD_OSG_APPLICATIONS:BOOL=OFF \ -D CMAKE_OSX_ARCHITECTURES:STRING=x86_64 \ -D OSG_WINDOWING_SYSTEM:STRING=Cocoa \ -D OSG_DEFAULT_IMAGE_PLUGIN_FOR_OSX:STRING=imageio \ -D OSG_COMPILE_FRAMEWORKS:BOOL=ON \ OSG_COMPILE_FRAMEWORKS \ . And then I get the following error message: -- The C compiler identification is GNU 4.2.1 -- The CXX compiler identification is Clang 3.1.0 -- Checking whether C compiler has -isysroot -- Checking whether C compiler has -isysroot - yes -- Checking whether C compiler supports OSX deployment target flag -- Checking whether C compiler supports OSX deployment target flag - yes -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Looking for include file pthread.h -- Looking for include file pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - found -- Found Threads: TRUE -- Found OpenGL: /System/Library/Frameworks/OpenGL.framework -- Looking for XOpenDisplay in /usr/X11R6/lib/libX11.dylib;/usr/X11R6/lib/libXext.dylib -- Looking for XOpenDisplay in /usr/X11R6/lib/libX11.dylib;/usr/X11R6/lib/libXext.dylib - found -- Looking for gethostbyname -- Looking for gethostbyname - found -- Looking for connect -- Looking for connect - found -- Looking for remove -- Looking for remove - found -- Looking for shmat -- Looking for shmat - found -- Looking for IceConnectionNumber in ICE -- Looking for IceConnectionNumber in ICE - found -- Found X11: /usr/X11R6/lib/libX11.dylib -- Found LibXml2: /usr/lib/libxml2.dylib (found version 2.7.3) -- Found PkgConfig: /usr/local/bin/pkg-config (found version 0.25) -- Found CURL: /usr/lib/libcurl.dylib (found version 7.21.4) -- Found OpenAL: /System/Library/Frameworks/OpenAL.framework -- Found SDL: /usr/local/lib/libSDLmain.a;/usr/local/lib/libSDL.dylib;-framework Cocoa -- Looking for Q_WS_X11 -- Looking for Q_WS_X11 - not found. -- Looking for Q_WS_WIN -- Looking for Q_WS_WIN - not found. -- Looking for Q_WS_QWS -- Looking for Q_WS_QWS - not found. -- Looking for Q_WS_MAC -- Looking for Q_WS_MAC - found -- Looking for QT_MAC_USE_COCOA -- Looking for QT_MAC_USE_COCOA - found -- Found Qt4: /usr/bin/qmake (found version 4.8.1) -- Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS -- Performing Test _OPENTHREADS_ATOMIC_USE_GCC_BUILTINS - Success -- Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS -- Performing Test _OPENTHREADS_ATOMIC_USE_MIPOSPRO_BUILTINS - Failed -- Performing Test _OPENTHREADS_ATOMIC_USE_SUN -- Performing Test _OPENTHREADS_ATOMIC_USE_SUN - Failed -- Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED -- Performing Test _OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED - Failed -- Performing Test _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC -- Performing Test _OPENTHREADS_ATOMIC_USE_BSD_ATOMIC - Success -- Looking for pthread_yield -- Looking for pthread_yield - not found -- Looking for sched_yield -- Looking for sched_yield - found -- Looking for pthread_setconcurrency -- Looking for pthread_setconcurrency - found -- Looking for pthread_getconcurrency -- Looking for pthread_getconcurrency - found -- Looking for pthread_setaffinity_np -- Looking for pthread_setaffinity_np - not found -- Performing Test HAVE_THREE_PARAM_SCHED_SETAFFINITY -- Performing Test HAVE_THREE_PARAM_SCHED_SETAFFINITY - Failed -- Performing Test HAVE_TWO_PARAM_SCHED_SETAFFINITY -- Performing Test HAVE_TWO_PARAM_SCHED_SETAFFINITY - Failed Will compile OpenThreads.framework! The build system is configured to install libraries to /usr/local/lib Your applications may not be able to find your installed libraries unless you: set your LD_LIBRARY_PATH (user specific) or update your ld.so configuration (system wide) CMake Error: The following variables are used in this
Re: [osg-users] Why no games with OSG?
Hi Michael, We are not changing the forum. We are changing our website. The old website is in http://openscenegraph.org and the new one in http://openscenegraph.com. We are in our firsts steps in this change and now we have the chance to redesign all the content in the old wiki. Giving better access to documentation, adding new pictures or video of community members work, etc. Any member of the community can ask for permissions to edit the new web and add new content. You can read the web discussion in the topic Building new website, assistance appreciated! in this list or the forum. Cheers. 2012/4/25 michael kapelko korn...@gmail.com Robert, I'm referring to this: http://forum.openscenegraph.org/album_cat.php?cat_id=8 Good to hear of new forum, because old phpBB gives stone age impression too :) Folks at Ogre simply accept news to be featured on the main page (ogre3d.org) to n...@ogre3d.org and post a digest once a month or two. Commercial or big ones even get their own news item featuring youtube video and such. As for chipping in to the discussion, how do I locate it? Thanks. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Jordi Torres Fabra gvSIG 3D blog http://gvsig3d.blogspot.com Instituto de Automática e Informática Industrial http://www.ai2.upv.es ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Why no games with OSG?
Hi Michael, On 25 April 2012 11:01, michael kapelko korn...@gmail.com wrote: Robert, I'm referring to this: http://forum.openscenegraph.org/album_cat.php?cat_id=8 Thanks for the pointer, I'm not a forum user directly, simply using the osg-users mailing list which gets mirrored on the forum. This means I don't track the contents of the forum, I'd guess that this entry was put up in the hope that it'd get populated, but most of the community probably never new about it... A problem with having information spread too thinly. Good to hear of new forum, because old phpBB gives stone age impression too :) Folks at Ogre simply accept news to be featured on the main page (ogre3d.org) to n...@ogre3d.org and post a digest once a month or two. Commercial or big ones even get their own news item featuring youtube video and such. As Jordi mentions right now we are just looking at the website, not the forum itself which is working fine. If we did change the forum it would have to remain something that one that can mirror the mailing list as some users prefer mailing lists and some prefer forums but by keeping them in sync we can avoid much of the potential bifurcation of the community. As for chipping in to the discussion, how do I locate it? Just post a discussion on the mailing list or forum. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [osgCompute] END_BRACKET
Hi, Trying to build osgCompute... It has built fine every time I have tried, except for now on my new machine My brain just isn't working right now so this is probably an easy fix, but I cant' see it... The error I am getting is: In function ‘bool writeResources(osgDB::OutputStream, const osgCuda::Computation)’: path/to/SOURCES/osgCompute/src/osgCudaSerializer/Computation.cpp:31: error: ‘BEGIN_BRACKET’ is not a member of ‘osgDB’ path/to/SOURCES/osgCompute/src/osgCudaSerializer/Computation.cpp:52: error: ‘END_BRACKET’ is not a member of ‘osgDB’ Thank you! Cheers, Conan -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47288#47288 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] colours in Android OSG
Hi Jorge and thanks for your reply. The file I am loading in the viewers is cell.osg (attached), which on Windows/Linux appears like screen_shot_0_0.jpg In the OSG android viewer example it appears like osgAndroidLightOn.jpg and if I toggle the light with the corresponding button I get osgAndroidLightOff.jpg. no message in LogCat about lights, the only message is about arial.ttf missing. I know I am probably showing how daft I am, but I thought the viewers would have shown the same model in the same way. Thanks Maurizio -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47289#47289 Attachments: http://forum.openscenegraph.org//files/osgandroidlightoff_208.jpg http://forum.openscenegraph.org//files/osgandroidlighton_123.jpg http://forum.openscenegraph.org//files/screen_shot_0_0_185.jpg http://forum.openscenegraph.org//files/cell_100.osg ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Current state of GLES2
I'm fuzzy on the shader stuff. For all my 3d dev, I just jumped into using osg, and whatever I've built has been derived from tutorials/examples given online. With the level of abstraction osg provides, I haven't had to make any OpenGL calls directly, so when you say using the shaders and avoiding all built in state... I don't understand what avoiding all built in state is in an osg context. Does it mean I shouldn't be using osg::StateSet? Pretty much. The state info is used by the OpenGL 1.x Fixed Function Pipeline (FFP) to produce different visual appearances (textures, lighting, etc). GLES 1 has FFP (it's very similar to OpenGL 1.x) but has no GLSL shader features. GLES 2.0 has removed all FFP functionality, and ONLY has GLSL shaders.. The GLES 2 ShaderGen I referred to previously will write a replacement GLSL shader for you, on the fly, to emulate SOME of this FFP capacity. However, if you're targeting GLES 2, you're usually doing so with the intent of using GLSL (otherwise you'd just use GLES 1). So, you'll want to learn to do things with shaders eventually. I'm using http://www.openscenegraph.org/projects/osg/wiki/Community/OpenGL-ES to set the environment up... and since I'd like to develop for OpenGL ES 2, I'll be using Cmake settings for Emulating OpenGL ES 2.0 when you only have standard OpenGL available to build osg to create my app. When it comes time to actually deploy, I'm guessing I'd rebuild osg against Cmake settings for OpenGL ES 2.0? Yes. I assume you're intending to deploy on a non-desktop platform, like Android, iOS or some embedded device? There are complications when you go to omit the GLX or WGL windowing system interface that OSG currently relies on and some platforms don't provide. GLES provides EGL which is a similar design, but currently OSG is not equipped to use EGL solely without GLX or WGL. I also downloaded an emulator/sdk for OpenGL ES 2 from PowerVR, and ran a bunch of default examples they provided. Does that factor in at all? They provide libEGL.so and libGLESv2.so libs for linking as well I have worked with this emulator. It works fine on Windows. I had trouble getting it to work on Linux. What exactly is involved in using ShaderGen? From the osgshadergen example, it looks like all that's done it is attaching it as a node visitor to your scene graph. Does it just automagically go through your scene and convert fixed function pipeline stuff to shader pipeline stuff? Yes. Which OS? OSG really only has ES2/EGL windowing interfaces for Xwindows -- Win32 is not implemented. I'm on Linux Well, if you got the PowerVR emulator working, you're ahead of me. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Training • Consulting • Contracting 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] colours in Android OSG
Hi, Maurizio, It probably comes from the fact that you're using ShapeDrawables for your geometry. ShapeDrawable was never intended for serious work, and as such, probably wasn't high on the list for support when OSG was ported to work with OpenGL ES. If you converted your geometry to use actual osg::Geometry drawables, you might have better luck. --J On 04/25/2012 10:47 AM, Maurizio Lodo wrote: Hi Jorge and thanks for your reply. The file I am loading in the viewers is cell.osg (attached), which on Windows/Linux appears like screen_shot_0_0.jpg In the OSG android viewer example it appears like osgAndroidLightOn.jpg and if I toggle the light with the corresponding button I get osgAndroidLightOff.jpg. no message in LogCat about lights, the only message is about arial.ttf missing. I know I am probably showing how daft I am, but I thought the viewers would have shown the same model in the same way. Thanks Maurizio -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47289#47289 Attachments: http://forum.openscenegraph.org//files/osgandroidlightoff_208.jpg http://forum.openscenegraph.org//files/osgandroidlighton_123.jpg http://forum.openscenegraph.org//files/screen_shot_0_0_185.jpg http://forum.openscenegraph.org//files/cell_100.osg ___ 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] Current state of GLES2
Hiya, Thanks Robert and Chris for your insight and advice. I think I'll try deploying using OpenGL ES 1.1 with what I have for now, and rebuild the OSG stuff using shaders to eventually build with ES 2.0. As Robert mentioned, this way I'll get a decent amount of exposure to GLSL and the new pipeline before getting in way over my head. Well, if you got the PowerVR emulator working, you're ahead of me. I was surprised that it 'just worked'... that usually never happens with Linux. Downloaded it, unzipped it and all the examples ran flawlessly. It's even more surprising considering I have a really old machine with spotty driver support (integrated ATi chipset). If it helps, I'm running Arch Linux with all the latest updates. The SDK I got was the ES 2.0 Emulation for PC (Linux) off this page: http://www.imgtec.com/powervr/insider/sdkdownloads/. Regards, Preet ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] problem with handleMouseRelease using custom camera manipulator
I would guess it has something to do with being repainted. It probably only repaints on mouse movement not clicks. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47294#47294 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Why no games with OSG?
Nice, lunar lander and thrust, :-), ok I am showing my age! I assume that will be available on Iphone/Android? Martin I'm more of an Oids man. I guess I'm showing my age too. So far no plans for iPhone/Android. It's just on Windows and Linux. It would be cool to have it on tablets, but it requires really precision controls which might be big problem. Hopefully I'll get to try it on a tablet someday and find out I don't know what I'm talking about. Terry, that's some very nice looking game! Good luck with that! Our team is currently working on Mahjong: http://opengamestudio.org/lang/en/ogs-mahjong , but we're thinking of a scroll shooter too, once we finish Mahjong :) Nice Mahjong video. The lighting and shadows look really sexy. -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] colours in Android OSG
Thanks Jason, true, I was using ShapeDrawables. However, I was already working on converting the geometries to use osg::Geometry. I have not done the cylinders yet; however I have converted the cubes, and, unfortunately the results are exactly the same. The code used to generate the cube geometry is pretty basic. Here it is: Code: osg::Geometry* CCubicPore::createCubeGeometry( const osg::Vec3 halfLengths, const osg::Vec4 color) { const float xMin( -halfLengths[ 0 ] ); const float xMax( halfLengths[ 0 ] ); const float yMin( -halfLengths[ 1 ] ); const float yMax( halfLengths[ 1 ] ); const float zMin( -halfLengths[ 2 ] ); const float zMax( halfLengths[ 2 ] ); osg::Geometry* cube = new osg::Geometry(); osg::ref_ptr osg::Vec3Array vertices = osg::ref_ptr osg::Vec3Array ( new osg::Vec3Array ); osg::ref_ptr osg::Vec3Array normals = osg::ref_ptr osg::Vec3Array ( new osg::Vec3Array ); osg::ref_ptr osg::Vec4Array colors = osg::ref_ptr osg::Vec4Array ( new osg::Vec4Array ); // front face vertices-push_back( osg::Vec3(xMin,yMin,zMax) ); vertices-push_back( osg::Vec3(xMax,yMin,zMax) ); vertices-push_back( osg::Vec3(xMax,yMax,zMax) ); vertices-push_back( osg::Vec3(xMin,yMax,zMax) ); normals-push_back( osg::Vec3( 0.0, 0.0, -1.0 ) ); // back face vertices-push_back( osg::Vec3(xMax,yMin,zMin) ); vertices-push_back( osg::Vec3(xMin,yMin,zMin) ); vertices-push_back( osg::Vec3(xMin,yMax,zMin) ); vertices-push_back( osg::Vec3(xMax,yMax,zMin) ); normals-push_back( osg::Vec3( 0.0, 0.0, 1.0 ) ); // left vertices-push_back( osg::Vec3(xMin,yMax,zMax) ); vertices-push_back( osg::Vec3(xMin,yMax,zMin) ); vertices-push_back( osg::Vec3(xMin,yMin,zMin) ); vertices-push_back( osg::Vec3(xMin,yMin,zMax) ); normals-push_back( osg::Vec3( -1.0, 0.0, 0.0 ) ); // right vertices-push_back( osg::Vec3(xMax,yMax,zMin) ); vertices-push_back( osg::Vec3(xMax,yMax,zMax) ); vertices-push_back( osg::Vec3(xMax,yMin,zMax) ); vertices-push_back( osg::Vec3(xMax,yMin,zMin) ); normals-push_back( osg::Vec3( 1.0, 0.0, 0.0 ) ); // bottom vertices-push_back( osg::Vec3(xMax,yMin,zMax) ); vertices-push_back( osg::Vec3(xMin,yMin,zMax) ); vertices-push_back( osg::Vec3(xMin,yMin,zMin) ); vertices-push_back( osg::Vec3(xMax,yMin,zMin) ); normals-push_back( osg::Vec3( 0.0, -1.0, 0.0 ) ); // top vertices-push_back( osg::Vec3(xMax,yMax,zMax) ); vertices-push_back( osg::Vec3(xMax,yMax,zMin) ); vertices-push_back( osg::Vec3(xMin,yMax,zMin) ); vertices-push_back( osg::Vec3(xMin,yMax,zMax) ); normals-push_back( osg::Vec3( 0.0, 1.0, 0.0 ) ); cube-addPrimitiveSet( new osg::DrawArrays( osg::PrimitiveSet::QUADS, 0, vertices-size() ) ); cube-setVertexArray( vertices ); cube-setTexCoordArray( 0, vertices ); cube-setNormalArray( normals ); cube-setNormalBinding( osg::Geometry::BIND_PER_PRIMITIVE ); colors-push_back( color ); cube-setColorArray( colors ); cube-setColorBinding( osg::Geometry::BIND_OVERALL ); return cube; } then I use osg::PositionAttitudeTransform to move the cubes to the correct position. Cheers, Maurizio -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47295#47295 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Building new website, assistance appreciated!
Hi all, I have been working a bit in the new osg website (http://openscenegraph.com). I am now creating all content categories and menu items. The amount of information in the old wiki is huge!! :S... If the menu becomes bigger maybe we need to split the main menu in vertical and top menus. I have done a test in my osg fake web (http://webkeux.com/osg) but I am not fully convinced. The vast majority of the articles does not have information yet, but I am filling them step by step. If you see something that I missed or something that could be improved or better categorized say it! :). It's very important to do this before to fill all the contents, it's the way to get the information quick. Cheers. 2012/4/23 Jordi Torres jtorresfa...@gmail.com Hi Robert, The best thing seems to share an account to manage the web folder [1], and then move the web directory to the new account as is explained in the link. Sorry to bother you with more web stuff, but I need superadmin rights in joomla to install the template because I need to access to extension manager and I can't with admin rights :(. Cheers. [1]http://blog.dreamhosters.com/kbase/index.cgi?area=2951 2012/4/23 Robert Osfield robert.osfi...@gmail.com Hi Jordi, On 23 April 2012 09:09, Jordi Torres jtorresfa...@gmail.com wrote: Thank you for your feedback. I will install the template in the new server (http://openscenegraph.com). Robert could you give me an ftp account? I need to tweak some css's and change some images, including the header-banner image with the blue marble layer. I'm still feeling my around server admin with Dreamhost, and haven't yet spotted a specific place to create a ftp account for you. I'm wondering if just creating an account for you with my Dreamhost account would be sufficient/appropriate. Suggestions? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Jordi Torres Fabra gvSIG 3D blog http://gvsig3d.blogspot.com Instituto de Automática e Informática Industrial http://www.ai2.upv.es -- Jordi Torres Fabra gvSIG 3D blog http://gvsig3d.blogspot.com Instituto de Automática e Informática Industrial http://www.ai2.upv.es ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] colours in Android OSG
If you're just using one overall color per drawable, try switching that for an osg::Material with the DIFFUSE color set to the same color. You might have better luck that way. --J On 04/25/2012 01:08 PM, Maurizio Lodo wrote: Thanks Jason, true, I was using ShapeDrawables. However, I was already working on converting the geometries to use osg::Geometry. I have not done the cylinders yet; however I have converted the cubes, and, unfortunately the results are exactly the same. The code used to generate the cube geometry is pretty basic. Here it is: Code: osg::Geometry* CCubicPore::createCubeGeometry( const osg::Vec3 halfLengths, const osg::Vec4 color) { const float xMin( -halfLengths[ 0 ] ); const float xMax( halfLengths[ 0 ] ); const float yMin( -halfLengths[ 1 ] ); const float yMax( halfLengths[ 1 ] ); const float zMin( -halfLengths[ 2 ] ); const float zMax( halfLengths[ 2 ] ); osg::Geometry* cube = new osg::Geometry(); osg::ref_ptr osg::Vec3Array vertices = osg::ref_ptr osg::Vec3Array( new osg::Vec3Array ); osg::ref_ptr osg::Vec3Array normals = osg::ref_ptr osg::Vec3Array( new osg::Vec3Array ); osg::ref_ptr osg::Vec4Array colors = osg::ref_ptr osg::Vec4Array( new osg::Vec4Array ); // front face vertices-push_back( osg::Vec3(xMin,yMin,zMax) ); vertices-push_back( osg::Vec3(xMax,yMin,zMax) ); vertices-push_back( osg::Vec3(xMax,yMax,zMax) ); vertices-push_back( osg::Vec3(xMin,yMax,zMax) ); normals-push_back( osg::Vec3( 0.0, 0.0, -1.0 ) ); // back face vertices-push_back( osg::Vec3(xMax,yMin,zMin) ); vertices-push_back( osg::Vec3(xMin,yMin,zMin) ); vertices-push_back( osg::Vec3(xMin,yMax,zMin) ); vertices-push_back( osg::Vec3(xMax,yMax,zMin) ); normals-push_back( osg::Vec3( 0.0, 0.0, 1.0 ) ); // left vertices-push_back( osg::Vec3(xMin,yMax,zMax) ); vertices-push_back( osg::Vec3(xMin,yMax,zMin) ); vertices-push_back( osg::Vec3(xMin,yMin,zMin) ); vertices-push_back( osg::Vec3(xMin,yMin,zMax) ); normals-push_back( osg::Vec3( -1.0, 0.0, 0.0 ) ); // right vertices-push_back( osg::Vec3(xMax,yMax,zMin) ); vertices-push_back( osg::Vec3(xMax,yMax,zMax) ); vertices-push_back( osg::Vec3(xMax,yMin,zMax) ); vertices-push_back( osg::Vec3(xMax,yMin,zMin) ); normals-push_back( osg::Vec3( 1.0, 0.0, 0.0 ) ); // bottom vertices-push_back( osg::Vec3(xMax,yMin,zMax) ); vertices-push_back( osg::Vec3(xMin,yMin,zMax) ); vertices-push_back( osg::Vec3(xMin,yMin,zMin) ); vertices-push_back( osg::Vec3(xMax,yMin,zMin) ); normals-push_back( osg::Vec3( 0.0, -1.0, 0.0 ) ); // top vertices-push_back( osg::Vec3(xMax,yMax,zMax) ); vertices-push_back( osg::Vec3(xMax,yMax,zMin) ); vertices-push_back( osg::Vec3(xMin,yMax,zMin) ); vertices-push_back( osg::Vec3(xMin,yMax,zMax) ); normals-push_back( osg::Vec3( 0.0, 1.0, 0.0 ) ); cube-addPrimitiveSet( new osg::DrawArrays( osg::PrimitiveSet::QUADS, 0, vertices-size() ) ); cube-setVertexArray( vertices ); cube-setTexCoordArray( 0, vertices ); cube-setNormalArray( normals ); cube-setNormalBinding( osg::Geometry::BIND_PER_PRIMITIVE ); colors-push_back( color ); cube-setColorArray( colors ); cube-setColorBinding( osg::Geometry::BIND_OVERALL ); return cube; } then I use osg::PositionAttitudeTransform to move the cubes to the correct position. Cheers, Maurizio -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47295#47295 ___ 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] osgVolume not working with latest ATI Radeon drivers on Windows
Note that I have a warning when I run osgvolume: OpenSceneGraph-3.0.1-Win64\binosgvolume C:\images\image.jpg Max texture size=8192 Max texture size=8192 (0.431373 0.427451 0.403922 1) (1 1 1 1) C:\images\image.jpg Min value 0.431373 0.427451 0.403922 1 Max value 1 1 1 1 Single image 1 volumes. Locator::computeLocalBounds Warning: RenderBin DepthSortedBin implementation not found, using default RenderBin as a fallback. Can anyone with an ATI card and 5 minutes to spare tell me if they can load an image with osgvolume and the most recent drivers (I am using 8.951.0.0 08/03/2012) ? Note that you will have to drag and rotate the initial view to see the image slice... cheers, guillaume From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Poirier, Guillaume Sent: April-18-12 4:23 PM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] osgVolume not working with latest ATI Radeon drivers on Windows Hello OSG users, osgvolume does not work for me with an ati card and found the following thread in the archives which sounds like the same issue but unfortunately without a solution: http://forum.openscenegraph.org/viewtopic.php?t=8913start=0postdays=0postorder=aschighlight= I am using Windows Vista 64 with a ATI Radeon HD 5800 with the most recent Catalyst driver and get a black screen whenever I load a stack of images in osgvolume. The volume displays fine with a GeForce card. Other people have had similar issues ? cheers, guillaume ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] colours in Android OSG
Unfortunately not. I am not getting this at all. The colour info is there, as you can see if I turn the light off, but as soon as the default headlight is turned on it all goes grey. Oh well thanks for the help anyway. Obviously this is not my thing at all! :) Cheers, Maurizio -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47300#47300 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Character modeling + Cloth simulation + Blender osgExporter
Hi, Thank you (sorry for not having responded to your problem). The choice for FBX was simply a historical choice at a particular moment were the osg exporter was not working correctly for this when I was using a new blender version (if I remember correctly), if i can go directly in osg from blender I will probably go your way. Removing the eyebrow can save you a lot of trouble. Thank you! Cheers, Luc -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47301#47301 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] colours in Android OSG
Hi Maurizio, I think the problem could be that glColorMaterial is not supported in OpenGLES 1.1. When you use ColorArray in a Geometry, I think it uses glColorMaterial to enable lighting using the color of the geometry. If you want to use Colors + Lighting in OpenGL ES 1.1, you need to setup an osg::Material in the StateSet of the Geometry. There is an osgmaterial example that you could use for reference. Cheers, Rafa. El día 25 de abril de 2012 20:57, Maurizio Lodo maurimaur...@msn.com escribió: Unfortunately not. I am not getting this at all. The colour info is there, as you can see if I turn the light off, but as soon as the default headlight is turned on it all goes grey. Oh well thanks for the help anyway. Obviously this is not my thing at all! :) Cheers, Maurizio -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47300#47300 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Rafael Gaitán Linares CTO at Mirage Technologies S.L - http://www.mirage-tech.com gvSIG3D Developer - http://gvsig3d.blogspot.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Strategies for reducing visual terrain-tile-popping with osgTerrain
Hi Robert, Thanks for the quick reply. I'm not sure whether the trade-off would be beneficial, but what if VPB was modified to generate normal maps as the terrain database was generated. This would save run-time normal map computations, but increase the size of the database. And since the normal map requires floating point resolution, I guess one would have to add a normal map field instead of using an image layer for this... Your thoughts? Best regards, John On 04/24/2012 03:08 PM, Robert Osfield wrote: Hi John, Avoiding popping is a challenge for sure. However even with the popping it's a rather nice model BTW :-) Given the lighting changes looked to be the most obvious perhaps directly addressing this by using a normal map texture as well as a colour texture would be appropriate. This would require a custom fragment shader and the creation of the normal map texture when building the database. Another alternative might be to have a custom TerrainTechnique read a high res height field - the same res as the texture map so 256x256 rather than normal default 64x64, then have the TerrainTechnique down sample the data for geometry rendering but also create a normal map automatically from the height field. Another approach would be to read the height field in vertex shader and in the fragment shader use the same height field to compute normals for lighting purpose. One complication in doing the normal computation is that it's a whole earth model so one would need to compute the normals in local coords that fit the overal curvature of the geocentric model. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Strategies for reducing visual terrain-tile-popping with osgTerrain
Hi Glenn, Yes, it definitely sounds like a fairly large implementation task, but a geomorph (as Shayne put it), seems like the most generic fix to the popping issue. Best regards, John On 04/24/2012 12:54 PM, Glenn Waldron wrote: John, osgEarth's LOD Blending function does this for imagery - it references two LOD textures per tile (level n and level n+1) and blends then in the shader based on camera distance. We are (once again) considering implementing something similar for heightfield data in the next version of osgEarth. The idea is that you use the vertex shader to alter a heightfield patch on the GPU using vertex texture lookups. Supply n and n+1 heightfields and morph between them using the shader. But..it's complicated. If you go down the route of creating and/or tessellating terrain on the GPU, you need to consider things like intersection testing and shadowing and other things that (currently) rely on having triangles on the CPU. Glenn Waldron / @glennwaldron On Tue, Apr 24, 2012 at 7:47 AM, John Vidar Larring larr...@weatherone.tv mailto:larr...@weatherone.tv wrote: Hi, Thankfully, there's a lot of people on this list using osgTerrain, which means that hopefully others have pondered about the same issue that we are currently having when rendering high resolution terrain: the visual popping of terrain tiles in the terrain. In the sample videos below, we have tweaked the lighting to make the visual effect more obvious: ftp://ftp.weatherone.tv/projects/popping/popping_dive_sample.mp4 ftp://ftp.weatherone.tv/projects/popping/popping_flight_sample.mp4 Since we normally work with large high resolution terrains, we would like to keep the geodetic-quadtree structure of the pagedLOD database, but we're a bit unsure about how to address the popping issue within this framework. One approach could possibly be to implement some kind of heightfield interpolation between LOD-n and its four children in LOD-n+1 based on camera distance*LOS_scale over a fraction of max/min view distance for the two LOD levels...(?) . What approach / strategy would you suggest? Anyone who have have tried and succeeded/failed and willing to share their experience? A similar discussion for terrain rendering in osgEarth is discussed here: http://forum.osgearth.org/height-mapping-on-GPU-td7432851.html Best regards, John -- This email was Anti Virus checked by Astaro Security Gateway. http://www.astaro.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 ___ 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] colours in Android OSG
On 04/25/2012 03:21 PM, Rafa Gaitan wrote: Hi Maurizio, I think the problem could be that glColorMaterial is not supported in OpenGLES 1.1. When you use ColorArray in a Geometry, I think it uses glColorMaterial to enable lighting using the color of the geometry. If you want to use Colors + Lighting in OpenGL ES 1.1, you need to setup an osg::Material in the StateSet of the Geometry. There is an osgmaterial example that you could use for reference. Yeah, that's what I was trying to say. Thanks for translating for me, Rafa :-) --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Character modeling + Cloth simulation + Blender osgExporter
Hi Luc, Thanks for responding (we are all such busy). But I had time to test a new solution so as to be able to use those clothes from Makehuman directly. I think that this opensource is so amazing by the way ! After reading several posts on the Makehuman forum, I tried another approach which makes the clothing and the underlaying body behave reasonably when posing and all the textures exported in OSG. Steps: 1. Create a dressed model with Makehuman 2. Import into Blender 3. Save all .tif texture files as .png files with Gimp 4. Change all texture with .tif format files as .png files in blend file 5. Unlink the clothes masks in the skin mesh 6. Delete eyebrows and eyelashes meshes 7. While posing the model, clothing and the underlaying body behave reasonably though at extreme points, the clothes are “torn” and must be tinkered so as to hide the underlaying skin (appending and deleting as I proposed before didn’t work for posing). 9. Export to OSG: the dressed and posed model is well exported to OSG See at: http://www.pasteall.org/pic/30790 Some interesting comments grabbed on the MH forum: == The hair bones can be posed just as any other bones in the body. There are both pros and cons with using custom clothes bones. The advantage is that we can achieve poses, like the flying hair, which is impossible to create with the hair bones. However, posing clothes can require a lot of work, especially in animation. In that case it may be advantageous to export the character from MakeHuman with Clothes rig disabled. The clothing will then inherit weights from the underlying body, and automatically behave reasonably. == For joining the clothes to the body, do you delete the mesh associated to the body hidden by the clothes? Another concern is about that (for perfomance). Thank you, Cheers, Maia -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47306#47306 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] colours in Android OSG
Thanks guys, you are helping loads. I will try that tomorrow. What about GLES2? Cheers Maurizio -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47307#47307 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] colours in Android OSG
Gles2 it goes all with shaders so if you don't rely on the default OSG shaders, use your own, set uniforms as you like, etc it's pretty much usable. There are still some glitches here and there that will be checked when i can make a decent configuration to debug in Android. 2012/4/25 Maurizio Lodo maurimaur...@msn.com Thanks guys, you are helping loads. I will try that tomorrow. What about GLES2? Cheers Maurizio -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47307#47307 ___ 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] Building new website, assistance appreciated!
Hi Jordi, The vast majority of the articles does not have information yet, but I am filling them step by step. If you see something that I missed or something that could be improved or better categorized say it! :). It's very important to do this before to fill all the contents, it's the way to get the information quick. I really like the menu at the top. Much better than the old Trac menu at the right side... The top-level items are good IMHO, and apart from adding a few other items in some menus, I think the contents of each menu are good too. Specifically, I would add: * About - Showcase (or some other term) A page that would link to projects done using OSG (whether they're downloadable / open source or not). I would sub-categorize this page in 1) engines / frameworks based on OSG, 2) vis-sim applications / simulators, 3) games. As we've seen in recent threads, I think OSG doesn't have enough visibility and showing successful projects done using OSG would promote it greatly. * Downloads - Tools A page with links to the major exporters (OSGExp for 3DSMax, Maya2OSG for Maya, Cedric's Blender plugin, etc.), modeling tools (OSGEdit, Remograph), etc. that people can use in conjunction with OSG. * Downloads - Data People often come to the list/forum asking where they can find free data. Of course the sample datasets would be listed here. Also some links to the Google sketchup model library (mentioning that they can load .kml using a specific plugin, was it collada?), and other free / open source model libraries would help them on their way. Apart from my own suggestions, I think you should perhaps start a new thread, in order to get more focused comments. Specifically target people who have just started using / learning OSG, or who have just installed it and are in the process of looking over the documentation / examples. Ask them how they found the existing documentation. I think Robert was suggesting a change in the structure of the documentation, don't remember what it was, but I'm pretty sure new users will have good ideas and comments on what works and doesn't work in the current structure. This will prevent you from doing things the same way as on openscenegraph.org, if it's not that effective for new users... Great work so far, keep it up! J-S -- __ Jean-Sebastien Guay jean_...@videotron.ca http://whitestar02.dyndns-web.com/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Building new website, assistance appreciated!
I think the main page should list news vertically and contain both community news (like this: http://www.ogre3d.org/2011/10/03/ogre-news-13 ) and OSG itself news (like this: http://www.ogre3d.org/2011/11/13/ogre-1-8-release-candidate-1-rc1 ). OSG news are posted like it is now, but community ones are posted on a request basis where a man who wants his project be featured on the main page sends request to, say, n...@osg.com so there's no need for admins to track community progress - community will take care of itself. Such main page allows to see how OSG is developing and for people to get noticed. Thanks. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] colours in Android OSG
if I use osg::Material I get no colours and a warning in logcat Warning: detected OpenGL error 'invalid enumerant' at after RenderBin::draw(..) -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=47311#47311 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org