Math 155B – Topics in Computer Graphics – Spring 2018
 

Project #3 – Either a Bezier Patch Scene OR augmented Water Effects with a Shader (CHOOSE ONE)

Overview:  You have two options for this assignment: Either you will design a scene with Bezier patch surfaces, including normal and textures, Or you will augment the Glsl Water Waves project with additional special effects. 

Due date: Friday, May 11, 9:00pm.  Upload to gradescope, and get graded in-person.

All projects:  Grading is an individual session with Jonathan Conder or Professor Buss.  Upload to gradescope should discuss both technical and artistic aspects of the project; it should include your name but NOT your Student ID number.

OPTION #1: A scene with Bezier patch surfaces.  Design by hand an object using rational Bezier patches. Your program should support the following:

1.      Design an object similar to the famous Teapot, for instance, you might design a coffee pot, or a vase, or an urn, or a lantern, or etc. There must be circular or elliptical cross-sections somewhere in your design.

2.      Apply a texture map to at least part of your object.

3.      Your program should support the usual keyboard controls for changing the direction of view, so that the model can be viewed from any direction.

4.      All surfaces should have normals, and show specular highlights. If your Bezier patches have critical points, you may need to custom code a few normal (e.g., at the north/south pole of a sphere).

5.      Your program must allow toggling between wireframe and solid mode, e.g. with the “W” command as usual.  It suggested that the program allows interactively changing mesh resolutions, with “M” and “m” as usual.  (Optional: If you wish, you can allow showing normals by modifying the geometry shader from the waves project.)

6.      It is expected that you will not compute normals in the vertex or fragment shader: instead compute them in the C++ code and load them into a VBO.

Example projects from an old 155B course can be seen online at http://math.ucsd.edu/~sbuss/CourseWeb/Math155B_2004Winter/BezierProjectsView.html.

Hints:

1.      As the starting basis for your code start with either the same code as was used to start the GlslWaves project or with the code from Project 6.

2.      Last quarter’s Project 6 contains shaders that allow applying textures. If you start with the starting code for the GlslWaves project, you will want to copy the texture map code from Project 6.  (In the shader and in the C++ code.)

3.      Normals for Bezier surfaces should be computed by calculating the partial derivatives w.r.t. u and v, and taking their crossproduct.

4.      You will need to provide texture coordinates in the VBO in order to apply a texture map.

5.      The suggestion is to write a function (a “Remesh” function) which takes in control points for a Bezier patch, and loads the data into VBO/EBO buffers. You can have an array of VAO’s, VBO’s and EBO’s if you wish: one for each Bezier patch.  If you are modelling circular patches, you can probably get by using only Bezier patches which are degree 3x2 (order 4x3).

Hand in: Upload to gradescope a PDF file showing one or two images of your scene, and give a description of the scene and its features.  The description of the features should include descriptions of both technical aspects and artistic aspects of the scene.  Length: 1-2 pages, including pictures.
Include your name, but not your PID, in the PDF file.

Grading will be based on technical merit, creativity, and artistic merit.

OPTION #2 Extend the features of the Glsl Waves Project (Project #2). The idea is to experiment with better water effects.

1.      Required element: You must have at least two overlapping waves.  You will probably want to decrease the height of the waves, and slow them down.

2.      Try various effects to see if the water can be made to look better:

a.      Add a “foam” texture map.  Or a “water” texture map.  Or, both on top of each other.  (You can find both kinds on the internet.)

b.      Try varying the color or specularity with wave height.

c.      Try varying the color with the view angle (probably lighter color when viewed at an angle).

d.      Try varying the transparency of the texture map with wave height. For instance, have more foam texture applied at the wave crests than at the wave troughs.

e.      Formulate your own ideas.

3.      This project will be experimental.  You will probably need to try a number of effects to find things that look good.

4.      For grading: keep a log of the special effects tried, and take screenshots to show the results.

Hints:

1.      Normal calculations become more complicated with multiple waves. You will need to use the crossproduct of partial derivatives method to calculate the normal. (Partial derivatives are linear, normals are not.)

2.      Since you may need to try a number of effects, be sure to keep screenshots and descriptions (even shader code) your best effects, perhaps as many as 4 or 5.

Hand in: Make a PDF file showing at least two images of your scene. Describe the different effects that were tried. Include pictures of the most interesting results. It is OK to include pictures of things that did not work out well, to record your work.  (Not too many pictures please: including 4 or 5 pictures is probably about right.) Be sure to discuss both technical aspects and artistic aspects.  Length: approximately one page of text overall, plus pictures.
Include your name, but not your PID, in the PDF file.

Grading: Technical merit, creativity, and artistic merit. For technical merit, it is expected you will use primarily shader code to obtain the effects.

OPTION #3: If you have another project you would like to do, this may be possible, but must be approved with Professor Buss no later than the weekend.