CS7029 Animation Project Part 2: Materials and Textures Anton Gerdelan materials with shaders Materials

What is a “material” exactly?

● container/abstraction ○ shaders: define drawing style ○ textures: (images) https://www.blender.org/manual/render/blender_render/materials/introduction.html Shaders: style of rendering ● mini programmes ● written in a shader programming language ○ e.g. OpenGL has GLSL shaders ○ has its own too ● define lighting interactions: ○ reflection, refraction ○ surface colours ● sample colours from textures a material using the “glass” shader. “BSDF” = affected by lighting ● inputs and [colour] outputs tweak some settings “IOR” = index of refraction shader output is linked to surface colour this is a wonderful tutorial for materials in cycles https://www.youtube.com/watch?v=YR-m5J6vDt8

Blender Tutorial - Rendering with Cycles by Sardi Pax

and for reducing noisy ‘fireflies’ further: http://www.blenderguru.com/articles/7-ways-get-rid-fireflies/ materials summary

● materials combine base properties, shaders, [and optional textures] ○ older Blender had properties based on Phong’s lighting model ■ diffuse (Lambert) colour ■ specular colour ○ newer Blender has properties based on “physically based rendering” ■ base colour ■ roughness ● style of rendering / colouring / lighting ● limited control in object properties pane ● more noodly visual control in the node editor mode ○ can mix outputs from multiple shaders to final surface colour ● i don’t use blender materials for games models textures Background to Textures and Texture Mapping

Academic and technical history (insight you won’t get this from tutorials)

Texture mapping is about using images transformed in 3d

Did anyone see Ed Catmull talk here before the Web Summit? (Walt Disney and Pixar Animation Studios)

Why “textures?” - that is a weird name. History of CG and lighting.

1974 PhD thesis “A Subdivision Algorithm for Computer Display of Curved

Surfaces” Basic Principle

how?

flat 2d image (e.g. a .PNG file) 3d model Texture Coordinates

0

V flat 2d image (e.g. a .PNG file) 3d model

1 *some software calls (U,V) (S,T) and the vertical may go from 0 at the bottom to 1 at the 0 1 U top Creating Texture Coords in Blender

● By default each mesh is just a list of XYZ XYZ XYZ vertex positions

● To add UV for each vertex - “unwrap” a selected mesh

● In edit mode (in 3d window) for selected object press U

● You have lots of different automatic layout options

● Change the pane view to UV/Image Editor to manually lay out texture coords Easiest Way to Add a Texture Image to a Material 3d Texture Painting in Blender ● loads of fun ● texture paint mode in 3d window ● first create UVs ● modify material to accept a texture input (e.g. in node editor) ● create a blank texture (e.g. in UV/image editor) ● may have to disable Texture Mask and Texture brush in paint pane on the left there (annoying) ● can use a drawing tablet

● remember to save the final image to a file for later (in UV/image editor) little speed-up tip if your computer has a good graphics card…(my work ones don’t) to make Blender use your GPU with the cycles renderer https://www.blender.org/manual/fr/render/cycles/gpu_rendering.html user prefs mode (and drag down) -> system -> CUDA (NVIDIA cards) or OpenCL (all cards) ->save Chappie - a nice read about texturing work http://image-engine.com/film/chappie/

“It wasn’t just a case of crafting a single Chappie model and being done with it – Image Engine had to create 16 different damage states for the robot, accomplished through texture, model and look development variations, or a combination of the three. Asset builds were managed with Shotgun and Maya communicating directly, along with a proprietary asset management workflow developed in-house to make sure everything went as smoothly as possible.” software to create a from image sequence http://www.andrewnoske.com/wiki/Convert_an_image_sequence_to_a_movie our lab uses virtualdub and premier pro (Windows) i use imagemagick and on i was sure Quicktime basic did it too - nope! pro only. storyboards http://www.premiumbeat.com/blog/10-tips-for-creating-storyboards-from- dreamworks/ grease pencil - hold down D and click and drag stays for subsequent frames until a new penciling is started