povray - old dominion universitycs355m/dbs/povray/max_plank_institute_pov-ray... · 08.12.1009...

45
08.12.1009 Dipl.-Ing Sibylle Nägle, MPI-DS 1 POV-Ray

Upload: nguyenxuyen

Post on 29-Jul-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 1

POV­Ray

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 2

POV­Ray

● Developed in the 1980th ● First steps by David Kirk Buck, he called it DKBTrace● It was turned to a group of developers in 1991

and calledPersistence of Vision Raytracer

POV-Ray

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 3

examples

by Sibylle Nägle

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 4

examples

by Sibylle Nägle

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 5

some examples

by Jaime Vives Piqueres

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 6

some examples

by Jame Vives Piqueres

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 7

some examples

by Gilles Tran

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 8

some examples

by Jaime Vives Piqueres

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 9

some examples

by Jonathan Hunt

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 10

Raytracing

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 11

mechanisms ­ reflection

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 12

mechanisms ­ absorption

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 13

mechanisms ­ refraction

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 14

mechanisms ­ example

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 15

coordinates

lefthanded coordinate systemby F.A. Lohmüller

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 16

first scene

  

necessary ingredients: light source camera object to be shown

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 17

first scene

  

light_source { <200,300,300> rgb <1,1,1> }camera { location <10,10,10> look_at <0,0,0> }

sphere { <0,0,0>,6 pigment { rgb <1,0.4,0.9> } }

povray +imyscene.pov +omyscene.png +A0.0

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 18

adding background

  

light_source { <200,300,300> rgb <1,1,1> }camera { location <10,10,10> look_at <0,0,0> }background { color rgb <0.5,0.7,0.9> }

sphere { <0,0,0>,6 pigment { rgb <1,0.4,0.9> } }

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 19

phong

  

light_source { <200,300,300> rgb <1,1,1> }camera { location <10,10,10> look_at <0,0,0> }background { color rgb <0.5,0.7,0.9> }

sphere { <0,0,0>,6 pigment { rgb <1,0.4,0.9> } finish { phong 1 } }

phong determines brightness ­­ 0= dull, 1=bright

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 20

mehrere Lichtquellen

  

light_source { <200,300,300> rgb <1,1,1> }light_source { <110,120,30> rgb <1,1,1> }camera { location <10,10,10> look_at <0,0,0> }background { color rgb <0.5,0.7,0.9> }

sphere { <0,0,0>,6 pigment { rgb <1,0.4,0.9> } finish { phong 1 } }

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 21

basic objects ­ box

Box:box { <x1,y1,z1> , <x2,y2,z2> }

P1

P2

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 22

basic objects ­ cylinder

Cylinder:cylinder { <x1,y1,z1> , <x2,y2,z2>,r }

P1

P2

r

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 23

basic objects ­ cone

Cone:cone { <x1,y1,z1>,r1, <x2,y2,z2>,r2 } P1

r1

P2

r2

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 24

basic objects ­ torus

Torus:torus { r1, r2 }

r1

r2

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 25

basic objects ­ plane

Plane:plane { <0,1,0>,0 }

Normal vector and distance to origin P

n

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 26

basic objects ­ text

Text:text { ttf “timrom.ttf” “POV­Ray” 0.15, 0

pigment { rgb <1,0.4,0.9> } finish { phong 1} }

0,0,0

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 27

transformation: scale

light_source { <200,300,300> rgb <1,1,1> }camera { location <10,10,10> look_at <0,0,0> }background { color rgb <0.5,0.7,0.9> }

sphere { <0,0,0>,6 pigment { rgb <1,0.4,0.9> } finish { phong 1 } scale <0,0.3,0> }

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 28

transformation: translate

light_source { <200,300,300> rgb <1,1,1> }light_source { <110,120,30> rgb <1,1,1> } camera { location <10,10,10> look_at <0,0,0> }background { color rgb <0.5,0.7,0.9> }

box { <0,0,0>,<5,5,5> pigment { rgb <1,0.4,0.9> } finish { phong 1 } translate <0,­3,0> }

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 29

transformation: rotate

light_source { <200,300,300> rgb <1,1,1> }light_source { <110,120,30> rgb <1,1,1> } camera { location <10,10,10> look_at <0,0,0> }background { color rgb <0.5,0.7,0.9> }

box { <0,0,0>,<5,5,5> pigment { rgb <1,0.4,0.9> } finish { phong 1 } rotate <30,0,0> }

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 30

several objects: union

#declare myobject = union {  sphere { <0,0,0>,6 pigment { rgb <1,0.4,0.9> } finish { phong 1 } }  box { <­5,­5,­5>,<5,5,5> pigment { rgb <0.4,0.9,1> } finish { phong 1 } }}object { myobject }

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 31

several objects: difference

#declare myobject = difference {  sphere { <0,0,0>,6 pigment { rgb <1,0.4,0.9> } finish { phong 1 } }  box { <­5,­5,­5>,<5,5,5> pigment { rgb <0.4,0.9,1> } finish { phong 1 } }}object { myobject }

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 32

several objects: intersection

#declare myobject = intersection {  sphere { <0,0,0>,6 pigment { rgb <1,0.4,0.9> } finish { phong 1 } }  box { <­5,­5,­5>,<5,5,5> pigment { rgb <0.4,0.9,1> } finish { phong 1 } }}object { myobject }

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 33

combining objects

#declare myobject = intersection {  sphere { <0,0,0>,6 }  box { <­5,­5,­5>,<5,5,5> }}object { myobject pigment { rgb <0.4,0.9,1> } finish { phong 1 } }

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 34

adding a floor

#declare myobject = intersection {  sphere { <0,0,0>,6 }  box { <­5,­5,­5>,<5,5,5> }}object { myobject pigment { rgb <0.4,0.9,1> } finish { phong 1 } }plane { <0,1,0>,­5 pigment { rgb <0.9,0.5,0.7> } }

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 35

patterns

#declare myobject = intersection {  sphere { <0,0,0>,6 }  box { <­5,­5,­5>,<5,5,5> }}object { myobject pigment { rgb <0.4,0.9,1> } finish { phong 1 } }plane { <0,1,0>,­5 pigment { brick rgb <1,1,1>, rgb <0.9,0.5,0.7> }

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 36

prepared textures ­ cork

#include “textures.inc”#declare myobject = intersection {  sphere { <0,0,0>,6 }  box { <­5,­5,­5>,<5,5,5> }}object { myobject  texture { Cork scale <10,10,10> } }plane { <0,1,0>,­5 pigment { brick rgb <1,1,1>, rgb <0.9,0.5,0.7> }

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 37

patterns

#declare myobject = union {  sphere { <0,0,0>,6 }}object { myobject pigment { 

image_map { jpeg "images/earth.jpg" once map_type 1 } rotate <0,180,40> } }

plane { <0,1,0>,­5 pigment { brick rgb <1,1,1>, rgb <0.9,0.5,0.7> }

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 38

transparency

#declare myobject = union {  sphere { <0,0,0>,6 }  box { <­5,­5,­5>,<5,5,5> }}object { myobject pigment { rgbf <0.4,0.9,1,0.5> } finish { phong 1 } }plane { <0,1,0>,­5 pigment { brick rgb <1,1,1>, rgb <0.9,0.5,0.7> }

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 39

index of refraction

#declare myobject = intersection {  sphere { <0,0,0>,6 }  box { <­5,­5,­5>,<5,5,5> }}object { myobject pigment { rgbf <0.4,0.9,1,0.8> } finish { phong 1 ior 1.5 } }plane { <0,1,0>,­5 pigment { brick rgb <1,1,1>, rgb <0.9,0.5,0.7> }

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 40

prepared textures ­ glass

#include “textures.inc”#declare myobject = intersection {  sphere { <0,0,0>,6 }  box { <­5,­5,­5>,<5,5,5> }}object { myobject  texture { Glass3 } 

pigment { rgbf <0.4,0.9,1,0.8> } finish { phong 1 ior 1.5 } }plane { <0,1,0>,­5 pigment { brick rgb <1,1,1>, rgb <0.9,0.5,0.7> }

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 41

prepared textures ­ glass

#include “textures.inc”#declare myobject = intersection {  sphere { <0,0,0>,6 }  box { <­5,­5,­5>,<5,5,5> }}object { myobject  texture { Glass3 } 

pigment { rgbf <0.4,0.9,1,0.8> } finish { phong 1 ior 1.5 } }plane { <0,1,0>,­5 pigment { brick rgb <1,1,1>, rgb <0.9,0.5,0.7> }

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 42

loops#declare myx=­7;#declare myobject_diff = difference {  #declare myobject = intersection {    sphere { <0,0,0>,6 }    box { <­5,­5,­5>,<5,5,5> }  }  object { myobject pigment { rgb <0.4,0.9,1>} finish { phong 1 } }  #while (myx<10)    box { <myx­0.01,­6,­6>,<myx+0.5,6,6> }    #declare myx = myx+1;  #end}object { myobject_diff pigment { rgb <0.4,0.9,1> } finish { phong 1 } }plane { <0,1,0>,5 pigment { rgb <0.9,0.5,0.7> } } 

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 43

loops

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 44

references

 Documentation: http://www.povray.org/documentation/ Tutorial (in german):  

http://www.f­lohmueller.de/pov_tut/animate/pov_anid.htm

 Pictures: Raytracing: 

http://en.wikipedia.org/wiki/Ray_tracing_(graphics) Refraction, Reflection, ... 

http://photoprotection.clinuvel.com/photodermatology­photobiology Coordinate system: 

http://www.f­lohmueller.de/pov_tut/basic/povkurs2.htm Earth: 

http://it­material.de/2009/09/meteosat­2­artificially­coloured­visible­channel­full­disk­earth­image/

08.12.1009 Dipl.­Ing Sibylle Nägle, MPI­DS 45

thanks