[osg-users] Recurse on a private mutex (FreeBSD)

2008-01-25 Thread Jim Brooks
Occurs on OSG 2.x on FreeBSD 6.2. Definitely a FreeBSD-specific problem. Already tried single-threading. Fatal error 'Recurse on a private mutex.' at line 986 in file /usr/src/lib/libpthread/thread/thr_mutex.c (errno = 0) Abort trap: 6 ___ osg-users

Re: [osg-users] Recurse on a private mutex (FreeBSD)

2008-01-26 Thread Jim Brooks
Could you provide a stack trace and a few more details about when and where this problems occurs i.e. which examples and data etc. Hi Robert, abort() was called in pthreads before main() was ever reached. Happens on two different OSG programs (run fine on Linux/Mac/M$). OSG 1.2 runs fine on the

Re: [osg-users] Recurse on a private mutex (FreeBSD)

2008-01-28 Thread Jim Brooks
This had me fooled. The call stack seemed to indicate an Nvidia OpenGL bug But it wasn't. #2 0x28913b78 in abort () from /lib/libc.so.6 #3 0x2895bc6f in pthread_testcancel () from /lib/libpthread.so.2 #7 0x28a0314d in _nv07gl () from /usr/local/lib/libGL.so.1 #8 0x28a725e4 in ?? () from

[osg-users] Collision detection for aircraft

2008-03-04 Thread Jim Brooks
IntersectionVisitor can be used for collision-detection. But determining whether the collision is fatal or not (safely sitting on runway vs. crash-dive) then requires consulting a physics model. ___ osg-users mailing list

Re: [osg-users] NodeVisitor won't visit TerrainTile

2008-04-13 Thread Jim Brooks
Yes, that's a pitfall and disadvantage of the Visitor pattern itself when adding new node types. The traversal is actually executing code compiled for the base NodeVisitor (not your derived one) so your virtual void DerivedVisitor:apply(NewDerivedNode) doesn't even exist in that context.

Re: [osg-users] How to document osgShadow?

2008-05-15 Thread Jim Brooks
I could submit modifications to the osgshadow source code with appropriate comment paragraphs explaining how to use each class. Sprinkling comments in the example code would help a lot. ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] principle of Light and LightSource

2008-12-17 Thread Jim Brooks
So, when I want to use more lights I see only the first light. Thats the graph with two lights: To render with multiple lights, arrange the LightSource group nodes vertically: root | V lightSource 0 | V lightSource 1 | V geodes

[osg-users] modifying vertexs

2009-03-05 Thread Jim Brooks
Found two different ways to tell OSG that vertexs were modified. Maybe these are circumventions that aren't proper (?). What is the one right way? Call dirtyDisplayList() ? ctor() : mVertexs(new osg::Vec3Array), mDrawArray(new osg::DrawArrays( osg::PrimitiveSet::POINTS,0,0)) { }

Re: [osg-users] modifying vertexs

2009-03-06 Thread Jim Brooks
. osg::ref_ptrosg::Vec3Array mVertexs; mDrawArray = new osg::DrawArrays(osg::PrimitiveSet::POINTS,0,0); // Modify vertex array (mVertexs is in app side). mVertexs-push_back( vertex ); // Tell OSG geometry was modified. mGeometry-setVertexArray( mVertexs.get() );

Re: [osg-users] Can't write to ALPHA component with custom fragment shader in RTT pass

2009-03-09 Thread Jim Brooks
. // activate blending to be able to write to gl_FragColor.a stateset-setMode(GL_BLEND, osg::StateAttribute::ON); .. No, this comment has a misunderstanding. Writing to gl_FragColor.a in the fragment shader does work of course but it isn't the final RGBA

Re: [osg-users] Can't write to ALPHA component with custom fragment shader in RTT pass

2009-03-09 Thread Jim Brooks
I agree that whatever is put in gl_FragColor.a will not be the final alpha value in the framebuffer, but at least if we put gl_FragColor.a = 0.0 then the current fragment shader's output color should be transparent, and so anything behind should be completely visible, right? Not necessarily. If

Re: [osg-users] Can't write to ALPHA component with custom fragment shader in RTT pass

2009-03-09 Thread Jim Brooks
OK, but I'm talking about a pre-render pass to an FBO though. The FBO is attached to an RGBA texture, and we want to be able to store some data in the alpha channel... So we want what we write to gl_FragColor.a to make it into the texture directly. Is there a way to do that? Never used FBO, but

Re: [osg-users] Only intersecting certain nodes in the scene graph

2008-07-04 Thread Jim Brooks
Or organize the scene graph into intersectable and non-intersectable groups (faster intersection traversal). osgUtil::IntersectionVisitor visitor( intersectorGroup.get() ); ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] Shadow techniques status

2008-07-29 Thread Jim Brooks
ShadowMap does suffer from bad aliasing when the viewpoint is very near the shadow. The Orange book (GLSL shader) describes how to super-sample the depth buffer to mitigate aliasing. ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] Shadow techniques status

2008-07-30 Thread Jim Brooks
ShadowMap does suffer from bad aliasing when the viewpoint is very near the shadow. The Orange book (GLSL shader) describes how to super-sample the depth buffer to mitigate aliasing. Indeed, aliasing is a big problem with vanilla shadow mapping in almost all real-world cases. What you

Re: [osg-users] Smoothing camera movements from HMD's input

2008-09-30 Thread Jim Brooks
In order to solve this problem, I was thinking about creating an animation path (on the fly) from a previously stored orientation to current head orientation. Is this the correct way to proceed? Or there is some other technique to smooth the resulting camera movements? osg::AnimationPath

Re: [osg-users] OSG + sky

2007-10-31 Thread Jim Brooks
I want to integrate enviroment in my application, for example clouds and sky. As far as my knowledge is concerned this is not possible in OSG currenly. Can someone tell me the alternatives. OSG can be used to render a sky dome/box and clouds (I've done it). For cumulus clouds, used libnoise to

Re: [osg-users] VTP height field issue

2007-11-28 Thread Jim Brooks
how would i flip it? i suspect i need to change the transform somehow: Transform { 360 0 0 0 0 180 0 0 0 0 1 0 You're on the right track, but the matrix elements are unit float {0.0,..,1.0} values, not degrees. These 3 rows are 3D unit vectors that define

Re: [osg-users] Crash on exit, Mac Os X

2007-12-19 Thread Jim Brooks
My program crashed on exit every time, on Mac OS X only (OSG 2.2 DMG), but works reliably on Mac without multi-threading. export OSG_THREADING=SingleThreaded mViewer-setThreadingModel( osgViewer::Viewer::SingleThreaded ); ___ osg-users mailing list

Re: [osg-users] ugly text, Nvidia vs. ATI

2008-01-07 Thread Jim Brooks
Indeed, osgText looks horribly jagged on ATI Radeon 9xxx but nice/smooth on Nvidia 55/76xx. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

[osg-users] keyboard differences between OSG 2.8.2 vs 2.8.1

2009-09-24 Thread Jim Brooks
Hi, On OSG 2.8.2, square brackets [] and parentheses() return the same values. OSG 2.8.1 returns different values as expected. Confirmed using my program and osgkeyboard. I'm using a USA keyboard on Debian 5 Lenny. -- Jim Brooks ___ osg-users mailing

Re: [osg-users] keyboard differences between OSG 2.8.2 vs 2.8.1 [patch]

2009-09-24 Thread Jim Brooks
] = '['; _extendedKeymap[XK_bracketright ] = ']'; -- Jim Brooks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Re: [osg-users] keyboard differences between OSG 2.8.2 vs 2.8.1 [patch]

2009-10-10 Thread Jim Brooks
Hi Robert, Yes, it's resolved. I saw the same keyboard fix already in the svn trunk. I believe this issue has already been tackled so could you please test svn/trunk and let me know. Also for future reference could you provide whole modified files rather than copy and paste entries as whole

[osg-users] normal vectors aren't causing culling

2009-11-26 Thread Jim Brooks
This is very basic This test-code snippet is supposed to create a simple square with a normal vector (or vectors). After rotating it around with the trackball manipulator, the square is never culled. Same behavior on OSG 2.6 and 2.8. Also, having trouble with with a dome composed of squares

Re: [osg-users] normal vectors aren't causing culling

2009-11-28 Thread Jim Brooks
back-face culling by VERTEX ORDER (without normal vectors). Sorry, nevermind. -- Jim Brooks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

[osg-users] CMakeLists.txt for Apple OS X 10.4 Tiger PowerPC

2009-12-03 Thread Jim Brooks
Got an arcane linker error after switching to MacPorts from Fink. Had to change OSG's top-level CMakeLists.txt: IF(UNIX) # Not sure what this will do on Cygwin and Msys # Also, remember OS X X11 is a user installed option so it may not exist. FIND_PACKAGE(X11) # Some Unicies

Re: [osg-users] What are the your favorite free 3d model sites?

2009-12-18 Thread Jim Brooks
I'm planning to put together a test app and would like to be able to add some new content to OpenSceneGraph-Data such as a vehicle and house(s). www.flightgear.org www.delta3d.org ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] osgDB::writeNodeFile() omits texture objects

2010-01-14 Thread Jim Brooks
I'm trying to dump the scene-graph. osgDB::writeNodeFile() writes geometry/colors ok, but (OSG 2.9.6) omits texture objects. Eg, when running osgviewer on the dumped .osg file, textures don't appear. Is this behavior of writeNodeFile() intentional?

Re: [osg-users] osgDB::writeNodeFile() omits texture objects

2010-01-15 Thread Jim Brooks
in it's default settings will enable it, so if you run the Optimzer this is probably the culprit. The DatabasePager also set up to enable this feature to help keep memory usage down. Robert. On Thu, Jan 14, 2010 at 3:46 PM, Jim Brooks wrote: I'm trying to dump the scene-graph. osgDB

Re: [osg-users] osgDB::writeNodeFile() omits texture objects

2010-01-16 Thread Jim Brooks
Hi Robert, Yes, running the Optimizer::TextureVisitor solved this problem, thanks! It could be that your databases have the UnrefImageAfterApply enabled on them which is causing the loaded database to release imagery. You can run the Optimizer::TextureVisitor to change the value back, just have

Re: [osg-users] locking nodes

2010-02-01 Thread Jim Brooks
. And even if you add more per-node locks, that creates potential for deadlocks. -- Jim Brooks ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

[osg-users] osgDB::writeImageFile() jpg vs png

2010-02-09 Thread Jim Brooks
Trying to save an osg::Image as a .jpg file malfunctions. Either false is returned or .jpg file has weird colors. But .png format works ok. osg::ref_ptrosg::Image image = mTextureObject-getImage(); //osgDB::writeImageFile( *image, file.jpg ); osgDB::writeImageFile( *image, file.png ); Tried OSG

Re: [osg-users] How to run OSG on iPhone(Mobile Device)?

2010-03-01 Thread Jim Brooks
Does any one know that how to run OSG on iPhone(Mobile Device)? Is iPhone capable of running a moderately complex OSG program? The thing has limited RAM and persistent memory ...it can't hold too many 3D models, etc. (Reminds me of trying to write a program for a VIC-20).

Re: [osg-users] Modifying scenegraph and update

2010-03-05 Thread Jim Brooks
Is there some lock/unlock mechanism in OSG or I is it happening by magic? This is done through the method Object::setDataVariance(), setting it to STATIC or DYNAMIC. In your case, you should mark that object DYNAMIC in order to prevent OSG accesing it while you are modifying the mesh. Not

Re: [osg-users] Modifying scenegraph and update

2010-03-05 Thread Jim Brooks
Is there some lock/unlock mechanism in OSG or I is it happening by magic? This is done through the method Object::setDataVariance(), setting it to STATIC or DYNAMIC. In your case, you should mark that object DYNAMIC in order to prevent OSG accesing it while you are modifying the mesh. Not

Re: [osg-users] nodemask or switch

2009-08-25 Thread Jim Brooks
When do I need a switch node if I have a nodemask? [..] Why - is there extra functionality from the switch, is there a limitation of the nodemask? The difference is in traversal of nodes. Switch nodes affect ALL traversals. Node/cull masks affect certain kinds of traversals. For example, if a

Re: [osg-users] 2.8.3 testing

2010-03-22 Thread Jim Brooks
Had compile errors on FreeBSD 8. Fixed with these two lines: src/OpenThreads/pthreads/CMakLists.txt IF(HAVE_PTHREAD_SETAFFINITY_NP) IF(NOT CMAKE_SYSTEM_NAME MATCHES FreeBSD) #---fix--- ADD_DEFINITIONS(-DHAVE_PTHREAD_SETAFFINITY_NP) ENDIF(NOT CMAKE_SYSTEM_NAME MATCHES FreeBSD)

Re: [osg-users] Lightness of the ES version

2010-04-10 Thread Jim Brooks
Is it at all possible to leave out features in the sake of library size? Yes, using cmake, extra modules/plugins can be omitted. I don't think there is a reduce memory at expense of performance run-time setting if you mean that too (?). ___ osg-users

Re: [osg-users] basic question on OSG smart pointers

2010-06-04 Thread Jim Brooks
Yes, you're right. A good OSG coding habit is to just always assign to osg::ref_ptr. Is it true that if I declare a pointer as follows: osg::Group* test = new osg::Group; I would have a memory leak since I can not call a delete on test object pointer? So, this is the reason why I should use

[osg-users] How to apply shaders to parts of models

2010-06-07 Thread Jim Brooks
A visitor can be used to apply specific shaders to the parts of a model. If names were given to parts of the model by the modeling program, the visitor can look for substrings _shader_metal, window, etc, using osg::Object::getName(). A better way is if modeling programs could output .osg format

[osg-users] finding pivot point of a 3D model as a transform node

2010-07-11 Thread Jim Brooks
I need to write a visitor that finds the transform node corresponding to the pivot point of a 3D model (eg the center of a wheel of a car model). Problem is that the visitor finds a Group node not a matrix/transform node (from an .ac file). Not sure if OSG is optimizing away some transform nodes

[osg-users] bad cache side-effect from osgDB::readNodeFile() in OSG 3.x

2012-03-10 Thread Jim Brooks
); -- Jim Brooks jimblist -at- gmail -dot- com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Re: [osg-users] bad cache side-effect from osgDB::readNodeFile() in OSG 3.x

2012-03-10 Thread Jim Brooks
/palomino_data_sounds_20080704.tar.bz2 This is the .osga file: ftp://ftp.palomino3d.org/sim/palomino_data_terrain_20080206.tar.bz2 -- Jim Brooks jimblist -at- gmail ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi