Creating 3d Assets for Games

billowycookieΠολεοδομικά Έργα

29 Νοε 2013 (πριν από 3 χρόνια και 6 μήνες)

103 εμφανίσεις

Creating 3d Assets for Games

C. Morris
-

2013

Creating 3d Assets for Games

What is an asset.


Any piece of digital media used within a title. This includes:




Textures




Materials




Meshes




Sounds




Music




Animations




Sprites




etc ...


We will be focusing on the first three; Textures, Materials and Meshes.

Creating 3d Assets for Games

Textures

Creating 3d Assets for Games

Textures overview.




Textures add detail and context to geometry without changing or adding to it.





They are however limited in scope.





Used in more complex material systems to provide more control over how a
surface appears.

Creating 3d Assets for Games

Texture variables.


Use & Context



Helps define other variables:




Consider where the texture is going to be used. On what kind of surface.





Textures for complex meshes should be approached differently to those
for simple geometry.





Matching game aesthetics.

Creating 3d Assets for Games

Resolution



The size of a texture:




Textures are measured in pixels, normally base 2 , frequently square.





Dependent on use, must not only fit aesthetic but be related to physical
size of mesh it is used on.





Larger meshes often need larger textures to maintain level of detail.





Most engines will accept textures as high as 4096x 4096, some will take
higher. Standard texture size however ranges between 512 and 2048.

Creating 3d Assets for Games

Tiling



Does the texture smoothly repeat:




Textures used on large, uncomplicated geometry are often tiled.





Tiling is often more efficient as a smaller texture can cover a larger area.





Texture seams should be contiguous to hide where texture repeats.





Small areas with a defined shape should be minimised.





Can result in a less detailed textures, as overly detailed textures can
make tiling very obvious.





Purposefully repeating patterns (such as tiles) can be tiled well as long
as each tile is simple.

Creating 3d Assets for Games

Tiling examples.

Non tiling concrete texture

Tiling concrete texture

Creating 3d Assets for Games

Colour



Does the texture incorporate colour:




Depending on use some textures work best in monochrome in order to
be coloured later.





Textures can be used in materials (see later) to create effects modulated
via colour.





Monochrome textures do not need to be saved in a colour format, and
therefore require less memory.

Creating 3d Assets for Games

Alpha


Extra data contained within texture files:




Certain file types save an extra channel known as alpha.





This extra channel can be used to convey more data in single file.





Often used to store transparency, or other maps used in materials.





Files containing alpha channels tend to be larger, but often are smaller
than saving another file to convey the information.

Creating 3d Assets for Games

Materials

Creating 3d Assets for Games

Materials overview.




Used to create a more in
-
depth and detailed representation of a surface.





Based on shaders, also known as lighting models. Define how light is
calculated when it interacts with the surface.





Affects how a surface is rendered on a pixel by pixel level.





Use a mixture of different textures and mathematical functions to achieve
desired effect.





Almost entirely replaced textures in modern engines (I.E. You can no longer
place a simple texture on a surface, it must be inside a material).

Creating 3d Assets for Games

Texture maps



Used in combination with shaders to create desired
effect:




Defuse


Imparts colour, shade, tone, contrast.




Specular


Details areas of high reflectance and shine.




Normal


Fakes details, such as bumps and dents by modifying the
angles used in calculating light reflectance, without adding detail to the
model.




Masks


Maps used to partition areas to allow for differing effects across
the surface.




Bump


Modifies the appearance of the surface by displacing it in 3d
space. Normal mapping is a form of bump mapping.




Baked lighting


Extra maps used to impart more shade and tone
relevant to environmental conditions. E.g. Ambient Occlusion and Cavity
maps.

Creating 3d Assets for Games

Texture maps example.

Defuse

Normal

Specular

Creating 3d Assets for Games

Normal and Bump mapping (detailed
):




Giving depth to a material without adding extra geometry.





Shader displaces surface in 3d space on a per pixel basis according to
texture map it is provided with.





Bump maps are normally monochrome maps used to convey height
variation.





Normal maps are full colour maps used to alter the calculated
orientation (or normal) of each pixel on a face.





This method allows for a high level of detail to be displayed on a low
resolution model.

Creating 3d Assets for Games

Normal and Bump map example.

Defuse

Defuse + Normal

Defuse + Normal + Bump (displacement)

Creating 3d Assets for Games

Meshes

Creating 3d Assets for Games

Meshes Basics.




Meshes are made up of Vertices, Edges, Faces (or polygons), and Surfaces.





The orientation of any element is known as a normal.





Most renderers only render the front of faces and not the reverse.





Normals are used by the shader to smooth the surface.





Polygons are not limited to a set number of edges. However most engines will
only work with Triangular or Quadrilateral polygons.

Creating 3d Assets for Games

UV maps



Translates between 3d space and 2d space:




Required to correctly place a texture onto a mesh.





A 2d coordinate system (UVW) similar to 3d space (XYZ).





Process saves 3d faces onto a 2d map. Similar to creating a world map,
making an item of clothing, or peeling an orange.





This UV map can then be used as a basis to create textures as the artist
knows where the texture will appear on the model.

Creating 3d Assets for Games

UV map examples.

Base model

Final textured model

UV map layout

Final defuse texture

Creating 3d Assets for Games

Texture baking



Creating textures directly from a mesh:




Requires a high resolution model, and a low resolution model which will
be used in the game engine.





Lighting effects are applied to the high resolution model, then
“projected” onto the game model.





These lighting effects are then saved using the UV map of the game
model.





Detail from high resolution model now “baked” onto game model.





Can be used to create many textures from defuse to normal and bump
maps.





Very common workflow uses zBrush to create high resolution models.

Creating 3d Assets for Games

Texture baking example.

Creating 3d Assets for Games

Tools & Pipelines

Creating 3d Assets for Games

Suggested tools

:




Image editor


Creating and editing textures. Photoshop in particular
has lots of useful tools including a high degree of brush control, colour
control, channels access and an inbuilt library of file type exporters.





3d modding application


Creating meshes. 3dmax, Maya, and Blender
are all good options





Digital sculpting application


Creating high resolution models for
texture baking. zBrush is the preferred option, but can be difficult to use.
Mudbox is a reasonable alternative





nDo2


A Photoshop plug
-
in which is extremely useful in creating
complex textures all from within Photoshop. Including creating normal
maps from scratch and converting them into other map types such as
defuse and specular.

Creating 3d Assets for Games

Pipelines



The process of importing assets into a game environment:




Engines have specific requirements for models and textures.





Research the engine you are using to find the required settings.





Options to look out for:




Meshes


Texture coordinates (UV maps), smoothing groups,
materials and animations. Y/Z axis orientation.




Textures


Bit depth, colour, and compression.





Suggested File types:




Meshes


FBX, OBJ




Textures


TGA, PNG, BMP

Creating 3d Assets for Games

Example UDK pipeline