• Surface of Revolution

    Write code to create a 3D surface of revolution mesh in the SurfaceOfRevolution::CreateMesh method in scene/components/surfaceofrevolution.cpp. Your shape must:

    • have appropriate positions for each vertex

    • have appropriate per-vertex normals

    • have appropriate texture coordinates for each vertex

    • have appropriate vertex connectivity (triangle faces)

    • use the "subdivisions" argument to determine how many bands your surface is sliced into.

  • Mesh Smoothing

    Add functionality, including a simple data structure, for filtering a mesh. In particular, for each vertex of a mesh, take a weighted sum of the vertex and its neighbors to produce a new mesh with the same connectivity as the original mesh, but with updated vertex positions. Vertices are neighbors if they share an edge. Your filter weights around a given vertex will be 1 for the vertex and a/N for each neighboring vertex, followed by dividing every filter weight by the sum of all the weights; "a" is a parameter that controls smoothing or sharpening (typically in the range (-1/2,1/2)), and N is the number of neighboring vertices (N is also called the "valence"), and will vary from vertex to vertex. As with image processing, you should not filter in place on the input mesh, but instead read vertex positions from the input mesh and compute new positions to put in the output mesh. You'll add this functionality in MeshProcessing::FilterMesh in the file meshprocessing.cpp.

    Note that you'll need to recalculate the per-vertex normals!

    To verify your implementation, we suggest you can load Spikey or Bunny mesh, go to [Assets->Mesh Processing->Filter Selected] to apply smoothing and then observe if the result is the same as the solution. To see siginificant and interesting changes, you can use more iterations (e.q. 10) to smooth your mesh.

    To load the Spikey or Bunny mesh, you first go to [SceneObject->Create 3D Object->Mesh] to create a new 3D mesh, which is a cube by defaualt. Then you change TriangeMesh::Mesh property as Spikey or Bunny(on the right inspector page).

  • Hierarchical Modeling

    Your artifact for this assignment will involve creating a hierarchical model. This model must have at least two levels of branching.

    There are two parts to this requirement:

    • Your artifact for this assignment will involve creating a hierarchical model. This model must have at least two levels of branching.
    • Implement a UI to control the relevant joint transformations of your model.

    As part of the project submisson, you need to save your model as YOUR_NETID.yaml, put it in the folder "Editor/assets/model" (you need to create this), and commit to your repository. We will use that model to do grading.

    We recommend you can write down the tree diagram of your model to help you figure out what your model will be, and to practice thinking about empty nodes, centers of rotation, and so on. But note the tree diagram is not a requirement.

    The UI requirement gives you an easy way to show off your model and makes it much easier to animate. It also will help you learn how to add UI elements to the application.

    Below we offer more examples and information to help you figure out how this works.

  • Point Light Blinn-Phong Shader

    Add support for the scene's point lights, by editing the files Editor/assets/blinn-phong.frag and Editor/assets/blinn-phong.vert. You need to include quadratic distance attenuation. Hint: you may not have to edit one of these files. We also include a few extra shaders including Editor/assets/texture.frag and Editor/assets/texture.vert to provide some basic examples for how to do things like sample from textures. You do not need to worry about these unless you're doing bells and whistles.

    • ShaderProgram::BuiltinUniforms in the file Engine/src/resource/shaderprogram.h contain a list of uniforms supplied by default to your shader as long as you declare them properly in your shader. GLRenderer::SetUniforms in the file Engine/src/opengl/glrenderer.cpp is where they are actually being passed in.

    The default scene donesn't include point light source. So you might see no differences after completing your implentation. We provide another scene that includes point light, located at assets/scene/point_light_scene.pyml, for helping you test the correctness. You just open the scene in both your and the solution program to see if the rendering results are the same.

  • Create an Additional Shader

    Create another shader(s) from the list below that is worth at least 3 whistles (or 1.5 bells). This is required and will not count as extra credit. However, any additional bells or whistles will be considered extra credit. Consult OpenGL Shading Language, "the orange book" for some excellent tips on shaders. Ask your TA's if you would like to implement a shader that isn't listed below. Credit for any shader may be adjusted depending on the quality of the implementation, but any reasonable effort should at least earn you one of the required whistles.

    Note You must keep your point light Blinn-Phong shader separate, so we can grade it separately. To be more specific, you need to rename the additional shader as YOUR_NETID.[vert,frag] and put them in the folder Editor/assets. If you have one more additional shaders, add an index number after YOUR_NETID (e.g. YOUR_NETID_[1,2,3,...].[vert,frag].

    Refer to Program Usage: Creating a new shader to know how to create a new material that uses your shader to draw the model.