Simulations in Virtual Reality: Digital Rhinoplasty - SBEL

natureplaygroundΤεχνίτη Νοημοσύνη και Ρομποτική

14 Νοε 2013 (πριν από 3 χρόνια και 6 μήνες)

59 εμφανίσεις

C
HRONO
::R
ENDER

Aaron Bartholomew

P
ROBLEM

R
EQUIREMENTS


Render huge data sets efficiently and beautifully




Have flexibility to render anything




Make the rendering process streamlined and
simple


R
AYTRACING


Conceptually simple



Easy to get complex visual effects without much
effort



R
AYTRACING

D
ETRIMENTS


Breaks down when scene complexity grows large



Only efficient if you can load the whole scene into
memory



Poor memory locality


Any ray can access any object in the scene at any
time



W
HAT

I
S

R
ENDER
M
AN
?


REYES algorithm


Render Everything You Ever
Saw



Pixar’s

PRMan

implementation is considered the
industry gold standard of rendering


“Used on every Visual Effects Academy Award
Winner of the past 15 years”


pixar.com






W
HY

R
ENDER
M
AN
?


Engineered to be as fast, efficient, and
configurable as possible



Extremely low memory overhead



Hybrid rendering capabilities


Raytracing

on demand



Highly scriptable and controllable

T
HINGS

R
ENDER
M
AN

IS

R
EALLY

G
OOD

A
T
: I
MMENSE

S
CENE

C
OMPLEXITY

T
HINGS

R
ENDER
M
AN

IS

R
EALLY

G
OOD

A
T
: D
ISPLACEMENT

T
HINGS

R
ENDER
M
AN

IS

R
EALLY

G
OOD

A
T
:
M
OTION
B
LUR

AND

D
EPTH

O
F

F
IELD

R
ENDER
M
AN
::
UNDER

THE

HOOD


REYES








Dice Primitives to
Microgeometry

Grids


Shade
Microgeometry


Bucket, load only relevant
Microgeometry

into
memory

R
ENDER
M
AN
::S
HADERS


Procedural material definition of how the
microgeometry

is rendered


Surface, Displacement, Atmosphere, Volume, …


Can do anything


Modular


RenderMan

Shading Language (C
-
like syntax)

R
ENDER
M
AN
::R
ENDER
P
ASSES


Compute some data that an effect is dependent
on


“Pass” over the scene to process the necessary
data


Composite the data in another pass to get the
final image


Example: Depth Map => Shadow


R
ENDER

P
ASS

E
XAMPLE
: P
OINT
-
B
ASED

A
MBIENT

O
CCLUSION

C
HRONO
::R
ENDER


RenderMan

requires a lot of work to configure
and optimize correctly


Need to specify long chains of
RenderMan

Interface
Bytestream

calls



Make it easy and more general to configure a
quality render, while still enabling flexibility



What is it: C++ processing binaries, simple
Python scripting interface, and succinct XML
specification







C
HRONO
::R
ENDER

RenderMan

Chrono::Render

XML

User

Scripts

DATA

Bytestream

C
HRONO
::R
ENDER

<S
ETTINGS
/>


Salient data for the render process

<settings>


<!
--
general render and data settings
--
>


<string name="
write_filename
" value="cube"/>


<string name="
write_path
" value="./"/>


<string name="
data_filename
" value="
pos.dat
"/>


<string name="
data_path
"
value="/
home/aaron/Documents/Programming/Repos/chronoman/t
est/input/data/rot_euler_y/"/
>


<string name="
data_format
"
value="
id,pos_x,pos_y,pos_z,euler_x,euler_y,euler_z,ignore,ignore,
ignore,ignore"/
>


<string name="
delim
" value=","/>


<string name="
searchpath
"
value="
./SHADERS/:/home/aaron/Documents/Programming/Repos
/chronoman/share/shaders/:/usr/share/aqsis/shaders/:/usr/share/aq
sis/shaders/surface/”/
>


<vector name="
framerange
" value="0 0"/>

</settings>

C
HRONO
::R
ENDER

<
RENDERPASS
/>



Scene definition and outputs

<
renderpass
>


<string name="name" value="
default_pass
"/>


<string name="scene"
value="./ARCHIVES/
default_scene.rib
"/>


<string name="lighting"
value="./ARCHIVES/
default_lighting.rib
"/>


<string name="camera"
value="./ARCHIVES/
default_camera.rib
"/>




<vector name="resolution" value="320 320"/>




<string name="
renderscript
" value="
AO.py
"/>




<!
---
RENDEROBJECTS
---
>

</
renderpass
>

C
HRONO
::R
ENDER

<
RENDEROBJECT
/>



Data and its appearance

<
renderobject
>


<string name="name" value="default"/>


<
bool

name="
motionblur
" value="0"/>


<vector name="range" value="1 1"/>


<vector name="color" value="1 1 1"/>


<geometry name="sphere">


<float name="radius" value="1"/>


</geometry>





<
shader

type="surface" name="
bake_areas
">


<string name="string filename" value="file"/>


<string name="string
displaychannels





value="_area"/>


</
shader
>


</
renderobject
>

C
HRONO
::R
ENDER

S
CRIPTING


Python Scripting


Complete control of RIB emission at runtime



Custom
-
grained Scripting


Write a script for any of the cameras,
renderobjects
,
renderpasses
, or lights



Wraps around fast C++ implementation



Really complex effects, very easy and concise


C
HRONO
::R
ENDER

ON

RAILS


Bootstrap your render



Generate/Transform scripts,
shaders
, and xml for
commonly desired effects


Example:
cman

generate
test.xml

pass
ao


Updates XML


Writes
AO.py

script to project tree



Convert file formats into
RenderMan
-
specific
types


Example:
cman

rib
cube.obj


Converts
cube.obj

&
cube.mtl

to
cube.rib

&
cube.sl



Adds files to render
searchpaths


L
IVE

D
EMO


“Suppose we’ll do it live”


Bill O’Reilly, Fox
News

C
HRONO
::R
ENDER
::Q
UESTIONS
::S
UGGESTIONS