Assignment 04 - Shading to Match the Real.
12 Sep 2018Here is example code to use that includes two (image) texture maps. You may study the main.cpp file and also the fs.glsl file to see how the texture mapping from images works, but you will only need the texture coordinates (bundled as a VBO in the VAO in main.cpp and passed as an input vec2 to the fragment shader) to complete the main assignment. Do not use image maps, as the goal is to write a completely procedural shader to best match your reference material that you choose. You may choose on of the pieces of labradorite in the videos linked below, or visit Clemson University’s Bob Campbell Geology Museum located near the Clemson Botanical Gardens to choose an interesting specimen other than labradorite (or perhaps visit a Charleston museum if located there). If you choose a piece from the museum, do your best to take several reference photos to match. (You should still produce a turntable real-time render even if you do not have video).
Details of Assignment 04:
- Complete a model with texture layout of your particular piece.
- Triangulate (imporant for the simple obj loader in the code) and export your model as an .obj file from Maya to read with the OpenGL code given.
- Develop a procedural fragment shader that uses some of the techniques discussed (or others) to attempt to match your piece of labradorite.
- Your goal is to match your reference as best possible, but experimentation, technique, and overall visual style will be valued more than a perfect match in this assignment.
- Consider a layered approach informed by the texture coordinates, normal vector, view vector, and light vector as well as other possibilities.
- Make sure that your fragment shader maintains Blinn-Phong lighting or a more advanced material model. Shift the CG light location to match the video turntable of your object if matching one of the labradorite videos.
- Include a brief description of your approach and final technique as well as a screenshot of any versions along the way and video(s) of your final version or others. If possible, match a looping turntable in your video. If you managed something really close to your rock, generate a video showing the two together.
- Package your brief written description (pdf) with screenshots, video, and fragment shader (or other materials as needed) in one lastname.tgz file to upload to Canvas by Thursday, February 27. Come to class prepared to present your video (live demo if time) for critique.
Optional Extensions for Extra Credit
- Implement your own noise, fBm, Voronoi, or other algorithm in your own code and document what you did.
- Implement a more advanced version of coherent noise (such as simplex) or other that you use in your shader.
- After having completed your procedural shader, for comparison, complete painted-image texture maps in a layered approach to match your piece.
- There are a few research papers published related to attempting to render labradorite and other minerals; reference and implement some of these techniques.
Videos are below.
Do your best to match your reference material. This is often one of the most important things that may be used to judge your portfolio material.
Regarding the turntable, I did not have time to make these ‘loopable,’ but you may find it worthwhile to edit your particular mov file with Quicktime or other utility to start and stop on similar frames so that you could loop your video to continue seamlessly. This would be helpful in critiquing your rendered loop as you try to match the reference. I did not check the timing, but you could adjust the timing that I added to the dpa8090assg01 main.cpp file to match the speed of the video turntable, if desired. (And build in the purple wall, too, of course).
Experiment, have fun, and see what you can create.
Labradorite Videos
- Polished Labradorite.
- Labradorite 01.
- Labradorite 02.
- Labradorite 03.
- Labradorite 04.
- Labradorite 05.
- Labradorite 06.
- Labradorite 07.
- Labradorite 08.
- Labradorite 09.
- Labradorite 10.
- Labradorite 11.
- Labradorite 12.
- Labradorite 13.
- Labradorite 14.
- Labradorite 15.
- Labradorite 16.
- Labradorite 17.
- Labradorite 18.
- Labradorite 29.
- Labradorite 20.
- Labradorite 21.
- Labradorite 22.
- Labradorite 23.
- Labradorite 24.
