This program use OpenGL to create an 3D virtual scene, approximated a picture of still life photography.
Target image (The color of tea)
All models created by 3ds Max.
The shading approach for the static objects in the scene is classic Phong-shading model. By modify the coefficient of ambient, diffuse and specular reflection for different object, the program can simulate different material.
As for the rendering for transparent object (glass), this program use a Fresnel value to control the alpha value so the glass will be more transparent when the viewing vecotr is more closer to the normal of the surface, and the glass will show its color when the viewing angle is big.
There are two different approach of texture mapping in this program. For the object model has UV coordinate, the program will directly import the texture coordinate. For those doesn't, the program will generate the texture coordinate by apply a texture mapping on the model. In this particular scene, the tea cup model doesn't have UV coordinate and the program applied a cylindrical texture mapping on it.
Screenshot of the view from camera #1
1
- switch to the camera #12
- switch to the camera #23
- switch to the camera #3a
- start animating (rotate the camera #1)s
- stop animatingr
- reset camera #1esc
orq
- quit the program
OpenGL 3.0
GLEW
GLFW
GLM (math library)
SOIL (image handle library)
- Shadow mapping
- Reflection
- Advanced shading model (PBR)