Normal maps: come si ottengono (2/4) Photometric Stereo (una forma di inverse lighting ) da: N immagini (N>=4) reali Stesso punto di vista Illuminazione diversa (possibilmente, controllata e nota) a Normal Map in spazio vista! convertire in spazio oggetto, o TBN Normal maps come si ottengono (3/4) Normal-Painting sul modello (e.g. con Z-brush, Sculptris Alpha ) simile a pittura delle diffuse maps ma painting di dettagli geometrici simile a scuplting ma il sistema scrive direttamente normali, non geometria Marco Tarini - 2015/2016 1
Normal maps come si ottengono (4/4) Detail recovery detail texture synthesis baking delle tessiture da: a: 1) mesh Hi-Res 2) mesh Low-res + UV mapping (senza ripetizioni) Normal map per 2 (che mimica il dettaglio presente in 1) Detail texture synthesis (aka detail preservation) Idea: input: a low res mesh A, with (injective) UV-map a hi-res mesh B with per vertex attributes output: a texture for A capturing the vertex attributes in B normals? a normal map is produced (in object space, convert to TBN if necessary) base color? a diffuse maps is produced baked (global lighting)? a light-map is produced fully automatic! es: A ottenuto da B tramite semplificazione automatica Marco Tarini - 2015/2016 2
Modelling + Texturing: Pipeline production example Concept drawings 2D artists Low-poly model A 3D modeller, low poly editing tools (Injective) UV-mapping of A UV-mapper, or automatic tool, to build UV-map for A Subdivision, digital sculpting of Hi-Res model B 3D modeller, digital sculpting Painting over B per vertex painting Detail Recovery: Automatic construction of Textures for A with attributes from B: Normals from B, (normal map) Colors from B (diffuse map) Baked lighting from B (light-map) hi-res mesh detail recover TESSITURA fatta apposta (es. BumpMap normali o RGB map x colori) semplificazione automatica low res mesh rendering M a r c o T a r i n i [ G A M E - D E V ] V e r o n a 2 0 1 3 still low-res, but textured! Marco Tarini - 2015/2016 3
originale M a r c o T a r i n i [ G A M E - D E V ] V e r o n a 2 0 1 3 500K triangles semplificato simplificato ma con tessitura 2K triangles Detail Recovery: how to Low-res model Hi-res model v Texture map find a suitable spot u e.g.: color, precomputed shading, normal... Some attribute Code & Store Marco Tarini - 2015/2016 4
Esempio Esempio Marco Tarini - 2015/2016 5
esempi da cg-talks CG society esempi da cg-talks CG society Marco Tarini - 2015/2016 6
esempi da cg-talks CG society Cutout textures texels = alpha (lvl trasparenza) Alpha map RGB map Marco Tarini - 2015/2016 7
Cutout textures texels = alpha (lvl trasparenza) es: drappi, barba... tessitura by Micheal M a r c o T a r i n i C o m Filipowski p u t e r G r a p h i c s 2 2004 0 1 1 / 1 2 U n i v e r s i t à d e l l I n s u b r i a Cutout textures texels = alpha (lvl trasparenza) es: alberi, foliage Marco Tarini - 2015/2016 8
Texture mapping e Alpha Test Es: pelo, pellicce tessitura (ripetuta) M a r c o T a r i n i C o m p u t e r G r a p h i c s 2 0 1 1 / 1 2 U n i v e r s i t à d e l l I n s u b r i a Procedural Textures Idea: textures come funzioni di (u,v) E.g.: color texture per bandiera del giappone: 0.5 1.0 u 0.5 1.0 (1,0,0) u f = v (1,1,1) if else u 0.5 v 0.5 2 < 0.3 2 v 0.3 Marco Tarini - 2015/2016 9
Procedural Textures Funzione da (u,v) a valori texel Da computare dinamicamente, durante il rendering (per frammento) invece di accedere ad array 2D di texel Vantaggi: costo in RAM: quasi azzerato resolution independent ALU, invece di accessi in (texture) RAM: meno caro, quasi sempre! Usate per immagini semplici Funz. implementata nel fragment shader Solid Textures Marco Tarini - 2015/2016 10
Solid Textures Tessitura volumetrica voxelizzata: array 3D di texels 1 texel == 1 voxel E.g. ogni voxel un colore RGB solid RGB textures Come tutte le tessiture: In video RAM Accesso veloce durante rendering filtering (tri-lineare) in accesso, MIP mapping Modellano colore sul volume superficie + interno utile, per es, per fratture Nota: nessun bisogno di UV-mapping! tessitura indicizzata con geometria mesh (riscalata) Problema: spazio ram Cubico con risoluzione Soluz: tessiture 3D procedurali? Solid Textures Procedurali Gyross - progetto di Paolo P. Slepoi Marco Tarini - 2015/2016 11