Week 4
Cameras and Viewports
To enhance the viewing abilities for scenes, I enabled multiple viewports, which is similar to traditional 3d renderers. This is performed by splitting the draw function into 4 draw functions, which loads the scene in different views. This may cause efficiency issues because the scene is draw several times simultaneously, but multi-view can be used as a light-quality mode. Cameras have been improved by implementing 4 cameras (3 orthographic and 1 perspective) into the Scene class. When viewing in a specific view other than perspective, the translation settings have to be adjusted to move the camera specifically. For example, when in top view, when moving the mouse, the camera should translate as it is in top view, not perspective view. The scene saves a current camera to define which camera/viewport to update during translation and rotation.
Improved Camera with Keyboard
As my favorite 3D software, Maya, I implemented a transformable camera based on the keyboard, using the ALT + mouse. This allows for an easier, familiar method of controlling the camera. The current version allows move and rotating a camera in both multi- and single- views.
Camera Types
To allow for camera manipulation, such as adding new cameras or switching between modes, I implemented an OOP Camera model, which creates orthographic and perspective cameras. The reason to divide the camera into camera type is the fact that the different camera types render single- and multi-views differently. This will later be implemented into factories and allow the user to create cameras and choose which modes to look through.
Primitive Selection
After struggling through selection problems through viewport errors, I implemented a primitive version to traverse through the objects to allow me to continue with my new mission of allowing the objects to be manipulated. The GLConstants global class saves a copy of the current object which is determined by space bar. If the object is null, no object is selected. If an object is selected, the new Object GUI will enable its Property panel to allow the object to (1)translate, (2)rotate, and (3)update material. Currently the translation and rotation are used via GLUI translation objects, but I am thinking about changing them to standard textfields, similar to Maya.
Object Manipulation
Object manipulation has been improved to support updating the primary UGeometry data members, which includes transformation and materials. I originally had problems with textfields until I converted all strings to GLUI_String to allow strings to be connected with the glui interface. I may change all strings to char* to allow strings to be visible through console and GLUI. Another issue is the textfield only updates if a translate or rotate occurs because this refreshes the call to UpdateObject.
Animated Textures
After reviewing the Texture Matrix capability, I implemented a simple animated texture by implementing a new data type in the material class. This allows the user to animate any of their textures. I immediately want to take this to the next step by implementing a transformation node, which the user can define how the texture is animated, either through translation or rotation. This includes the speed of animation.
Texture GUI
The next step for this upcoming week is to implement a texture panel into the current material panel which will allow the user to select options that tie into the texture, including if the object is textured and properties such as tiling, scaling, clamping..etc. This will also be the place where the user can determine if the texture can be animated. |
 |
Weekly Notes
Project-specific sections:
> Week 1 Notes
> Week 2 Notes
> Week 3 Notes
> Week 4 Notes
> Week 5 Notes
> Week 6 Notes
> Week 7 Notes
> Week 8 Notes
> Week 9 Notes
> Week 10 Notes
> Week 11 Notes
> Week 12 Notes
> Week 13 Notes
> Week 14 Notes
> Week 15 Notes
> Week 16 Notes
> Week 17 Notes
> Week 18 Notes
> Week 19 Notes
> Week 20 Notes
|