Hi Will,

Will Steptoe wrote:
> Hi Dirk,
> 
> I am using OpenSG 1.8.
> 
> At the moment we would like to morph 4 geometries - the base head, a
> blinking model, an eyelids wide open model, and a mouth open model.
> 
> I'm not sure what you mean by "#attributes per geo". How would I put
> multiple geometries into a single as texture coordinates? Is there an
> example of a shader that interpolates between these?

I don't have a ready made example, but the basic idea is simple. You 
take your 4 geometries, and you put their vertices (and normals, and 
texture coordinates if they're different between models) into texture 
coordinates 2-x f the first geometry.

Than you start with a normal surface shader (like the Phong Shader 
example), and you pass in the interpolation weights as parameters. 
Instead of just using the vertex (and normal...) data from the first 
geometry you use the weights to interpolate between all of them (that's 
why you need to feed them into the shader, and the only way to do that 
in 1 is as texture coords), and you use the interpolated vertex (and 
normal...) to draw.

Hope it helps

        Dirk

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to