Re: [osg-users] light, normals

2009-05-15 Thread J.P. Delport
Hi, Jean-Sébastien Guay wrote: Hi Christian, my geometry has 9 vertices - i thought if i use a drawElement index with index swaps to revist a vertex, this would give me the opportunity to use more than one normal per vertex (there are reasons why i need this ;-). i now think the truth is,

Re: [osg-users] light, normals

2009-05-15 Thread Christian Sam
Hi, i wanna thank the two posters for clarifying which different approaches are possible for this issue, because problems like that weren't covered in the basic opengl books i have read. Cheers, Christian -- Read this topic online here:

Re: [osg-users] light, normals

2009-05-15 Thread Jean-Sébastien Guay
Hi JP, and make two primitives. By two primitives, do you mean two osg::Geometry objects sharing the same vertex array? (as opposed to two PrimitiveSets in the same osg::Geometry, which is what he was trying to do...) Yes, that's true and clever, I hadn't thought of that. Thanks for your

Re: [osg-users] light, normals

2009-05-15 Thread J.P. Delport
Hi J-S, Jean-Sébastien Guay wrote: Hi JP, and make two primitives. By two primitives, do you mean two osg::Geometry objects sharing the same vertex array? (as opposed to two PrimitiveSets in the same osg::Geometry, which is what he was trying to do...) Yes, that's true and clever, I

Re: [osg-users] light, normals

2009-05-15 Thread Jean-Sébastien Guay
Hi JP, Sorry, primitives is a bit vague. I normally make separate (sometimes to set e.g. renderbin number on each) osg::Geometry, each with single addPrimitiveSet. I have not tried multiple addPrimitiveSet on single geometry, but think/hope it should also be OK and share the vertex array.

[osg-users] light, normals

2009-05-14 Thread Christian Sam
Hi, i need a little help with some lighting issues. the geometry, a roof, consists of a drawable with one primitive (DrawElement TRIANGLES) and associated normal vectors per vertex. the problem is, the resulting shading of the rendering is not what i have expected. [Image:

Re: [osg-users] light, normals

2009-05-14 Thread Christian Sam
Hi, okay, i think i figured out that the odd shading is only a result of my missunderstanding of the normals BIND_PER_VERTEX concept. my geometry has 9 vertices - i thought if i use a drawElement index with index swaps to revist a vertex, this would give me the opportunity to use more than

Re: [osg-users] light, normals

2009-05-14 Thread Jean-Sébastien Guay
Hi Christian, my geometry has 9 vertices - i thought if i use a drawElement index with index swaps to revist a vertex, this would give me the opportunity to use more than one normal per vertex (there are reasons why i need this ;-). i now think the truth is, only real vertices in the