Notes for April 30

 

Creating mesh deformations

In class showed how to create mesh deformations.

The key is to pass multiple matrix transformations, rather than a single matrix transformation, down to the vertex shader, and also to assign a weight to each matrix transformation, which is stored as an attribute in each vertex. For every vertex, all of these weights must sum to 1.0.

In the version that we implemented, we designated four slots for these weights, which appears in the vertex shader as deformation attribute vec4 aDef.

For each deformation, we do the transformation of the position as usual, but using a different matrix. We then take the weighted sum of all of these positions to get the final value of vec4 pos that determines where the vertex will be displayed, in the assignment statement:

      gl_Position = vec4(pos.xyz, 1.);

All of the code we created in class on Tuesday is in shader12.zip.

Homework

As I said in class, all you need to do for tomorrow is propose a final project. Please put your proposal on your web page by this Thursday, May 2.

You should aim for your project to take about two weeks of work (about twice the amount of work for an average assignment for this class).

You can build on any topic that we have covered this semester, or if you are feeling ambitious you can try to incorporate something that we have not covered.

I will be reading over all of your proposals, and will provide feedback via email if I feel that you need to iterate on your project proposal.

Everyone will be presenting their final project in class either Tuesday May 14 or Thursday May 16.