5. 3d modeling essentials - 3d graphics and game development course

49
3D Modeling Essentials Introduction To 3D Modeling George Georgiev http://academy.telerik.com Technical Trainer academy.telerik.com /.../3d-game-developm ent-opengl George Atanasov Front-End Developer

Upload: telerik-software-academy

Post on 12-Jan-2015

1.311 views

Category:

Education


2 download

DESCRIPTION

In this presentation, part of the 3D graphics and game develpment course, we discuss what is 3D modeling, the high poly and low poly modeling, the smoothing, the abstract types of light, the textures, the transperancy and level editing. The website and all video materials are in Bulgarian.Main topics:http://academy.telerik.com/.../3d-game-development-openglTelerik Software Academy: http://www.academy.telerik.comThe website and all video materials are in Bulgarian

TRANSCRIPT

Page 1: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

3D Modeling Essentials

Introduction To 3D Modeling

George Georgiev

http://academy.telerik.com

Technical Trainer

academy.telerik.com

/.../3d-game-developm

ent-opengl

George AtanasovFront-End Developer

Page 2: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

What is 3D Modeling? 3D Modeling process

Representing any 3 dimensional surface Automatic or Manual

2

Page 3: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

What is 3D Model? The product is called 3D model 3D model can be:

Rendered to 2D image

Printed to realistic object with 3D printer

Used in 3D games with real-time rendering

3

Page 4: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Splines & NURBS

Vector design is better for industrial goals Hands of the Craftsman vs. CPU

Lathe

4

Page 5: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Polygon Mesh Objects

Polyhedral object Best for games and physical simulations

5

Page 6: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Polygon Mesh Objects Polygon mesh sub-object level

Vertex

Edge

Face

Polygon

6

Page 7: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Mesh vs. Spline Why Mesh is better for game development? More calculations == less FPS

Nowadays GPUs are designed to perform faster with VBOs (Vertex Buffer Objects)

Mesh objects can be easily represented in VBO

The absolute accuracy of the objects is not basic goal in the Games

In game developing the basic goal is to create the best possible representation of an object with the least possible resources

7

Page 8: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

The 3D Scene Three dimensional coordinate system Represents uniquely all the points

in it by three parameters – values for each axis

Contain sub-coordinate systems Each object has his own

local coordinate system

8

Page 9: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

High Poly ModelingExplaining High-Poly Design

Page 10: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

High Poly Modeling We can understand the idea of high-poly modeling just by its name

The more triangles in the mesh, the more detailed the object is

Final renders are appropriate for Commercials

Magazines

3D Movies

10

Page 11: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Low Poly ModelingExplaining Low-Poly Design

Page 12: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Low Poly Meshes Low poly mesh is a mesh which has small amount of polygons

Commonly used in real-time applications

In theory polygons can have infinite number of sides, but in 3D graphics they are broken down into triangles

12

Page 13: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Why Low Poly? Why we need to create low-poly models when there is so many smooth modifiers?

In general the more triangles in a mesh the more detailed the object is

computationally intensive it is to display

To decrease render time it is better to use low poly models

13

Page 14: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

The Polygon Budget A combination of game engine and the computer being used defines the polygon budget

It is equal to the number of polygons which can appear in a scene and still be rendered with acceptable frame rate

It varies depending on the speed of the render engine

the amount of polygons

The speed of the hardware14

Page 15: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Low Poly As a Relative Term

There is no defined threshold for a mesh to be low poly

This term is relative and its definition depends on other factors: The time in when the meshes were

designed and for what

The detail required in the final mesh

The shape and properties of the object

15

Page 16: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Low Poly – Future vs. Past

Super Mario 2 – 1996 In 1996 rendering an objects

created by 240 polygons was a huge success

All the environment is created by textured extremely low polygon objects

Crysis 2 – 2011 At 2011 rendering objects created

by 24 000 polygons is not a big deal

The environment is created by averagely resolute objects

16

Page 17: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Appearance Low poly objects do not always have to look bad

You can “lie” the viewer that the object has better resolution with techniques such as Normal mapping

Bump mapping

Etc.

17

Page 18: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

SmoothingSmoothing techniques

Page 19: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Smoothing There are many methods to create a smooth objects Normal smoothing

Mesh smoothing

Etc.

It is important to understand how to use each one of them

You have to pick the best for your goals

19

Page 20: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Normal Smoothing Normal smoothing affects only the way that the light is reflected by the objects surface

That is better for games, because the triangle count stays the same

20

Ends of the object remain edgy

Performs better on dark colors

Page 21: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Mesh Smoothing Mesh smoothing affects directly the geometry of the object

Can be used many times on the same objects

Iteration value With each iteration increase, the resolution of the object increases by square

21

Page 22: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

LightsUnderstanding Lightning in 3D

Page 23: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Why We Need Lightning?

Modeling the 3D object is just a little part of the whole design process

The light makes the object to look as 3D object

23

Page 24: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

How the Light Works? For full realistic light simulation you would need a “NASA” computer

The lighting in 3D graphics is not exact representation of the real light

In most 3D engines the light appearance is decayed to separate effects independent of each other

24

Page 25: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Abstract Types Of Lights

The light is composed by several abstract components Diffuse, Ambient, Specular,

Emissive, Reflection, Refraction

Each light component can have its own color

It is important to understand how to deal with each type of them

And it is more than important to understand how the real light affects the objects

25

Page 26: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Ambient Light When sun ray hits an object it reflects from it

The ambient light is the emission of all light sources

The result is averagely brightening whole object

3D object with only ambient light channel applied to it looks 2D

26

Page 27: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Diffuse Light Diffuse light represents a directional light casted by a light source

It can be explained as a light from light bulb placed on specific location in the space A diffuse light of red color, coming

from the left of a black object defining its 3D shape

27

Page 28: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Diffuse light For more realistic result we can apply both diffuse and ambient light channels

The diffuse light represents a light from a light bulb and flashes the front side of the object

The ambient light brightens the entire object

28

Page 29: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Specular Light The specular light channel represents the brightest area of the object (the highlight area)

The position and the amount of specular highlight is depends on The viewers position

The angle between the viewer and the source

29

Page 30: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Emissive Light Emissive light works a little different than the previously explained before types of lights

It is responsible for the object material ability to absorb or reflect light

Below is the result of object emitting green light with red light source applied

30

Page 31: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Reflections The use of reflections helps to create more realistic objects

Remember... You would not see the reflection effect if you don’t have another objects to reflect

Reflection looks better on round objects

Do not overdo with the

reflection effect Reflection mapping saves time 31

Page 32: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Refractions The refraction property defines how much light goes through the object

In simple language it controls the opacity of the object Refraction color #000000 == full

opacity

Refraction color #FFFFFF == full transparency

32

Page 33: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

TexturesTexturing Essentials

Page 34: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Textures? Textures are just simple raster pictures JPEG

PNG

TGA

GIF

TIFF

Widely used in 3D game modeling

34

Page 35: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Why To Use Them? If you are developing a car racing game you do not need to model all the details on the buildings behind

By texturing your object you can add a lot of details on the model without adding any more resolution to it

For example you can use a texture of window instead of modeling it

35

Page 36: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Texturing Methods There are several ways to texturize an object

Which one is better depends on the object which is going to be texturized

In game developing process the basic texturing methods are UVW Mapping

Tiling

UVW Unwrapping 36

Page 37: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

What is Tiled Texture Tiling is another trick which saves a lot of resources

To understand it, imagine that you have to represent the facade of a huge building by texturing The idiotic way is to draw a huge

texture with a lot and the same windows in it

The right way is to draw a texture with only one window on it and multiply it 37

Page 38: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Texture Optimization Tricks

Creating details with textures instead of polygons saves render time

Do not flood your 3D scene with huge amount of textures Do not use bigger textures than you

need

Manage balance between quality and size

When it is possible use texture modulation 38

Page 39: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Texture Modulation Useful for level editing (creating environment) You want to model brown roof tile

and the same ones, but in different colors

Use white (or bright) roof tile texture and modulate it with the color of its object

You can create many different looking models with the use of one and the same resource 39

Page 40: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Use Transparency OK… We have to create a metal fence

But how many polygons we need? First way is to create it as a polygon

mesh 100 000 polygons for 1 meter wide

fence ?!?

The trick to do that is to use a texture of metal fence with transparency at the empty spaces 2 polygons and the result looks the

same

40

Page 41: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

UV(W) Mapping Projects a texture map to 3D object Assigns pixels of the image on the polygons

Allows you to texturize more complex shapes

41

Page 42: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Unwarp UVW A very useful technique for texturing game characters and other complex objects

42

Page 43: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Tools & Software What Software To Use

Page 44: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Define Your Goals Your goals are ?

Making super cool 3D game models

Making very detailed models for commercials, magazine covers, movies, etc.

Making 3D models for an industrial goals

Level editing for games

You are learning

44

Page 45: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Comers & Games Appropriate software

3D Studio Max, Maya

Blender, Google SkatchUp

Cinema 4D

Inappropriate software SolidWorks

AutoCAD, ArchiCAD

45

Page 46: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Industrial Appropriate software

SolidWorks

AutoCAD, Civil 3D

ArchiCAD

Inappropriate software 3Ds Max, Maya

46

Page 47: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

Level Editing Appropriate software

Civil 3D

3Ds Max

Blender

Inappropriate SolidWorks, AutoCAD, ArchiCAD

3Ds Max

Blender

47

Page 48: 5. 3D Modeling Essentials - 3D Graphics and Game Development Course

форум програмиране, форум уеб дизайнкурсове и уроци по програмиране, уеб дизайн – безплатно

програмиране за деца – безплатни курсове и уроцибезплатен SEO курс - оптимизация за търсачки

уроци по уеб дизайн, HTML, CSS, JavaScript, Photoshop

уроци по програмиране и уеб дизайн за ученициASP.NET MVC курс – HTML, SQL, C#, .NET, ASP.NET MVC

безплатен курс "Разработка на софтуер в cloud среда"

BG Coder - онлайн състезателна система - online judge

курсове и уроци по програмиране, книги – безплатно от Наков

безплатен курс "Качествен програмен код"

алго академия – състезателно програмиране, състезания

ASP.NET курс - уеб програмиране, бази данни, C#, .NET, ASP.NETкурсове и уроци по програмиране – Телерик академия

курс мобилни приложения с iPhone, Android, WP7, PhoneGap

free C# book, безплатна книга C#, книга Java, книга C#Дончо Минков - сайт за програмиранеНиколай Костов - блог за програмиранеC# курс, програмиране, безплатно

?

? ? ??

?? ?

?

?

?

??

?

?

? ?

Questions?

?

3D Modeling Essentials

http://academy.telerik.com/