Have a question?
Message sent Close

OSU CSE 3541 Practical - Lab 1-6

Instructor
Sandra Watson
0
0 reviews
  • Description
  • Full Document
Blur-Preview

Ohio State University

Computer Gaming and Animation Technique (CSE 3541/5541)

1 Requirements
Use Unity to write a 3D solar system program. Read the tutorials before you start working on it.
1.1 The objects (3 Points)
To begin with, let us create three spheres as our objects as the sun, the earth, and the moon. Change
their radii, so that the sun is the biggest and the moon is the smallest. Build an object hierarchy, so
that the earth depends on the sun, and the moon depends on the earth. (You can create as many
intermediate empty objects as you want, if necessary.) Adjust their positions, so that the sun is at
the origin; the earth is some distance away from the sun; then the moon is some distance away from
the earth.
1.2 The scripts (6 Points)
Our next step is to get everything to move!
Camera motion (3 Points). Allow user to change the default camera view, by clicking the mouse
button and dragging it. The horizonal movement corresponds to rotating the camera around the
Y axis, and the vertical mouse movement is corresponds to rotating the camera around the X axis.
To implement this, you can: 1) create a script for the camera and assign the camera transformation
to a script variable; 2) detect the mouse events using the default Input variable in the Update
function; 3) obtain the mouse movement using the Input.GetAxis function and modify the camera
transformation variable accordingly.
Camera motion (2 Points). Create two scripts to handle the earth motion and the moon motion,
respectively. You can do this by applying rotation on the object’s transformation in the Update
function.
Rendering (1 Points). Let us assign the sun, the earth, and the moon with some material colors.
Finally, put a point light at the center of the sun (i.e., the origin) to light everything up. (You may
assign the self-illumination material to the sun, so it doesn’t need to be lit up.)

PREVIEW

 

OSU CSE 3541 Practical - Lab 1-6

NOTE: Please check the details before purchasing the document.

error: