$29
Create a world containing one or more movable lights, a skybox, a user-controllable camera, and at least three objects made of different materials and textures,. At least two of the objects must be moving and organized in a matrix stack as a hierarchical system.
In addition to moving the camera around, you will add controls for moving a light around. You can reuse some of your code from A2, such as key bindings, camera controls, XYZ axes. Your scene can be similar to the one you made for A2, or it can be different, but in either case there must be some substantial change. Try to be creative!
Program Requirements
At least one object must be imported from an OBJ file not distributed in class. Use the OBJ loader from the book, and an OBJ model from the web or another source, or you can build one using Maya or Blender. Include XYZ axes that can be toggled on/off as in A2.
Use at least two different textures. Textures must be rendered so that they also show the effects of lighting, blended as described in Chapter 7.6 (try each method and choose which one works best for your scene). Access OBJ files using only relative paths.
At least two of the objects must be organized using a matrix stack, in which the parent object is moving. This should cause the child object to follow, or be attached to, the parent. Use the JOML Matrix4fStack class to manage the MV matrix used for the moving object and the child object. This should require only one Matrix4fStack instance. Also, at least one object in your scene must be defined outside (i.e., not in) the matrix stack.
The world is to be lit by at least: (1) global ambient light that is always on, and (2) a positional or spot light that can be toggled on/off by a button or key. The positional light must be moveable via the mouse, with controls for left, right, forward, backward, up, and down. Use either dragging, and/or the mouse wheel. (document this in your readme file)
Your shaders must implement Phong or Blinn-Phong reflection on all displayed objects (when lighting is enabled), except for the skybox. Distance attenuation isn’t required.
Draw a yellow dot (or something similar) at the location of the movable light, unless there is already an object for the light. You can add a key that removes the yellow dot if you like.
The program must use at least two different material definitions for rendering world objects. You may obtain your material definitions from any source, such as the table in the book. You may also use the statically-defined materials (gold, silver, bronze) in the Utils class on the textbook’s CD. However, at least one of your material definitions should be from some source other than the textbook/CD.
1
Your scene should include a skybox. It may be from the book, or from the web, or one that you create. Note that it must be a skybox, not a roombox. It should be implemented using an OpenGL cube map. You may use the code in the Utils.java file on the accompanying disk. Do not apply lighting to the skybox. Test your skybox by turning the camera around, to make sure that all six sides are properly positioned relative to each other.
The user must be able to manipulate the camera using similar camera controls as in the previous assignment (A2). You may choose to restrict the camera (and light) movement controls to within a range that is logical for your scene. However it must be possible to view all six sides of the skybox.
Additional Notes
Deliverables
(it is not necessary to include an additional TEXT file this time)