Return To Previous Page

Camera Perspective & Pre-Rendered World

Date: May 23, 2021

Program / Driver

Description:

A program where users are placed into a pre-rendered world of objects formed by sphere and cylinders where users are able to explore around the virtual world through a Perspective Viewpoint, as well as through an Orthographic Viewpoint. The user is able to use Camera Controls to explore and maneuver around the virtual world, as well as use a created animation to move around the center of the object world. Users are also able zoom in and out of the world to have a different Field of View when observing the virtual world normally.

Guide to Use Program:

Camera Controls

Controls are above the Canvas with instructions. To move the camera's positions, use WASD controls to move forward, backwards and sideways. To move the camera in place, use IJKL controls to tilt up and down, as well as pan left and right.

Zooming In and Out

Below the Canvas contains a slider for zooming in and out of perspective. Users are able to adjust how far or near they want to view the world.

Resetting Camera Position

Pressing the "Reset Camera" button will reset the camera's position to where it originally starts when the program is opened.

Switching Between Perspective and Orthographic Projections

Pressing the "Switch Projection" button will change the projection of the camera towards the virtual world. Users are able to observe which projection they are currently on by the text below the button that what the current projection is.

Animation

Pressing the "Animation" button will turn on the camera animation to rotate around the center of the object's world. In order to turn off the animation, the user must press the "Animation" button once again to stop the animation and will reset the camera's position.

Creating / Controlling Cylinders

- To create a cylinder, you must input an N number that will represent the number of sides for the cylinder. Below the number input is a Color Box, where the user can decide what color shading the user wants on their created cylidner. Once the user has decided on N and the Color, they can click on "Add" to create the new cylinder.
- To control a specific cylinder, users can click on the drop down menu containing all created cylinders and click on the numbered cylinder they would like to control.
- To make every cylinder into a wireframe rather than completely filled out, users can use the "Wireframe" checkbox to view the wireframes of each cylinder.

Transformations of Cylinders

- Users are able to transform each Cylinder Object through 3 options: Translate, Rotate, and Scale. Each transformation has 3 slides that are assigned to each axis on the 3D plane. Each slider performs the appropriate transformation depending on which axis it is being used on.

Choosing Type of Shading / Updating the Canvas

Below the user input of the cylinders, there is a Shading List that contains three possible choices: Flat Shading, Smooth Shading, and Wireframes. Choosing one from the list will adjust how each object on the canvas will be outputted as. To update the canvas, click on "Update" after selecting the desired shading choice.

Toggling On/Off Light Sources

Below the table to transform cylinders around are two toggle switches that are ON at the start. Each switch corresponds to the appropriate light source labeled. To turn each specific light source ON/OFF, click on the toggle switch as such. Note: If both the switches are OFF, the objects will only have Ambient Lighting.

Moving the Point Light Source

The Point Light Source is represented as the small yellow sphere on the bottom part of the canvas. If the Point Light Source is toggled to be on, the user can adjust the point light source by adjusting which axes the user wants to move towards.

Issues:

* When tilting all the way up or down, the perspective of the world flips upside down. Continuing to rotate in the same direction will flip the world once again and the world will be in the normal perspective.
* Increasing the zoom value past 20 or decreasing the zoom value past -10 seems to flip the world upside down and mirror the virtual world. Might be how the zoom value is calculated when dividing by 10 however I was not sure how to fix it.

Example Outputs:


Perspective Projection:

Orthographic Projection:

Zoomed In:

Zoomed Out:




Return To Previous Page