34
Implicit Surface Modeling for 3D Printing WebGL Meetup Berlin @ xy:matic office on 2015/07/02 by Mike Schäkermann (Stilnest.com, Head of IT)

Implicit Surface Modeling for 3D Printing

Embed Size (px)

Citation preview

Page 1: Implicit Surface Modeling for 3D Printing

Implicit Surface Modeling for 3D Printing

WebGL Meetup Berlin@ xy:matic office

on 2015/07/02by Mike Schäkermann

(Stilnest.com, Head of IT)

Page 2: Implicit Surface Modeling for 3D Printing

Stilnest

Page 3: Implicit Surface Modeling for 3D Printing

3D Printing

Sucks at ...Excels at ...

Page 4: Implicit Surface Modeling for 3D Printing

3D Printing

Sucks at mass production of generic productsExcels at ...

Page 5: Implicit Surface Modeling for 3D Printing

3D Printing

Sucks at mass production of generic productsExcels at on-demand production of anything

Page 6: Implicit Surface Modeling for 3D Printing

3D Printing

Sucks at mass production of generic productsExcels at on-demand production of anything

MASS CUSTOMIZATION

Page 7: Implicit Surface Modeling for 3D Printing

We need ...the software to support this dream

A WEBLINK TO CLICK

Page 8: Implicit Surface Modeling for 3D Printing

We need ...the software to support this dream

A WEBLINK TO CLICK

SIMPLE INTERFACES

Page 9: Implicit Surface Modeling for 3D Printing

We need ...the software to support this dream

A WEBLINK TO CLICK

SIMPLE INTERFACES

REAL-TIME FEEDBACK

Page 10: Implicit Surface Modeling for 3D Printing

We need ...the software to support this dream

A WEBLINK TO CLICK

SIMPLE INTERFACES

REAL-TIME FEEDBACK

UNBREAKABLE MODELS

Page 11: Implicit Surface Modeling for 3D Printing

Let me introduce...

Raymarching of Signed Distance Fields

Page 12: Implicit Surface Modeling for 3D Printing

What is a Signed Distance Field (SDF)?

A function, implicitly describing a volume:

- input: 3D position of a point in space

- output: the distance of this point from the surface of the volume (zero if point is on the surface, negative if it is inside and positive if it is outside the volume)

float distanceToSurface(vec3 position) { … }

Page 13: Implicit Surface Modeling for 3D Printing

SDF: an easy example

Who can tell me what shape is defined by the following SDF?

float distanceToSurface(vec3 position, float r)

{

float distance = length(p) - r;

return distance;

}

Page 18: Implicit Surface Modeling for 3D Printing

RAYMARCHING OF SDFsTHE GENERAL IDEA

Content creator: 9bit Science

Page 19: Implicit Surface Modeling for 3D Printing

Content creator: Miles Macklin

Page 21: Implicit Surface Modeling for 3D Printing

Content creator: Iñigo Quilez

Page 22: Implicit Surface Modeling for 3D Printing

Nice, but how do we get a filefor a 3D printer out of all this???

Page 23: Implicit Surface Modeling for 3D Printing

Marching Cubes

… or any otheralgorithm fortriangulatingiso-surfaces

Content creator:Tim Poston et. al.

Page 24: Implicit Surface Modeling for 3D Printing

Marching Cubes

Parallelization of distance samplingon GPU is trivial!

Content creator:Tim Poston et. al.

Page 25: Implicit Surface Modeling for 3D Printing

Recap: SDF Raymarching + Marching Cubes is cool for 3D Printing because:

Unbreakable surfaces

Page 26: Implicit Surface Modeling for 3D Printing

Recap: SDF Raymarching + Marching Cubes is cool for 3D Printing because:

Perfect volume definitions

Page 27: Implicit Surface Modeling for 3D Printing

Recap: SDF Raymarching + Marching Cubes is cool for 3D Printing because:

Cheap deformations

Page 28: Implicit Surface Modeling for 3D Printing

Recap: SDF Raymarching + Marching Cubes is cool for 3D Printing because:

Cheap blending

Page 29: Implicit Surface Modeling for 3D Printing

Recap: SDF Raymarching + Marching Cubes is cool for 3D Printing because:

Cheap shelling

Page 30: Implicit Surface Modeling for 3D Printing

Recap: SDF Raymarching + Marching Cubes is cool for 3D Printing because:

Cheap soft shadows

Page 31: Implicit Surface Modeling for 3D Printing

Recap: SDF Raymarching + Marching Cubes is cool for 3D Printing because:

Cheap reflections

Page 32: Implicit Surface Modeling for 3D Printing

Recap: SDF Raymarching + Marching Cubes is cool for 3D Printing because:

Real-time tweaking of params

Page 34: Implicit Surface Modeling for 3D Printing

DEMO SDF:

float frequency = 10.0; // input1: [5.0, 15.0]float speed = 0.3; // input2: [0.1, 30.0]float smoothness = 0.6; // input3: [0.1, 1.0]float wall = 0.15; // input3: [0.15, 0.3]vec3 p = point;float box = sdBox(p, vec3(2.0, 0.2, 0.2));p.x += sin(p.y*4.+time+sin(p.z))*0.15;float d = length(p)-1.;float st = sin(time*0.42)*.5+0.5;d += sin(p.x*frequency + time * speed + sin(p.z*frequency+time*.5+sin(p.y*frequency+time*.7)))*0.075*st;d = opUSmooth(d, box, smoothness); // change to opSSmooth//if (d < - wall * 0.5) d = - wall - d;//d = opS(d, sdBox(opMoveX(11.0 + sin(time) * 1.5, point), vec3(10.0, 10.0, 10.0)));distance = d;