Thursday, 6 June 2013

6. Constraints

Polygon Count

The two common measurements of a game character's 'cost' are polygon count and vertex count. Polygon is interchangeable with triangle in these measurements, as GPUs only see vertices and triangles, not 4+ sided polygons. Depending on the use, a game character may stretch anywhere from 200-300 triangles, to 40,000+ triangles. A high-end third-person console or PC game may use many vertices or triangles per character, and an iOS tower defense game might use very few per character.











Polygons Vs. Triangles


When a game artist talks about the poly count of a model, they really mean the triangle count. Games almost always use triangles not polygons because most modern graphic hardware is built to accelerate the rendering of triangles.
The polygon count that's reported in a modeling app is always misleading, because a model's triangle count is higher. It's usually best therefore to switch the polygon counter to a triangle counter in your modeling app, so you're using the same counting method everyone else is using.

Polygons however do have a useful purpose in game development. A model made of mostly four-sided polygons (quads) will work well with edge-loop selection & transform methods that speed up modeling, make it easier to judge the "flow" of a model, and make it easier to weight a skinned model to its bones. Artists usually preserve these polygons in their models as long as possible.

Triangle Count vs. Vertex Count

Vertex count is ultimately more important for performance and memory than the triangle count, but for historical reasons artists more commonly use triangle count as a performance measurement.
On the most basic level, the triangle count and the vertex count can be similar if the all the triangles are connected to one another. 1 triangle uses 3 vertices, 2 triangles use 4 vertices, 3 triangles use 5 vertices, 4 triangles use 6 vertices and so on.
However, seams in UVs, changes to shading/smoothing groups, and material changes from triangle to triangle... are all treated as a physical break in the model's surface, when the model is rendered by the game. The vertices must be duplicated at these breaks, so the model can be sent in renderable chunks to the graphics card.

Rendering

Because there are still PC systems being sold with limited graphics cards (or none at all), software rendering will always be required for some applications. Games for kids and casual gamers (who use outdated systems or systems primarily meant for office applications) can have a need for a software renderer as a fallback. For example Toy Story 2 Action Game has a choice of selecting either hardware or software rendering before playing the game while others like Half-Life default to software mode and can be adjusted to use OpenGL or DirectX in the Options menu. Some 3D modeling software also feature software renderers for visualization. And finally the emulation and verification of hardware also requires a software renderer. An example of the latter is the Direct3D reference rasterizer.

But even for high-end graphics, the 'art' of software rendering hasn't completely died out. While early graphics cards were much faster than software renderers and originally had better quality and more features, it restricted the developer to 'fixed-function' pixel processing.

Dependant on how large the polygon count is on a 3D model that is created, rendering times on a none high-end PC can take a long time. This is why even though rendering can be and is done quickly (within example below) some people are constrainted by the time it takes a 3D model to render. 

4. Mesh Construction

People who will use Mesh Contruction will often opt to create the mesh using a variety of tools. This includes lots of different software programs that will assist and aid in creating the mesh, opposed to creating the mesh manually by specifying verticies anf faces. 

Box Modelling
Box modeling is a technique in 3D modeling where you take a basic primitive shape (like a box, cylinder or others) and make the basic shape “rough draft” of your final model from there you sculpt out your final model. The process uses various tools and steps that sometimes get repeated again and again until you're done. Despite the fact you’re repeating these steps you will model faster and control the amount of detail you wish to add, slowly building your model up from ground level of detail to high level. 

Quadrilateral faces, commonly named "quads", are the fundamental entity in box modeling. Obviously, if an artist were to start with a cube, the artist would have six quad faces to work with before extrusion. While most applications for three-dimensional art provide abilities for faces up to any size, results are often more predictable and consistent when working with quads. This is so because of the fact if you were to draw an X connecting the corner vertices of a quad, the surface normal is nearly always the same. We say nearlybecause, when a quad is something other than a perfect parallelogram (such as a rhombus or trapezoid), the surface normal would be different. Also, a quad subdivides into two or four triangles cleanly, making it easier to prepare the model for software that can only handle triangles.

Extrusion Modelling

In 3D computer graphicspolygonal modeling is an approach for modeling objects by representing or approximating their surfaces using polygons. Polygonal modeling is well suited to scanline rendering and is therefore the method of choice for real-time computer graphics. Alternate methods of representing 3D objects include NURBS surfaces,subdivision surfaces, and equation-based representations used in ray tracers. See polygon mesh for a description of how polygonal models are represented and stored.

The basic object used in mesh modeling is a vertex, a point in three dimensional space. Two vertices connected by a straight line become an edge. Three vertices, connected to each other by three edges, define a triangle, which is the simplest polygon in Euclidean space. More complex polygons can be created out of multiple triangles, or as a single object with more than 3 vertices. Four sided polygons (generally referred to as quads) and triangles are the most common shapes used in polygonal modeling. A group of polygons, connected to each other by shared vertices, is generally referred to as an element. Each of the polygons making up an element is called a face.

Primitive Modelling

Another common method of creating a polygonal mesh is by connecting together various primitives, which are predefined polygonal meshes created by the modelling environment. Common primitives include:

Cubes
Pyramids
Cylinders
Spheres
2D primitives, such as squares, triangles, and disks












Specialised Modelling

Finally, some specialized methods of constructing high or low detail meshes exist. Sketch based modeling is a user-friendly interface for constructing low-detail models quickly, while 3d scanners can be used to create high detail meshes based on existing real-world objects in almost automatic way. These devices are very expensive, and are generally only used by researchers and industry professionals but can generate high accuracy sub-millimetric digital representations.


5. 3D Development Software

There are so many different pieces of software for 3D modelling out there, so much that many people may get confused as to which to purchase or use for the 3d model they want to create. Although that there are so many different pieces of software for this out there, many of them are very similar in what they do, how they present your model and also the price of the software itself. Here are some examples of different pieces of software for 3D modelling.

3d Tin
An online 3D modeling program with an intuitive interface. All models saved in the cloud, and can be exported to standard file formats such as STL, DAE and OBJ. This is a free piece of software.

3ds Studio Max
Autodesk 3ds Max Design is a 3D modeling, animation, rendering, and compositing software product for architects, designers, civil engineers, and visualization specialists. This could cost up to $3500 but is defiantly professional quality, whereas some others are not up to £Ds Max’s standards.











AC3D
3D software for games, virtual reality and flight simulation, scientific, medical and general data visualization, rapid prototypes of 3D designs, high resolution 3D renderings, Google Earth, Second Life and more. AC3D is around $99 in price to buy but isn’t as high quality as the more expensive pieces of software.

Lightwave

LightWave is a software package used for rendering 3D images, both animated and static. It includes a rendering engine that supports such advanced features as realistic reflection and refraction, radiosity, and caustics. The 3D modeling component supports both polygon modeling and subdivision surfaces. The animation component has features such as reverse and forward kinematics for character animation, particle systems and dynamics.











AutoCAD
Autodesk AutoCAD is an industry leader in 3D CAD design, drafting, modeling, architectural drawing, and engineering software and a best-in-class customizable and extendable CAD application. AutoCAD is very expensive due to it high quality and professional looks within its presentation. It can be as high as $1500 to purchase.

Cheetah3D
Cheetah3D is a 3D modeling, rendering and animation software for Mac OS X. It offers native support for importing and exporting STL files (ASCII and Binary). This is recommended for lesser experienced 3D modelers as its price is only around $50 but isn’t the high quality some may expect.

Inventor 3D
Autodesk Inventor 3D is a mechanical design and 3D CAD software product that has tools for product simulation, tooling creation, and design communication.

Maya
Autodesk® Maya® 3D animation software delivers an end-to-end creative workflow with comprehensive tools for animation, modeling, simulation, visual effects, rendering, match moving, and compositing on a highly extensible production platform. This is another top end piece of software as it is over $3000 in price and is usually use by industry professionals due to its highest quality of all the 3D software.









Rhino
Rhinoceros (Rhino) is a NURBS-based 3-D modeling tool used for industrial design, architecture, marine design, jewelry design, automotive design, CAD/CAM, rapid prototyping, reverse engineering as well as the multimedia and graphic design industries.

Solidworks
Dassault Systèmes’ SolidWorks a leading 3D CAD product design engineering software with more than 1,400,000 users at over 136,800 locations around the world.

Zbrush
ZBrush is a digital sculpting and painting program that has revolutionized the 3D industry with its powerful features and intuitive workflows. It uses a proprietary "pixol" technology which stores lighting, colour, material, and depth information for all objects on the screen. The main difference between ZBrush and more traditional modelling packages is that it is more akin to sculpting.












You may see that some of the 3D software are clearly only for beginners and people who are not experienced in modeling, whereas some of them are used for industry professionals as they are in the thousands in cost and are very high quality when creating and presenting your 3D model. 

2. Displaying 3D Polygon Animation

API

API, an abbreviation of application program interface, is a set of routines, protocols, and tools for building software applications. A good API makes it easier to develop a program by providing all the building blocks. A programmer then puts the blocks together.

Most operating environments, such as MS-Windows, provide an API so that programmers can write applications consistent with the operating environment. Although APIs are designed for programmers, they are ultimately good for users because they guarantee that all programs using a common API will have similar interfaces. This makes it easier for users to learn new programs.

Direct3D

An API for manipulating and displaying three-dimensional objects. Developed by Microsoft, Direct3D provides programmers with a way to develop 3-D programs that can utilize whatever graphics acceleration device is installed in the machine. Virtually all 3-D accelerator cards for PCs support Direct3D.

OpenGL

A 3-D graphics language developed by Silicon Graphics. There are two main implementations: Microsoft OpenGL, developed by Microsoft and Cosmo OpenGL, developed by Silicon Graphics. Microsoft OpenGL is built into Windows NT and is designed to improve performance on hardware that supports the OpenGL standard. Cosmo OpenGL, on the other hand, is a software-only implementation specifically designed for machines that do not have a graphics accelerator.

This is an overview of the graphics pipeline in OpenGL: 


Graphics Pipeline

In 3D computer graphics, the terms graphics pipeline or rendering pipeline most commonly refer to the way in which the 3D mathematical information contained within the objects and scenes are converted into images and video. The graphics pipeline typically accepts some representation of a three-dimensional primitive as input and results in a 2D raster image as output. OpenGL and Direct3D are two notable 3d graphic standards, both describing very similar graphic pipelines.

Stages of the graphics pipeline

Per-vertex lighting and shading

Geometry in the complete 3D scene is lit according to the defined locations of light sources, reflectance, and other surface properties. Some (mostly older) hardware implementations of the graphics pipeline compute lighting only at the vertices of the polygons being rendered. The lighting values between vertices are then interpolated during rasterization. Per-fragment or per-pixel lighting, as well as other effects, can be done on modern graphics hardware as a post-rasterization process by means of a shader program. Modern graphics hardware also supports per-vertex shading through the use of vertex shaders.

Clipping

Geometric primitives that now fall completely outside of the viewing frustum will not be visible and are discarded at this stage.

Projection Transformation

In the case of a Perspective projection, objects which are distant from the camera are made smaller. This is achieved by dividing the X and Y coordinates of each vertex of each primitive by its Z coordinate (which represents its distance from the camera). In an orthographic projection, objects retain their original size regardless of distance from the camera.

Viewport Transformation

The post-clip vertices are transformed once again to be in window space. In practice, this transform is very simple: applying a scale (multiplying by the width of the window) and a bias (adding to the offset from the screen origin). At this point, the vertices have coordinates which directly relate to pixels in a raster.

Scan Conversion or Rasterisation

Rasterisation is the process by which the 2D image space representation of the scene is converted into raster format and the correct resulting pixel values are determined. From now on, operations will be carried out on each single pixel. This stage is rather complex, involving multiple steps often referred as a group under the name of pixel pipeline.

Texturing, Fragment Shading

At this stage of the pipeline individual fragments (or pre-pixels) are assigned a color based on values interpolated from the vertices during rasterization, from a texture in memory, or from a shader program.

Display

The final colored pixels can then be displayed on a computer monitor or other display.

3. Geometric Theory

Geometry

There are many different steps to creating a 3D model. Wire frame, texture mapping and displaying the 3D. A wire frame model is a visual presentation of a 3D or physical object used in 3D modeling. It is created by having 3 or more points which are joined on the 3 axis (x, y, and z) in a 3D space. The object is projected onto the computer screen by drawing lines at the location of each edge. The term wireframe comes from designers using metal wire to represent the 3 dimensional shape of solid objects.3D wireframe allows to construct and manipulate solid surfaces.

Triangles always inhabit a single plane. The flat nature of triangles makes it simple to determine their surface normal, a three-dimensional vector perpendicular to the triangle's surface. Surface normals are useful for determining light transport in ray tracing. Some rendering systems use vertex normal’s instead of face normal’s to create a better-looking lighting system at the cost of more processing. In many systems only one of the normals is considered valid – the other side of the polygon is referred to as a back face, and can be made visible or invisible depending on the programmer’s desires.  

A texture map is applied (mapped) to the surface of a shape or polygon. This process is akin to applying patterned paper to a plain white box. Every vertex in a polygon is assigned a texture coordinate either via explicit assignment or by procedural definition. Image sampling locations are then put across the face of a polygon to produce a visual result that seems to have more richness than could otherwise be achieved with a limited number of polygons. Multitexturing is the use of more than one texture at a time on a polygon. For instance, a light map texture may be used to light a surface as an alternative to recalculating that lighting every time the surface is rendered. This is then followed by displaying the 3D image by usually rendering the 3D model so that it can be displayed in its full glory with all the shading, texture mapping etc. This will then show you all the things you have done to it in its entirety that you may not have seen before.

1. Applications of 3D

3D is used in many different industries such as the education, engineering and architecture industries. But it is primarily used within the vast industry of video games. In gaming it is used to create 3D models of things that would be seen or even played with in the game. That means things from characters all the way down to a random object in the background that you may not even interact with at all. 3D "dumb" solids are created in a way similar to manipulations of real world objects (not often used today). Basic three-dimensional geometric forms (prisms, cylinders, spheres, and so on) have solid volumes added or subtracted from them, as if assembling or cutting real-world objects. Two-dimensional projected views can easily be generated from the models. These models are used in the gaming industry because when placed in a 3D game, the player will be able to go around the object and see the entire object, compared to a 2D version of something where the player will only be able to see the front or back.

The education sector is an industry which can link with many other industries by teaching people how to model in 3D and give them the skills which could be transferred to the industry in which the person learning goes into. This is commonly used in the video games industry or the architect industry due to these 2 industries using 3D the most and relying on people to model things in 3D for them. Many universities and colleges offer a course(s) which is primarily based on 3D modelling.

3D in Medical Industry
Scientists, hospital staff and patients benefit from the use of systems that present information in understandable formats by using a unique combination of 3D technology, science, and software engineering. 3D CT imaging in human medicine is mainstream and used in numerous applications such as vascular studies, cardiac imaging, virtual endoscopy, and presurgical planning. 3D imaging in veterinary medicine is far less common. This is likely because of the fact that newer CT machines are necessary to generate diagnostic images and the applications for 3D CT are different.

As well as the medicine industry using 3D models the science sector uses them as highly detailed models of chemical compounds. In recent decades the earth science community has started to construct 3D geological models as a standard practice. This has helped the development of science due to professionals now being able to look around compounds and learn much more about them, compared to the limited amount of things they could see when using 2D or just simple images of the compound. They now have the freedom to look completely around it and explore, much more than they could do before the introduction of 3D models in science and medicine. 

3D in Engineering Industry


The engineering community uses 3D as designs of new devices, vehicles and structures as well as a host of other uses. 3D modelling has come a long way in the last few years, bringing new uses for 3D vehicle modelling and speeding up developments. The entry of more professional experts and new and improved 3D modelling software programs has made 3D vehicle and engineering modelling more accessible and affordable for entrepreneurs and businesses from small to large, further fuelling and enabling the development of new vehicles, parts, manufacturing processes, safety measures and business ideas. In fact without fast and effective 3D engineering modelling we would not being enjoying many of the great vehicles and features that we now use every day. This not only applies to family cars but racing vehicles, recreational vehicles, commercial and private aircraft, marine craft and the safety of military vehicles. 3D modelling can be and is used to create things from a simple mock up of the vehicles design all the way to engineering vital pieces such as the gearbox and engine to go inside the vehicle. Every single part of engineering on anything can now be modelled in 3D and then transferred straight to the vehicle.  


3D in Product Design
Professional 3D modelling for product design has come on huge leaps and bounds in recent years. New technology and more professional experts have made 3D product design modelling more affordable and accessible to most companies out there, of all sizes, therefore opening up this industry vastly. In fact without the current usage of 3D modelling we not be enjoying many of the great products we now use on a daily basis. This is anything from household items to tech gadgets and new cars but many economies of the world would not be enjoying the high quality of life that we currently enjoy. This is addition to the lack of jobs that there would be without 3D modelling. Around you right now, almost everything you see was probably developed from 3D product design modelling at some point. In short, without 3D modelling we would not have the amount of jobs and the variety of industries we see today. Overall, 3D modelling is used in mostly all parts of the product design industry and can be used to design anything from the newest piece of technology, like a new apple product, to something as vintage as an antique teapot made to sell for the Queen’s anniversary.
3D in Architecture
The architecture industry uses 3D modelling to demonstrate proposed buildings and landscapes through Architectural Models. Digital architecture uses computer modelling, programming, simulation and imaging to create both virtual forms and physical structures. 3D modelling is vital in most architectural designs due to the fact that without them.

3D Fly-Through of Kitchen:


3D in Video Games, Movies and Animation
3D computer graphics software is used to make computer-generated imagery for movies, etc. Recent availability of CGI software and increased computer speeds has allowed companies to create huge feature length films which have made millions of pounds. All made from 3D models and CGI animation. An example of a film that uses just 3D models and CGI is Disney’s Toy Story films.


The first revolutionary use of 3D imagery in a movie was in Jurassic Park released in 1993, almost all of the dinosaurs were created in using 3D CGI and shown in the live-action scenes of the movie.





3d imagery is now currently used in multiple blockbuster films. It is often used or characters, explosions or Special Effects. For example Marvel's The Avengers used a lot of 3D animation to create characters and effects such as explosions and fight scenes.




3D in Games

3D Monster Maze was the first ever game released on a commercial games machine that was in 3D. It was developed by Malcolm Evans in 1981 for the Sinclair ZX81 platform. The game awarded points for each step the player took without getting caught by the Tyrannosaurus Rex that hunted them in the 16 by 16 cell, randomly generated maze.












Transition to 3D

The fifth generation is most noted for the rise of fully 3D games. While there were games prior that had used three dimensional environments, such as Virtua Racing and Star Fox. 












It was in this era that many game designers began to move traditionally 2D and pseudo-3D genres into full 3D. Super Mario 64 on the N64, Crash Bandicoot and Spyro the Dragon on the PlayStation and Nights into Dreams... on the Saturn, are prime examples of this trend. Their 3D environments were widely marketed and they steered the industry's focus away from side-scrolling and rail-style titles, as well as opening doors to more complex games and genres. Games like GoldenEye 007, The Legend of Zelda: Ocarina of Time or Virtua Fighter were nothing like shoot-em-ups, RPGs or fighting games before them. 3D became the main focus in this era as well as a slow decline of cartridges in favor of CDs, which allowed much greater storage capacity than what was previously possible.













The ever-increasing download speeds capable through wireless and mobile networks and the developments made in the field of motion/gesture control, mean that 3D technology will have a big part to play in the ways in which games are played and displayed.

3D in Animation

Pixar's Tin Toy
Tin Toy is a 1988 American computer-animated short film produced by Pixar and directed by John Lasseter. The short film, which runs five minutes, stars Tinny, a tin one-man-band toy, attempting to escape from Billy, a destructive baby. The third short film produced by the company's small animation division, it was a risky investment: due to low revenue produced by Pixar's main product, the eponymous computer to manage animations, the company was under financial constraints.

Lasseter pitched the concept for Tin Toy by storyboard to Pixar owner Steve Jobs, who agreed to finance the short despite the company's struggles, which he kept alive with annual investment. The film was officially a test of the PhotoRealistic RenderMan software, and proved new challenges to the animation team, namely the difficult task of realistically animating Billy. Tin Toy would later gain attention from Disney, who sealed an agreement to create Toy Story, which was primarily inspired by elements from Tin Toy.


The short premiered in a partially completed edit at the SIGGRAPH convention in August 1988 to a standing ovation from scientists and engineers. Tin Toy went on to claim Pixar's first Oscar with the 1988 Academy Award for Best Animated Short Film, becoming the first CGI film to win an Oscar. With the award, Tin Toy went far to establish computer animation as a legitimate artistic medium outside SIGGRAPH and the animation-festival film circuit. Tin Toy was selected for preservation in the United States National Film Registry by the Library of Congress as being "culturally, historically, or aesthetically significant" in 2003.



3D Techniques

3D Animation is carried out by key-framing the camera, lights and objects within a scene. Character movement is created by using rigging or motion capture techniques.

Rigging


Skeletal animation is a technique in computer animation in which a character is represented in two parts: a surface representation used to draw the character (called skin or mesh) and a hierarchical set of interconnected bones (called the skeleton or rig) used to animate (pose and keyframe) the mesh. While this technique is often used to animate humans or more generally for organic modelling, it only serves to make the animation process more intuitive and the same technique can be used to control the deformation of any object — a spoon, a building, or a galaxy.
This technique is used in virtually all animation systems where simplified user interfaces allows animators to control often complex algorithms and a huge amount of geometry; most notably through inverse kinematics and other "goal-oriented" techniques. In principle, however, the intention of the technique is never to imitate real anatomy or physical processes, but only to control the deformation of the mesh data.













Motion Capture

Motion capture is the process of recording the movement of objects or people. It is used in military, entertainment, sports, and medical applications, and for validation of computer vision and robotics. In film making and video game development, it refers to recording actions of human actors, and using that information to animate digital character models in 2D or 3D computer animation. When it includes face and fingers or captures subtle expressions, it is often referred to as performance capture. In many fields, motion capture is sometimes called motion tracking, but in film making and games, motion tracking more usually refers to match moving.