Re: [osg-users] Nvidia RTX
My research tells me that a) hybrid rendering like RTX is the way to go for the next few years if you want real-time performance, and b) Vulkan will have ray-tracing extensions but OpenGL will have none. So once I get time I'd like to dig into VSG or some game engine with Vulkan support. I don't know of any other options besides rolling your own, and I'm not so anxious to do that with Vulkan. Would love to hear other opinions on this. - Terry > On Tue, 19 Feb 2019 at 17:17, Chris Hanson wrote: > > Any of my OSG homies do anything with Nvidia RTX yet? I did a simple search > > and didn't see any overlap between OSG and RTX. > > RTX feature support is on my ROADMAP.md for the VSG ;-) > > It will likely take till early summer before we've completed enough > other VSG features before we can progress on to the RTX features. > > Add RTX features to the OSG should be possible, though I don't have > any plans to do this myself as my work on the VSG is close to full > time till 1.0 goes out. > > Cheers, > Robert. > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Can i use MatrixTransform to transform a HUD node?
> So you mean that if i want to move or scale these hud nodes on the main > screen, i have to use the camera's setviewmatrix method to do this? Add the > hud nodes to a new MT and use the Mt transform methods won't work,right? > > The node structure instruction is like the following: > > 1. Root->hud node->Mt node->geode node->geometries; > > 2. Root->Mt node-> hud node->geode node->geometries; > > So the first one will work and the second won't,right? > I have only done #1, where the HUD node is derived from osg::Camera. I set the view matrix and projection matrix to provide a simple box in which to render all HUD elements. The individual elements can be positioned within that box with MatrixTransforms. It's not very hard to get this working. Try prototyping it with one osgText::Text element and one simple box or sphere under a MatrixTransform. > > I'm afraid I didn't understand this explanation very well myself. My first > question would be, do the HUD elements (the 2d pics) stay stuck to the > screen space (as if they were part of a game scoreboard overlaid onto the > screen) or do the move around the screen as the main view camera rotates, > tilts, moves, etc like an Augment Reality environment? > Chris, I assumed your first idea. AR labels never crossed my mind. Maybe Chen can tell us if I made the right assumption. - Terry ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Can i use MatrixTransform to transform a HUD node?
I have made plenty of HUD classes derived from osg::Camera. It's easy to set it up as an orthographic or perspective projection, depending on what look you're going for. Then I compute some simple coordinates for the screen corners like this: mHUDLRBT[0] = -mAspectRatio; mHUDLRBT[1] = mAspectRatio; mHUDLRBT[2] = -1.0f; mHUDLRBT[3] = 1.0f; if(mAspectRatio < 1.0f){ mHUDLRBT[0] = -1.0f; mHUDLRBT[1] = 1.0f; mHUDLRBT[2] = -1.0f / mAspectRatio; mHUDLRBT[3] = 1.0f / mAspectRatio; } All your HUD nodes (such as osgText::Text or something derived from MatrixTransform) can be positioned relative to those screen corners. Every time you resize your window you should call your HUD nodes positioning method. - Terry > > Message: 5 > Date: Fri, 04 Jan 2019 14:47:01 +0100 > From: "Chen Gao" > To: osg-users@lists.openscenegraph.org > Subject: [osg-users] Can i use MatrixTransform to transform a HUD > node? > Message-ID: <1546609621.m2f.75...@forum.openscenegraph.org> > Content-Type: text/plain; charset=UTF-8 > > Hi,guys > > Well,as the subject notes,The software in my dev job has to use a HUD to > show 2d pics. Generally using a camera to create a new viewport to show the > pic will be OK. > > But the 'Entity' base class for the software system uses a MT > (matrixtransform) to add the detailed entity node(such as basic geometry,text > with a geode) and then add this MT node to the root by the datacontainer > manager class. > > If I create the hud entity class derived from the base class, ie, add the > camera node to the MT node,does it work if I operate the move, scale commands > to this hud entity by using MT,not the camera? If it doesn't work, how can I > change the node structure to make the Hud entity responsive to the transform > operations which is generated by MT.Or do I only have to use the camera node > itself to do these transformation jobs? > > Please do me a favor!Thank you,guys! > :) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Shadow frustum culling
Gedalia, If I understand the original question correctly, you're not seeing shadows that are cast by off-screen objects. I had that exact problem back around 2006 and Robert solved it with the introduction of the View class. Sorry, I don't remember the details beyond that and can't find our old discussion archived anywhere. - Terry > Hi Gadalia, > > The OSG doesn't culling per Camera with each camera's own view frustum used > for culling, this means the shadow camera should only cull things that are > in it's frustum. If it's culling objects that you think should be in the > frustum then perhaps it's just set up with the wrong projection matrix > settings. > > Robert > > On Mon, 29 Oct 2018 at 18:44, Gedalia Pasternak wrote: > > > > > Hi List, > > I've noticed that when using a camera for shadow casting it can often cull > > out objects that are just outside of the frustum but cast shadows into the > > scene. Is there any way to decouple the camera frustum culling calculation > > from the rendering one, even just increasing the culling frustum size by > > 10-15% might help. > > Thanks > > -Gedalia ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] The naming of VulkanSceneGraph
> Just call it VSG! There has already been a Vega Scene Graph available from MultiGen Paradigm for years and years, so I would shy away from VSG or anything abbreviated VSG. After all, there was some confusion with the two OSGs last time around. Is it worth asking if this project will be a scene graph or a rendering engine? The primary job of OSG and other scene graphs tends to be rendering, though the term "scene graph" is more general and can include other scene properties like sounds, behaviors, physics, etc. OSG is much more than just a graph data structure. Maybe "scene engine" is more appropriate. How about Bad Ass Scene Engine? I'm only half joking. Of course, googling for "BASE" is a terrible idea. - Terry ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Please test OpenSceneGraph-3.6 branch in prep for 3.6.1
Confirmed. Splitting the pragma line in half fixes the problem on Intel graphics: #pragma import_defines( BACKDROP_COLOR, SHADOW, OUTLINE) #pragma import_defines( SIGNED_DISTANCE_FIELD, TEXTURE_DIMENSION, GLYPH_DIMENSION) I'm running on Win7 64-bit, Intel HD Graphics 4000, driver version 10.18.10.4885. - Terry On Wed, Apr 25, 2018 at 1:38 PM, Terry Welsh <mogu...@gmail.com> wrote: > Thank you, Dan. That is *exactly* the problem I have with the Intel > graphics driver. This bug affects a driver from September and the new > one I installed last night. I'll test your workaround when I get home > tonight and report on it. > > (My AMD driver, on the other hand, is a complete mess. It crashes on > Furmark and pretty much everything else.) > > Robert, here is a related suggestion: how about renaming text.vert and > text.frag to something unique? Maybe osgtext_text.frag? When I first > tried 3.6.0 all my text was very broken because I already had a > text.vert and text.frag in my application. It took a while to figure > out that they were being loaded by osgText::Text even though I had > disabled them in my own code. > - Terry > >> >> Hi Terry, >> >> Hey I might know this one. Thanks for that additional info about your >> driver. Do you mind retesting with a change? >> >> See references: >> >> - >> https://devtalk.nvidia.com/default/topic/971330/opengl/bug-report-crash-in-glcompileshader-if-using-pragma/ >> - >> https://software.intel.com/en-us/forums/graphics-driver-bug-reporting/topic/623485 >> - https://github.com/gwaldron/osgearth/issues/1017 >> - https://github.com/gwaldron/osgearth/pull/1106 >> - https://github.com/gwaldron/osgearth/pull/1100 >> >> There are some older intel drivers that crash on shaders that include >> pragmas with too many "arguments". The spec says that pragmas should be >> ignored. But testing demonstrates severe problems with several intel >> drivers over a few years' period where lines like: >> >> #pragma import_defines( BACKDROP_COLOR, SHADOW, OUTLINE, >> SIGNED_DISTANCE_FIELD, TEXTURE_DIMENSION, GLYPH_DIMENSION) >> >> ... could cause a failure. Breaking it up into separate lines of no more >> than 2 arguments each works. >> >> We found that the magic number for drivers is 3 -- once you get over 3 >> parameters, it starts to break (depending on driver version). Could you try >> to edit your text.frag file to change: >> >> #pragma import_defines( BACKDROP_COLOR, SHADOW, OUTLINE, >> SIGNED_DISTANCE_FIELD, TEXTURE_DIMENSION, GLYPH_DIMENSION) >> >> To: >> >> #pragma import_defines( BACKDROP_COLOR, SHADOW, OUTLINE) >> #pragma import_defines( SIGNED_DISTANCE_FIELD, TEXTURE_DIMENSION, >> GLYPH_DIMENSION) >> >> This breaks it into 2 lines of 3 params each. If it's the same bug that we >> encountered, this might fixyour problem. >> >> Robert, I haven't reported this because we haven't explicitly ran into this >> same problem with 3.6 and text shaders yet, because we haven't run on those >> drivers. Newer drivers do fix the issue. >> >> - Dan >> ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Please test OpenSceneGraph-3.6 branch in prep for 3.6.1
Thank you, Dan. That is *exactly* the problem I have with the Intel graphics driver. This bug affects a driver from September and the new one I installed last night. I'll test your workaround when I get home tonight and report on it. (My AMD driver, on the other hand, is a complete mess. It crashes on Furmark and pretty much everything else.) Robert, here is a related suggestion: how about renaming text.vert and text.frag to something unique? Maybe osgtext_text.frag? When I first tried 3.6.0 all my text was very broken because I already had a text.vert and text.frag in my application. It took a while to figure out that they were being loaded by osgText::Text even though I had disabled them in my own code. - Terry > > Hi Terry, > > Hey I might know this one. Thanks for that additional info about your > driver. Do you mind retesting with a change? > > See references: > > - > https://devtalk.nvidia.com/default/topic/971330/opengl/bug-report-crash-in-glcompileshader-if-using-pragma/ > - > https://software.intel.com/en-us/forums/graphics-driver-bug-reporting/topic/623485 > - https://github.com/gwaldron/osgearth/issues/1017 > - https://github.com/gwaldron/osgearth/pull/1106 > - https://github.com/gwaldron/osgearth/pull/1100 > > There are some older intel drivers that crash on shaders that include pragmas > with too many "arguments". The spec says that pragmas should be ignored. > But testing demonstrates severe problems with several intel drivers over a > few years' period where lines like: > > #pragma import_defines( BACKDROP_COLOR, SHADOW, OUTLINE, > SIGNED_DISTANCE_FIELD, TEXTURE_DIMENSION, GLYPH_DIMENSION) > > ... could cause a failure. Breaking it up into separate lines of no more > than 2 arguments each works. > > We found that the magic number for drivers is 3 -- once you get over 3 > parameters, it starts to break (depending on driver version). Could you try > to edit your text.frag file to change: > > #pragma import_defines( BACKDROP_COLOR, SHADOW, OUTLINE, > SIGNED_DISTANCE_FIELD, TEXTURE_DIMENSION, GLYPH_DIMENSION) > > To: > > #pragma import_defines( BACKDROP_COLOR, SHADOW, OUTLINE) > #pragma import_defines( SIGNED_DISTANCE_FIELD, TEXTURE_DIMENSION, > GLYPH_DIMENSION) > > This breaks it into 2 lines of 3 params each. If it's the same bug that we > encountered, this might fixyour problem. > > Robert, I haven't reported this because we haven't explicitly ran into this > same problem with 3.6 and text shaders yet, because we haven't run on those > drivers. Newer drivers do fix the issue. > > - Dan > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Please test OpenSceneGraph-3.6 branch in prep for 3.6.1
Looks like I had a graphics driver problem. Originally, I didn't think that was the problem because the computer I'm working on has dual graphics and it was crashing in Intel graphics mode and AMD graphics mode. As it turns out, my dual graphics was broken and running Intel graphics the whole time. Now that's fixed and both drivers are broken, but at least they're broken in different ways :P Sorry for the false alarm. - Terry P.S. Buy NVidia graphics. > > Hi Terry, > > On 23 April 2018 at 16:12, Terry Welsh <mogu...@gmail.com> wrote: >> Using the 3.6.0 tag I have crashes whenever an osgText::Text appears >> on screen in my application. The osgtext example just doesn't show >> anything at all and crashes when I press Esc. No problems with >> osgText::Text3D or anything else so far. These problems occur when >> compiling with Visual Studio Community 2017 on Win7. I have not had >> any problems compiling with MS Build Tools on Win10 or any problems on >> Fedora or Ubuntu. Last night while I was sleeping I compiled a debug >> build of 3.6.0, and I'll try to look at it tonight. Do you think any >> of the bug fixes you already made would affect this? > > You are the first to report a crash with osgText, so what you find > with your debug version of the OSG will be invaluable. > > What graphics hardware are you working with? > > I don't think the fixes I made to the OpenSceneGraph branch will fix > anything related to your crash, but you never know we might get lucky > :-) > > FYI. the new osgText::Text implementation uses shaders to it's work, > in theory it shouldn't do anything radical without checking the > available functionality, but perhaps your driver/hardware aren't > handled well. > >> By the way, the new shaderized Text outlines are very pretty. > > That was key deliverable for this work so it's good to hear that you > are seeing an improvement. > > Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Please test OpenSceneGraph-3.6 branch in prep for 3.6.1
> > Please let me know of success and failures, or any bugs you've seen in > 3.6.0 but haven't reported yet :-) > Robert, Using the 3.6.0 tag I have crashes whenever an osgText::Text appears on screen in my application. The osgtext example just doesn't show anything at all and crashes when I press Esc. No problems with osgText::Text3D or anything else so far. These problems occur when compiling with Visual Studio Community 2017 on Win7. I have not had any problems compiling with MS Build Tools on Win10 or any problems on Fedora or Ubuntu. Last night while I was sleeping I compiled a debug build of 3.6.0, and I'll try to look at it tonight. Do you think any of the bug fixes you already made would affect this? By the way, the new shaderized Text outlines are very pretty. - Terry ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] More lights in scene!
Neat. I did the same thing for a game I wrote, but I used custom shader-based lights instead of OpenGL lights, and I used 4 lights instead of 8. The most interesting takeaway was that applying shaders for 0, 1, 2, 3, or 4 lights (5 different shaders) was very slow due to shader swapping. The fastest combination I found was to only compile shaders for 0 or 4 lights, and if I only needed to apply 1, 2, or 3 lights I could set some of their color uniforms to black. -- Terry Welsh http://www.reallyslick.com > > Hi, > > Check out my solution - no shaders needed: > http://forum.openscenegraph.org/viewtopic.php?t=15339 > > Cheers, > Jannik > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=69123#69123 > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Why isn't OpenSceneGraph used in games?
Hi Michael, After building 1.5 games using OSG, I'm surprised there aren't more. OSG is probably built to be general-purpose first and high-performance second. So this might scare away someone building an extremely high-fidelity game. But for anything less OSG is fine. Also, being free and having an extremely active community counts for a lot in my book. When I meet other devs they're usually surprised (sometimes shocked and amazed) that I'm not using Unity or some other popular game engine. So the main reason OSG isn't popular for games may be that there is a huge swath of younger developers that don't know C++ or are daunted at the idea of building a game with it. >From my first game, nothing about OSG registered as a big performance problem unless you count osgParticle. I wrote my own OpenGL particle systems, partly for better performance but also because I wanted some features not available in osgParticle. The other big performance issues came from shaders (purely a problem with OpenGL and graphics hardware) and computing stuff that was off-screen (purely a game logic problem). Concerning your particular problem of rendering large areas of rural and urban terrain, many of us on this list have done that at high performance with OSG. OSG contains good tools for spatial organization of your data and LOD. If you use all of it and avoid novice mistakes (like putting transparency in your low-LOD models), you can get seriously high performance. Of course, a game engine tuned for that specific type of game should do more for you automatically and lead you toward good decisions. -- Terry Welsh http://www.reallyslick.com > > Message: 9 > Date: Thu, 21 Apr 2016 16:07:12 +0200 > From: "Michael DeForge" <mdefo...@simcreator.com> > To: osg-users@lists.openscenegraph.org > Subject: Re: [osg-users] Why isn't OpenSceneGraph used in games? > Message-ID: <1461247632.m2f.66...@forum.openscenegraph.org> > Content-Type: text/plain; charset=UTF-8 > > Can anyone explain to me why OpenSceneGraph isn't used in the games industry? > There seems to be a large stigma surrounding OSG's performance, but is there > really a problem here or not? OSG's own website claims "high performance". Is > it really? > > I've heard reports that people have had to keep their scene graphs shallow > otherwise the lookups become too expensive. Makes sense, but is that enough > to disqualify it for use in games? > > My problem is that we have to render very large expanses of terrain in urban > and rural environments. Think GTA, but for simulation research purposes, not > entertainment. > > I know OSG is used a lot in the simulation industry but I don't understand > why when there's better tech out there. > > I'm not trying to incite a flame war, I just want a straight honest answer. > We're considering many different frameworks and engines right now and OSG > seems like an iceberg that I'm trying to steer us away from. > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph-3.4.0-rc11 tagged
That fixes my trouble. Thank you. -- Terry Welsh http://www.reallyslick.com Hi Terry, I have just checked and Types was missing from the header list in src/osg/CMakeLists.txt, this should address the install issue. I have checked this fix into svn/trunk and OSG-3.4 branch. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph-3.4.0-rc11 tagged (John Ivar Haugland)
Types is a problem on Linux now too. Trying to compile my program I get: In file included from /home/terry/sdk/include/osg/GLDefines:25:0, from /home/terry/sdk/include/osg/GLExtensions:18, from /home/terry/sdk/include/osg/Shader:25, from /home/terry/sdk/include/osg/StateAttribute:20, from /home/terry/sdk/include/osg/StateSet:18, from /home/terry/sdk/include/osg/Node:19, from /home/terry/source/Asset.h:7, from /home/terry/source/Asset.cpp:1: /home/terry/sdk/include/osg/GL:19:21: fatal error: osg/Types: No such file or directory #include osg/Types It appears make install just isn't installing it. Copying it to my installed include/osg/ directory fixes the problem. -- Terry Welsh http://www.reallyslick.com Message: 14 Date: Sun, 9 Aug 2015 20:54:52 +0200 From: John Ivar Haugland john.haugl...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] OpenSceneGraph-3.4.0-rc11 tagged Message-ID: CAK9p2vo=UDGb2Tb=D3PqGuMENn6aYt9=6WMAeTxtW_HvOrk=_...@mail.gmail.com Content-Type: text/plain; charset=utf-8 Hi, Build with Windows 7, x64 GL2 Visual Studio 2013 Errors: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\stdint.h(8): error C2371: 'int8_t' : redefinition; different basic types 3 D:\appl\OSG\OpenSceneGraph-3.4\include\osg/Types(18) : see declaration of 'int8_t' the stdint.h file has the following line: *typedef signed charint8_t;* while Types has the following conflic line: *typedef __int8 int8_t;* Changing line 17 in D:\appl\OSG\OpenSceneGraph-3.4\include\osg/Types #if defined(_MSC_VER) _MSC_VER *=* 1800 to #if defined(_MSC_VER) _MSC_VER ** 1800 to drop the typedefs for Visual Studio 2013 is a possible fix, however I have not tested this with Visual Studio 2012 or older. Kind regards John Ivar Haugland On Sun, Aug 9, 2015 at 12:37 PM, Robert Osfield robert.osfi...@gmail.com wrote: Hi All, Just when we thought it was safe to tag 3.4.0 a build error gets reported, another found, and another bug spotted and resolved. Time for another RC, this time number 11, Whhooo!!! - Zip file containing source code : OpenSceneGraph-3.4.0-rc10.zip http://trac.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.4.0-rc10.zip - Subversion tag for 3.4.0-rc10 : svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/tags/OpenSceneGraph-3.4. http://svn.openscenegraph.org/osg/OpenSceneGraph/tags/OpenSceneGraph-3.4.0-rc100-rc10 OpenSceneGraph Also now available is the data to go along with 3.4.0: - OpenSceneGraph-Data-3.4.0.zip http://www.openscenegraph.org/downloads/stable_releases/OpenSceneGraph-3.4.0/data/OpenSceneGraph-Data-3.4.0.zip Please, please test, Robert. -- ChangeLog since rc10 2015-08-09 10:16 robert * CMakeLists.txt: Updated RC number to 11. 2015-08-09 10:16 robert * src/osg/GL.in: Changed GLint64 and GLuint64 to use int64_t and uint64_t (pulled in via include/osg/Types) to avoid conflict with Qt5 definitions 2015-08-09 09:40 robert * include/osgViewer/api/X11/PixelBufferX11, src/osgViewer/PixelBufferX11.cpp: Added #idef guards for SGIX usage 2015-08-08 08:49 robert * src/osgPlugins/zip/ZipArchive.cpp: From Glenn Waldron, fix error in ZIP plugin handling of memory buffer ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph-3.4.0-rc10 tagged
Hi Robert, Hope you're feeling better today. Looks like one of the recent changes broke the GLES2 build. Regular OpenGL profile still works fine for me. Afraid I don't have time to work on it today, but maybe I can send in a fix in a few days. Should be an easy one. I'm compiling for GLES2 profile with this configuration: ccmake .. -DOSG_GL1_AVAILABLE=OFF -DOSG_GL2_AVAILABLE=OFF -DOSG_GL3_AVAILABLE=OFF -DOSG_GLES1_AVAILABLE=OFF -DOSG_GLES2_AVAILABLE=ON -DOPENGL_HEADER1=#include GLES2/gl2.h -DOPENGL_HEADER2=#include GLES2/gl2ext.h -DOPENGL_egl_LIBRARY=/usr/lib64/libEGL.so -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF -DOSG_GL_MATRICES_AVAILABLE=OFF -DOSG_GL_VERTEX_FUNCS_AVAILABLE=OFF -DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=OFF -DOSG_GL_FIXED_FUNCTION_AVAILABLE=OFF -DOSG_CPP_EXCEPTIONS_AVAILABLE=ON -DCMAKE_INSTALL_PREFIX=../../.. And I get these errors during comiple: In file included from /home/sdk/src/OpenSceneGraph/src/osgViewer/GraphicsWindowX11.cpp:23:0: /home/terry/sdk/src/OpenSceneGraph/include/osgViewer/api/X11/PixelBufferX11:88:76: error: ‘GLXFBConfig’ has not been declared typedef Pbuffer ( *GLXCreateGLXPbufferSGIX_FuncPtr) (Display *dpy, GLXFBConfig config, unsigned int, unsigned height, int* attrib_list); ^ In file included from /home/terry/sdk/src/OpenSceneGraph/src/osgViewer/GraphicsWindowX11.cpp:23:0: /home/terry/sdk/src/OpenSceneGraph/include/osgViewer/api/X11/PixelBufferX11:91:31: error: expected identifier before ‘*’ token typedef GLXFBConfig ( *GLXGetFBConfigFromVisualSGIX_FuncPtr) (Display *dpy, XVisualInfo *vis); ^ /home/terry/sdk/src/OpenSceneGraph/include/osgViewer/api/X11/PixelBufferX11:91:101: error: ISO C++ forbids declaration of ‘GLXFBConfig’ with no type [-fpermissive] typedef GLXFBConfig ( *GLXGetFBConfigFromVisualSGIX_FuncPtr) (Display *dpy, XVisualInfo *vis); ^ /home/terry/sdk/src/OpenSceneGraph/include/osgViewer/api/X11/PixelBufferX11:91:101: error: ‘GLXFBConfig’ declared as function returning a function /home/terry/sdk/src/OpenSceneGraph/include/osgViewer/api/X11/PixelBufferX11:96:9: error: ‘GLXGetFBConfigFromVisualSGIX_FuncPtr’ does not name a type GLXGetFBConfigFromVisualSGIX_FuncPtr _glXGetFBConfigFromVisualSGIX; ^ make[2]: *** [src/osgViewer/CMakeFiles/osgViewer.dir/GraphicsWindowX11.o] Error 1 make[1]: *** [src/osgViewer/CMakeFiles/osgViewer.dir/all] Error 2 make: *** [all] Error 2 [terry@banzai build_gles2]$ gedit /home/terry/sdk/src/OpenSceneGraph/src/osgViewer/GraphicsWindowX11.cpp /home/terry/sdk/src/OpenSceneGraph/include/osgViewer/api/X11/PixelBufferX11 -- Terry Welsh http://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] OpenSceneGraph-3.4.0-rc6 tagged
Hi Robert, Thanks for tackling the GLint/GLuint problem. I looked into it a couple weeks ago but never discovered check_cxx_source_compiles or any other solution. One small issue: if your checks for GLint and GLuint fail, you get these lines in include/osg/GL #define GL_HEADER_HAS_GLINT64 #define GL_HEADER_HAS_GLUINT64 This causes errors because the code later in that file expects #define GL_HEADER_HAS_GLINT64 0 #define GL_HEADER_HAS_GLUINT64 0 I fixed it by adding the following to CMakeLists.txt @@ -593,6 +593,9 @@ int main() { GLint64 test; return 0; } GL_HEADER_HAS_GLINT64 ) +IF(GL_HEADER_HAS_GLINT64 STREQUAL ) +SET(GL_HEADER_HAS_GLINT64 0) +ENDIF() check_cxx_source_compiles( ${OPENGL_HEADER1} @@ -600,6 +603,9 @@ int main() { GLuint64 test; return 0; } GL_HEADER_HAS_GLUINT64 ) +IF(GL_HEADER_HAS_GLUINT64 STREQUAL ) +SET(GL_HEADER_HAS_GLUINT64 0) +ENDIF() -- Terry Welsh http://www.reallyslick.com Message: 1 Date: Wed, 22 Jul 2015 16:09:09 +0100 From: Robert Osfield robert.osfi...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: [osg-users] OpenSceneGraph-3.4.0-rc6 tagged Message-ID: cafn7y+w1z+wolydngtxsqttzen4cgec3h77n9yqy1bndxvm...@mail.gmail.com Content-Type: text/plain; charset=utf-8 Hi All, I have done some CMake work on handling whether the GL header provides the GLuint64 and GLint64 typedefs which will hopefully help with address some of platform specfic build errors with certain GL/ES headers. - Zip file containing source code : OpenSceneGraph-3.4.0-rc6.zip http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.4.0-rc6.zip - Subversion tag for 3.4.0-rc6 : svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/tags/OpenSceneGraph-3.4. http://svn.openscenegraph.org/osg/OpenSceneGraph/tags/OpenSceneGraph-3.4.0-rc60-rc6 OpenSceneGraph My plan is now to make 3.4.0 tomorrow. Thanks in advance for any testing you can do. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Using pre-built dependencies for Android
Hi, Following the instructions here http://www.openscenegraph.org/index.php/download-section/dependencies I have downloaded the .zip and put the 3rdparty/ directory in my OpenSceneGraph/ directory. The deps are not getting picked up by cmake. I have also tried to set the OSG_3RDPARTY_DIR env variable, even though that does not appear in Android instructions. More specifically, I want to use the libpng.a included in the .zip, but configuring with cmake tells me: PNG_INCLUDE_DIR *PNG_INCLUDE_DIR-NOTFOUND I'm trying to build this on Fedora 19 using this for cmake: ccmake .. -DANDROID_NDK=/home/terry/sdk/android-ndk-r10d -DCMAKE_TOOLCHAIN_FILE=../PlatformSpecifics/Android/android.toolchain.cmake -DOPENGL_PROFILE=GLES2 -DDYNAMIC_OPENTHREADS=OFF -DDYNAMIC_OPENSCENEGRAPH=OFF -DANDROID_NATIVE_API_LEVEL=15 -DANDROID_ABI=armeabi-v7a -DOSG_CPP_EXCEPTIONS_AVAILABLE=ON -DCMAKE_INSTALL_PREFIX=../../.. I have also tried various ANDROID_ABI settings. Has anyone used these deps recently and know how to make this work? -- Terry Welsh http://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] OpenScenGraph-3.4 branch made, OpenSceneGraph-3.4.0-rc1 tagged
Hi Robert, 3.4.0-rc1 builds and works fine for regular OpenGL profile. I get errors compiling for GLES2 related to glClipControl since gl2ext.h does not contain GL_LOWER_LEFT and GL_UPPER_LEFT. Sorry, I don't have a fix for this yet. I'll need to learn how OSG splits apart GL profiles first. Maybe it's easy. I'm compiling for GLES2 on Linux like so: ccmake .. -DOSG_GL1_AVAILABLE=OFF -DOSG_GL2_AVAILABLE=OFF -DOSG_GL3_AVAILABLE=OFF -DOSG_GLES1_AVAILABLE=OFF -DOSG_GLES2_AVAILABLE=ON -DOPENGL_HEADER1=#include GLES2/gl2.h -DOPENGL_egl_LIBRARY=/usr/lib64/libEGL.so -DOSG_GL_DISPLAYLISTS_AVAILABLE=OFF -DOSG_GL_MATRICES_AVAILABLE=OFF -DOSG_GL_VERTEX_FUNCS_AVAILABLE=OFF -DOSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE=OFF -DOSG_GL_FIXED_FUNCTION_AVAILABLE=OFF -DOSG_CPP_EXCEPTIONS_AVAILABLE=OFF -- Terry Welsh http://www.reallyslick.com Message: 6 Date: Fri, 3 Jul 2015 11:29:32 +0100 From: Robert Osfield robert.osfi...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: [osg-users] OpenScenGraph-3.4 branch made, OpenSceneGraph-3.4.0-rc1 tagged Message-ID: CAFN7Y+Wxz1MaoO7HBxD=7zprapscvua0kx7mrcb_sd2040g...@mail.gmail.com Content-Type: text/plain; charset=utf-8 Hi All, Yesterday evening I made the OpenSceneGraph-3.4 branch and tagged the 3.4.0-release candidate 1 from this. - Zip file containing source code : OpenSceneGraph-3.4.0-rc1.zip http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.4.0-rc1.zip - Subversion tag for 3.4.0-rc1 : svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/tags/OpenSceneGraph-3.4. http://svn.openscenegraph.org/osg/OpenSceneGraph/tags/OpenSceneGraph-3.4.0-rc10-rc1 OpenSceneGraph OpenSceneGraph-3.4 has so many new features and refinements that I won't attempt to list them all here, suffice to say it'll be a grand release :-) Could the community start testing the 3.4 branch or 3.4.0-rc1 and provide feedback of success or problems on this thread. I'll be away on holiday for a week so will catch up with you all on my return. Many thanks to all the contributors and testers, Robert ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [GL ES2] Compilation errors on master branch
Hi Robert, I'm no cmake expert, but I think you can do something like that with check_symbol_exists or check_type_size. Is there any reason the typedef needs the same name? Can you just create a unique OSGint64 and OSGuint64 instead? That might be the simplest solution if opengl headers are too inconsistent. I'm using current OSG from svn on Fedora 19 and getting libgles2ext.h from mesa-libGLES-devel-9.2.4-1.20131128.fc19.x86_64. -- Terry Welsh http://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] [GL ES2] Compilation errors on master branch
I have this problem too. Your check for GL_ES_VERSION_2_0 didn't work for me. Instead I comment out that whole block that typedefs GLint64 and GLuint64 and #include GLES2/gl2ext.h. After all, that's the file that already typedefs GLint64 and GLuint64. -- Terry Welsh http://www.reallyslick.com I don't see a solution to this problem. In the meantime, here is what I do: Code: #if !defined(GL_VERSION_3_1) #ifdef _WIN32 typedef __int64 GLint64; typedef unsigned __int64 GLuint64; #else #ifndef GL_ES_VERSION_2_0 typedef long long int GLint64; typedef unsigned long long int GLuint64; #endif #endif #endif It does not make sense because GLint64 and GLuint64 are not always defined when GL_ES_VERSION_2_0 is defined, but at least it works on my machine. I tried to use a mesa version number or something that would indicate its API status but could not find any. Thanks. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Intel graphics poll...
I've been running my last game (medium fidelity OSG with various shaders and FBOs) at 60Hz on Intel 4000 under Fedora 19. Also been prototyping a new one with it. Intel graphics have been much, much better lately starting with their first in-CPU graphics. -- Terry Welsh http://www.reallyslick.com Message: 2 Date: Tue, 12 May 2015 22:43:05 +0200 From: Mattias Helsing helsin...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Intel graphics poll... Message-ID: caopud5dzh7ec2wuzcxet1wywmbpbxbh__-kxk2xm8ojrzfr...@mail.gmail.com Content-Type: text/plain; charset=UTF-8 Thank you all! We borrowed and tested a rugged tablet from our supplier (not pushing anything! but if your interested it is a FIDS YONA tablet) with core i7 and HD4600. I installed vanilla Ubuntu 15.04 64-bit, compiled OSG trunk and our simulator suite and it runs smth :) We are far from the bleeding edge OpenGL wise, but we require two screens, IR simulation and some effects. We still have a lot of testing to do, but so far I'm impressed and quite surprised. So thanks. If this works, our product will be (quite a bit) sexier. cheers Mattias On Fri, Apr 3, 2015 at 1:44 AM, webmaster webmas...@3dvri.com wrote: hi Mattias Helsing, we run openscenegraph smoothly in Intel 740 and S3 savage 3D,years ago. regards zhuwan 04,03,2015 -- ???: Mattias Helsing helsin...@gmail.com : 2015-3-30 22:37:16 ???: OpenSceneGraph Users osg-users@lists.openscenegraph.org ??: ??: [osg-users] Intel graphics poll... Hej all, I just wanted to ask if anybody have tried to run OSG applications on Intel GPU on linux lately. I haven't heard anything about intel in this forum for some time and one of our suppliers is offering a ruggedized computer, but currently it only comes with intel hd4600. I immediately puked a little in my mouth, but then I thought I could at least hear if someone has had any success with intel gpus, OpenGL and linux. Anyone? /Mattias ___ 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] VBO questions
A couple questions about OSG exposing specific VBO features: Looking at the body of DrawElementsUInt::draw(), it appears the size of its base std::vector is directly used for the elements count. I'm doing dynamic geometry and usually want to draw fewer elements. Is there a way to do this with OSG's API? Right now I'm using Geometry::setVertexArray() and Geometry::setNormalArray(), but I'd like to see if I can get better performance from an interleaved array. Is there a way to do this? Perhaps some example code somewhere? -- Terry Welsh http://www.reallyslick.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Retrobooster trailer
If you want to see some artsy OSG work, I got my new trailer done last week. http://youtu.be/z9a2SYQtWcE Terry Welsh http://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] [ANN] 3rdParty Package released for Visual Studio 2013 RTM (v120)
To avoid all this caveats (and because the package contains also executables), I decided to mark it as non-XP. Sounds reasonable. I didn't try your executables in XP, but they should not work. It might still be a good idea to note on the downloads page that the libs still work for XP in case someone needs a newer version of a lib for whatever reason. I have still some customers using XP, but I admit I'm pushing torwards Win 7. In my opinion is Win7 a worthy successor of XP and I try to phase out all the XP support hooks - in particular since it is only supported until April 2014. Win 7 is decent, but I still think Microsoft hasn't made an OS better than XP :P Anyway, I'm making a game which needs to run as many places as possible, and XP still has a third of the desktop OS market share. (Although, people probably don't have many good graphics cards on their old XP machines.) -- Terry Welsh 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] Bit OT: building OSG on Windows 8?
I didn't have trouble building OSG with VS 2013 on Windows 8, but I had already worked on my whole system's file permissions just to get Cygwin to work. There are a lot of instructions online for giving users full access to the C drive, but I can't remember which ones actually fixed my problem. You'll have search a little and try things out. In the end I was only able to give myself full access to C:\terry but not C:. You may have better luck. Now doing all my compiling and other work in C:\terry works fine. -- Terry Welsh 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] [ANN] 3rdParty Package released for Visual Studio 2013 RTM (v120)
Torben, congratulations and thank you. These libs are a big help. After reading your email I'm glad I skipped VS2012. Just to clarify one thing, you can use these new vs120 libs with Windows XP. I just compiled my game and all its dependencies on VS2013 on Windows 8.1. The dependencies are all compiled as-is with Platform Toolset vs120. Only the executable needed to be compiled with vs120_xp. I'm using your libpng, zlib, and freetype, which all get statically compiled into OSG .dlls. This new build runs on my old XP machine. I don't know why only the executable needs to be compiled with vs120_xp. If anyone knows where to read an explanation, I would like to see it. The closest thing I found is this: http://software.intel.com/en-us/articles/linking-applications-using-visual-studio-2012-to-run-on-windows-xp -- Terry Welsh www.reallyslick.com Hello dear OSG-community, Sorry again for my long absence: PhD finished: check Married: check - now it's time to dive into OSG again :) As Visual Studio 2012 's C++ compiler is even after Update 4 quite buggy, I switchted to VS2013 asap, since there are (at least) my annoying VC bugs fixed by MS. Therefore I am pleased to present my precompiled 3rdParty Packages for Visual Studio 2013 :) As always, I compiled the libraries in 32 and 64 bit and used platform toolset v120, the default of VS2013. It is not compatible with Windows XP, please use Windows Vista and above for this package. The precompiled 3rdParty package is provided in 2 flavors again: small and full. The small one contains the (in my opinion) most common dependencies, the full package contains some additional. For a list of content and further details, please visit http://www.osgvisual.org/projects/osgvisual/wiki/Downloads . You can download it at http://www.openscenegraph.org/index.php/download-section/dependencies or directly at http://www.osgvisual.org/projects/osgvisual/wiki/Downloads . Currently only the small package is finished and tested, I hope to provide the full package in the end of November, but who knows.. If you have further questions or bug reports, please contact me. Best regards, Torben ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Cannot resize when rendering to FBO
Thanks Farshid. Camera::setRenderingCache() is the secret sauce. It works perfectly now. I hadn't come across that function yet, so I don't know if I ever would have found it. -- Terry Welsh www.reallyslick.com Hi Terry, I use osg::Camera objects to render FBOs that are the same size as the window. When the window is resized, I clear the rendering cache of the camera and reset the texture size: texture-setTextureSize(w,h); texture-dirtyTextureObject(); camera-setRenderingCache(0); This has worked fine for me for a while now. What version of OSG are you using? Cheers, Farshid ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Cannot resize when rendering to FBO
I render to an FBO texture attachment the same size as my window. But when I expand the window and try to resize the texture to match it, I end up rendering to a rectangle the size of my original window in the lower left corner of the now-larger texture. It seems like a lot of people would have tried this by now. Any advice from someone who is doing it successfully? I have tried this code that has been recommended in a few emails, but no luck. mColorTex-setTextureSize(w, h); mColorTex-dirtyTextureObject(); mColorTex-dirtyTextureParameters(); mCamera-setViewport(x, y, w, h); mCompositeCamera-setViewport(x, y, w, h); mMainSceneView-getRenderStage()-setFrameBufferObject(NULL); mMainSceneView-getRenderStage()-setCameraRequiresSetUp(true); This seems to be the exact same problem as this unanswered email from last year. There have been similar threads from time to time as well. http://lists.openscenegraph.org/htdig.cgi/osg-users-openscenegraph.org/2012-March/057126.html -- Terry Welsh 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] Shadows on invisible objects
This sounds reasonable. If all your objects (including the invisible ones) have the appropriate NodeMask bit set, then they can all be rendered into your shadow map. Then when you render the final scene, you would need a specialized shader for rendering the invisible objects. This shader would only render pixels that are in shadow; you could render just a transparent gray for the shadowed pixels that you keep. -- Terry Welsh www.reallyslick.com Hi, I'm creating a visualization where it is critical for some invisible objects to be able to receive shadows on them. I know this sounds physically impossible, but I hope it is possible on a virtual environment. Is there any way of achieving this in OSG? Perhaps using shaders? Thank you! Cheers, Juan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] virtual file system code
For what it's worth, here's a brain dump of the current virtual file system code in my game. This week I've been trying to finalize this and put some decent comments on it. It lets you specify archives (I've only tested .zip files) in OSG_FILE_PATH just like you would specify directories. I thought it might be useful to anyone trying to do the same. The attachment includes the patch I'm using to add this functionality to OSG 3.2. It also includes an attempt at implementing this functionality with callbacks and no mods to OSG. However, this method has too many ugly little workarounds, so I don't like it very much. I included it because it has some decent notes about the gotchas you'll run into with this method. -- Terry Welsh www.reallyslick.com virtualfilesystem.tar.gz Description: GNU Zip compressed data ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] referenced file path search order inconsistency
Was curious about the way referenced files are searched for. There's this block of code at Registry.cpp line 1002. It appears to use the file path of a parent file to search for referenced files. if (options !options-getDatabasePathList().empty()) { fileFound = findFileInPath(filename, options-getDatabasePathList(), caseSensitivity); if (!fileFound.empty()) return fileFound; if (osgDB::containsCurrentWorkingDirectoryReference(options-getDatabasePathList())) { pathsContainsCurrentWorkingDirectory = true; } } As long as this code block is there, referenced files are not searched for in the order specified in OSG_FILE_PATH. The code block immediately following this one searches all of OSG_FILE_PATH, so if you comment out this code block the order in OSG_FILE_PATH is respected for all files which is more consistent. Is this inconsistency intentional or should this code block be removed? -- Terry Welsh 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] Draw varying number of elements with DrawElementsUByte
Thanks Robert, I found a (maybe temporary) solution with DrawArrays. I already submitted changes to PrimitiveSet to make DrawElements* more flexible about how much they draw. I think it's good functionality to have in any case. If it doesn't interest you I'll try deriving from DrawElementsUShort and see if I can get better performance than my DrawArrays solution. -- Terry Welsh www.reallyslick.com Hi Terry, On 17 July 2013 01:20, Terry Welsh mogu...@gmail.com wrote: I'm updating some old code and getting rid of deprecated Geometry features. With DrawArrays I could change the number of vertices drawn with setCount(). As far as I can tell, there is no equivalent call when using DrawElementsUShort. Am I missing something? Is there a recommended solution for only drawing part of your geometry and not all of it? osg::DrawElement*() doesn't have support for varying the number of it's elements set to OpenGL, it just passes the whole array on. There are three routes you could possible take: 1) Have multiple DrawElements objects that target specific parts of the overall mesh that you want to render and just add/remove these as required. 2) Change the original draw so that it duplicates the vertex data and then just uses DrawArrays as before. 3) Subclass from osg::DrawElementsUShort to override the way it calls OpenGL so that it passes a custom set size rather than the std::vector::size() used in the default implementation. Robert ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Draw varying number of elements with DrawElementsUByte
Hi, I'm updating some old code and getting rid of deprecated Geometry features. With DrawArrays I could change the number of vertices drawn with setCount(). As far as I can tell, there is no equivalent call when using DrawElementsUShort. Am I missing something? Is there a recommended solution for only drawing part of your geometry and not all of it? -- Terry Welsh 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] Questions about OSG
OSG works fine for my game so far: http://www.reallyslick.com/retrobooster/I'm making heavy use of model loading, textures, shaders, nodemasks, render bins, and deriving Drawables. The linear math classes are very useful outside of the scenegraph as well. The only serious rendering task I'm not using OSG for is particles. OSG has osgParticles, but I haven't looked at it for a few years. It might have more of what I require now. I'm also using SDL and SDL_mixer. Together with OSG, these libraries reliably provide most of the heavy lifting of other game engines. -- Terry Welsh www.reallyslick.com Is OSG suited for a game engine? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Can I make a png image's background transparent?
I do not see the attachment. However, the PNG format can store 4-channel images (RGB plus alpha). I make these all the time with Gimp. You'll need to investigate how to create these with whatever image manipulation program you are using. -- Terry Welsh www.reallyslick.com Message: 6 Date: Tue, 12 Mar 2013 14:15:03 +0100 From: Lv Qing donlvq...@msn.com To: osg-users@lists.openscenegraph.org Subject: [osg-users] Can I make a png image's background transparent? Message-ID: 1363094103.m2f.53...@forum.openscenegraph.org Content-Type: text/plain; charset=UTF-8 Hi, ... I have attached one png image to the placenode,however the image has a white background ,is it possible to make the backgound transparent? Thank you! Cheers, Lv ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] anyone have experience with OSG on Intel HD Graphics 4000 hardware?
Hi J-S, Looks like a very cool resource. Have you ever been able to put it to any practical use? I could see this being helpful, but I don't see it removing all of the randomness :) There are always undiscovered bugs lurking here and there. I, too, would love to see driver writers aiming for 100% scores on these tests. -- Terry Welsh www.reallyslick.com Message: 1 Date: Fri, 08 Feb 2013 20:14:09 -0500 From: Jean-S?bastien Guay jean_...@videotron.ca To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] anyone have experience with OSG on Intel HD Graphics 4000 hardware? Message-ID: 5115a2e1.3080...@videotron.ca Content-Type: text/plain; CHARSET=US-ASCII; format=flowed Hi Terry, all, In short, good luck understanding the insane mess that is graphics drivers. It's all very random. It's only random if you try to understand it with a few limited tests :-) Someone has applied structured testing to the problem and has come up with this: http://www.g-truc.net/post-0538.html#menu This is the OpenGL driver status posts, which Christophe Riccio posts every month. He gathers this information using his own very comprehensive OpenGL tests, which cover about every type of functionality you would want to use in a very structured way. So he can say with absolute certainty that a given driver will work with a given usage pattern. (I wish this were used as a base for official Desktop OpenGL conformance tests and that the results of these tests were publicised by Khronos, so that vendors would have a real reason to keep their drivers up to a certain level of quality... But I digress) Then you just have to know your own app enough to know what it's doing at the OpenGL level... Which is often the hard part :-) Tools like gDEBugger (discontinued) or apitrace (active) can help there. The only thing I find a pity is that he doesn't keep an easy to search list of older drivers too. If he did, you could easily see that a given feature worked starting with this version, broke in this one and then was fixed in this one, and you could tell that to your clients, knowing which features are critical to your application. You could even automatically enable and disable features in your app by knowing which driver versions they would work on. But maybe that's going too far... Anyways, it's a useful resource I think. J-S ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] anyone have experience with OSG on Intel HD Graphics 4000 hardware?
Hi Michael, I have my in-development OSG-based game running great on Intel 4000. So the hardware itself is quite cabable and definitely the best graphics part Intel has ever made. It had a horrible framerate at first because of a depth buffer copy that I was doing. Once I removed that, my framerate went up by an order of magnitude. Try removing big pieces of your app or scene one at a time to simplify it until you're left with almost nothing. You might find a bad bottleneck along the way. It could be something as simple as a piece of OpenGL state that your Intel driver doesn't like. If you find a real problem you can always try to submit it to Intel, but they probably won't listen. This driver stuff is really hit or miss. My laptop can switch between Radeon 7730M graphics and Intel 4000. If i use the driver supplied by Dell (which appears to come originally from AMD) that contains both Radeon and Intel drivers, I get a slightly better framerate from the power saving Intel 4000 graphics. There are some subtle visual artifacts using the Radeon but none using the Intel 4000. If I install the Intel 4000 driver from Intel's website, I still get a good framerate but there are horrible visual artifacts on my OpenGL Vertex Array particle systems that disappear after about a minute. In short, good luck understanding the insane mess that is graphics drivers. It's all very random. -- Terry Welsh www.reallyslick.com Message: 15 Date: Tue, 05 Feb 2013 19:20:00 +0100 From: Michael Schanne michael.scha...@gmail.com To: osg-users@lists.openscenegraph.org Subject: [osg-users] anyone have experience with OSG on Intel HD Graphics4000 hardware? Message-ID: 1360088400.m2f.52...@forum.openscenegraph.org Content-Type: text/plain; charset=UTF-8 Hi, Does anyone have experience with using OSG on the Intel HD Graphics 4000 hardware? I am having performance problems in my application with fairly simple scenes. I have several different models which are simple shapes like boxes, tubes, X's, etc. that are duplicated about 40 times each using MatrixTransforms. The bottleneck is in the Draw traversal. With this scene I am seeing a draw time of 55 ms on the HD Graphics, while on another PC with a Radeon X1550 card the draw time is 3.8 ms. I've used OpenGL Extensions Viewer (http://www.realtech-vr.com/glview/) on both machines and according to that the HD Graphics only supports OpenGL 3.0/3.1, with no support for earlier versions. My development PC with the Radeon card supports 1.1-2.1. I'm currently using OSG 3.0.0, with a build that turned on OSG_GL1_AVAILABLE and OSG_GL2_AVAILABLE, but not OSG_GL3_AVAILABLE. Is it possible that using only GL3 would give better performance? One other thing I should mention is that I used gDebugger and their Teapot sample application performs better on the Intel HD Graphics than the Radeon card, which suggests to me that I'm not using the hardware correctly. Using alternate hardware is not an option at this time. ... Thank you! Cheers, Michael ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] VBO as default
Mathias's point that display lists are deprecated are probably the best reason to try to make the switch. If OSG isn't close to a major release, I suggest trying it and seeing if it causes problems. As for big vs. small geometries, I used to see differences as well. Years ago, my rule of thumb was to make geometries with fewer than 200 vertices use display lists and bigger ones use VBOs. I just tested this again this morning on NVidia and Intel graphics and I see no difference anymore. However, I'm using a practical test scenario that runs through a scene in my game with geometries ranging in size from about 20 to 1000 vertices. I'm not doing a contrived test. My test scene is about 10% faster using all VBOs vs. all display lists. -- Terry Welsh www.reallyslick.com Message: 4 Date: Thu, 24 Jan 2013 11:39:34 +0100 From: Mathias Fr?hlich mathias.froehl...@gmx.net To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] VBO as default Message-ID: 2803708.in7vaaGG2y@notebook Content-Type: text/plain; charset=us-ascii Hi, On Thursday, January 24, 2013 10:27:48 Robert Osfield wrote: On 22 January 2013 20:15, Terry Welsh mogu...@gmail.com wrote: I don't think this has been asked in a while. Is it time to switch Drawables to use VBOs instead of Display Lists by default? I *always* switch it manually, except for a couple exceptional situations. I think VBOs are at least as fast as Display Lists and sometimes much faster on modern hardware. Would this cause a lot of trouble? I was hoping that more of the community might chime in here... guess we are all sleeping of the winter holidays :-) I haven't done any recent tests with VBO's vs display lists, but in the last few years I've found that for scenes with large number of small geometries display lists tend to have an advantage, while scenes with a smaller number of larger geometries favour VBO's. The results are driver dependent, as well as how you manage the meshes - so a geometry with lots of small primitive sets would favour display lists while using a single triangle mesh optimized for cache coherency would favour VBO's. I think the best way forward would probably be to default to VBO or perhaps no VBO or display lists, and then use the Optimizer to decide which geometries to change how they are managed, including remeshing if one want to VBO's or just standard vertex arrays to cut down on the GL calling overhead. One might want to add some metrics into the decision of whether to use VBO vs display lists, perhaps even hardware dependent sets of metrics so we get the best performance from different type of hardware. My observation is quite similar. From what I know the display lists in the closed source drivers are done by vbos. From what I read in the sources of the open source ones, this is just the same. So, whatever you do you will end up using vbos technically. Well, there is technically no other way to solve this with current hardware since about everything is really communicated with the chip by buffer objects in some sense. That includes uniforms and what not ... Looking at dlist, I believe that the closed source one even optimizes triangle strips and ploygons by using huger batched draws with primitive restart. Since the driver knows about the chip and that it has the restart available in any case for nvidia, it will do this optimization without asking the user. Whereas if you do that as an application you need to ask for an extension here and prepare for not having primitive restart this in the end. On some hardware/drivers vbos with osg are still slower than dlists. OTOH, dlists are deprecated and if we now start to require this, it's probably a good time. This will also move the attention of some osg users to provide faster geometries as long as we are not exactly close to the point where the legacy contexts really vanish. So, it could be a good in the end to move to vbos as default at some point. ... may be now. No particular emphasis on any argument. Just the thoughts ... Mathias ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] VBO as default
I don't think this has been asked in a while. Is it time to switch Drawables to use VBOs instead of Display Lists by default? I *always* switch it manually, except for a couple exceptional situations. I think VBOs are at least as fast as Display Lists and sometimes much faster on modern hardware. Would this cause a lot of trouble? -- Terry Welsh 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] Retrobooster playable demo
Hi Jan, Thanks for all the tips and the article. I wanted to use an RPM and DEB for this release because I really like the way Linux can resolve dependencies for packaged software. Unfortunately, making packages is hard to get right and there is much room for error. If I was making something open source I'd definitely try to go through distro maintainers. When I get some more time I want to look harder at tools like MojoSetup, Makeself, and Nixstaller. They get a lot of use by other indie game developers. -- Terry Welsh www.reallyslick.com On 12/04/2012 12:59 AM, Terry Welsh wrote: I love developing on Linux, but windowing and packaging seem to be big issues. I supposed it's because of the scattered nature of Linux (many distros with many desktop managers, and packaging systems). Actually, the way to go is to prepare something that can be distributed and then work with the packagers of the distros instead of trying to supply your own installer. They will handle the packaging, integration with various desktop environments within their distro and even distribution for you. The ideal case is when your application is open source - then make sure that the build system is sane (i.e. something similar to the ./configure ./make make install) and you should be set. If you application is not open source, then it is tad more complex. If you are still allowing free redistribution, then the above still applies, but you need to prepare something that is easy to install and actually runs on the target distro - e.g. a statically linked file in a tar.gz file, with all the required data. Make sure to not hardwire any paths, because different distros put things in different places and without source code they couldn't patch your application to integrate well. For example, Adobe Acrobat Reader is/used to be commonly distributed in this way. If you application is purely closed source and not allowing free redistribution, then you are on your own. However, a binary either packaged with all its dependencies or statically linked and stored in a tar.gz file will run on any modern distribution. Targeting recent Fedora or Ubuntu is a safe bet that will probably cover some 80% of the user base, because those distributions are popular and many others are based on them or using same software versions. Don't bother with the various window manager integration - you will always get it wrong for someone (e.g. Mageia has different KDE/Gnome menus than Fedora which has them yet different than SuSE ...). The users are smart enough to make a shortcut in the menu themselves if that is what they want and when you are working with the distro packagers directly, they will take care of it anyway. There is also this, more technical article from 2005, but it applies the same today as it did back then: http://onlamp.com/pub/a/onlamp/2005/03/31/packaging.html Regards, Jan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Retrobooster playable demo
H Ulrich, That was mostly a joke. Mostly :) My current plan is to do an OS X port if the game actually makes enough money on Windows and Linux. I actually gave up on Apple in 1995 because MacOS was so amazingly unstable. So I just don't happen to have any Apple equipment or enough space for any at the moment. - Terry Message: 3 Date: Tue, 04 Dec 2012 13:12:34 +1100 From: Ulrich Hertlein u.hertl...@sandbox.de To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Retrobooster playable demo Message-ID: 50bd5c12.5050...@sandbox.de Content-Type: text/plain; charset=UTF-8 Hi Terry, On 3/12/12 12:30, Terry Welsh wrote: From: Thomas Hogarth thomas.hoga...@gmail.com Really like the dust clouds kicking up as you approach the ground. Glow effect is great too. I'm running windows 7 on a Mac Book via Parallels. Thanks, I spent a long time on the particles and glow. And maybe I won't have to port to OS X after all :) The glow might be a bit Please do consider an OS X port! Since you seem to be using SDL and OSG it might not be that difficult. And the packaging *can* be slightly more straight forward than on Linux :-} Cheers, /ulrich ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Retrobooster playable demo
Great work! It really looks like a game where you need to practice to get better, which I love. Graphically I love your particle effects (the rotation with movement and all), the lighting on weapon impact, the way the ship's thrust effect changes when you take damage, etc. Lots of little things that show your attention to detail. My kids loved to find new and brutal ways to destroy the ship and/or kill the little people. I guess that's one kind of emergent gameplay you might not have planned for... :-) Thanks J-S. Glad you spotted the attention to detail :) Some friends' kids have had the same sort of reaction. I was surprised that 6- to 10-year-olds seem to love this game more than the target audience (slightly patient old-school tunnel-flyer fans). About the multi-screen issues Jan mentioned, I didn't have any problem like that on Windows 7 x64. Looks like SDL's handling of multi-screen setups is inconsistent indeed. Any reason you didn't do your own windowing based on GraphicsWindowWin32 and GraphicsWindowX11? You might have more control that way. Using SDL for sound and input doesn't force you to use it for windowing too... I always prefer to let code so widely tested as SDL or OSG to do as much as possible, windowing included. I love developing on Linux, but windowing and packaging seem to be big issues. I supposed it's because of the scattered nature of Linux (many distros with many desktop managers, and packaging systems). Good luck for the eventual release of the full game! J-S OK, that wasn't really a complaint. I haven't had that issue with your game myself, but it is something commonly overlooked so I wanted to bring it up. Regards, Jan Cool, I didn't take it as a complaint. Sorry if I gave you that impression. I really appreciate all the feedback, good or bad, so please don't hesitate to send more. - Terry ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Retrobooster playable demo
From: Thomas Hogarth thomas.hoga...@gmail.com Really like the dust clouds kicking up as you approach the ground. Glow effect is great too. I'm running windows 7 on a Mac Book via Parallels. Thanks, I spent a long time on the particles and glow. And maybe I won't have to port to OS X after all :) The glow might be a bit expensive. I knew glow artifacts would really be exaggerated by all the black in the backgrounds, so I had to make it very clean and get rid of all the flicker. From: Eric Wing ewmail...@gmail.com Congrats Terry! (Did you make the game harder?) Yes, you were to good at it. Grrr. From: Jan Ciger jan.ci...@gmail.com Thanks for the insight. Press Alt-Enter to switch to windowed mode. That isn't really obvious to find, neither the switch to windowed mode - shouldn't that be in the options somewhere? Yes. Nothing about the game is actually finished, so I'm sure I'll get to that eventually. Regarding the SDL problem - I think the only reliable way to get around this is to *not* use the buggy full screen functionality in SDL. Unfortunately SDL uses xrandr to determine the screen size and that doesn't report that the screen is actually two monitors, but that there is one screen 3840x1200 in size (in my case). I think that has to do with the Nvidia's Twinview - Xinerama interaction. A better solution is to request an undecorated window with the size of the screen (and let user pick the resolution in the settings!) instead and set it to be on top. That pretty much does the same thing as full screen setting. Ryan and Sam of SDL appear to be aware of the xrandr issues (and understand them a lot better than me), so I'm hoping this gets fixed properly with SDL 2.0. I'll keep your solution in mind if things don't improve. Graphics cards have had a lot of fill for a while now, so I am hoping to completely avoid in-game resolution choosing. Retrobooster has a fullscreen glow pass, which worried me about this at first. However, it runs plenty fast on Intel 2500 and 4000 at 1920x1200, so fill will probably only be an issue at 2560x1600 or on multi-monitor setups. Mouse can be always grabbed, that is not a problem. Even though it is quite evil in windowed mode - make sure that there is a key or something to ungrab if you need to pause the game and switch to another window temporarily. That is another common usability issue in Linux game ports. Pressing Esc to pause, also releases the mouse. This seems to work well enough, and I haven't heard any user complaints so far. Hopefully, it will stay that way. - Terry ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Retrobooster playable demo
Hi Jan, Thanks for the insight. Press Alt-Enter to switch to windowed mode. I only have one monitor at home and have not done any multi-monitor testing or planning yet. Also, I figured it was premature to do anything like that since I want to switch to SDL 2.0 eventually. I tried 2.0 about a month ago and fullscreen didn't work at all, so the switch wasn't possible for this release. Ryan Gordon has been busy trying to fix fullscreen on Linux once and for all: https://mail.gnome.org/archives/wm-spec-list/2012-October/msg1.html Another option (if fullscreen remains a mess on Linux) is to start the Linux version in windowed mode. However, this can only work of the game can reliably lock the mouse to the window during gameplay (if it leaves the window and changes focus, you'll crash and die). I have had inconsistent results with this so far. I hear about similar problems on Windows with my old OpenGL screensavers, and I have never heard of a solid catch-all multi-monitor solution on any platform. Seems like it's only ever possible to get consistent behavior with one monitor :( -- Terry Welsh www.reallyslick.com Cool, well done! I have only a little nitpick - on Linux with Twinview the game starts stretched across both screens, making it unplayable (the ship is directly between the two monitors). Please, make sure that one can actually constrain the resolution and/or play in a window, don't rely on SDL setting up a full screen window for you. The problem with Twinview or Xinerama on Linux is a long standing, annoying SDL bug and the only way how to work it around for many games is to disable the second screen - annoying. Regards, Jan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Retrobooster playable demo
A little more blatant self-promotion here. I just released the first playable demo of my OSG-based game. Check it out if you want to see some crazy OSG action. http://www.reallyslick.com/retrobooster/downloads.html -- Terry Welsh 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] object disappears when using VBO
Objects randomly disappearing are usually a culling issue, but it's strange if it only happens when using VBOs. Also, is your graphics driver up to date? I just got a new machine with Radeon graphics, and the Linux driver is kind of a mess with lots of incorrect OpenGL state. -- Terry Welsh www.reallyslick.com Message: 19 Date: Wed, 22 Aug 2012 17:38:27 +0100 From: Robert Osfield robert.osfi...@gmail.com To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] object disappears when using VBO Message-ID: CAFN7Y+Vjs0qz96qEEimgh5bzAk0KF95Lo001NrRioF=27pxe=g...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Hi Tina, On 14 August 2012 21:56, Tina Guo guoyiting1...@gmail.com wrote: I am using VBO on simple models, it works fun. When the model becomes very complex, my object just disappear, and isVertexBufferObjectSupported() returns true in my case. Might you be running out of memory?? Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Metaflight pager code
Attached is the MetaFlight pager code that I wrote a while back. Once people who are interested in it get familiar with it, we can discuss whether or not it should be rolled into OSG. -- Terry Welsh www.reallyslick.com metaflight.tar.gz Description: GNU Zip compressed data ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Metaflight pager code
Hi, Some parties have asked about using the MetaFlight terrain loader/pager I wrote years ago. My employer says that it would be alright to opensource this piece of software. Does anyone have any suggestions for good places online to opensource a project like this? It's likely that this software satisfies too small of a niche to be included anywhere in OSG, but that would be fine by me. For some background, I wrote this software so that I could page in MetaFlight terrain databases without processing them to add PagedLOD nodes. It uses libxml2 to parse a MetaFlight file (.mft) which contains a description of the terrain layout. Then you updated it with one or more eyepoints each frame and it continuously loads and unloads the appropriate tiles. It does not support the entire MetaFlight spec, just common functionality that I use; maybe the opensource community will improve it. -- 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
[osg-users] software engineering job at Moffett Field, CA
Hi all, I'm leaving my job at Moffett Field to work full time on my OSG-based video game. (Ha! I can't believe I just wrote that.) Anyway, they need a replacement. The job is heavy on OSG/OpenGL/Linux programming. Here's the job posting in case anyone is interested in applying: https://jobs.ucsc.edu/applicants/jsp/shared/frameset/Frameset.jsp?time=1336681474922 -- 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] Advice for placing large number of objects on grocery shelves ?
Don't forget to make good use of level-of-detail. Your distant objects can be extremely simple in a case like this. Also, if you have transparency in any of your objects, make sure to remove it from the low-LOD versions so they don't get put in the transparent bin and sorted. -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Hi, We'd like to create several grocery shelves with very large number of objects. I am looking for some advices on how to read and to place these objects with OSG. I found osgEdit but is it still active ? After reading tutorials, I only found how to read few objets and place each object in a node, but how about this kind of application ? What would be the best way to do that ? I found some application developped with Delta3D but the shelves are almost empty and not very attractive in this way. One solution would be to place everything in a modeler and export as a whole but we need to interact (i.e. pick) with some objects on the shelves. Thank you! Cheers, Maia ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Robert Osfield robert.osfi...@gmail.com, Building new website, assistance appreciated!
Hi, I'm using Wordpress for the blog on my own site, and I like it a lot, but I don't think it's the right thing for the OSG website. The OSG site requires a more general content management system, but Wordpress is a CMS very focused on blogging. Also, I have integrated it with the rest of my site, but I have not found a very clean way to do this. Wordpress seems to do better on its own, where it controls your entire website. -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Message: 19 Date: Mon, 30 Apr 2012 15:32:57 +0200 From: Diane Potter di...@springboarddesigns.com To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Robert Osfield robert.osfi...@gmail.com, Building new website, assistance appreciated! Message-ID: 1335792777.m2f.47...@forum.openscenegraph.org Content-Type: text/plain; charset=UTF-8 Hi Jordi, Joomla an Drupal are difficult from the admin side of things. Wordpress on the inside looks like Microsoft Word, it has bold, italics, underlined etc. WP is THE most commonly used software to build websites today and it has a massive community where you can get free apps to make your website do whatever it wants. Checkout wordpress.org and look for a tab called plugins- you'll see. I just built this site using WP: quickhandle.com My site is on WP: springboarddesigns.com I looked at your link, I know there isn't anything being done there that can't be done in WP. I just hate to see you being held hostage to an expensive web designer the rest of the time for every little change you want to make. Most of my clients go in and make small edits themselves because it's easy and saves them money. Google WP tutorials and see for yourself how friendly the inside is. For example, if you want to create a new page for your website its: Pages: Edit or Add New. I mean it's pretty straight forward right? I think some web designers feel if they can use more complicated software they get a longer ROI from a client because the client will NEVER figure out how to use it and I just don't care for that line of thought. Hope this helps. ... Thank you! Cheers, Diane ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] About and gallery menu items in the new website
So if you want to attract people to OSG, you should give them raw tech renderings which prove that this uber cool XYZ technique is easily achieved with OSG. That's more of 'feature' sorting, not application domain sorting. So I would add some Gallery section named OSG features, OSG facilities, Unleash your GPU, What OSG can do or smth like that which could contain possibly screenshots from other sections, but with descriptions that tell what's so cool about that specific picture (HDR, DOF, or other modern technique). I wonder if a list of the example programs, each with an appropriate screenshot, would cover this requirement. - Terry ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Highland fling!
Holy moly. I wore myself out hiking ten miles yesterday, but now I feel sallow and weak by comparison. - Terry Hi all, Quick update: had an AWESOME day out, finished in 10:45. Now very tired and achy, but still on a high. 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?
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] Why no games with OSG?
Well, my game is called Retrobooster, but it isn't finished yet. It's at www.reallyslick.com and it's all for fun; absolutely not for simulation, training, or education of any kind. Yuck! OSG has been a good tool for this so far, but I have little experience with game engines such as Ogre. I can't imagine using plain DirectX or OpenGL. If you want to have any kind of complexity in the rendering, you really need higher-level tools than that. And I recall seeing screenshots for Pirates of the XXI Century, but I don't know if that game was ever finished. Anyone know what happened to it? - Terry ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Retrobooster - OSG-based game
At the risk of sounding like a shameless self-promoter, here's level playthrough video from a hobby project I've been working on. I'd be grateful to hear any critiques or ideas anyone has. Plus, I thought people might get a kick out of seeing a pretty involved OSG project in development. http://www.youtube.com/watch?v=VkVbq4jIr2k -- 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] Retrobooster - OSG-based game
Hi guys, Thanks for the kind words. Unfortunately, the little people cannot extinguish themselves. Life is hard for virtual fodder :( I wrote the particle system ages ago. At the time, osgParticle still had immediate mode code in it and I wanted some very different features and the ability to optimize the heck out of it, so I just did it from scratch. However, Farshid, I am using OSGExp for the models :) -- 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] Retrobooster - OSG-based game
Wow, it's cool to see so many questions. Here are some answers: No current plans for porting to iOS or Android tablets. The CPUs might be able to handle it, but I think I would have to dumb down the graphics pretty bad. But mainly that's another huge project that I don't have time to tackle right now. And I have serious doubts about controlling this game with a touch screen, but that would be an interesting experiment. I'd like to sell it eventually, but I have no idea how long it will take to get to that point. It's got 4-player split-screen multiplayer. So far just coop and deathmatch modes. I ruled out networked multiplayer really early on to keep the scope more reasonable. -- 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
[osg-users] Loading an archived reference from archive root instead of specified directory
Hi Robert, I'm making a separate thread out of this and putting it into osg-users, because it's not a submission and really is a different issue than what I was working on in my virtual file system thread. The specific problem I'm talking about here is easy to test: Make an archive archive.zip Make it contain model.osg and texture.png osgviewer archive.zip/model.osg If model.osg references texture.png, the texture will be loaded. If model.osg references some/crazy/path/to/texture.png, the texture will not be loaded. I think it should be loaded in both cases so that the full full directory structure is not required inside the archive. Do you agree? - Terry Hi Terry, On 11 March 2012 01:58, Terry Welsh mogu...@gmail.com wrote: I think your osgDB::Options idea is mostly working for finding references in the same archive as the parent. ?I find that this works when the reference is just a filename, but it fails if the filename comes with a path, such as the absolute path that an exporter might give you. ?This should probably be fixed regardless of whatever else we do on this subject. This could probably be made to work if a call to getSimpleFileName() was inserted somewhere along the way, but I don't see a good place to put it yet. ?Somewhere in Registry::read()? ?Or in the archive plugin? ?Any suggestions on this one? I've been working on various other topics over the last month so will need to spend some time getting back familiar with it again. I think the best thing to do would be to create a series of test models and usages that flesh out what we want to achieve. The osgarchive example could possibly be extended to have a unit test section, and we could add some simple archive models to OpenSceneGraph-Data. Could you make some suggestions about some simple example data and usages that we can put together to test the specific issues you are seeing. Thanks, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Is the ZIP plugin thread-safe?
Is the problem in the public domain Zip Utils code? I would only suggest looking for a more current version. I bet the code in OSG is pretty dated by now, and maybe someone has addressed this. -- 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] Missing parts of 3rdParty_VC10_x86_x64.zip
Hi Brad, Thank you for the binaries. Now that I have things figured out a little better, I don't see anything additions or changes that need to be made. Everything compiles and runs fine, and, as a bonus, I was able to leave a couple DLLs out of my installer when building with VS2010. -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Message: 4 Date: Wed, 15 Feb 2012 16:23:24 +1100 From: Christiansen, Brad brad.christian...@thalesgroup.com.au To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Missing parts of 3rdParty_VC10_x86_x64.zip Message-ID: 26898_1329283407_4f3b414f_26898_1481_1_ec2d32308f4ea3813fd3d3a3a5d42d37fdc...@gisvwe-ex02.area04.grp Content-Type: text/plain; charset=iso-8859-1 Hi, I was the creator of the 3rd party dependancies package you downloaded (I should add that info to the wiki). When I started using VS2010 with OSG no binaries where available for the 3rd party libraries so I had to build them all myself. After doing so I made them available for others to ease the transition for others. The build is based on the VS9 binaries provided by OSG Visual. They havent been updated for some time as I have had no need to do so. If you send me any new binaries / changes I will happily include them. Cheers, Brad ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Missing parts of 3rdParty_VC10_x86_x64.zip
Well, we can chalk this up to my inexperience with Cmake in Windows. Looks like I needed to point it at 3rdParty\x86 instead of just 3rdParty. Also, the libs I need are in there, but some of them appear to be static libraries now instead of .dlls so I was just looking in the wrong place. Chris, thanks for the link. It looks like you still have a libpng13.dll and zlib1.dll while the other 3rdParty binaries download does not. I don't know that one is better than the other for my purposes right now. Now everything is compiled. Too bad my game is only running at 0.1Hz. I really miss Linux. -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com On Fri, Feb 10, 2012 at 9:17 PM, Terry Welsh mogu...@gmail.com wrote: Hi, I just upgraded to Visual Studio 10 Express. After compiling I found I was missing plugins for freetype, png, and zip. I believe these projects didn't get built because I'm missing the necessary .lib and .dll files in the 3rdParty binaries. They are there for x64 but not x86. The 3rdParty binaries for VS9 contained these and they were very helpful. So is there a known better way to deal with freetype, png, and zlib nowadays, or are they just missing? And if they're just missing, who maintains those downloads and do you want me to try to compile them and contribute them? -- 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
[osg-users] Missing parts of 3rdParty_VC10_x86_x64.zip
Hi, I just upgraded to Visual Studio 10 Express. After compiling I found I was missing plugins for freetype, png, and zip. I believe these projects didn't get built because I'm missing the necessary .lib and .dll files in the 3rdParty binaries. They are there for x64 but not x86. The 3rdParty binaries for VS9 contained these and they were very helpful. So is there a known better way to deal with freetype, png, and zlib nowadays, or are they just missing? And if they're just missing, who maintains those downloads and do you want me to try to compile them and contribute them? -- 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] Separate rendering of renderbins
Hi Sebastian, I wanted to do this too. Specifically, I wanted to cull once based on the view frustum, then use nodemasks to render regular geometry to one buffer and render everything that glows to a glow texture. Unfortunately, I never figured out a way to do this. I don't think it's possible with OSG so I am doing all the culling twice. I hope someone can tell us otherwise. I still have not gotten around to trying to use multiple render targets and shaders to direct different information to each one, but this might be an option. -- 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] Search for plugins in . first
Sorry about the incorrect subject line before. I hate it when I do that :( But I'm not talking about that usage. I'm talking to set it just for your application. I have seen many commercial applications doing that ?a launcher script that sets LD_LIBRARY_PATH *in that shell* and then executes the process, so it uses the dynamic objects bundled with the application instead of system ones. -- Alberto That's a good point; that's probably a safe way to use it. I tried setting LD_LIBRARY_PATH=. and it makes it so ./osgPlugins-version is searched but not . I haven't figured out why yet, but it must be some detail inside of OSG. However, I'm still leaning toward solving this problem with internal OSG functionality if possible since I want this app to be cross-platform and Windows does not have a direct equivalent to LD_LIBRARY_PATH. I'd rather use OSG behavior that is guaranteed to be consistent across platforms. Something like the FindFileCallback found in include/osgDB/Callbacks? You can assign a FindFileCallback to osgDB::Options or the Registry. I just tried this out and I think it gives me full flexibility. It looks like I can search however I want now and still keep using OSG_LIBRARY_PATH. I should have remembered this since I was experimenting with the findDataFile half of the callback a few months ago. Thank you both for the help. - Terry ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg-users Digest, Vol 55, Issue 12
What about using LD_LIBRARY_PATH? -- Alberto I honestly don't know if this would work, but I'm trying to figure out how to package stuff at the quality of commercial release, so I prefer to avoid LD_LIBRARY_PATH. LD_LIBRARY_PATH is fine for development and debugging, but it's generally considered very bad for use in any software distribution. Just google for LD_LIBRARY_PATH evil or something similar. Hi Terry, ./osgPlugins-3.1.0 /usr/local/lib/osgPlugins-3.1.0 ./ /usr/local/lib/ Is that the checking of the all files paths first with the /osgPlugins-version appended that is causing the problem? If this wasn't appended then ./ would have been checked first. The /osgPlugins-version is appended for plugins to avoid versioning problems. Could you just place your plugins in the osgPlugins-version directory? Robert. There are a number of problems here. One of them is that all the paths are first checked with osgPlugins-version appended. This prevents me from using setLibraryFilePathList(.:/usr/lib:/usr/local/lib); In this case, /usr/local/lib/osgPlugins-version will actually be checked before . You are right that the workaround for this is to put my plugins in ./osgPlugins-version, but I would rather just keep them in . As far as I can see, the only way to keep them in . is to use setLibraryFilePathList(.); Unfortunately, any use of setLibraryFilePathList() also makes it so that OSG_LIBRARY_PATH has no effect anymore, which makes my program considerably less flexible. Ideally, I would like to have total control over the paths to search just using environment variables, but I don't see a way to do this. Are there any ways to control the plugin search paths other than with setLibraryFilePathList() and OSG_LIBRARY_PATH? Would it be alright to modify or amend the way OSG searches plugin paths? Maybe we can come up with something more flexible. - Terry ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Search for plugins in . first
Could you get the OSG_LIBRARY_PATH env variable and append it to . and then set Registry::instance()-setLibraryFilePathList( wholeLibraryPath ); ? Doug I think I tried the equivalent to that. I may have worded my original question poorly. As far as I know, OSG_LIBRARY_PATH starts out empty, so there is nothing to get. If you set it to . then the . will be appended to /usr/lib/:/usr/lib64/:/usr/local/lib/:/usr/local/lib64/ and you will end up with /usr/lib/:/usr/lib64/:/usr/local/lib/:/usr/local/lib64/:. I really want my app to only search in . by default, but I would like to keep the ability to modify that search using OSG_LIBRARY_PATH. I don't see a way to do this yet because calling setLibraryFilePathList() renders OSG_LIBRARY_PATH ineffective. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Search for plugins in . first
I want to search for plugins in . first. My first attempt was to set OSG_LIBRARY_PATH=. Unfortunately, OSG_LIBRARY_PATH just appends the standard search paths: /usr/lib/:/usr/lib64/:/usr/local/lib/:/usr/local/lib64/ Next I tried setting it in code with Registry::instance()-setLibraryFilePathList(./:/usr/local/lib/); This almost works except that my search order becomes: ./osgPlugins-3.1.0 /usr/local/lib/osgPlugins-3.1.0 ./ /usr/local/lib/ This means that the library from the standard directory gets called first. So I tried Registry::instance()-setLibraryFilePathList(./); And this works. However, when you set your library file path list in the code this way, OSG_LIBRARY_PATH no longer has any effect. So I have made my program look where I want for plugins, but I lose all flexibility to experiment with OSG_LIBRARY_PATH. Is there any way to do both, search first in . and still have the flexibility of using OSG_LIBRARY_PATH? -- 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] flagging shaders with errors
Hi Joel, I'm not sure this is useful to you, but here it is anyway. When I load shaders in my game I check to see if the computer I'm running on can handle them with code like this: Progam* program = new Program; load vertex and fragment shaders here program-compileGLObjects(state); const int context = state-getContextID(); if(!(program-getPCP(context)-isLinked())) return false; Can you use this to detect your own shaders that don't work? -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Message: 6 Date: Sat, 22 Oct 2011 13:23:14 +0200 From: Joel Graff pair_o_gra...@comcast.net To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] flagging shaders with errors Message-ID: 1319282594.m2f.43...@forum.openscenegraph.org Content-Type: text/plain; charset=UTF-8 Robert, It would appear I've not taken the time to really explain what I'm doing... My apologies. :) I am presently building a shader development environment using OSG. Since RenderMonkey can't really handle GLSL 140+ and the other options out there are limited so far as GLSL is concerned, I decided I may as well write my own shader dev tool. After hunting around for an API that I could use to manage the 3D for me (I hadn't touched OpenGL since college and that was around version 1.2), I settled on OSG. So far, it's been a really good experience, though I suppose my posts to this forum may not have reflected that... Anyway, since the software I'm writing would lie at the heart of the shader development process, there's an expectation that I'll be loading *lots* of shaders with errors. :). In the end, I'm working toward a hotloading solution, but having a callback checking the shader error logs and flagging them for removal has proven a pretty useful mechanism thus far. Regarding the techniques you've proposed, I imagine I've missed something obvious, but I don't see how to get at the scene graph from a draw callback (or a realize callback, for that matter). That is, what you're proposing makes sense. Actually, that's what I was trying to do (I think). My problem is I couldn't figure out how to run my node visitor when I couldn't get a reference to the scene graph's root node from inside the draw callback - not without explicitly passing a reference when I construct the callback. That's the thing I want to avoid, if possible. Thanks, Joel ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] tight integration of virtual file system
Hi Robert, This discussion is pretty messy still, as I don't have nearly enough time to work on this project. I would still like to hear your thoughts on the licensing question from my previous email if you get a chance. I need to take a closer look at osgDB::Archive; maybe Jason's zipfs plugin could be simplified if it derived from Archive instead of ReaderWriter. I looked at osgPlugins/zip a while ago, which derives from osgDB::Archive. It seems to be able to load a model like so: osgviewer model.zip where model.zip contains for example model.flt and texture.jpg But it fails if I try something like this: osgviewer model.zip/model.flt I haven't found any solid documentation on the zip osgplugin, so I am concluding that a zip file is allowed to contain just one model. Maybe I'm wrong about that. Also, it seems that textures or any external resource must be in the exact relative path that appears in the model files, which is not a requirement when you are using OSG_FILE_PATH to find resources. What I've been doing is generalizing OSG's file loading by overriding the path searching functionality to treat .zip files as directories. This gives a few benefits that make it feel more like a real virtual file system: 1. Models can load their external references from multiple .zip files. 2. Relative paths inside of .zip files don't matter anymore. 3. osgDB's file finding routines can now be used to search for any file in an osgDB::FilePathList. I can even search for level files or sound files that will not be used by OSG. Jason's zipfs plugin already loads files when specified with a .zip file as part of the path, so that was really helpful. The only thing I had to fix was that it couldn't load shaders. I don't think OSG has any of those benefits I listed. If they're hiding somewhere I must have missed them. I'll keep trying to think of some concrete way to integrate this stuff into OSG (without being too invasive). So far it's pretty messy with my function overrides. -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Hi Terry, I haven't dived into this discussion as I have plenty of other tasks occupying my brain and time right now. I would like to add that I'm open to suggestion of additions to osgDB so if you have something concrete then feel to post it to osg-submissions for me review. I would also add that osgDB::Archive had some additions to better support usage with the zip plugin, these are rolled into the OpenSceneGraph-3.0.x release so perhaps this might have an influence over your work. Cheers, Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] tight integration of virtual file system
Attached is my modified ReaderWriterZipFS.cpp. It currently only has small changes to make it use osgDB::findFileInPath(). However, these changes probably aren't helpful unless you override findFileInPath so that it can search inside .zip files, like so: // Override osgDB::findFileInPath so that it can search inside of zip files as well as regular directories. string osgDB::findFileInPath(const string filename, const FilePathList filepath, CaseSensitivity caseSensitivity){ if (filename.empty()) return filename; if (!isFileNameNativeStyle(filename)) return findFileInPath(convertFileNameToNativeStyle(filename), filepath, caseSensitivity); for(FilePathList::const_iterator itr=filepath.begin(); itr!=filepath.end(); ++itr){ OSG_DEBUG itr=' *itr '\n; string path = itr-empty() ? filename : concatPaths(*itr, filename); path = getRealPath(path); OSG_DEBUG findFileInPath() : trying path ...\n; if(fileExists(path)){ OSG_DEBUG findFileInPath() : USING path \n; return path; } #ifndef WIN32 // windows already case insensitive so no need to retry.. else if (caseSensitivity==CASE_INSENSITIVE){ string foundfile = findFileInDirectory(filename,*itr,CASE_INSENSITIVE); if (!foundfile.empty()) return foundfile; } #endif string::size_type pos(path.find(.zip)); if(pos != string::npos){ string zip_filename(path, 0, pos + 4); if(fileExists(zip_filename)){ // Open the zip file struct zip* zf = zip_open(zip_filename.c_str(), 0, NULL); if(zf){ // find index to file in zip string filename_in_zip(path, pos + 4); stripPrecedingSlashes(filename_in_zip); int location = zip_name_locate(zf, filename_in_zip.c_str(), 0); zip_close(zf); if(location = 0){ OSG_DEBUG findFileInPath() : USING path \n; return path; } } } } } return string(); } A side concern here is that half of my new findFileInPath is code copied straight from OSG. But I can't include copied code in my commercial app. To use this function legally do I need to package this inside its own library, license that library under OSG's license, and release the library's source? I fixed the shader loading problem by overriding Shader::loadShaderSourceFromFile(). This is necessary because this function does the actual opening of the shader file. So I replaced the guts with my game's new file loading utilities. This one is so totally rewritten that it doesn't give me the same licensing worries as findFileInPath. Would love to see some of this functionality get into OSG. Or at least have the hooks necessary so that these messy function overrides are not necessary. But I haven't yet come up with a way to modify OSG to make this possible. Any suggestions? I still haven't tried converting everything to zlib in order to remove the libzip dependency. I'll get to that one of these days. Currently I'm trying to use this infrastructure to load my .wav and .ogg files, but that's not an OSG problem. -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Message: 25 Date: Tue, 6 Sep 2011 11:17:01 -0400 From: Jason Beverage jasonbever...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] tight integration of virtual file system Message-ID: CAMcxSMt=gtyqugofedwsy8y16gavoijqwm_rbewg52+hkjm...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Hi Terry, On Sun, Sep 4, 2011 at 9:29 PM, Terry Welsh mogu...@gmail.com wrote: Excellent ZipFS plugin Jason. ?Thank you for the help. ?I think that was the hardest part of the problem. ?I finally got around to working on this more and I have the other half of the problem mostly solved. Thanks, glad it worked for you. We don't use it anymore for osgEarth but I think in general it's pretty useful. It looks like OSG uses zlib for all its compression/decompression. Just out of curiosity, how did you pick libzip instead? ?Or did you not write ZipFS? I did write the ZipFS plugin, we chose libzip over just using zlib b/c it had easy access to dealing with zip archives. If zlib itself has something
Re: [osg-users] osg-users Digest, Vol 51, Issue 6
Okay, I'm sure I'll have something to submit. Just don't expect it anytime soon. I've got a vacation coming up :) and I want to consider switching to zlib (just to save my game an extra dependency) and figure out a fix for the shaders not loadingand fix whatever other problems I come across... -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Message: 25 Date: Tue, 6 Sep 2011 11:17:01 -0400 From: Jason Beverage jasonbever...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] tight integration of virtual file system Message-ID: CAMcxSMt=gtyqugofedwsy8y16gavoijqwm_rbewg52+hkjm...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Hi Terry, On Sun, Sep 4, 2011 at 9:29 PM, Terry Welsh mogu...@gmail.com wrote: Excellent ZipFS plugin Jason. ?Thank you for the help. ?I think that was the hardest part of the problem. ?I finally got around to working on this more and I have the other half of the problem mostly solved. Thanks, glad it worked for you. We don't use it anymore for osgEarth but I think in general it's pretty useful. It looks like OSG uses zlib for all its compression/decompression. Just out of curiosity, how did you pick libzip instead? ?Or did you not write ZipFS? I did write the ZipFS plugin, we chose libzip over just using zlib b/c it had easy access to dealing with zip archives. If zlib itself has something in there that we can use instead of having another dependency that would be great but I didn't really look that hard since libzip worked so well. If you have a submission for the osgEarth that you need integrated just send along the whole modified file or do a pull request on github and I'll take a look at it. Jason To recap, I'm trying to set an OSG_FILE_PATH such as mydirectory/data.zip and load files out of the specified archive. ?At first I discovered the Registry class's FindFileCallback. ?I thought I could just make one of those and have it search inside of zip files. However, the work that I really needed to replace happened when the default Registry::findDataFileImplementation would call osgDB::findFileInPath in FileUtils. ?So I decided to override findFileInPath so that would look for paths containing .zip and try to locate the desired file inside the zip file. That almost worked. ?I also had to modify ReaderWriterZipFS::readFile so that it uses OSG's directory searching. ?At the beginning of the function I added std::string filenameWithPath = osgDB::Registry::instance()-findDataFile(fullFileName, options, CASE_SENSITIVE); and then I use filenameWithPath instead of fullFileName where appropriate. So now I can load almost all my game resources from one .zip file instead of a directory full of files. ?I haven't tested performance yet, but there's no noticeable change. ?.osg files load with all their textures. Here's the catch: .osg files don't get loaded with their shaders. ?I believe this is because shaders don't use the standard OSG plugin loading paradigm. ?Instead they simply use Shader::loadShaderSourceFromFile(). ?I haven't put any thought into this last detail yet (I hope it's not too messy), but I need a programming break -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Message: 9 Date: Fri, 5 Aug 2011 08:50:10 -0400 From: Jason Beverage jasonbever...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] tight integration of virtual file system Message-ID: ? ? ? ?camcxsmsly2m20aoa5z7tubjob1xyrqqkmnz9z9lslzmmkqu...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Hi Terry, osgEarth has a generic zip based plugin called ZipFS that is implemented as an osgDB plugin and isn't dependent on osgEarth. ?We originally developed it to support using a zip file of imagery tiles for a cache. It allows you to load files like: osgDB::readNodeFile(c:/data/models.zip/cow.osg); I haven't used it for quite awhile but last I checked it was working just fine. ?You can get the osgearth source code from github at https://github.com/gwaldron/osgearth If anything it could be a start to what you're looking for. Thanks, Jason ___ 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] tight integration of virtual file system
Excellent ZipFS plugin Jason. Thank you for the help. I think that was the hardest part of the problem. I finally got around to working on this more and I have the other half of the problem mostly solved. It looks like OSG uses zlib for all its compression/decompression. Just out of curiosity, how did you pick libzip instead? Or did you not write ZipFS? To recap, I'm trying to set an OSG_FILE_PATH such as mydirectory/data.zip and load files out of the specified archive. At first I discovered the Registry class's FindFileCallback. I thought I could just make one of those and have it search inside of zip files. However, the work that I really needed to replace happened when the default Registry::findDataFileImplementation would call osgDB::findFileInPath in FileUtils. So I decided to override findFileInPath so that would look for paths containing .zip and try to locate the desired file inside the zip file. That almost worked. I also had to modify ReaderWriterZipFS::readFile so that it uses OSG's directory searching. At the beginning of the function I added std::string filenameWithPath = osgDB::Registry::instance()-findDataFile(fullFileName, options, CASE_SENSITIVE); and then I use filenameWithPath instead of fullFileName where appropriate. So now I can load almost all my game resources from one .zip file instead of a directory full of files. I haven't tested performance yet, but there's no noticeable change. .osg files load with all their textures. Here's the catch: .osg files don't get loaded with their shaders. I believe this is because shaders don't use the standard OSG plugin loading paradigm. Instead they simply use Shader::loadShaderSourceFromFile(). I haven't put any thought into this last detail yet (I hope it's not too messy), but I need a programming break -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Message: 9 Date: Fri, 5 Aug 2011 08:50:10 -0400 From: Jason Beverage jasonbever...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] tight integration of virtual file system Message-ID: camcxsmsly2m20aoa5z7tubjob1xyrqqkmnz9z9lslzmmkqu...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Hi Terry, osgEarth has a generic zip based plugin called ZipFS that is implemented as an osgDB plugin and isn't dependent on osgEarth. We originally developed it to support using a zip file of imagery tiles for a cache. It allows you to load files like: osgDB::readNodeFile(c:/data/models.zip/cow.osg); I haven't used it for quite awhile but last I checked it was working just fine. You can get the osgearth source code from github at https://github.com/gwaldron/osgearth If anything it could be a start to what you're looking for. Thanks, Jason ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] tight integration of virtual file system
I would like to be able to load from .zip files and also to be able to prioritize which paths or .zip files to load from using the standard OSG_FILE_PATH mechanism. Has anyone done any work with integrating a virtual file system such that .zip files can be added as paths to OSG_FILE_PATH and osgDB::findDataFile and osgDB::readNodeFile can freely navigate these files? I suspect this would require overriding way too many osgDB functions. Is it even feasible? Just finished looking over the physfs tutorial ( http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/VFS ). It's very cool, but it doesn't appear to be as tightly integrated as what I want to do. -- 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] Fixing Z-Fighting in Far Field...
This technique works fine; I've used it before. Don't forget about adding CameraNode::DO_NOT_COMPUTE_NEAR_FAR and turning on CullSettings::NEAR_PLANE_CULLING and CullSettings::FAR_PLANE_CULLING. I believe all 3 of these settings are unused by default. If your scene is divided up with a good spatial hierarchy, then you shouldn't have to worry about adding different objects as children of the near or far camera. Just add the entire scene to each camera and let OSG's culling take care of everything. -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Message: 1 Date: Fri, 29 Jul 2011 21:52:46 +0200 From: Oren Fromberg orenfromb...@gmail.com To: osg-users@lists.openscenegraph.org Subject: [osg-users] Fixing Z-Fighting in Far Field... Message-ID: 1311969165.m2f.41...@forum.openscenegraph.org Content-Type: text/plain; charset=UTF-8 Howdy everyone, I have objects under a group node called Objects that are rendered. When the objects get too far away, Z-fighting occurs. Would it be possible to fix the Z-fighting by instead of adding the objects as a child of Objects, create two camera nodes as children to Objects (farCam and NearCam) and adding the objects to either camera based on its range to the eyepoint? the farCam and nearCam would be identical except zNear and zFar for the projection. Would I need to make any additional settings in the cameras for this to work? Thanks! ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OpenSceneGraph-3.0.1-rc3 tagged, please test
Everything works well in my apps. Thank you for the improved TextBase culling workaround. -- 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] osgText SCREEN_COORDS picking problem
Hi Kurt, osgText bounds seem to be an ongoing issue. There have been some changes made since OSG 2.8, so you should probably try using the trunk and see if it behaves differently. Here's some possibly (but probably not) related reading: http://www.openscenegraph.org/projects/osg/changeset/12467 http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2011-June/052394.html -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Message: 10 Date: Wed, 13 Jul 2011 20:33:17 +0200 From: Kurt Sierens ksier...@msn.com To: osg-users@lists.openscenegraph.org Subject: [osg-users] osgText SCREEN_COORDS picking problem Message-ID: 1310581997.m2f.41...@forum.openscenegraph.org Content-Type: text/plain; charset=UTF-8 Hi, We are using OSG 2.8, and I am currently trying to add picking to osgText objects. When I use OBJECT_COORDS, it works fine, but when I use SCREEN_COORDS, it will only pick the text when the cursor is close to the position, almost like the bounding box is not scaled correctly. Is there anyway to get around this? Also, the text is being displayed using SCREEN axis alignment and LEFT_TOP alignment. Thank you! Cheers, Kurt ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Strange osgText::Text problem while moving from OSG2.9.8 to OSG 3.0.0
I think JS is talking about the problem I was having. Here's a hacky fix that worked for me. I probably should have already sent this to osg-submissions, but maybe you can validate it first or think of something better. Try changing this one line in TextBase.cpp: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2011-June/052479.html -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Message: 11 Date: Fri, 01 Jul 2011 11:31:00 -0400 From: Jean-S?bastien Guay jean-sebastien.g...@cm-labs.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Strange osgText::Text problem while moving from OSG2.9.8 to OSG 3.0.0 Message-ID: 4e0de834.40...@cm-labs.com Content-Type: text/plain; charset=UTF-8; format=flowed Hi George, Sergey, We run into same issue yesterday, and as far as i can tell, this changed between osg 2.9.9 (all works ok) and 2.9.10(nothing visible). osgText is culled when it shouldnt for some reason. For temporary solution you can turn off culling on geode with text or add some other drawable as u did. I seem to remember people talking about a bug in the osgText bounds computation that causes it to never calculate its bounds, so they always stay at the initial value (which is an invalid bounds) and so the text is always culled (and thus it can never calculate its bounds, and so on). Not much to go on but it might be the hint that helps you to fix this... J-S ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] FAR_PLANE_CULLING
Thanks for the explanation Paul. I hadn't had to look at the auto near/far feature for so long I didn't make the connection. It looks like this old app I'm using has it disabled as you'd expect. -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Message: 8 Date: Thu, 23 Jun 2011 15:30:21 -0600 From: Paul Martz pma...@skew-matrix.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] FAR_PLANE_CULLING Message-ID: 4e03b06d.7090...@skew-matrix.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed On 6/23/2011 3:14 PM, Terry Welsh wrote: Haven't looked at this in a while, but I was just performance tuning an old app and got a significant boost by adding in CullSettings::FAR_PLANE_CULLING. Why isn't this included as part of DEFAULT_CULLING? I don't have any hard data, but I suspect the performance penalty for culling with the far plane when you shouldn't isn't near as bad as ignoring the far plane when you should use it. (I suspect NEAR_PLANE_CULLING is not as useful for most apps.) Hi Terry -- Do you have auto-compute near/far turned on? If so, there shouldn't be anything behind the far plane. In that case, it doesn't make sense for the CullVisitor to check every single Drawable's bounding box against a plane that it can't possibly be clipped by. For this reason, culling against the far plane is off by default. If you disable auto-compute near/far, and you expect part of your scene to be behind the far plane, then you should enable far plane culling. I'd expect to see a performance boost in such a case. Hope that helps, -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] improperly culled osgText
Okay, so it's a problem that can't be solved properly without some major refactoring. In the meantime, I propose changing this: bbox.set(_position, _position); to this: bbox.set(_position - Vec3(1.0, 1.0, 1.0), _position + Vec3(1.0, 1.0, 1.0)); It's still a hack :) but I think it's better because now text that takes this code will get drawn instead of staying invisible forever. I suppose it's still possible for text to get culled as a small feature this way, but it *always* gets culled the other way. -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Message: 24 Date: Fri, 24 Jun 2011 13:57:59 +0100 From: Robert Osfield robert.osfi...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] improperly culled osgText Message-ID: banlktinfcspn9ed57ots+7ozncs1ums...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 HI Terry, On Thu, Jun 23, 2011 at 9:43 PM, Terry Welsh mogu...@gmail.com wrote: Thanks for the reply. ?Turning off small feature culling does indeed fix my problem, but it's not ideal. It's not ideal at all, I'd call it hack ;-) I guess another hack would be to switch off culling off for the first frame and then re-enable. ?I'm not sure I understand all the details of what you're saying, but let me take a crack at it. ?With the current code you can a) turn off small feature culling, which will get you a bounding box of size 0 on the first frame and a reconstructed bounding box of the proper size on later frames, or b) leave small feature culling on, which causes your text to never be displayed. If there must be an incorrect bounding box on the first frame, maybe it should be just large enough to escape being culled as a small feature. ?Then small feature culling could be left on without any trouble. ?Of course, if there is any way to build a bounding box of roughly the right shape and size with information about the text to be drawn, that would probably be better. ?It sounds to me like things happen in the wrong order in OSG to make this practical or even possible. You are reading things correctly, as things stand the view dependent settings in osgText cause problems with sizing and computing bounding volumes for the first frame. Having a view dependent text in two different views will also cause similar issues with the bounding volume. I don't think there is any easy solutions without rejigging a number of design elements. For instance if I was write osgText::Text now I wouldn't put any of the view dependent support into it. Instead this should be provied by osg::AutoTransform, osg::Billboad or similar node level support. This will solve part of the problems, but there still is the issue with view dependent subgraphs and their bounding volumes which would need some resolution at the node level, unfortunately I don't know just what right now. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] improperly culled osgText
Hi Robert, Thanks for the reply. Turning off small feature culling does indeed fix my problem, but it's not ideal. I'm not sure I understand all the details of what you're saying, but let me take a crack at it. With the current code you can a) turn off small feature culling, which will get you a bounding box of size 0 on the first frame and a reconstructed bounding box of the proper size on later frames, or b) leave small feature culling on, which causes your text to never be displayed. If there must be an incorrect bounding box on the first frame, maybe it should be just large enough to escape being culled as a small feature. Then small feature culling could be left on without any trouble. Of course, if there is any way to build a bounding box of roughly the right shape and size with information about the text to be drawn, that would probably be better. It sounds to me like things happen in the wrong order in OSG to make this practical or even possible. - Terry Message: 5 Date: Thu, 23 Jun 2011 17:55:01 +0100 From: Robert Osfield robert.osfi...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] improperly culled osgText Message-ID: BANLkTik-fFAmJJ4oYZ1PkymjxxGf_=o...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Hi Terry, The code is not ideal, but it does try to provide a bit of fallback for when one can't establish the actual bounding volume of a text item because it's scaling is dependent upon the current modelview matrix - something that it won't know until after the first frame. The problem boils down to what size of bounding box is appropriate if you don't know what scale to use. A zero scaling assumed is no more or no less valid than any other size, but it does mean that at least it won't be too large. I can see problems with the current implementation when small feature culling are on, and when the origin of the label is outside the view frustum but the label when eventually scaled correctly would inside the view frustum. Is it one of these two cases that you hitting problems with? As to a robust solution that works in all cases, well it's a bit akward - you almost need to disable culling for the first frame for these Text drawables, then re-enable culling once they have a size. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] FAR_PLANE_CULLING
Haven't looked at this in a while, but I was just performance tuning an old app and got a significant boost by adding in CullSettings::FAR_PLANE_CULLING. Why isn't this included as part of DEFAULT_CULLING? I don't have any hard data, but I suspect the performance penalty for culling with the far plane when you shouldn't isn't near as bad as ignoring the far plane when you should use it. (I suspect NEAR_PLANE_CULLING is not as useful for most apps.) -- 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
[osg-users] improperly culled osgText
Hi, I found another problem with invisible text today. In TextBase.cpp there is this chunk of code at line 290: // provide a fallback in cases where no bounding box has been been setup so far if (_characterSizeMode!=OBJECT_COORDS || _autoRotateToScreen) { // default to a zero size. bbox.set(_position, _position); } else { osg::Matrix matrix; matrix.makeTranslate(_position); matrix.preMultRotate(_rotation); bbox.expandBy(osg::Vec3(_textBB.xMin(),_textBB.yMin(),_textBB.zMin())*matrix); bbox.expandBy(osg::Vec3(_textBB.xMax(),_textBB.yMax(),_textBB.zMax())*matrix); } I'm probably missing something but I don't see the logic behind the first conditional. Does it really have a purpose or is it legacy code? If I change the whole chunk to this then my text is displayed properly: osg::Matrix matrix; matrix.makeTranslate(_position); matrix.preMultRotate(_rotation); bbox.expandBy(osg::Vec3(_textBB.xMin(),_textBB.yMin(),_textBB.zMin())*matrix); bbox.expandBy(osg::Vec3(_textBB.xMax(),_textBB.yMax(),_textBB.zMax())*matrix); -- 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] large VBOs for multiple Drawables
Hi Jason, Thank you for the suggestion. I feel like I'm missing something still. Is there an Optimizer feature or something that combines Arrays for you? Or did you write a bunch of custom code that processes your models after you load them? -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Message: 3 Date: Sun, 2 Jan 2011 21:28:12 -0500 From: Jason Beverage jasonbever...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] large VBOs for multiple Drawables Message-ID: aanlktin2mdb-vewdrpkp0rwjxcok2jm4o0vdx31ao...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Hi Terry, You can pack the verts of your small objects into a single osg::Vec3Array and share that array across multiple osg::Geometry objects then use DrawElements for each geometry with the correct indices. I've just recently done this actually for a project I'm working on and it's worked out great. Thanks, Jason On Sat, Jan 1, 2011 at 6:21 PM, Terry Welsh mogu...@gmail.com wrote: I found some email threads that hinted at this a little, but nothing seemed very specific. ?I have scenes where display lists perform a bit better than VBOs. ?My best guess is because my objects have relatively small vertex counts (usually between 20 and 200). ?Is there any way in OSG to use one large VBO to store the date for multiple Drawables in order to minimize buffer state changes? -- 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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] large VBOs for multiple Drawables
I found some email threads that hinted at this a little, but nothing seemed very specific. I have scenes where display lists perform a bit better than VBOs. My best guess is because my objects have relatively small vertex counts (usually between 20 and 200). Is there any way in OSG to use one large VBO to store the date for multiple Drawables in order to minimize buffer state changes? -- 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
[osg-users] gprof integration?
Is there any formal support for compiling on linux with -pg and using gprof? I can only find support from before the cmake days. -- 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] Saving the result of an IntersectVisitor
How about just a vector of vector of integers? Each integer would represent the nth child of the previous node, and each vector of integers would represent a whole nodepath. So 4 6 7 would mean the 7th child of the 6th child of the 4th child of the root node. -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Message: 14 Date: Wed, 25 Aug 2010 08:44:05 -0400 From: Todd J. Furlong t...@inv3rsion.com To: osg-users@lists.openscenegraph.org Subject: [osg-users] Saving the result of an IntersectVisitor Message-ID: 4c751015.3010...@inv3rsion.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hi all, I use an IntersectVisitor to select nodes in a viewer application. It works fine, and the first Geode in the hit list is the node I want to select. Now I need to record that hit as part of saving the state of our application in a metadata file that we save alongside a model file or files. This is where I've run into a problem. 1. Many of the nodes in our model files are unnamed (lost in translation, most likely), so I can't store the name of a Geode. 2. NodePaths are vectors of pointers, so they can't help me here. 3. I *could* save intersection rays play them back after loading. That would work, but it would be both slower and not quite in the spirit of saving the application state. So, I am throwing this problem out to the folks in the group. Am I unaware of an already-existing solution to this? Or does somebody out there have a clever idea to help me out? Thanks in advance, Todd ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG and vsync (UNCLASSIFIED)
http://www.digitalversus.com This is a good resource for finding monitor input lag rates. Go to Product Face-Offs-LCD Computer Monitor, then choose a couple monitors, and then select the test Input Lag vs a CRT. This site was indispensable for picking out my last monitor, a Dell U2410. It rocks. (Just so you know, I don't work for digitalversus.com or Dell). -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Message: 4 Date: Fri, 6 Aug 2010 11:26:09 -0400 From: Jason Daly jd...@ist.ucf.edu To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] OSG and vsync (UNCLASSIFIED) Message-ID: 4c5c2991.1000...@ist.ucf.edu Content-Type: text/plain; charset=ISO-8859-1; format=flowed Middleton, Colin (GE Intelligent Platforms) wrote: PS I've only tested 7600 and 9400 properly, but I've seen symptoms of latency on GeForce 8 series cards too. I think Geforce 5 and 6 didn't have this 'feature' though. Interestingly, I also found that there were some monitors that had over 66 milliseconds of extra latency. From what I've read, newer monitors tend to have a lot more latency than the old CRTs did. My TV at home (a Samsung LED DLP) has almost a half second of latency! It's one of those numbers that I wish more manufacturers published. --J ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Help setting up a cave-like device viewer
Hi Nick, It's hard to say exactly what's going wrong without seeing a screen shot. However, I can tell you that rotating the projection matrix is the wrong approach. The rotation belongs in the view matrix. OpenGL relies on having only a projection transformation in the projection matrix and everything else in the view matrix in order to do computations for lighting and fog. I think it may be able to mess up your clipping too. Some of this stuff can be dependent on your graphics hardware and drivers. -- Terry Welsh mogumbo 'at' gmail.com www.reallyslick.com Message: 20 Date: Mon, 21 Jun 2010 16:54:48 + From: nick waller nhwalke...@yahoo.com To: osg-users@lists.openscenegraph.org Subject: [osg-users] Help setting up a cave-like device viewer Message-ID: 1277139288.m2f.29...@forum.openscenegraph.org Content-Type: text/plain; charset=UTF-8 Hello. I'm working on configuring a cave-like device using OSG. The device has 3 walls along side each other, the two on the outside rotated in about 30 degrees. To account for this, I tried rotating the slave camera's that display to the outside screens but this doesn't seem to work. Instead it clips the image and I get a strange view-slot on the rotated screens. I am rotating them by rotating rotating the projection matrix when I create the slave camera's. This is clearly not working. Can someone point me in the right direction? Thanks -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=29222#29222 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgText issue
This sounds very much like a problem I had a while ago. Try this: http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg39201.html -- Terry Welsh / mogumbo 'at' gmail.com www.reallyslick.com / www.mogumbo.com Message: 9 Date: Fri, 4 Jun 2010 09:12:24 +0100 From: Robert Osfield robert.osfi...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] osgText issue Message-ID: aanlktinmxzysh4oach0c5h_c-rrha0ykc5zrrk7fd...@mail.gmail.com Content-Type: text/plain; charset=windows-1252 Hi Brad, I don't have time right now to dive into this topic, but my guess is that the default bounding box for the text is small enough for small feature culling to cull it's parent so that the text itself never gets traversed. Perhaps making the bounding volume invalid until it's been traversed would be one thing to do, so for the first frame it's not culled. You'd only want to do this in the case of screen scaled text. Robert. On Fri, Jun 4, 2010 at 12:06 AM, Brad Huber br...@procerusuav.com wrote: It looks like for some reason my screen aligned, screen sized text is getting small feature culled under certain circumstances.? My small feature cull is set to the default (2 pixels) and my text is definitely larger than 2 pixels (when it does show).? When I disable small feature culling the text always shows correctly. I?m still not sure why this is happening but is it possible that it is using the world size of my drawables for culling rather than the actual screen size?? Also, I?m not sure why this is an intermittent problem.? (ie text doesn?t show then I zoom in and it shows, then zoom back out and it still shows). Thoughts? Thanks -Brad From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Brad Huber Sent: Thursday, June 03, 2010 10:02 AM To: 'OpenSceneGraph Users' Subject: [osg-users] osgText issue Cedric (or anyone else), I?m running in to a similar issue to what is described here: http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg15610.html a long time ago by Cedric Pinson. I searched around in the forum archives and didn?t see any resolution to this issue nor did I find anything else similar.? Did you ever find a solution to this problem? The way it manifests for me is that there is an osgText object in the visible scene but it doesn?t show until I zoom the camera in on it.? Then it appears and if I zoom the camera back out it sticks around. ?It should be showing the whole time? Thanks -Brad ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] looking for a terrain database building
In a graph, a leaf node is a node with no children. In the context of a pagable terrain database, the leaf nodes would be the highest-resolution tiles. Hi Terry, sorry that I can' help you, I have no deep experience with polygonal and flat database. Can you explain me what the leaf node is? Thank you! Cheers, Torben ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] looking for a terrain database building
Thank you for the replies everyone. Now I have a few more things worth looking into. To explain my current situation in more detail, this is the current test database that I'm working on: osgdem --polygonal --compressed --mip-mapping-hardware --range -87721 87721 111320 -111320 -t 37N_123Wx39N_121W.tif --range 0 1113 0 1113 -t 10seh955060.tif --range -87721 0 0 -111320 -d dted/W123/N37.DT1 --range -87721 0 111320 0 -d dted/W123/N38.DT1 --range 0 87721 0 -111320 -d dted/W122/N37.DT1 --range 0 87721 111320 0 -d dted/W122/N38.DT1 -l 12 --tile-image-size 512 -o eastbay.ive My data consists of geotiffs for textures and .dt1 files for elevation. If memory serves, .dt1 just means DTED level 1. Ultimately, I'd like to take some of the leaf tiles, convert them to .flt, edit them in Creator, and convert them back to .ive so they get loaded into the database. (In a graph (in this case, OpenSceneGraph), a leaf node is a node with no children). According to http://www.openscenegraph.org/projects/VirtualPlanetBuilder/wiki/CommandLineOptions , --range is for use when you want a flat database (not geocentric), and flat is what I want. But now it sounds like maybe I should be using --cs instead of --range. I searched high and low on Google for something that explains the usual GDAL/OGR forms, complete WKT, PROJ.4, EPS so that I can use --cs, but everything I found is written for people who are already experts at that stuff. Anyone know where I can find something that tells me how to make one of these strings from scratch? Particularly, one that will get me a database that squashes 2x2 degrees of data centered at (38N, 122W) (all data containing geographic info) into the range -87721 87721 111320 -111320 meters? w.r.t 4: you have missed the number 4 :) d'oh! w.r.t. 5: VPB adds LODs until both, texture and DEM, are displayed in full resolution. As far as I know does VPB exactly what you want! Yes, it *does* do exactly what I want. ...Arg. Shame on me for testing this so poorly before. ...And yea for VPB! Have you tried the optimizer? I don't know if that could work.. Haven't applied it to this problem yet, but it's on my list. Too many projects. We had to convert the mesh nodes to triangles in creator as well as flatten the transforms. Otherwise we had all kinds of issues. Couldn't edit certain areas, crashes, lighting errors, etc. This was with a fairly recent version of creator. I've been using --polygonal, so I think I should get easy-to-edit polygons. My version of Creator is *really* old. Anyway, I'm going in for a demo of new Creator next week, so maybe I'll load up a CD with models to test and include some generated terrain tiles. -- Terry Welsh / mogumbo 'at' gmail.com www.reallyslick.com / www.mogumbo.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] looking for a terrain database building
Thanks J-S for pointing out that leaf tiles have no PagedLOD nodes. That changes things a bit; don't know how I missed it. Since then I've tried to use VPB to output a good sample database. Right now I'm stuck on a few more problems. Hopefully there are solutions for these troubles that I just haven't found yet. If anyone knows any solutions or workarounds to these issues I'd be happy to hear them. 1. Units. My database defaults to being built in degrees. I would prefer meters, which can be achieved using the --range option. (Actually, --range appears to be necessary to keep the database from being completely square, which is incorrect anyplace other than on the equator.) Once I've used --range on one item, it must be used on everything to get all my sources in the same coordinate system. This is unwieldy when there are a lot of source images and/or DEMs. Since all my images and DEMs contain geographic info, it would probably be better to have some option that just lets you specify the units for the final database, and some way to squash the database appropriately depending on the latitude. 2. My main GEOTiff contains geographic info, but fails to reproject if any of my DEMs do not use the --range option. This appears to be a GDAL error, but I don't understand it well enough to fix it yet: ERROR 1: Unable to compute a transformation between pixel/line and georeferenced coordinates for 37N_123Wx39N_121W.tif. There is no affine transformation and no GCPs. Failed to reproject 37N_123Wx39N_121W.tif 3. --range values for images can be entered in either order, min-max or max-min. For DEMs, order matters. This is odd, but is probably very fixable. 5. I'd like to be able to specify a minimum number of levels to build for the whole database, and then build more levels where there is high-res imagery. So far I can't find any way to do this. Without this I'd be building a huge number of tiles that don't have high-enough-res elevation or image data to justify their existence. 6. Creator loads up my .flt files in bad, indescribable, uneditable ways (probably due to my horribly outdated version of Creator). 7. I need the output image files to be separate from the terrain files when editing .flt. I don't see a way to build tiles with separate image files, but I think I've seen a code snippet somewhere for extracting images. Other options are welcome. 8. I still need to work out the reasons for the big file size differences between my output .ive files and the .flt files I convert them too. Converting back to .osg I noticed huge lists of Geodes each containing one triangle. Maybe I can do some tri-stripifying when converting back from .flt to .ive. -- Terry Welsh / mogumbo 'at' gmail.com www.reallyslick.com / www.mogumbo.com Message: 4 Date: Thu, 01 Apr 2010 17:20:04 -0400 From: Jean-S?bastien Guay jean-sebastien.g...@cm-labs.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] looking for a terrain database building Message-ID: 4bb50e04.60...@cm-labs.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hi Terry, Hi J-S. When you convert a file to .flt and then back to .ive, your PagedLOD nodes are lost. I meant converting the leaf tiles. Unless I'm mistaken (it's been a while since I analyzed the structure so I might remember wrong), in a VPB database, you have a master .ive file, which has PagedLOD nodes that refer to other .ive files, which might have other PagedLODs, etc. Eventually you have geometry in .ive files that have no PagedLODs. You could convert these to flt, edit the geometry, and reconvert. But it does mean that each LOD of each tile is in a separate file, so it's a bit of a pain to edit all LODs of a certain region to match (you have to convert and edit as many files as you have levels, separately). The new .ive file is also 50X larger than the original and missing its textures, but those problems are probably solvable. The 50x larger is weird, but the textures you just have to convert to .osg with -O OutputTextureFiles to recover them (convert to .osg and to .flt then delete the .osg file). I don't know if the flt output plugin has a similar option, I know about that one for the .osg output plugin so I've always used that. No, I need tiles to be in separate files. I understand that, but what I meant is that the VPB structure is hierarchical. You have the first LOD (lowest-res) with the whole terrain at very low resolution, then two or four tiles at higher resolution, then each of those splits into four again, etc. So level i has 4^i tiles in general for square terrain. If you want to make all tiles at all LODs the same size, then I guess that could be added as an option in VPB. But then what would you replace PagedLOD with? ProxyNode? I don't understand what you mean here. I mean if you want VPB to build non-quadtree LOD structures. i.e. each LOD you have the same
Re: [osg-users] looking for a terrain database building
Message: 2 Date: Thu, 01 Apr 2010 09:13:21 -0400 From: Jean-S?bastien Guay jean-sebastien.g...@cm-labs.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] looking for a terrain database building Message-ID: 4bb49bf1.8070...@cm-labs.com Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hi Terry, Both VPB and osgEarth seem to default to building scenegraphs with PagedLOD nodes, which I don't think will work for me. One option I thought of is to use VPB to create a big database in a single file with traditional LOD nodes, then use a separate program to convert it all to individual .flt tiles and a Metaflight file or something similar. I'll have to do more thinking about this option. Anyone know of any alternatives to Metaflight that can describe tiled databases but still let you store and edit tiles individually? I just want to consider all the options. What's the specific problem with PagedLOD? You could still find the tile you want to modify, convert it to .flt (using osgconv with the flt write support in recent OSG versions), edit it, reconvert it to .ive (with osgconv, keeping the name the same) and run it. Hi J-S. When you convert a file to .flt and then back to .ive, your PagedLOD nodes are lost. More accurately, I think they get turned into regular LOD nodes that don't link to any external files the way PagedLOD nodes do. That's the biggest problem. The new .ive file is also 50X larger than the original and missing its textures, but those problems are probably solvable. Is the problem that the multiple LODs for the same region are not in the same file? That's not just caused by using PagedLOD, but also the fact that VPB (and I assume osgEarth too) make quadtree-LOD structures. If you needed all LODs of a given region to be in a single file, then all the geometry would be in a single file because the lowest-res LOD contains the geometry for the whole terrain. Tiles become more numerous and smaller as you go to higher-res LODs. No, I need tiles to be in separate files. The databases we need to build here are large enough that having all LODs in one file will be impractical or impossible. But I want to consider building one big file with LOD nodes as an intermediate step. I'd process that file and split it all up into separate tiles. If I did that I still don't know if I'd build a metaflight description file or something else. If you want to make all tiles at all LODs the same size, then I guess that could be added as an option in VPB. But then what would you replace PagedLOD with? ProxyNode? I don't understand what you mean here. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] looking for a terrain database building
Hi Torben, It's good to see I'm not the only one trying to do this stuff. Yes, coming up with a toolchain document that tells people specifically how to string together a lot of different tools would be good. I was just playing with osgEarth yesterday, and damn! that's neat. I haven't had as much luck getting VirtualPlanetBuilder to understand my geotiffs. But if osgEarth can understand them, then it's probably a solvable problem with how data is getting sent to gdal or something like that. Anyway, I keep coming back to that same problem: I need to be able to manually edit anything with a modeling problem since my employers make random requests all the time. Your flattening of the database in configurable areas sounds similar. So, to answer your question, I'd like to be able to modify databases offline. Being able to do fancy stuff like stitching in roads and prebuilt models of cities and stuff would be very cool. Both VPB and osgEarth seem to default to building scenegraphs with PagedLOD nodes, which I don't think will work for me. One option I thought of is to use VPB to create a big database in a single file with traditional LOD nodes, then use a separate program to convert it all to individual .flt tiles and a Metaflight file or something similar. I'll have to do more thinking about this option. Anyone know of any alternatives to Metaflight that can describe tiled databases but still let you store and edit tiles individually? I just want to consider all the options. -- Terry Welsh / mogumbo 'at' gmail.com www.reallyslick.com / www.mogumbo.com Message: 14 Date: Tue, 30 Mar 2010 10:33:34 + From: Torben Dannhauer z...@saguaro-fight-club.de To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] looking for a terrain database building toolchain Message-ID: 1269945214.m2f.26...@forum.openscenegraph.org Content-Type: text/plain; charset=UTF-8 Hi Terry, I have quite the same goal to reach, so I would happy to cooperate and create a usefull toolchain. At the moment I use VPB to generate the database. I'have tried osgEarth but the VPB Plugin over there doesn't work very well, it loades all tiles at highest LOD and my FPS falls down to less than 5 fps. So osgEarth is not an option. At the beginning, I had a lot of problems to compile my datase ( ~800GB raw data. with 64 Bit and the newest VPB it now works quite stable, resuming works and it is possible. With compressing all geotiffs with LZW the build time is reduzed dramatically from several weeks to days ( 16 Cores, 12 gig ram, several HDDs for source data) About this task, I have written a detailed documentation which I plan to publish on VPB wiki. The following tasks are not solved but are only my current todo list: adding forest to database based on openstreetmap shapes. Use of LOD to blend forest on configurable distance in and out flattening/pulling ground to specifig height of the geocentric database in configurable areas to provide complete flat areas (or other height feature) for flat airports or other submodels. adding streets and other feature of OpenStreetMap and other sources Would you like to modify database offline or online during runtime via pseudoloader? Both approaches are quite interesting I think. I would be happy if we could create a Toolchain and write a detailed documentation (I'd like to do this, because I struggled myself often at the beginning due to lack of documentation) Cheers, Torben[/list] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=26264#26264 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] looking for a terrain database building toolchain
I've just started looking for a new way to build terrain databases for my employers. The requirements are for very big databases (so they must be pageable), and the ability to customize tiles by building roads and trenches and any other feature imaginable. In the past I did this with Creator Terrain Studio for building Metaflight terrain databases, then I modified individual terrain tiles using Creator, and I programmed a Metaflight paging tool for loading tiles into my OSG-based simulator. I haven't used this toolchain for a couple years, and it fell out of favor when the last version of Creator Terrain Studio was too buggy to be useful. But we still use the Metaflight pager for loading our databases. Naturally, I started this new toolchain search looking at free OSG-based tools. It looks like VirtualPlanetBuilder has come a long way since I last tried it. My current barrier to using VPB is that it appears to only build tiles that include PagedLOD nodes. Since these nodes are unique to OSG, I don't think there's any way to edit tiles containing PagedLOD nodes in program like Creator. So my question is: is there a way to get any part of my desired toolchain using OSG-based tools like VPB? And am I unaware of any current or soon-to-be-released features that might help, such as the ability to build or page tiles that don't contain PagedLOD nodes? I'm amenable to programming pieces of this toolchain if necessary. -- Terry Welsh / mogumbo 'at' gmail.com www.reallyslick.com / www.mogumbo.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] bound not computed
Tracked it down, sort of. Using setAxisAlignment(TextBase::SCREEN) causes my Text to be culled out sometimes when it shouldn't be. Other axis alignment modes that have _autoRotateToScreen set to false appear to work. The Text seems to first appear when some other type of drawable becomes a sibling in the scene graph structure. So I can work around the problem now. However, I still can't pinpoint the exact logic that's causing the Text to be culled improperly. -- Terry Welsh / mogumbo 'at' gmail.com www.reallyslick.com / www.mogumbo.com On Mon, Mar 22, 2010 at 8:38 AM, Terry Welsh mogu...@gmail.com wrote: I'm not sure I understand the question, but I don't think so. My camera always points down the +y axis, and the text always faces down the -y axis. The only scaling I do is with setCharacterSize(). And I have a MatrixTransform holding the text, but it only holds a translation, no scaling. It seems to me the BoundingBox should be computed when you call setText(), but this doesn't happen. Something else triggers the bound to be computed later on. If I could figure out what causes the bound to be computed, this problem might make more sense. -- Terry Welsh / mogumbo 'at' gmail.com www.reallyslick.com / www.mogumbo.com Message: 12 Date: Mon, 22 Mar 2010 11:44:47 + From: Robert Osfield robert.osfi...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] bound not computed Message-ID: 7ffb8e9b1003220444s7b76ba3fua19cb8dbe0e74...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Hi Terry, Are these text elements view dependent in any way? Such as orientation or scaling? Robert. On Mon, Mar 22, 2010 at 5:21 AM, Terry Welsh mogu...@gmail.com wrote: I'm having a culling problem with some osgText ::Text drawables. They're popping on as I pan the camera after they should have been on screen for a while. ?I can see that their BoundingBoxes have not been computed. ?They pop into view as soon as the boxes get computed, though. ?Even if I call mytext-dirtyBound() after mytext-setText(), the BoundingBox does not get computed until sometime later after I have panned the camera too much. ?I'm stumped, so I thought I'd throw this out there an see if anyone else has seen this problem or has any suggestions. ?Anyone? -- Terry Welsh ?/ ?mogumbo 'at' gmail.com www.reallyslick.com ?/ ?www.mogumbo.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
Re: [osg-users] bound not computed
Hi Robert, I can send you a pretty simple example of this problem if you like, but after what you said I don't know if there's any point. I didn't know vertex positions were being recomputed to orient the text to the screen. I supposed lots of transforms can slow down drawing pretty bad, but computing enough vertex positions could slow down updating even worse, depending on many factors. Manipulating the modelview matrix like a billboard sounds a lot simpler. If we did a big change like that, this problem I'm having would likely just go away. -- Terry Welsh / mogumbo 'at' gmail.com www.reallyslick.com / www.mogumbo.com Message: 7 Date: Fri, 26 Mar 2010 10:07:43 + From: Robert Osfield robert.osfi...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] bound not computed Message-ID: 7ffb8e9b1003260307v5ec90d29x31c21a432e46e...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Hi Terry, Good to hear that you've narrowed the problem down to the view dependent case. Without diving into the code and testing it with an app that reproduces the problem I can't add much in the way of specific suggestions. One thing I've wondered about doing for a while now is to simplify osgText so that the view dependent code is done using manipulation of the modelview matrix rather than computing new values of the vertex positions of the quads as is done right now. The code present holds a multi-buffer of vertex positions of the quads, with a set of positions per view, this code original existed to help handle tens of thousands of text labels on a Onyx system when we had to optimize as much as possible to get the performance required. Nearly a decade of improvements in computers has occurred since then so I don't think the same performance constraints really need to hold back our implementation to being more complicated than it need be. So I'm inclined to throw out the multi-buffering and all the complicated updates and move the code to just having a single set of vertices for the quads and then computing the modelview matrix required to align and scale the text labels as required. This simplifies the code and should make it easier to track down problems. It won't directly solve the bounding volume issue with view dependent text labels, but hopefully it'd make it easier to come up with a scheme that works solidly. Robert. On Fri, Mar 26, 2010 at 7:20 AM, Terry Welsh mogu...@gmail.com wrote: Tracked it down, sort of. ?Using setAxisAlignment(TextBase::SCREEN) causes my Text to be culled out sometimes when it shouldn't be. ?Other axis alignment modes that have _autoRotateToScreen set to false appear to work. ?The Text seems to first appear when some other type of drawable becomes a sibling in the scene graph structure. ?So I can work around the problem now. ?However, I still can't pinpoint the exact logic that's causing the Text to be culled improperly. -- Terry Welsh ?/ ?mogumbo 'at' gmail.com www.reallyslick.com ?/ ?www.mogumbo.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] bound not computed
I'm not sure I understand the question, but I don't think so. My camera always points down the +y axis, and the text always faces down the -y axis. The only scaling I do is with setCharacterSize(). And I have a MatrixTransform holding the text, but it only holds a translation, no scaling. It seems to me the BoundingBox should be computed when you call setText(), but this doesn't happen. Something else triggers the bound to be computed later on. If I could figure out what causes the bound to be computed, this problem might make more sense. -- Terry Welsh / mogumbo 'at' gmail.com www.reallyslick.com / www.mogumbo.com Message: 12 Date: Mon, 22 Mar 2010 11:44:47 + From: Robert Osfield robert.osfi...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] bound not computed Message-ID: 7ffb8e9b1003220444s7b76ba3fua19cb8dbe0e74...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 Hi Terry, Are these text elements view dependent in any way? Such as orientation or scaling? Robert. On Mon, Mar 22, 2010 at 5:21 AM, Terry Welsh mogu...@gmail.com wrote: I'm having a culling problem with some osgText ::Text drawables. They're popping on as I pan the camera after they should have been on screen for a while. ?I can see that their BoundingBoxes have not been computed. ?They pop into view as soon as the boxes get computed, though. ?Even if I call mytext-dirtyBound() after mytext-setText(), the BoundingBox does not get computed until sometime later after I have panned the camera too much. ?I'm stumped, so I thought I'd throw this out there an see if anyone else has seen this problem or has any suggestions. ?Anyone? -- Terry Welsh ?/ ?mogumbo 'at' gmail.com www.reallyslick.com ?/ ?www.mogumbo.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
Re: [osg-users] osgText quality issue
This is a good suggestion. I've been using osgText a lot lately, and this change definitely improves the quality in my apps. -- Terry Welsh / mogumbo 'at' gmail.com www.reallyslick.com / www.mogumbo.com Message: 3 Date: Wed, 17 Mar 2010 13:29:43 -0700 From: Farshid Lashkari fla...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: [osg-users] osgText quality issue Message-ID: 978d1eac1003171329l4f526d49q78495dbc1f958...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 Hi, I'm in the process of porting our application from OSG 1.2 to 2.9. One major issue that immediately stood out was the quality of osgText. All the letters seem to be cut off by one pixel along the edges. There has been a lot of changes since 1.2, but I did find one setting that seemed to fix the issue for me. On line 539 of Font.cpp there is a hard-coded variable called sizeAdjustment that is set to 1. In OSG 1.2 this value was set to 0. Changing this value back to 0 pretty much resolves the quality issue for me. I've attached a screenshot comparing the result of changing the value. Does anybody else notice these artifacts? Is there a downside to changing the sizeAdjustment value back to 0? Any insight is appreciated. Cheers, Farshid -- next part -- An HTML attachment was scrubbed... URL: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20100317/d0591de3/attachment-0001.htm -- next part -- A non-text attachment was scrubbed... Name: osgTextSizeAdjustment.png Type: image/png Size: 55917 bytes Desc: not available URL: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20100317/d0591de3/attachment-0001.png ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Did my shader compile successfully?
Thanks for the reply Robert. Parsing an error message sounds a bit risky. A couple hours after writing that message I found another solution. You cannot call myshader-getPCS(context)-isCompiled(); because getPCS() is protected. But you can call myprogram-getPCP(context)-isLinked(); because both those functions are public. I believe if compiling fails then linking always fails too. So now my game can detect which programs have linked and only use the ones with low enough complexity. Seems to work fine so far -- Terry Welsh / mogumbo 'at' gmail.com www.reallyslick.com / www.mogumbo.com Message: 17 Date: Thu, 4 Mar 2010 09:06:23 + From: Robert Osfield robert.osfi...@gmail.com To: OpenSceneGraph Users osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Did my shader compile successfully? Message-ID: 7ffb8e9b1003040106n47ab65e7wbd7706652d9ee...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 Hi Terry, I don't recall a method for programmability getting whether a shader has compiled successfully, but you will out a warning output via osg::notify to the console if there is an error with compilation or linking. If you don't get an error then things should be fine. Up you notification level to DEBUG via (assuming bash) export OSG_NOTIFY_LEVEL=DEBUG runyouapp Robert. On Thu, Mar 4, 2010 at 6:09 AM, Terry Welsh mogu...@gmail.com wrote: I'm certain this sort of thing has been asked before, but I can't seem to find answers in the archives. I was hoping I could call Shader::isCompiled(), but I need access to Shader::getPCS(), which is protected. Does this need to be protected? Do I really need to derive from Program to use this function? Or is there another way to find out if my shader is compiled that I haven't spotted? -- Terry Welsh / mogumbo 'at' gmail.com www.reallyslick.com / www.mogumbo.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org