Unit 66: 3D Modelling

Unit 66: 3D Modelling

Application of 3D Models
3D models have been an recurring feature in gaming since the 1990's, the majority of games over the last two decades have featured 3D models. But 3D models are not a recent discovery, they have been around since the as early as the 1960's. But because of technological restrictions it took years for 3D modelling to really come of use , and for many different purposes. Animation has been a important tool for the development of television and film industries, 2D animation has been used in cartoons for years, and many modern films use CGI(Computer Generated Imagery) to create a scene which could not have been done in real life without killing a stuntman or two. A example on a 3D animated film would be Toy Story(1995). Toy Story was not the first 3D animated movie, but it could be described as the most famous example. Toy Story would use an animation variable called "Avar's"- also known as a hinge. Woody- one of the main characters in Toy Story- would have 212 in his face and 712 for the rest of his body. An Avar controls part of animated object, sets of Avar's create the animated objects movement for each frame. An Avar is similar to how motion capture works, but motion capture will only be as good as the actor moving around, 3D animation is limitless, it just takes a lot of time- Toy Story took 4-5 years to make.
In the 1990's 3D animation became a lot cheap due to more powerful and obtainable computers, because of this the video game industry could venture into 3D graphics, in the mid 1990's game like Super Mario 64 were being released, and consoles like the PlayStation were powerful enough to render 3D models and animation.

3D modelling is not just used in entertainment products, it has many other practical uses for example 3D models are used in education, because they are a more interesting and interactive way of learning.
Auto CAD is a 3D modelling program commonly used for architecture, architects still use pen and paper to design buildings, but it's the 3D models of these buildings which simulate what a building will look like.

Displaying 3D polygon animations
An application programming interface(API)is a group of functions that allow access to features and data of an operating system, or an app, or any other service. Direct X is an example of an API, as it allows programs like games, to access the CPU and Graphics Card, Direct X also determines the hardware capabilities of a a computer. To get the best looking 3D polygon animations, you will need a relatively high spec PC, because hardware is an important part of the equation. The graphics pipeline is a sequence of events that create a 2D raster representation of a 3D scene.

The pipeline back's up my point on hardware being important to displaying 3D polygon animations- the entire pipeline relies on the memory resources available, texture memory is the storage that makes texture data readily available to the GPU- for example a graphics card will have a  couple gigabytes of memory- the more memory available for displaying polygons, the more polygons can be shown on screen.

Lets talk through the pipeline. Firstly there is the Input- Assembler Stage, this stage of the pipeline puts together the lines, points, and triangles. Next is the Vertex Shader Stage, this processes vertices during transformations. The Hull Shader, Tessellator, and the Domain Shader Stages, all are known as Tessellation stages, these three stages convert high order surfaces into triangles for rendering- for example the floor textures of many games will be pretty basic textures- but with a higher tessellation, the texture will become more detailed.

The Geometery Shader Stage processes polygon primitives, it inputs full primitives. The Stream Output Stage will steam the primitive data to the Rasterizer Stage, the Rasterizer will clip the primitives and prepare them for the Pixel Shader Stage. The pixel Shader will then generate some colours and shading for the primitives. And finally the Output-Merger Stage will add the finishing touch using tests to check that everything is good. 


Lets talk about rendering techniques, in many modern 3D games you will notice how pretty the lighting can be, this is all thanks to Radiosity. Radiosity illuminates a rendered scene with shadows, and blur. Ray Tracing is another nice feature that is important for making the most realistic looking 3D animations in games, and other animated media. Ray Tracing is basically giving rendered 3D polygons reflections, these reflections can make a image extremely realistic.

Ray Tracing

Rendering Engines are used to render 3D animations, they are used in films to render CGI, they are used in game engines too. Some examples of rendering engines are V-Ray and Arnold. Arnold has been used to render scenes in many Hollywood blockbusters such as Alice in Wonderland(2010). V- Ray is a plug in, and is used in many other software packages such as 3D Max, MAYA, and Cinema 4D. V-Ray and Arnold are both pretty similar, I have heard that Arnold is a lot simpler to use- but this doesn't mean the rendering is not as complex as it should be. V-Ray is said to have many different options available to the user- so many options it might get too complicated; but this is good for someone who knows exactly how they want it to render. 

Parallel Rendering is the when many different programming principles are aimed towards the displaying computer graphics, all the rendering runs at the same time, but on different processors. The opposite of Parallel rendering would be concurrent rendering, concurrent rendering will switch back and forth between the tasks the same processor- this causes overlapping. There are benefits to concurrent rendering- the main one is that it can complete several tasks at once, this is great if one is taking a while to render, this can reduce the amount of time it takes to render a 3D model, although you should be beware of the hardware restrictions to this- if that one processor, doing all the tasks is having trouble rendering because it's outdated or low spec- you might as well stick to parallel rendering. 
Here's a good way to look at it. If one of the two coffee machines, breaks down- one line will have to start from the back of the other. On the other hand if the one coffee machine breaks down for the two cues, everyone has to wait till the machine is fixed to get coffee.

Some other important features of displaying 3D animations, are the Lighting; lighting is very important as it can set the mood of a scene, and it can bring out the features and colours of a 3D model. Lighting is good, but without any shading and shadowing it's not as nice to look at. Shading can make 3D models look a lot better, and more realistic. Fogging is also important as it can create a sense of depth in a landscape, for example a game where you are flying a plane and you can see a great distance, what makes that distance more impact would be the ground fog instead of just the same textures as when you were on the ground. Level of detail is an important aspect of 3D modelling, but in games it can be scaled down a little be to make way for smoother gameplay, usually background objects and textures will have a lower level of detail than something more important like the players weapon.

Geometric theory
In Maya, there is a lot of geometry theory put into practice, for example the Vertices, edges, and faces of shapes are all available to manipulate. A Vertices is a point of a polygon, with you might discover from playing around with Maya, that you can manipulate the vertices to create sharper points on the 3D model. 
Faces, Vertices, and Edges, are all parts of a polygon. The Faces are the flat surface areas, the Vertices are basically the corners of the polygon, and the edges are the areas between the vertices.

I will show you how I made this Spiky Ball, using box modelling in MAYA.

A couple of controls to be aware of- clicking on "4" on the keyboard shows the polygon as a wire frame, some people might prefer a wire frame view to a shaded view- to get back to shaded view press "5" on the keyboard.
Here's the Maya toolbar. The main controls you should be aware of are: the square surrounded by arrows moves the shape, the one below rotates the shape. 

First Start of with a simple cube polygon primitive. Next, right click on it and select vertex. You will see the points of cube will all turn purple- these are the vertices.
If you click and drag your mouse over the screen, you can highlight all the vertices. When you have done this, find the edit mesh tab at the top of the screen, and click the "Extrude" option. The purpose of extrusion modelling, is to push out parts of a shape to manipulate the shape into a different looking shape. In the screenshot below, the cube has sharp vertices, this is because we highlighted all the vertices and then extruded them- pushing them all out of the cube.
The cube will now have sharp enlarged edges. 

Right click on the polygon, and select "Face"- this is will highlight one of the faces of the shape.

Now with a face highlighted,click on the edit mesh tab, go down to "Poke". The "Poke" function in Maya is used to manipulate the depth of a face, imagine you were to poke a piece of soft moulding clay with your finger- the area you poked would have increased in depth. What we are going to do is the opposite of poking a hole in some clay- we are going to use the Poke function to increase the height of a face- so in other words we are going to poke upwards.
Some arrows should appear, click on the yellow arrow, pointing up and drag it until you feel it matches the other spikes. After you've done this, do it to all the other faces, excluding the one at the bottom, because it ruin the top of the shape.
You might notice some blue lines on the top of the shape, this is what causes the problem, when you try to poke the bottom of the polygon.

These blue lines are edges, left click the mouse and switch to edges. Now you can select the edges and delete them.

Delete the edges on the bottom too.

Now all you have to do is select the face on the bottom of the polygon, and then poke it like you did before. Finally you should have a spiky ball, or a star, or a gem of some sort, you can you it for whatever you want.

3D development software
There are many different 3D development software programs available, the one I am using is Autodesk MAYA. MAYA is considered the industry standard for a lot of 3D modelling, MAYA is good for games design because recently they have allowed users to export straight to the Unreal Development Kit, this is good because the Unreal Engine is used to develop a large portion of games on the market. This simple merge between to two pieces of software with save a lot of time, time which will be spent on creating 3D models in Maya, or designing the game in Unreal.
I have looked at other 3D modelling software, I downloaded Blender- a free to download program which can create some pretty decent 3D models and animation. Blender is supposed to be a "beginner" level piece of software, but when I opened it at home I was pretty confused; this could just be because I am used to MAYA.

I have heard on the internet that 3D max is a better piece of software for designing 3D models and animation for computer games. This could be true, but since MAYA is the industry standard it could open more work opportunities for beginner 3D modellers. MAYA and 3D Max are both owned by Autodesk, this could support the idea that 3D Max has features which would probably be better for creating computer games. Overall it all comes down to personal preference- as they are both 3D moddeling programs.

3D models are complex, they're not the sort of thing every computer, can process. This causes many constraints, 3D models are standard in modern computer games- even on mobile platforms there are 3D models, but there would be a different between the 3D models of a mobile game, and a game which would be on technologically superior platforms such as gaming PC's and games consoles. A major different between mobile games and console games is the amount of available space, for example a mobile device will not have as much RAM(Random Access Memory) as a gaming console, the most RAM a big name phone has is about 2GB, this is okay for a lot of basic functions- like running the phones operating system, but not really enough for the console and PC standard of  gaming and rendering 3D models. Compare it to the average gaming PC- which has 8GB of RAM- but can have 32GB if upgraded. 3D models use polygons, the more polygons, the higher the polygon count, a high polygon count will use more memory, but will look better. A 3D model with a lower polygon count will look more ridged- and less realistic- but it will use less memory to process. Because of this, mobile games will use 3D models with low polygon counts, and the models might use compressed textures to save memory. This isn't all bad though, mobile games are played on smaller screens, so the low poly graphics probably won't be as noticeable.