[osg-users] How to combine soft shadow mapping with normal mapping (and possibly other techs)?

2012-11-12 Thread michael kapelko
Hi. I know OSG has built-in soft shadow mapping, but I'm not sure if it has normal mapping. I only know how to implement normal mapping in GLSL, but not how to combine built-in OSG soft shadow mapping with custom normal mapping shader. Please tell me how to do it. Thanks.

Re: [osg-users] Problem with TBN matrix

2012-11-12 Thread Sebastian Messerschmidt
Hello Peterakos, Have you checked if the tangent space gives you correct results if applied to lighting? Also I don't understand what you need the tangent space for. Usually the fragment's normal is what you already have in the normal-buffer, if you doing some sort of deferred shading. In

[osg-users] qt rendering thread

2012-11-12 Thread Filip Arlet
Hi, Current state GraphicsWindowQt uses QTimer and function osgQt::setViewer for rendering traversal. It's clever, because Qt and osg events get correctly dispatched. But if fps drops, Qt Gui lags, mainly because some events (menu for example) will request redraw. I want to render scene in

Re: [osg-users] Review of osgQt changes.

2012-11-12 Thread Martin Scheffler
Hi, I am just learning about the changes to the OpenGL integration in Qt 5. The new way of dealing with OpenGL seems to be a lot less retarded than the QGLWidget way. You can simply create a QOpenGLContext object in the render thread and a QSurface object in the GUI thread and do

Re: [osg-users] How to combine soft shadow mapping with normal mapping (and possibly other techs)?

2012-11-12 Thread Sebastian Messerschmidt
Hi Michael, First of all you should search the forum for questions regarding shadow mapping and custom shaders. The general answer is: Write your own vertex and fragment shaders and simply apply the shadow mapping as in the stock shaders by applying the shadow term to your lighting. Look

Re: [osg-users] Oddities when loading a FLT file

2012-11-12 Thread Paul Martz
I had another thought on this, Chris. Set a breakpoint in the Multiswitch constructor and verify that the missing Multiswitch is being created under both circumstances. Assuming that test passes, set a breakpoint in the Multiswitch destructor, it should get hit when the missing Multiswitch is

Re: [osg-users] Problem with TBN matrix

2012-11-12 Thread Peterakos
Hello. I use this method: http://www.john-chapman.net/content.php?id=8 for ssao pass. For each fragment i create a hemisphere of samples. This hemisphere is oriented based on fragment's normal, which means the samples have to be oriented based on normal too. The problem is that i cant be sure

Re: [osg-users] Keyboard handler: SHIFT modifier doesn't work on Linux

2012-11-12 Thread Michael Rubin
robertosfield wrote: Could you try the osgkeyboard example Example works fine -- thanks for the tip! I've tracked the issue (in my code) to masking against osgGA::GUIEventAdapter::KEY_Shift_L instead of (like the example) osgGA::GUIEventAdapter::MODKEY_LEFT_SHIFT. Thank you very much

[osg-users] how to use several texture one time?

2012-11-12 Thread wh_xiexing
i have a mesh and want to project several photo on the mesh . code is here: osg::Switch *layer = new osg::Switch; osg::Geode* leaf = 0; if (!hasTexture){ leaf = createLeaf(points, numOfVert, tris,header.np); layer-addChild(leaf); }else{ osg::Group *group = new osg::Group; for (unsigned int