# 计算机代写｜COMP3617 Virtual and Augmented Reality

**Important, please read first! **

You work at a VR company, and you currently participate in the development of a prototype 3D graphics engine capable to render content for VR headsets. You have been tasked to work on the 3D engine to develop basic rendering, tracking, physics, and distortion pre-correction for VR. Your are provided with a rudimentary 3D engine [2] (available in Blackboard), capable of rendering simple 3D objects using orthographic projection only (i.e., no perspective projection, depths are projected on the screen without taking their depth -distance from camera- into account instead). The engine can perform simple shading too, based on vertex colour interpolation. The engine outputs a single framebuffer on the disk. Your assignment is to extend the 3D engine, to handle perspective projection & object transformations, tracking, physics and distortion correction.

Your task list is below. You should demonstrate your development in a demo scene by rendering a few VR headsets (3D model is provided) falling from the sky under the effect of gravity while the camera is yawing,pitching and rolling based on the provided (in Blackboard) real headset tracking dataset.

**Before proceeding**, please read LaValle’s relevant chapters in the free book available in Blackboard, attend all relevant lectures and read [4] carefully (Please note the typo in the order of operations in eq. 8 & 10).

Additional helpful but not necessary resources can be found in Blackboard ( [1, 3])

PROBLEM 1, RENDERING – 15 MARKS:

The provided engine currently only produces static renders. Add the following features to the rendering engine by updating its source code as required:

PROBLEM 2, TRACKING: HANDLING POSITIONAL DATA – 15 MARKS:

In the Blackboard coursework folder, you can find a sample dataset (6959 records) acquired from a VR headset’s IMU. The headset was sequentially rotated from 0 degrees, to +90 degrees and then to -90 degrees around the X, Y and Z axes (Z is up due to the way the IMU was soldered to that particular headset). IMU observations were recorded at a rate of 256Hz: Time in seconds, Tri-axial velocity (rotational rate) in deg/s, tri-axial acceleration in g (*m*/*s *2 ), and tri-axial magnetometer flux readings in Gauss (G) – the flux readings will not be used in this coursework.

PROBLEM 3, TRACKING: CAMERA POSE CALCULATION – 20 MARKS:

PROBLEM 5, PHYSICS – 20 MARKS:

Implement simple Physics in the engine, simulating gravity acceleration and air resistance applied on the falling objects. See additional literature in the Blackboard coursework folder for formulas on calculating air resistance. Choose arbitrary values for the *drag coefficient *(e.g., 0.5), *air density *(e.g., 1.3*kg*/*m*3 ) and *area *(e.g., 0.2*m*2 ). (10 marks)

Implement simple distance-based collision detection between the objects. Use spheres of an appropriate radius as bounding regions to perform the calculation. For your demo scene, arrange the objects in such a way so that a few collide and change direction. (10 marks)