72

Click here to load reader

Blender is Happiness in R&D Projects

Embed Size (px)

Citation preview

Page 1: Blender is Happiness in R&D Projects

Blender PTConference 2013

Porto (Portugal)

Carlos Glez. MorcilloAssociate Professor Escuela Superior de InformáticaUniversity of Castilla-La Mancha Blender Foundation Certified Trainer

April 7th 2013

or... “Using Blender as an Integrated Rendering Engine in R&D projects”

Page 2: Blender is Happiness in R&D Projects

[Slide 2]

□ What is Rendering?

□ Why Blender?□ Blender as a «Black Box»□ R&D Projects

□ MultiAgent Rendering □ Sign Language□ Indoor Navigation

□ Showcase

Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

ContentsIntro Why Blender? Black Box R&D Projects Showcase

Page 3: Blender is Happiness in R&D Projects

[Slide 3]

□ What is Rendering?

□ Why Blender?□ Blender as a «Black Box»□ R&D Projects

□ MultiAgent Rendering □ Sign Language□ Indoor Navigation

□ Showcase

Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

ContentsIntro Why Blender? Black Box R&D Projects Showcase

Page 4: Blender is Happiness in R&D Projects

[Slide 4]

□ What is Rendering?

□ Why Blender?□ Blender as a «Black Box»□ R&D Projects

□ MultiAgent Rendering □ Sign Language□ Indoor Navigation

□ Showcase

Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

ContentsIntro Why Blender? Black Box R&D Projects Showcase

Page 5: Blender is Happiness in R&D Projects

[Slide 5]

□ What is Rendering?

□ Why Blender?□ Blender as a «Black Box»□ R&D Projects

□ MultiAgent Rendering □ Sign Language□ Indoor Navigation

□ Showcase

Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

ContentsIntro Why Blender? Black Box R&D Projects Showcase

Page 6: Blender is Happiness in R&D Projects

[Slide 6]

□ What is Rendering?

□ Why Blender?□ Blender as a «Black Box»□ R&D Projects

□ MultiAgent Rendering □ Sign Language□ Indoor Navigation

□ Showcase

Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

ContentsIntro Why Blender? Black Box R&D Projects Showcase

Page 7: Blender is Happiness in R&D Projects

[Slide 7]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Intro Why Blender? Black Box R&D Projects Showcase

Botticelli (XV)Botticelli (XV)Search for Realism...Search for Realism...

Page 8: Blender is Happiness in R&D Projects

[Slide 8]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Search for Realism...Search for Realism...Intro Why Blender? Black Box R&D Projects Showcase

Botticelli (XV)Botticelli (XV)

Page 9: Blender is Happiness in R&D Projects

[Slide 9]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Search for Realism...Search for Realism...Intro Why Blender? Black Box R&D Projects Showcase

Botticelli (XV)Botticelli (XV)

Page 10: Blender is Happiness in R&D Projects

[Slide 10]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Search for Realism...Search for Realism...Intro Why Blender? Black Box R&D Projects Showcase

Albrecht Dürer (XVI)Albrecht Dürer (XVI)

Page 11: Blender is Happiness in R&D Projects

Input Bin

[Slide 11]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

What is Rendering? What? Compute color for each pixel. How? Different Methods.

Intro Why Blender? Black Box R&D Projects Showcase

Real Time Rendering(GPU Based)

“Realistic” Ray-Traced Rendering(Normally CPU Based)

Page 12: Blender is Happiness in R&D Projects

RealisticRealisticRendering!!Rendering!!

Page 13: Blender is Happiness in R&D Projects

RealisticRealisticRendering!!Rendering!!

Page 14: Blender is Happiness in R&D Projects

RealisticRealisticRendering!!Rendering!!

LightLightSimulation!!Simulation!!

Page 15: Blender is Happiness in R&D Projects

Mod

elin

g

Ani

mat

ion

Gam

e En

gine

Vid

eo E

dito

rNodes

Scripting

Ren

derin

g

Blende

r

Yaf(a

)ray

Cycles

etc..

.

Simulation

Input Bin

[Slide 15]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Why Blender?

Intro Why Blender? Black Box R&D Projects Showcase

Blender: Swiss Army Knife of 3D graphics

Page 16: Blender is Happiness in R&D Projects

[Slide 16]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Why Blender?Intro Why Blender? Black Box R&D Projects Showcase

Blender is Free Software

F0: Run the programF1: Study how it works, and change it F2: Redistribute copies. F3: Distribute copies of your modified versions.

Integration in R&D Projects!

4 Essential Freedoms:

Page 17: Blender is Happiness in R&D Projects

[Slide 17]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Why Blender?Intro Why Blender? Black Box R&D Projects Showcase

Blender is Free Software

F0: Run the programF1: Study how it works, and change it F2: Redistribute copies. F3: Distribute copies of your modified versions.

Integration in R&D Projects!

4 Essential Freedoms:

Page 18: Blender is Happiness in R&D Projects

[Slide 18]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Why Blender?Intro Why Blender? Black Box R&D Projects Showcase

Blender is Free Software

F0: Run the programF1: Study how it works, and change it F2: Redistribute copies. F3: Distribute copies of your modified versions.

Integration in R&D Projects!

4 Essential Freedoms:

Page 19: Blender is Happiness in R&D Projects

Geometry

Materials &Textures

Light Sources

Particles

Others....

Input BinInput Bin

Blender as a «Black Box»Intro Why Blender? Black Box R&D Projects Showcase

[Slide 19]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Page 20: Blender is Happiness in R&D Projects

Geometry

Materials &Textures

Light Sources

Particles

Others....

Input BinInput Bin

Intro Why Blender? Black Box R&D Projects Showcase

[Slide 20]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Blender as a «Black Box»

Page 21: Blender is Happiness in R&D Projects

Input BinInput Bin

Intro Why Blender? Black Box R&D Projects Showcase

[Slide 21]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Blender as a «Black Box»

Page 22: Blender is Happiness in R&D Projects

Input Bin

Intro Why Blender? Black Box R&D Projects Showcase

AftersomeTime

Working

Input Bin

[Slide 22]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Blender as a «Black Box»

Page 23: Blender is Happiness in R&D Projects

Input Bin

Intro Why Blender? Black Box R&D Projects Showcase

Resulting2D Image

AftersomeTime

Input Bin

[Slide 23]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Blender as a «Black Box»

Page 24: Blender is Happiness in R&D Projects

[Slide 24]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Blender in NumbersIntro Why Blender? Black Box R&D Projects Showcase

● 84% C/C++, 13% Python, 3% Others● 345 Years of effort!! (> 15.000.000 €)● Large development team (>90)

Page 25: Blender is Happiness in R&D Projects

[Slide 25]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Quality of the Blender CodeIntro Why Blender? Black Box R&D Projects Showcase

"The only reliable measurement of Code Quality: WTFs/minute!"

Page 26: Blender is Happiness in R&D Projects

[Slide 26]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Some Blender SnippetsIntro Why Blender? Black Box R&D Projects Showcase

Blender 2.26 (first public release)intern/decimation/test/decimate_glut_test/intern/main.cppLines 192-198

faces­>push_back(load_face.verts[0]);faces­>push_back(load_face.verts[1]);faces­>push_back(load_face.verts[2]);

// free up the memory this pile of shit used // to allocate the polygon's vertices

free (load_face.verts);

Page 27: Blender is Happiness in R&D Projects

[Slide 27]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Some Blender SnippetsIntro Why Blender? Black Box R&D Projects Showcase

Blender 2.26 (first public release)source/blender/render/intern/source/rendercore.cLines 230-240

void scanlinesky(char *rect, int y){  /* have to type this! set to :  addalphaUnder:     char*, char* addalphaUnderGamma: ditto called     with char *, uint* !!! unmangle this shit... */  void (*alphafunc)();  float fac;  int dx, x, ofs;  unsigned int col=0, *rt;  short *sp;  char *cp, *cp1;  float u, v;

Page 28: Blender is Happiness in R&D Projects

[Slide 28]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Some Blender SnippetsIntro Why Blender? Black Box R&D Projects Showcase

Blender 2.50 (new trunk)extern/bullet2/src/Bullet/ConstraintSolver/btConeConstraint.cppLines 799-803

if (fabs(vSwingAxis.x()) > SIMD_EPSILON){  // non­zero twist?! this should never happen.  int wtf = 0; wtf = wtf;}

source/blender/blenkernel/intern/library.cLines 801-802

/* this format specifier is fucked... */sprintf(id­>name+2, "%s.%0.3d", left, nr);

Page 29: Blender is Happiness in R&D Projects

[Slide 29]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Some Blender SnippetsIntro Why Blender? Black Box R&D Projects Showcase

Blender 2.66 (latest release)extern/bullet2/src/LinearMath/btConvexHull.cppLines 575-590

btAssert(v != ­1);btAssert(!isextreme[v]); // wtf we've already done this vertexisextreme[v]=1;j=m_tris.size();while(j­­) {

if(!m_tris[j]) continue; int3 t=*m_tris[j];   if(above(verts,t,verts[v],btScalar(0.01)*eps)) {

  extrude(m_tris[j],v);}

}// now check for those degenerate cases where we // have a flipped triangle or a really skinny 

Page 30: Blender is Happiness in R&D Projects

[Slide 30]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Use Blender in your R&D ProjectsIntro Why Blender? Black Box R&D Projects Showcase

1) External Realistic Rendering Engine. 2) Creation of Graphical Assets.3) Blender Customization: Development

of Particularized Tools (Python Scripting). 4) Testing Suite (find Bugs!).

4 Good Uses:

Page 31: Blender is Happiness in R&D Projects

[Slide 31]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Research & Development ProjectsIntro Why Blender? Black Box R&D Projects Showcase

Page 32: Blender is Happiness in R&D Projects

[Slide 32]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

MultiAgent Rendering OptimizationIntro Why Blender? Black Box R&D Projects Showcase

Input BinInput BinInput Bin

Page 33: Blender is Happiness in R&D Projects

[Slide 33]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

MultiAgent Rendering OptimizationIntro Why Blender? Black Box R&D Projects Showcase

Geometry

Materials &Textures

Light Sources

Particles

Others....

Input Bin

Page 34: Blender is Happiness in R&D Projects

[Slide 34]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

MultiAgent Rendering OptimizationIntro Why Blender? Black Box R&D Projects Showcase

Geometry

Materials &Textures

Light Sources

Particles

Others....

Input Bin

Page 35: Blender is Happiness in R&D Projects

[Slide 35]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

MultiAgent Rendering OptimizationIntro Why Blender? Black Box R&D Projects Showcase

Input Bin

Page 36: Blender is Happiness in R&D Projects

[Slide 36]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

MultiAgent Rendering OptimizationIntro Why Blender? Black Box R&D Projects Showcase

Ray Depth Light Samples# Photons Use Cache

….Config.Parameters

Input Bin

Page 37: Blender is Happiness in R&D Projects

[Slide 37]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

MultiAgent Rendering OptimizationIntro Why Blender? Black Box R&D Projects Showcase

AftersomeTime

Working

Input Bin

Page 38: Blender is Happiness in R&D Projects

[Slide 38]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

MultiAgent Rendering OptimizationIntro Why Blender? Black Box R&D Projects Showcase

Result2D Image

AftersomeTime

Input Bin

Page 39: Blender is Happiness in R&D Projects

[Slide 39]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

MultiAgent Rendering OptimizationIntro Why Blender? Black Box R&D Projects Showcase

Result2D Image

Input Bin

HowMuch

Time?

Page 40: Blender is Happiness in R&D Projects

© Lightstorm Entertainment

[Slide 40]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Intro Why Blender? Black Box R&D Projects Showcase

Page 41: Blender is Happiness in R&D Projects

RenderRenderTimeTime 4040 hh

[Slide 41]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Intro Why Blender? Black Box R&D Projects Showcase

Page 42: Blender is Happiness in R&D Projects

RenderRenderTimeTime 4040 hh

216216 KK Frames FramesStereoscopic (Stereoscopic ( ×2)×2)

1.972 Years1.972 Years

[Slide 42]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Intro Why Blender? Black Box R&D Projects Showcase

Page 43: Blender is Happiness in R&D Projects

RenderRenderTimeTime 4040 hh

216216 KK Frames FramesStereoscopic (Stereoscopic ( ×2)×2)

1.972 Years1.972 Years

a) 34.816 Coresa) 34.816 Cores

[Slide 43]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Intro Why Blender? Black Box R&D Projects Showcase

Page 44: Blender is Happiness in R&D Projects

RenderRenderTimeTime 4040 hh

216216 KK Frames FramesStereoscopic (Stereoscopic ( ×2)×2)

1.972 Years1.972 Years

a) 34.816 Coresa) 34.816 Coresb) Optimizationb) Optimization

[Slide 44]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Intro Why Blender? Black Box R&D Projects Showcase

Page 45: Blender is Happiness in R&D Projects

[Slide 45]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Speed Rendering UpIntro Why Blender? Black Box R&D Projects Showcase

ConfigurationParameters

Customization of

Page 46: Blender is Happiness in R&D Projects

[Slide 46]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Speed Rendering UpIntro Why Blender? Black Box R&D Projects Showcase

ConfigurationParameters

Customization of

Input BinInput Bin

Input BinInput Bin

Distributed Rendering

Page 47: Blender is Happiness in R&D Projects

[Slide 47]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

ObjectivesIntro Why Blender? Black Box R&D Projects Showcase

Input Bin

Config. Param.

Combine the advantages of both approaches

Input BinInput Bin

Input Bin+

Customization ofDistributed Rendering

Page 48: Blender is Happiness in R&D Projects

[Slide 48]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

ObjectivesIntro Why Blender? Black Box R&D Projects Showcase

Input Bin

Config. Param.

Combine the advantages of both approaches

Input BinInput Bin

Input Bin+

Customization ofDistributed Rendering

Modeling ofExpertExpertKnowledgeKnowledge

Page 49: Blender is Happiness in R&D Projects

[Slide 49]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

ObjectivesIntro Why Blender? Black Box R&D Projects Showcase

Input Bin

Config. Param.

Combine the advantages of both approaches

Input BinInput Bin

Input Bin+

Customization ofDistributed Rendering

Modeling ofExpertExpertKnowledgeKnowledge

Inherent

ParallelParallelComputingComputing

Page 50: Blender is Happiness in R&D Projects

[Slide 50]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Proposed SolutionIntro Why Blender? Black Box R&D Projects Showcase

Local Rendering(1 agent)

Page 51: Blender is Happiness in R&D Projects

[Slide 51]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Proposed SolutionIntro Why Blender? Black Box R&D Projects Showcase

Local Rendering(1 agent)

MultiAgentRendering

Page 52: Blender is Happiness in R&D Projects

ProblemDivision 1

[Slide 52]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Proposed SolutionIntro Why Blender? Black Box R&D Projects Showcase

Local Rendering(1 agent)

MultiAgentRendering

Page 53: Blender is Happiness in R&D Projects

ProblemDivision 1

[Slide 53]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Proposed SolutionIntro Why Blender? Black Box R&D Projects Showcase

Local Rendering(1 agent)

MultiAgentRendering

Use Knowledge (Local Optimization)

2

Page 54: Blender is Happiness in R&D Projects

ProblemDivision 1

[Slide 54]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Proposed SolutionIntro Why Blender? Black Box R&D Projects Showcase

Local Rendering(1 agent)

MultiAgentRendering

Use Knowledge (Local Optimization)

2

CombineResults

3

Page 55: Blender is Happiness in R&D Projects

ProblemDivision 1

[Slide 55]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Proposed SolutionIntro Why Blender? Black Box R&D Projects Showcase

MultiAgentRendering

Use Knowledge (Local Optimization)

2

CombineResults

3

MultiAgentArchitecture

Use of Expert Knowledge

VolunteerComputing

Web Based!

Page 56: Blender is Happiness in R&D Projects

[Slide 56]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Gene

ral W

orkf

lowIntro Why Blender? Black Box R&D Projects Showcase

Scene Analysis

Page 57: Blender is Happiness in R&D Projects

[Slide 57]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Importance MapIntro Why Blender? Black Box R&D Projects Showcase

Importance Map

Fast.

Approximation of the complexity.

Page 58: Blender is Happiness in R&D Projects

[Slide 58]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Importance MapIntro Why Blender? Black Box R&D Projects Showcase

Importance Map

Very complex (Mirror + Reflact)

Page 59: Blender is Happiness in R&D Projects

[Slide 59]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Importance MapIntro Why Blender? Black Box R&D Projects Showcase

Importance Map

Very complex (Mirror + Reflact)

Simple zone

Page 60: Blender is Happiness in R&D Projects

[Slide 61]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Gene

ral W

orkf

lowIntro Why Blender? Black Box R&D Projects Showcase

Distributed Rendering

Page 61: Blender is Happiness in R&D Projects

[Slide 62]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

ResultsIntro Why Blender? Black Box R&D Projects Showcase

16 Minutes. 8 Agents. B Opt.Level.121 Minutes. 1 Agent. No Opt.

Very different rendering times with no noticeable changes.

Page 62: Blender is Happiness in R&D Projects

[Slide 63]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Resu

ltsIntro Why Blender? Black Box R&D Projects Showcase

Page 63: Blender is Happiness in R&D Projects

[Slide 64]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Intro Why Blender? Black Box R&D Projects Showcase

Ganas: Text to Sign LanguageAutomatic Synthesis of Sign Language from written Spanish.

● Reusable Dictionary. ● Open Representation of Key Poses.

● Facial and Corporal. ● Non Lineal Animation. Dynamical blending by code.

Page 64: Blender is Happiness in R&D Projects

[Slide 65]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Intro Why Blender? Black Box R&D Projects Showcase

Ganas: Text to Sign Language

Page 65: Blender is Happiness in R&D Projects

[Slide 66]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

ConSignos: Speech to Sign LanguageIntro Why Blender? Black Box R&D Projects Showcase

Exporter

Automatic Sing Editor

(Blender)

Skeletal Animation

+

Sign Elements

DBManual

SignCreation

DBSign

Elements

Parametric Desc.

Configuration

List of Tokens

Sockets

Essential Description

Facial Animation

Page 66: Blender is Happiness in R&D Projects

[Slide 67]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Design of the CharactersIntro Why Blender? Black Box R&D Projects Showcase

Page 67: Blender is Happiness in R&D Projects

[Slide 68]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

ConSignos: Speech to Sign LanguageIntro Why Blender? Black Box R&D Projects Showcase

Page 68: Blender is Happiness in R&D Projects

ElCano Multimodal Distributed Architecture for IndoorLocalizationUniversity of Castilla-La ManchaIndra Cátedras and Fundación Adecco

[Slide 69]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Intro Why Blender? Black Box R&D Projects Showcase

Page 69: Blender is Happiness in R&D Projects

[Slide 70]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Showcase: Weather in C-LeónShowcase: Weather in C-LeónIntro Why Blender? Black Box R&D Projects Showcase

Page 70: Blender is Happiness in R&D Projects

[Slide 71]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Showcase: Virtual MuseumIntro Why Blender? Black Box R&D Projects Showcase

Over 70 models. Linux + OpenGL.http://www.esi.uclm.es/museo/

Page 71: Blender is Happiness in R&D Projects

[Slide 72]Carlos González Morcillo ([email protected]) – University of Castilla-La Mancha

Showcase: Game DevelopmentIntro Why Blender? Black Box R&D Projects Showcase

4 Free Books (over 1200 pages) on Game Development with Blender, C++, Ogre and other free multiplatform technologies.

Page 72: Blender is Happiness in R&D Projects

Blender PT 2013Porto (Portugal) · 6/7 April 2013

or... “Using Blender as an Integrated Rendering Engine in R&D projects”