Re: [osg-users] osgShadow and multitexture

2012-03-20 Thread Sebastian Messerschmidt
Hi Daneil, All the shadow mapping techniques AFAIR support multitexturing. You will have to provide you custom vertex and fragment shader however. Also you should set the texture unit/texture coordinates for the shadow to texture-count + 1. Just look into the sources, there are the

Re: [osg-users] Camera attached to object

2012-03-20 Thread Sergey Bocharov
Anyone knows how to do this? Thank you! Cheers, Sergey -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46424#46424 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] osgShadow and multitexture

2012-03-20 Thread Daniel Schmid
I have a hard time understanding that the osgShadow implementations should support multitexturing when they never mix the colors oft he different texture units... Ok, I'm not yet that settled in glsl maybe there is some magic working behind, which I do not understand. I'm having a closer look

Re: [osg-users] osgShadow and multitexture

2012-03-20 Thread Sebastian Messerschmidt
Am 20.03.2012 09:26, schrieb Daniel Schmid: I have a hard time understanding that the osgShadow implementations should support multitexturing when they never mix the colors oft he different texture units... Ok, I'm not yet that settled in glsl maybe there is some magic working behind, which

Re: [osg-users] osgShadow and multitexture

2012-03-20 Thread Robert Osfield
Hi Daniel, On 20 March 2012 08:26, Daniel Schmid daniel.sch...@swiss-simtec.ch wrote: I have a hard time understanding that the osgShadow implementations should support multitexturing when they never mix the colors oft he different texture units… Ok, I’m not yet that settled in glsl maybe

[osg-users] Camera attached to object

2012-03-20 Thread Sergey Kurdakov
Hi Sergey, Anyone knows how to do this? just a suggestion you may take a look at osg code ( nodetrackermanipulator), and adjust it to your needs as you would get desired camera out of existing codebase for camera matrix manipulation. Regards Sergey On Tue, Mar 20, 2012 at 11:50 AM, Sergey

Re: [osg-users] osgShadow and multitexture

2012-03-20 Thread Daniel Schmid
There is a remaining question. In StandardShadowMap.cpp Lines 632 - 639 (osg 3.0.1) I find lines setting the texture mode for stage 1-4. Why is there a limitation to these 4 stages, and what are they doing? If my model uses 4 textures and the shadow should go on layer 5, could this be a

Re: [osg-users] Camera attached to object

2012-03-20 Thread Sergey Bocharov
Hi, Sergey Я уже голову сломал с этими матрицами. ;-) Cheers, Sergey -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=46433#46433 ___ osg-users mailing list osg-users@lists.openscenegraph.org

Re: [osg-users] osgShadow and multitexture

2012-03-20 Thread Wojciech Lewandowski
Hi, These lines limit the textures used for rendering shadow map. Basically there is no need to render the models with textures when we only render depth in shadow map. The only exception are textures which can contain alpha and then models will not render the parts with full transparency. So the

Re: [osg-users] PixelBuffer Cocoa - Meaning of output message?

2012-03-20 Thread Robert Osfield
Hi Hartwig, The warning looks inappropriate, I've removed it and check the change into svn/trunk. Thanks, Robert. On 19 March 2012 21:41, Hartwig Wiesmann hartwig.wiesm...@wanadoo.nl wrote: Hi, in osgView::PixelBufferCocoa::realizeImplementation there is a line Code: std::cout

[osg-users] Camera attached to object

2012-03-20 Thread Sergey Kurdakov
Hi Sergey, in computeNodeCenterAndRotation take a look at coordinateFrame , I expect it should be unit matrix to be at center of object. Regards Sergey ___ osg-users mailing list osg-users@lists.openscenegraph.org

[osg-users] texture sampler uniforms

2012-03-20 Thread Daniel Schmid
Hi there I was searching osg to find out what happens with textures when a model node is loaded from file (for example openflight *.flt model). Does osg automatically create uniforms samplers for shaders to access the textures? Do these uniforms have specific names ? or do I have to manually

Re: [osg-users] Nodes in osg::Group affect each other's state.

2012-03-20 Thread Eldar Insafutdinov
Hi I was able to find a workaround to this problem by adding an overall white colour to the textured quad Code: osg::ref_ptrosg::Vec4Array colors = new osg::Vec4Array; colors-push_back(osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f)); // needs to be white! geom-setColorArray(colors.get());

Re: [osg-users] Any libraries of public domain shapes for Open Scene Graph?

2012-03-20 Thread Barry
Hello Robert Your right I should be more precise with my language. I was wondering if there are collections of shapes available for use in OpenSceneGraph applications. I was thinking more like the the mathematically defined shapes that Christian suggested. But the objects that Andrew

Re: [osg-users] Any libraries of public domain shapes for Open Scene Graph?

2012-03-20 Thread Christian Buchner
There are some objects in osg::ShapeDrawable, but they are not optimized for speedy rendering. Its constructor takes an osg::Shape, such as Box, Capsule, Cone, Cylinder, Sphere, ... Good enough for composing test scenes. Christian ___ osg-users mailing

Re: [osg-users] [vpb] osgdem: set texture minfilter and magfilter to nearest?

2012-03-20 Thread Ethan Fahy
And if it's not possible, is there any way to change the filters once I've read a terrain.ive file into an osg project? I've seen this code snippet: Code: osg::osg::Node* terrain = osgDB::readNodeFile(terrain.ive); osg::Texture2D* tex = new osg::Texture2D;

Re: [osg-users] Segmentation fault in osgDB::readNodeFile()

2012-03-20 Thread Mark Green
Hi, Thanks to everyone for the help given, the problem has been solved now. Your hunch was indeed correct about requiring a reinstall. What exactly went wrong during the initial install hasen't become clear, but the segmentation fault and the warning dissappeared after said reinstall. As a

[osg-users] Geometry object shared by multiple Nodes.

2012-03-20 Thread Eldar Insafutdinov
Hi, I am trying to reuse Geometry objects between multiple osg::Node instances and apply geometry shader to reposition them. On the attached testcase I tried to implement this. The first osg::Node instance uses unmodified Geometry, and the second one uses vertex shader to shift the quad

Re: [osg-users] Geometry object shared by multiple Nodes.

2012-03-20 Thread Glenn Waldron
Sounds like it might be getting clipped by the near clip plane. OSG automatically computes a near clip plane based on the bounds of the real geometry in the scene. It doesn't account for geometry that's altered by a vertex shader. Check into osg::CullSettings for ways to alter the way clip planes

Re: [osg-users] texture sampler uniforms

2012-03-20 Thread Sergey Polischuk
Hi you need to manually create them and add to statesets. If you'll save model after that - they will be saved correctly and will be there on model load. 20.03.2012, 17:15, "Daniel Schmid" daniel.sch...@swiss-simtec.ch:Hi thereI was searching osg to find out what happens with textures when a model

Re: [osg-users] Geometry object shared by multiple Nodes.

2012-03-20 Thread Eldar Insafutdinov
Thanks, Glenn. I now think it really is the case, because if I position 2 geometries close enough, the second one isn't truncated. I will investigate in details the CullSettings class. Cheers, Eldar -- Read this topic online here:

Re: [osg-users] Geometry object shared by multiple Nodes.

2012-03-20 Thread Eldar Insafutdinov
There's actually one more question I intended to ask: in case of sharing a Geometry object through the API does it actually create only one instance of it on the graphics card side? The whole reason I use this trick to save both systems and graphics memory. Cheers, Eldar --

Re: [osg-users] Geometry object shared by multiple Nodes.

2012-03-20 Thread Glenn Waldron
Yes, single instance. Glenn Waldron / @glennwaldron On Tue, Mar 20, 2012 at 11:51 AM, Eldar Insafutdinov e.insafutdi...@gmail.com wrote: There's actually one more question I intended to ask: in case of sharing a Geometry object through the API does it actually create only one instance of

Re: [osg-users] [vpb] osgdem: set texture minfilter and magfilter to nearest?

2012-03-20 Thread Robert Osfield
HI Ethan, Texture filter is controlled per osg::Texture, you can't override the filtering without overriding a the texturing. If you want to modify the filtering of the textures that an osgTerrain based database they you'll need to load the scene graph then search the scene graph to locate the

Re: [osg-users] Nodes in osg::Group affect each other's state.

2012-03-20 Thread Robert Osfield
Hi Eldar, I you don't assign a colour to a geometry and the shader/fixed function pipeline is using colour then it'll inherit it's state from the last time that it was applied, in your case it would have been other geometry in your scene. If you want a specific colour on geometry then you need

Re: [osg-users] Segmentation fault in osgDB::readNodeFile()

2012-03-20 Thread Robert Osfield
Hi Mark, On 20 March 2012 15:07, Mark Green hlgamead...@hotmail.com wrote: Thanks to everyone for the help given, the problem has been solved now. Your hunch was indeed correct about requiring a reinstall. What exactly went wrong during the initial install hasen't become clear, but the

[osg-users] Global state attribute (uniform)

2012-03-20 Thread Aurelien Albert
Hi, I would like to add a global uniform to my scene graph (OSG 3.0.1). By global, I mean that all shaders can access to its value, anywhere in the graph So, first I've binded this uniform on my scene graph root object, it works well. But now, the project has evolved and I need a modification

[osg-users] Trans/Rot need for quad fill entire screen?

2012-03-20 Thread Paul Griffiths
Hi, Lets say: A Quad (4 * 3 units) at pos(0, 10, 0), rot(0, 45, 0). The screen is 800 * 600 (ratio 4/3) What is the trans rot needed from the Quad for the Quad to fill the entire screen? I need to pull back from the Quad for it to exactly fill the screen. Any advice? ... Thank you!

Re: [osg-users] osgShadow and multitexture

2012-03-20 Thread Jean-Sébastien Guay
Hi Wojtek, This should be no problem for models with more texture stages as long as you substitute shadow technique shaders with your own set which can process your multiple textures correctly. Almost correct - the problem is that the shadow technique also disable all shaders for the shadow

Re: [osg-users] Trans/Rot need for quad fill entire screen?

2012-03-20 Thread Chris Hanson
I need to pull back from the Quad for it to exactly fill the screen. You may be going about this wrong. What are you actually trying to accomplish? -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Training • Consulting • Contracting 3D • Scene