Monday, 20 January 2014

HA4 Task 6 – Constraints

HA4 Task 6 – Constraints
What constraints are involved in working within a 3D environment - polygon count, file size and rendering time?

Remember that you are trying to comprehensively explain the theory and applications of 3D with elucidated examples and consistently using subject terminology correctly.

Polygon Count and File size
There are two measurements which can determine the file size of the object. These are polygon count and vertex count. As we know, polygons are used to build in-game characters, models and objects. These items can have any amount of polygons that construct them. The more polygons = the more detail usually, so as you can imagine, in high end games the main characters model can consist of a lot of polygons. This polygon count can usually be more than 40,000, meaning there are more than 40,000 individual polygons. However, this can vary as character models or object models usually have between 200 - 50,000 polygons in the games industry and it all depends on the scale of the item or the detail needed, so the more polygons = higher file size. Vertices can also be counted instead of polygons.

Polygons vs. Triangles
When ever artists use the term polygon count, they really mean triangle count. This is because most games use triangular polygons to build objects or characters as most modern hardware suits and enhances the speed of rendering these triangular polygons. 2D Triangles are the only shaped that can be moved anywhere and still be considered a planar, meaning that if you move one of the 3 points on a triangle, the object will stay triangular and flat, there fore triangles are the most stable shape to use. If you have a quadrilateral shape however and try to move a point, the surface will bend and this should be avoided. The polygon count in the modelling program can be misleading though as a models triangle count is usually higher, so it is best to switch to a triangle counter in the program so you are using the same counting method as other developers. 
Quadrilateral shapes however do work well with edge-loop selection and transform methods that speed up the modelling, judge the flow of a model and make it easier to add a skinned model to the bones created for it. When the model is exported into the game engine, its quad polygons are transformed into triangles, so if you image a square polygon, the game engine would split that polygon into 2 triangles, so in this case a line would appear diagonally down the square and split the square into the two triangles. This would happen with all polygons. It is therefore best to check if every triangle is in place after transformation though as some could alter the objects appearance. 

Triangle count vs Vertex count
Vertex count is more important for the memory and performance side of things, but most artist still use triangle count as their method of measuring the performance. On a model, the triangle and vertex count can be similar and follow a pattern - 1 triangle uses 3 vertices, 2 triangles use 4 vertices, 3 triangles use 5 vertices and so on. Changes in lighting and shading for example as well as different triangles having different surfaces, are considered breaks in the model, so when it is being rendered the vertices that are on those breaks must be duplicated so the model will be rendered correctly and so the model can be sent in controlled and sized chunks to the Graphics Processing Unit. Adding more shading, lighting or texturing will increase size and decrease performance as more vertices will be created. 




Rendering Time
This is the final process in which the final, completed model must go through to become a finished object/character. This finalisation can be compared to a photo shoot as the time spent building the model would be the time spent preparing the stage and photo area, and the final rendered model would become the final printed picture. Many different methods of rendering have been produced over the years with their own advantages and disadvantages. An example of such as process could be that one rendering method could take hours to create the final product, but have an outstanding quality. Scaline rendering and rasterisation, ray casting, ray tracing and radiosity are all different ways to render, each with their own set of advantages and disadvantages.


http://en.wikipedia.org/wiki/Rendering_(computer_graphics)

Real Time Rendering
This is where the rendering of models continues whilst something else is happening. Real time rending has become very popular in games over the years as in the past, game would just play videos for cut scenes, but now, something is actually rendered and happens in the 3D game world. It also saves performance as memory and in most cases looks better. A good example of a game not using much real time rendering is a game called Max Payne 3. This game came out only a few years ago, but was packed will high quality, pre rendered video cut scenes and this amounted to a whole file size of 30GB+ when I tried to download it which is bigger than most games today and this was all down to it not using real time rendering in its cut scenes. 

During a loading screen of a game, the game pre loads all models, objects and events within the next area of the game, so nothing unrealistically pops in whilst the player is moving around. A technique is used a lot nowadays where is the player is far away from an object, is not looking at it, or it is behind other objects and not visible, the game will temporarily not render the object. This saves a lot of memory and greatly increase frames per second ( FPS ). Most games will run between 30 - 120 FPS as this creates an illusion to the eye that objects on the screen are moving. FPS basically means that a certain amount of frames of an animation for example will play within a second, so if the game was running at 60 FPS, 60 frames of the animation will be played within the actual second, and 60 more will play in the next second and so on. If a game starts to drift below 30 frames per second, then we will start to see a kind of slide show of a game as our eyes will be able to detect the individual frames since they are appearing so slowly. To create a more immersive view, motion blur of field of view ( FOV ) will be added to make it seem more realistic and the higher the frame rate, the more fluid the movement seems, so 120 FPS will seem more more fluent and friendly than 30. Real time rendering is often polygonal and can be helped by the GPU.

http://en.wikipedia.org/wiki/Real-time_rendering



Non Real Time Rendering
Films or animations pretty much always use non real time rendering and are rendered much more slowly. This is where scenes are rendered by the company and turned into videos, which will then be pieced together to make the film, so it is not actually rendered as the audience is watching the film. This allows for more time to be taken, so better rendering can be used and create a higher quality final product. To achieve a photo-realistic product, ray tracing and radiosity are usually used as

"Radiosity is a method which attempts to simulate the way in which directly illuminated surfaces act as indirect light sources that illuminate other surfaces. This produces more realistic shading and seems to better capture the 'ambience' of an indoor scene. A classic example is the way that shadows 'hug' the corners of rooms."
and
"Ray tracing aims to simulate the natural flow of light, interpreted as particles."

These techniques can be used to create naturally occurring effects including light interaction and particle systems which can be used to simulate fire, smoke or rain for example. Volumetric sampling can be used to simulate fog and dust, caustics can simulate light, refraction and things such as ripples on pool floors from the actual surface of the water above it and subsurface scattering to simulate reflecting light inside the volumes of solid objects.

Due to all these processes, a lot of work will need to be done depending on the amount used, but since computer power is increasing, more realistic productions are being made and many people have powerful home PCs now, so some of the work - such as modelling, animations or even rendering - can be done at home.















No comments:

Post a Comment