The Unity 3D Engine: Building Interactive Scenes Using GameObjects

729 Words2 Pages

The Unity 3D Engine: Building Interactive Scenes Using GameObjects Unity is a powerful development tool that can be used to create interactive 3D Scenes quickly and effectively. Unity uses the rendering pipeline to display graphics and in this report I will outline the phases of the viewing/rendering pipeline and attempt to explain how transformations inside unity are calculated and displayed to the user. The viewing pipeline is the name given to the steps involved in the displaying of a 3D scene as a 2D raster representation. The viewing pipeline uses 3D polygon rendering in order to calculate the necessary pixel values, 3D polygon rendering involves the colour and lighting of all of the polygons in the view of the camera being calculated and then every surface generates a ray which is traced back to the camera. The stages of the viewing pipeline are as follows: 3D geometric primitives – the scene is created from geometric primitives. Usually triangles are used to achieve this as they exist on one plane. Modelling and transformation – The local coordinates are converted into 3D world coordinates this is where transformations made in unity are taken into accounmt. Camera transformation - The 3D world coordinate system in transformed into the 3D camera coordinate system, using the position of the camera as point (0, 0, 0). Lighting – the scene is illuminated using newly calculated lighting and reflectance values. Projection transformation – The 3D world coordinates are transformed into the cameras 2d view, in order to calculate the perspective sizes of objects at different distances to the camera the X and Y coordinates of every vertex must be divided by the Z coordinate of its own primitive. Clipping – all primitives that ar... ... middle of paper ... ...ses a gameobject to move at a high speed along the vector of the player cameras direction. As well as movement the bullet would need to collide with other game objects meaning a collision detection function would usually have to be written. However for the purpose of simply stopping the bullet when it collides unity has built in physics components that can be attached to the bullet gameobject in the inspector panel such as a rigidbody. Unity contains many components, the rigidbody component allow gameobjects to be affected by physical forces such as gravity or wind. Unity also comes with built in character controller components which offer basic functionality for various game types such as first person shooter. These basic components give the opportunity to build upon them using additional scripts in order to save the time it would take to create them from scratch.

Open Document