HI Chirstoph,

On 25 October 2012 17:13, Christoph Heindl <[email protected]> wrote:
> Ok, so the fixed function pipeline does already contain an implementation
> for multitexturing, in contrast to the programmable pipeline via shaders,
> right?

Both fixed function and shaders support multi-texturing.  The fixed
function is typically more limited in the number of texture units the
driver exposes, how many units each support is driver and hardware
dependent.

>> How many textures do you want to assign to a single mesh?
>
> I would assume that ten fotos should suffice to texture a mesh 95%.

This might well push you over the limit supported by fixed function
pipeline on your hardware so it's likely you'll need to look at using
GLSL shaders.  As you have a pretty straight forward usage case this
won't require anything too complicated.

>  I need
> to deal with vertices that are textured from multiple fotos or are never
> textured somehow on my side. Is there a way (without splitting the mesh) to
> assign a default material (simple color) to all untextured
> vertices/triangles? I'd assume that I can assign out of range UV coordinates
> (-1) and set a border color.

With OpenGL the whole mesh will be textured by all textures you apply,
the way to get non and textured parts for areas outside the texture
coordinate range 0,0 to 1,1 is to set a alpha value of 0 for the
border colour, something like (1,1,1,0) would be appropriate.  However
if you are using GLSL you can use test the texture coordinate prior to
reading the texture and then just blend the colours as you require.

It's not really me place to teach you GLSL so I have to recommend that
you look at online resources for GLSL, and on the OSG side have a look
at the osgshaders example and any other places where osg::Program
crops up in the OSG examples or code base.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to