Professional Documents
Culture Documents
The nuthor is nvnilablc 10 OWIlCTS of rights who he has not ocen able to contact for mailers COllCcming im'oluntnl)'
omissions or rnist.lkes in the eitnt ions of the sources ofthc wril1cn nndillustr;lledeonlenthcrcin.
All rightsrescr.·cd. No P;lIt of this book e;\11 oc reproduced, nlCrnori7.c<l illfi lc systcms or transmined in 3ny fonnorby
any mcans:clcctronic. IlIcchanical. photocopied. rccordedorolllCr. withoutlhcprc\' iouswril1enauthori71ltionoflllC
author
T11C mrthorofthiSl'ohrnlC 1l.1S earricd out tllC preparation of tllC book and co llCei"edtllCleamingprogralllscontaillCd
within il. TIIC author docs not take responsibility, implicit or e~plieit. for tl lCsc programs or tllC contents of tllC te.\1. TIIC
authOrc.1nrlOt.undcranyei rcul1\st:mccs.ocret:linedresponsibleforaceidcnts or conscqucnt dalllagc which dcril'c or are
eauscdbytllCuscofthcscprogramsandthcirfuuctionality
Nallles aud brands which are cited in the te\t are generally deposited and registered by their reslXX=til'e publishing
houscs
SUMMARY
SUMMARY _ VII
CHAmR 3 - VBay:.and"a, PAITl
INTRODUCTION
'"
INTRODUCflON
NOle
'"
EXAMPLES 167
Exmnplc 1 : \\'1~11isanlial iasing'! 167
Examplc 2: Adaplivc subd i\'ision sampler ............ 167
Example J : Adapli\'c QMC smnp lcr 168
Example 4: DOF, bump and lC.Xlurcs 169
E:-;arnpic5: OOFandproccdurallc,,\urcs ............................................. 173
Exarnplc6: SCCIlC withoul1C.xturcs and DOF 179
E.xamplc7: tCX1Urcsand amialiasing 185
E-.:amplc 8: ObjccI omlinc and nonnal
Example 9: random .1nlialiasing
E:»amplc 10: the lihcrs
Example II: moircclTcct
INTRODUCTION 209
AN IMATION
INTRODUCTION
PARAMETE RS 228
INTRODUCTION
PARAMETERS 276
NOTE
SUMMARY _IX
CHAPTlR 4 - "ay: Ian'"" PART 2
VRAY: ENVIRONMENT
VRA Y: CAUSTICS
INTRODUCTION
INTRODUCTION
PARAMETERS
NOTE
INTRODUCTION
PARAMETERS
INTRODUCTION
VRA Y: SYSTEM
INTRODUCTION
INTRODUCTION 5"
SUMMARY _ XI
VRA Y MATERIAL: VRayMt lWra llpcr . . ..................... 582
INTRODUCTION 582
INTRODUCTION 588
PARAMETERS
INTRODUCT ION
PARAMETERS
INTRODUCT ION
PARAMETERS .. (08
INTRODUCTION
PARAMETERS
VRAYMAP: VRa~·/l1a 11
PARAMETERS
INTRODUCT ION
PARAMETERS
INTRODUCTION
PARAMETERS .. 650
INTRODUCTION
PARAMETERS
INTRODUCTI ON
PARAMETERS
INTRODUCTION
PARAMETERS
INTRODUCTION
PARAMETERS
TIIEORY
lliECAMERA . 68~
V IGNETfING EFFECT
INTRODUCTION
SUMMARY _ XIII
VRAY LIGHT and VRAY SHADOWS .7-41
INTRODUCTION
PARAMETERS
VRAYLIGHT
INTRODUCTION
PARAMETERS VlbySky
VRAYPROXY
INTRODUCTION 825
PARAMETERS
NOTE
INTRODUCTION 833
PARAMETERS
VRA VFUR
INTRODUCTION 835
INTRODUCTION
INTRODUCTION
GENERAL ELEMENTS
PARAMETERS
CHAm. 8 - RENIEIElEMENTS
PARAMETERS 893
RcnocrElcmClllS
COMPOSITING
SU MMARY _ XV
CHAma 9 - .. UTIS
VRay,-1.5RCJ
INTRODUCTION
INTRODUCTION
I NTRODUCTION
INTRODUCTION _ 1
INTRODUCTION
ABOUnHIAUYHOR
Frnnccsw LcgrclUj was bon! ill 1971 in a linle valley in Bergamo ( Iwly). Aflcr \!lIming a dcgR!t; in bui lding
cnginccringalthcfacul\yofcnginccring.hcworkcdasaslmc1Ura l cnginccrfor lh~ycars.Rcali7jnghisrcal p<1ssio li.
he llbandOllo:l 1he j ob for whid l he had spell! years studying. to dcrlicmc himsclf 10 Ihe study 1uJd pmclicc of
professional gmphic design. In 200 I he was asked 10 p:1l1icipalc in the ma r~1gcmcnl of www.1rcddi.com. a small itali,Hl
CG porlaL lhal at the time cou nted up a bi t more than 1000 users; at the present it is a poi nt of rc fcncc for ,Ill ita lians
fascinated by cornplIlcr gmphics. by Jallual)' 2008 it had 0\"cr30.000 registered uscrs. In 2001. he also became ,m-arc of
a small plug-i n. VRay. developed by Chaosgroup. a Bulgarian sortwarc- holLsc. Siocc then he has 1101 stopped being
interested in everything thm h.1.s to do with rhe world of rendering systems. cspccblly VR~y. Afler four ye~rs as the
director of the Modeling & Lighting dC["l!1rnent in 1111 architect's studio in Milan. the ml1hor is currently working
free lance.
ACKNOWLEDGEMENTS
At the risk of sounding like as if giving an nceeptmlee speech a t tile Oscar'S ceremony, I thank the following people for
giving rlleadviee. inspiralion. and support for this book
tIle friends an1 users of www.lretldi.co m. Without \\'hose support and encounrgelllent I would 1\3\'e ne\'er sct
olTon lhis advell1ure.
Fabio All ama ndri (O$ \"e), ,,.ho was with me for the dmfling of the book
the uscrsoftheofficial YRllY forum. the princiJXl1 5Ourceofinfonnation and instruction. It is t l~urkstotheir
advice 1I~1t Ilmve been ab le 10 n~1ke Ihis book
the col1egues :11 www.abc·fologmfia.com. Pao lo Alli\'iss im o's www.auissimo.llel. Mau ro Bosca ro l's
www.boscarol.com. Franccsto BlInlcr lc 's www,banterle.colH. for providing nle with infonnation ke\' to tile
rcali~1n ion of the cI~lpters dellling wi th lights. photography and lhe history of compUicr graphics. A tI~mk you
10 Paolo Bo na\'oglia 's \\,\\,W,bol~1\'oglia,eu for llle P,1!1 dedicmed !O photognlphy.
spa~joinwind,libcro .illbm\'offologmfia of Da\'id Donnini , wcb.liscalilletitfv isiol~1gcf of Mau rizio C he lucci
again for the part dcdica tcd 10 camems.
a ll the intemel sit es wherc I havc bccnablc to find images and newSlOpu t lOgcthcrthccl~lptcraboul thc
histol)' of compUler gmphics. of lighl ,1lld of pho tography. I am sony for nOI citi ng all Ille sources 11~1t
cOlllributcd,c\'Cll i fonlyindirectly.tothedrawingupoflhcsecl~lPlers
Ihe typographers St ilJ!r.lfonli nc
10 Mariarosa Ta ranlin i for ller co ll,1bomtion in [he fonr~1 1 clleck oflhe In:t
10 Tom Hul1 so n for allowing the addilion oflhe Grccble plug-into Ihe OYO.
10 Cu neyt Ozda s for ill10wing lhe insertion into tlle OVD of [he Color Correct plug-in
10 Fedor Bi nka for a llowing tlle usc of llle GUt for vrimgcxr program in llle DVO
10 the C haosg ro ul) for allow ing Ihe insertion of tIle VRay Oemo into the OVO.
10 Flillside \\'\\'w.aycrsis.bcIforlhcirHORlrnaps
10 Chi ara. my girlfriend. for bclIring my absence these years a nd for p.1IieH[ly eneoumgiug nle
10 my dear p.lrenlS Tomaso aud Mcgi. who. wilhout even knowing, tmrghl their son commitment to follow his
drcams,neyerleUinggo.T1~1nkyou!
fNTRODUCTION _ 3
ORGANllATION Of THE BOOK
Rcscnrch was done 10 find a slyle for the book (hm was sober, bUI a1 the saine lime rich and plcasam to read. Composed
of9cl~lplcrs.cachoflhcmdc:llingwilhdisliTlC1andcasiJyidcnlitiable topics
1. I NTRO DUCTIO N.
2. THE HISTORY OF COM PUTER GRAPHICS.
J, RE N D ER ER - PA RT A.
~. RENDERER - PA RT B.
5. MATE RIA L EDITOR.
6. CAMERAS AN D L1GII TS.
7. O BJECT & ENVIRONM ENT .
H. RENDER ELEM ENTS.
9. UPD ATES.
TIM; first ,haptcr OOll1ains &Cnernl infonnaliOIl. The SC\:ond d~lptcr is an unllSI~1J pa.rt of the book. Personally I've
:1111'<1\"5 had an interest ill history. aoo 1]l<ltof COlllpulCT Gr.lphics has. and I think man.,. readers will agree. a Spcci,ll
chann. For 1I~1ny years of my life J lJ.1\'C oolle<:tcd ,Irticlcs and infonnmion about tIl\: subject. Rcali~jllg tlJ.11 J 111d
gmhcrcdalotofm.11crial,ldccidcdlosharciLbyaddingilasani1l1cgra1cdplIn Oflhc book. Funhcnllore. in lhc SlImc
CII.1ptcr.lhc history of IRtll" will bediscusscd. from ilsbeginnings. with inI.1gCSllnd ncwSIIC\"CrpublisllCd before.
C1I.1ptcr 3 and Chaptcr -I. tllC largest oncs. conlain infon1l<ltion regarding tllC usc of most of tllC p.1ralllCtcrs in tllC
Renderer. TIIC subjcct has been divided into two pariS only bec<lU$C of practical reasons. Chapter 5 dcscribes ,til tllC
nI.11crinlnndIl11psaddcdt03dsMaxnftcrinslalling l"Rm .whilcCII.1ptcr60ITcrs infOnlI.1tionabolllcamCl1lsnnd [ights
belonging to 1"R"y . ClI.1ptcr7describesl11C0bjcctsandtllCatmospllCricalcffcC1S 1II.'I<lc availablcby 1"H".... ChaptcrS
introduces video compositing conccplS. tOgCttlCT with tllC Rendcr Pass. lllC last Chapler brings tllC book up to datc with
tllC innovations inlroduccd by ' Ruy ·s\'I.SRC3. 1.5 FINAL. VRay 1.5 SPI. SP2 and SP3a
SOF'WARE
32_l1itOp<'rllling!:»·.f/em,':
- Microsoft Windows XP Professional (Service Pack 2 or higllCr) TCCOllllllCnded
- Microsoft WilKiows 2000 Professiol\<11 (Sen'icc Pack 4)
6.J-llitOper(l/ill{:.~)·"lem.. :
-Microsoft WilKioll'sXP Profession.alx64
-Browscrwcbrequircd: Microsoft 11l1enICI Explorer 6 or higllCr.
- Addilional software required: Diree. X R 9.Oc (required). OpcnGL (opliona l).
HARDWARE
32-IJitI /t'f'siO/,.-:
- Intel Pentiulll IV. Intcl Core duo. AMD Athlon XP or higllCr processor
-512 MB RAM ( I GB recollllllC1Kied)
- Hardware llCcclcralorOpcnGL R mKi Direcl 3D
-Poill1illgdispos.1IMicrosoftWindowS-C01llp.llible(Microsoftlll1elliMousc)
-OVOplayer.
6.J-lJitOperlltillg!:»·stl.'m!l:
-Imel EM64T. Imel Core Ouo.lmel Xcon. AMO Alhlon M orhigllCr. AMO Opleron Pf(lCessor
- I GB RAM (4 GB TCCOllllllCrKied).
- Hardware acccleratorOpcnGL R and Oirect 3D
- Pointing disposal Microsoft Windows-c<Jmp.ltible (Microsoft InlelliMousc)
-OVOplayer.
INTRODUCTION _ 5
Two l'ersiollS of IRIIJ exist: the 32-bil one. and thc 6-f-bitone. Regarding thc 32-bil I"crsion. it I1lnstbeinstallcdinlhe
presctlCe of a J2-bit OS. suc h as Windows XP Professiot~11 J2-bil. instead tllC (H-bit version mUSI be instnlled wilh
Windows XP Professional 64-bit. lbc 64-bit version will gual1lntce the possibility of assignillg to 3ds Ma.~ . and to
'Rtly as weH. more tll.1n 4 GB of IllCmO!)'. due 10 ils intrinsic nature. TIIC impossibility of assigning more than 2 GB of
memory tolllC sanlC process is OIICoflllC IIlOst scriousJ2-bit systemsproblellls. This isa big lilllitation. collSidering
11~1t high qualily computations IlCed a lot of RAM . In C<ISC tllC !ICed exceeds IIIC maximum nlCmo!)' available. 2GB in
32-bit systems. 3ds M,l~ lI'ill crash. even if more than 2 GB are prescnt on tllC system. TIlis doesn't 1l<lppen with a (H-
bit system. where all tllC installed RAM. 2. 4. 8 or 16 GB. Clm be assigned to an unique process
SOIlIC "not-official'" advice on tllC typology of hardware to usc wilh 'R".I to get tllC mosl out of tllC book are collccted
intllCnextscetion. withspcc ial c.1retotllCprices. TIlisisnotgeneraladvice:lhey·regroundedone.~perienccandonthe
prescntprices.aecordingll'ilh IRlly ·sneeds
P roc~S{Jrs: this is illC pM oftllC 1~1rdware which is uscd mOSl by 'R"y . All raytracingcomputillg. Globallllumi!~1tion
is processed by IIIC CPU. Thus. tllC more power OIIC has. IIIC more rapidly tllC image crealion will be achieved
NOl1'ad1ys l1l<uket oITers relat ively cheap 2.66 GHz-Qu.ad-Core processors. TIlis me<t1lS tllC PC will pragnl<ltic<tlly
,ontain just one CPU which is in tnuh fonned by .. scpmllled CPUs. A system containing two of llK:sc CPUs. called
Dual QI~1d-Core. will hall'e times comp.1rcd with tlK: previolls 01K:. I( is also possible to conncet more PCs. Single Core
or Multi Core. togellK:r in a network making !lK:m work toge!lK:r. This lI'illll11ow a funher fall in waiting tiuK:s
RAM: Memory qu<tlltity is anotllCr cruc ial aspect for a workstation. WllCn I "NIIY I~ls to compute complex inl<lges. it
Slores 11K: infonnation in Ihe syslem memory. SonlClimes. wllCn certain objects are uscd. for inst.1llCC Light CadlC.
DispJacenlCntand many oillC r oncs. ilcould happenlll<lttllC nlCrnol)' rcqueSlby IRu) is higllCrtll<1Ilthe available 01lC
lhis will make tlK: progrlllll cl1Ish. TIlis means iI's beHer to economize on Olher h.1rdware cleillems. I1ItlK:r tl~111 tlK:
RAM. As far as 32-bit systems a~ ,on:;:emcd. [ find pointless to e.~eced 2 GB. while for 64-bit ones tlK: adl'ice is
11.1\·ing allc.1st 4 of lhem. divided inlwo benehes, each one of 2 GB. RAM's mpidity is IIOt ilnpon.1nl as its quam it)'
H D: TIte choice of 1~1.rd disk illSlead. comp'lred 10 RAM and CPU. isn't all tl~lt imponant for I Ray. Its employnK:nt is
in fact purely storing tlK: infOlll~11ion. TIK: faster 11 HD is. the more rapidly you'll be able to open a file. save or llXall
11K: IrradiallCe Map. et, ... TIK: dirre~tlCes betll"cenllK: tK:W 1~1rd disks and tlK: oldest 01K:S is, anyway. just a fell'
sccOllds. TIK: problelll ariscs wllCn. for e ....ample. tlK: HD is used by 'Rfl.) as a "pad" me!llOry. instead of tlK: RAM .
SonlClirnes you' II llOtice a HD's on!,'oing aetivit,· dU.rillg tllC rendering with I R"I", togctllCr with tllC processor's
letl~Hgic 011C. TIK: reason is tlK: RAM requesll~IS been integl1l1ed by tlte hard disk ntelllOl)'. ilChiel"ing the creation of
p.1ging files on disk: this is a I'el)' long procedure. III otlK:r words. I Ril.!" is using disk space as if it was comnlOll RAM
This opermion is I'el)' slow. beeause the 1~1rd disk is. for its !~1ture. slo\\"erll~1n tlK: RAM . H:l\'ing.1 fasl HD could be
useful for lhis operation. in slang called Swapping. TIIC adl'ice could be I~l\'ing II 250 GB HD. with rotmion speed of
7200rounds/minUle
Nctw'ork Ca rd : A good qualily IlCt\lOrk card is helpful in casc 11K: PC is conrlCcted to a lK:twOrk uscd for dala transfer
thanks to a distribilled render. TIK: data isstorcdona Pc. when milltipic mac hincsworkl0gethcrl0,omputeascelK:
On;:e tlK: render is staned. tlris n~1ChilK: distribules tlK: SCCtK:. 11K: maps and textures et,--. to all tlK: Olhe r PCs linked 10
lIte !lCtwork too. Once this process is finished. as to sa~' all tlK: PCs 1~1ve llXeivcd .111 11K: infOlll~1tions. 111C lK:twOrk
Imffic slows down quickly. but doesn't stop. A lillie aetivily. due 10 tllC continuous d:lt:l transfer from tllC network
computers. which are executing tllC render. to the centr.11 SClver. which receives the data deriving from tllC PCs.lI'ili
always be prescnt Nowadays )'011 can find network 'llrdS 10110011000 Mbps at a dozen of euros
Vitl co Card : TIK: I'idco card doesn't affect tllC rendering computing in any way. II is only uscful for 1~1l' i ng a better
mal~1gClnenl of tllC viewpon. allowing a faster l'isualiz.1tion and a beneT real-linK: te.~ture represcntation. For this reason
it won't be considercd in this description.
TIIC author will be pleased 10 offer yon this support. accepting snggcSlions to improve lhe fulure cdiliolls of Ihis book
bUlhc is 1101 available forconsullingorspcdficproblClllsolI'ingoonccminguscrs'spccificprojccts
You can wrilc 10 Ihc allthor, both in Italian orin EngJish. 10 this add TeSS
,·rll):..("e....J;uid<!lQ~reddi.com
INTRODUCT ION _ 1
VRavANO ITS INTERFACE
IRlly iSlIsoftwarcbuiltuplocompUlcilll.1gcsbycomputcr,spccificallyCOJJCCi'"OOlocrcatcphotorcalisticimagC5_llis
bascdonphysicallall"sand propcnicsprcscnt in lI.11UJ'C. ThisCl~1b lcs i( to simUlate reality thebesl way possible thus
ob13 iningphysica llycorrcC\fCndcrs
. Flg..-el.l
Somee~esrealizedbyVRay'$wers
From Illc lcchnical point of vicw, I Ray was created as a 3ds Ma,~ plug-in. Nowadays many Olher versions arc being
developed. in Ilic fonn of plug-ins for Maya. Rhino. Cincn~1 ~D. SkclchUp. XSI. a SwndalollC \'CrsiOll onc for Linu.~
and 3no\herOlle for Mac OS X. lbc ones for Rhino, SkCIChUp, Cillcma~D arc already Oll lhc market
We will c~,Hn i nc ouly the 3ds Ma.~ vers ion in Ihi s book. SirlCc I '8".1 is still under beta-testing. different kind of
\'crsiollswilloc uscd.startingfrom .'I. .f7.03.uplililhclaslvclSioua\'ailablcduriuglhcbook·swriling. Incascncw
fcalun:s.dcrivingfromllCwvclSiolls.beoomclwailablc. lhCSl: will be n:mmtcdandoouullcmcd
(lhe book will be updntcd up 10 Ihc ,' J.5 SP311 for Jds Max 20(0)
Wc find l'RIJ,r lmd ilSOpliolls spread inside Jds Ma.\ . Onec inslalled and SC I as rendering cngine.one ca ll find il in
Illanv dilTcrcut scc lions. such as Matcrial Edilor. orin Ihc lights, lhc call1cras.thcobjccls.thccffccls.ctc