You are on page 1of 239

A PHOTOGRAPHIC PHOTOREALISTIC

APPROACH RESULTS
Studying th" real wo rld Through the simple
with the ba ~ ...s from and systematic use
phys~. materials, of the powerful V-Ray
l1ght1~g and ph otography rendering engine
Introduction

I've held various workshops and met hundreds of


people over the last few years. Some participants were
1: experienced, while others weren i at all, but eve1yone

.,,,. ----- -: -
shared the desire to create photorealistic renders and gain
complete mastery ofthe process and tools .
Workshop after workshop, I've tried to continuously
improve the sequence ofthe presented topics to find the
right order for a logical and above all informed use of
V-Ray. Jn architectural rendering more than anywhere
else, all the main concepts are derived from photography.
My job has been precisely that- to put down roots in this
discipline and make all the necessary connections that
give depth and thickness to its practical application within
the software.

- Our goal is 'Awareness' and this can only be obtained


through in-depth analysis, through asking ourselves
"Why?", and throughfi.rst ofall knowing the principles
and then refining them into methods - all while
continuing to preserve simplicity of vision.

Ciro Sannino
-
The Publisher
PHOTOGRAPHY & RENDERING with V-RAY

The publ isher of this work, Gabriele Congiu, is owner of the publishing house GC edizioni,
(Autodesk Authorized Publisher) and an Autodesk Certified Author and Instructor. His
signature publishing style is evident in PHOTOGRAPHY llt RENDERING with V-Ray, as it is
in all his publications. He regards Ciro Sannino's first book as a practical guide oriented to
all those (experts and not) who want to learn the basics for creating a photographic render
using a quick and intuitive method.

Who Is the Author?


The author Ciro Sannino, a graduate in Industrial Design, has been working in 3D and
rendering since 1997. He's a Licensed V-Ray Instructor, approved by Chaos Group (V-Ray's
production house), and since 2006 has also dedicated himself to his much-read personal
blog: www.grafica3dblog.it.
With the support of CGworld, he developed the 5-Step R1ender Workflow method, which
he has used successfully in his live workshops and which is illustrated in this book.

Objective of the Book


The intention of the book is to build a solid way of thinking through reasoning and
application. It allows the user to tackle photorealistic rendering and to know where to start
and what path to follow in order to arrive at the final outcome. All aspects, parameters and
problems are sorted into a framework that not only makes studying the book easier for
users, but also facilitates their subsequent phase of growth.

How the Book Is Structured


The 1 S chapters that make up the work are structured to ensure gradual learning and are
aimed at using V- Ray and its relative applications in the photographic field. The cornerstone
of the work is the parallelism between photography and the V-Ray software. The theoretica l
concepts presented in the chapters are followed by itheir practical application using
exercises, and are examined further in some cases, throug h videos.
1

Style Guidelines
Certain style guidelines have been used throughout this book to facilitate reading
and comprehension of the topics covered. These include technical Notes for in-depth
analysis and the author's Considerations. Reading is also facilitated by color printing and
highlighting of the fundamental words in bold. Videos are indicated inside grey boxes
containing this symbol f)l.

Contents of the DVD-Rom


The book comes with a DVD-Rom that contains all the .MAX files needed to carry out the
exercises, together with their relative textures. It also contains videos in .MP4 format and
.JPG files of the images used in the book. These can help you to better grasp the aspects
explained in the paragraphs. 30 111odels from DesignConnected have also been included
on the DVD. Some of these can be downloaded for free and others can be purchased directly
from the site www.designconnected.com. Finally, you wi'll also find textures produced by
Arroway Textures, as seen on their website www.arrowa)t-textures.com.
:INTRODUCTION

Principles and Methods


The famous American philosopher Ralph Emerson wrote:
"As to methods there may be a million and then some, but principles are few. The man
who grasps principles can successfully select his own methods. The man who tries methods,
ignoring principles, is sure to have trouble."
Emerson didn't know about computer graphics but he did understand the problem with
tutorials that don't illustrate principles. Tutorials are only valid and useful if, knowing the
principle, one seeks a guide to show him/ her how to technically apply it.
This is what we are going to do in this book: illustrate a set of rules that go beyond the
software and which deal with photography, the physics of materials, the creation of a
photographic set, and the proportions between objects and lights. Ei'lch concept will then
be associated with its practical application, to be carried out using V-Ray for 3ds Max.
To fulfill this purpose, we will prioritize the topics. There are tools which contain dozens
of options, but in this book we will only use the necessary ones to make the illustrated
principles concrete and speed up learning.
We must keep these simple relationships in mind:

Knowledge of all parameters > Time I Definition


Knowledge of Photography and Design > Aesthetic quality

Knowledge of the more technical parameters of V- Ray almost always leads to better time
management and the production of a clean and defined image. Knowledge of photography
and design, on the other hand, directly influences aesthetic quality. That's why we have to
start thinking "out side the parameters". Imagine yourself creating a photograph by putting
together and arranging a photographic set, assisted perhaps by an interior designer who
can harmonize forms and colors.
The photographic world isn't made up of Vray light, Color mapping and the Physical camera.
Rather, it's made up of Bank lights, exposure problems and DSLR cameras. This is a world of
knowledge in which we can find everything we need and translate it into parameters and
options that will al low us to produce photographic renders.

Considerations: The way we use the word Quality in this field can easily cause
misunderstandings. The same word can indicate both precision of calculation and the
aesthetic quality of an image. Let's use the power of words to immediately begin to
distinguish between two different types of"quality'; which have very different meanings.
We might have an image that lacks precise calculation, but in which we can already
glimpse a strong aesthetic quality. For this reason, henceforth, I will call the meaning
related to the precision of calculation the Definition of the image, while the aesthetic
quality will simply be called Quality.
PHOTOGRAPHY & RENDERING with V-RAY

V-Ray Certification for Users


The official certificates currently available in Italy are the V-Ray Certified Professional,
issued directly by Chaos Group - the company that produces V-Ray - , and the SSWR
Certification for V-Ray, issued by CGworld, a company specializing in education and
processes.

V-Ray Certified Professional


The V-Ray Certified Professional is a software cer-
tificate. To obtain it you need to book a session and
go to a V-Ray Training Center to take part in an exam
consisting of 120 multiple choice questions (currently
in English). To pass the exam, you need to answer more
than 70% of questions correctly.
Users who pass the exam will be included
and published in the official list on the Chaos V-Ray Certified Professional
Group website and can display their name
and surname aside the Chaos Group logo on
cards and letterheads.

Official w ebsite: www.chaosgroup.com


Reference in Italy: www.vraytrainingcenter.it

SSRW Certification for V-Ray


The SSRW for V-Ray is a process certificate. It is issued by
CGworld and certifies that users are able to carry out the five ,.-
(ssnw ~
step process using V-Ray. Vast knowledge is required and relates
to photography, lighting techniques, V-Ray software and color
correction using Photoshop. CERTIFICATION

The test is divided into two parts: 700 multiple choice questions

.............
and a practical exam in which the participant

. ....
shows he/she is able to build a scene using

specific processes and meeting the standards

CG World
of the 5-Step Render Workflow 9 .
.. ..


the professional network

Certified users will be officially published at www.Ssrwcertification.com and will receive a


unique url for their certification.

Official website: www.Ssrwcertification.com


E-Learning: www.learnvray.com
INTRODUCTION

Minimum Hardware Requirements for V-Ray


The minimum requirements for using V-Ray ADV or V-Ray RT CPU are:
CPU 4 CORE + Hyper-threading (i7 or its alternatiyes);
RAM4GB.

The Ideal Workstation for Using V-Ray


Providing only one ideal configuration for using V-Ray may be too limiting. However, in this
paragraph we would like to direct you to a workstation that provides good value for money.
We stress that, for a tailored solution, it is advisable to visit the www.3dws.net website and
contact 3DWS to obtain the ideal configuration for your needs.
The workstation we currently (February 2013) advise is:
"Middle Range" class of workstation- Mono CPU with Xeon ES 1650, 32 GB di RAM and a
Quadro 2000 video card as a minimum, or a "High End" class of workstation for creating
renders using V-Ray Advanced- dual Xeon ES 2687, 32 GB di RAM and a Quadro KSOOO
video card.

Who Is Chaos Group?


Chaos Group was founded in Sofia, Bulgaria is the second half of the l 990s. Its two partners
Peter Mitev and Vladimir Koylazov
worked to develop software for
simulating fire. The first product they
released was called Phoenix and was a plug-in for the early versions of 3DS Max 3 and 4.
At the end of the 1990s they had the idea of developing a true rendering engine with
Global Illumination, to be integrated into 3ds Max as a plug-in. This idea was fostered by
the incompatibility of the fire simulation software Phoenix with the rendering engine in 3ds
Max (Scanline). The first beta versions were released to the public in December 2001, and in
Spring 2002 the first commercial version of V-Ray was presented. The Phoenix project was
abandoned for a long t ime and only in recent years has it reemerged with the new versions
Phoenix FD 1 and 2.
Chaos Group currently has offices in various countries throughout the world but its
headquarters has always been in Sofia and now has over 100 employees. V-Ray is Chaos
Group's product leader, having now become a standard for high level professional 3D
visualization of photorealistic images.

Who Is 3DWS?
3DWS (www.3dws.netl was founded on 3rd December 2001. The company's goa l is to
support all professionals in the CG, Video Pro, CAD, and
Networking environments and to advise them on the best
workstations. 3DWS has been Chaos Group's official partner
for years, providing professional support for V-Ray, both from
a technical and artistic point of view.
Its partners also include NVIDIA and Intel
PHOTOGRAPHY & RENDERING with V-RAY

Who Is DesignConnected?
DesignConnected is a computer graphics .Jl,...._
company that was set up in 2006 with ~ designconnected.com
headquarters in Sofia, Bulgaria. It has become
the main producer of high quality 30 models of furniture, lighting and accessories, Figure
lntro-1. DesignConnected strives to perfect 30 modelling, ensure the beauty of structures,
and capture precise details, paying special attention to the latest trends and design icons. At
www.designconnected.com, it's not only possible to purchase various high definition 30
models, but also to download some for free. These can be used in various projects, as long
as the source is acknowledged.

Figure Intro-1
Some of the 30
models rendered by
DesignConnecced

Who Is Arroway Textures?


Arroway Textures produces high resolution textures,
Figure lntro-2, used in many fields, such as architecture, arroway
mechanics and design, in which a realistic visua lization of textures
computer graphic images is necessary. Its headquarters are
in Leipzig, Germany.
www.arroway-textures.com sells thousands of high resolution textures to meet all the
varying needs of digital graphics professionals.

Figure l ntro-2
Several examples of
chc application of
Arroway Texcurcs
in renders created
using va1ious
sofcwarc progr11ms
This is an introductory chapter to the 5-Step
Render Work.flow method, an educational
method consisting of5 steps that will be used as
a guide for the whole book. The order oftopics
is designed to give readers a simple, logical way
of thinking that will allow them to master the
production process in the best way possible.
The 5 steps, in order, are: 1) Framing and
Checking Your Model, 2) Light Balance,
3) Creating Materials, 4) Final Settings for
Cleaning Your Image and 5) Color Correction.
Steps 1 and 2 are the most creative and, if carried

-- out correctly, lay the foundations for a successful


image. The last three become progressively more
technical but their explanations are simple and
linear.
PHOTOGRAPHY & RENDERING with V-RAY

The 5-Step Method


Photorealistic rendering should take a great variety of factors into account, ranging from
photographic knowledge to understanding the software and the many parameters you
need to know in order to use it. So how can we produce a render without leaving anything
to chance? Where do we start? How do we develop it all in a linear way?
Studies of complex systems, that is, those that include a considerable number of variables,
aim to break a problem into many small pieces. Each one is consequently easier to tackle
and solve.
The order we choose to follow in this kind of approach is also extremely important, as each
concluded step acts as a constraint for the one after, until the final solution is reached.
After years oftraining and contact with many students and thanks to the support of CGworld,
a network of 3D artists with headquarters in the USA, the 5-Step method for producing
photorealistic renders has finally become a simple, solid and tested procedure. The 5-Step
Render Workflow is an educational format that applies the illustrative approach to
studying complex systems to t he creation of a photorealistic render. It breaks production
down into five steps, Figure lnt-1 , each one being highly accessible, even to beginners.
In the 5-Step Render Workflow the production process is broken down as follows:
Step-1: Framing I Checking Your Model;
Step-2: Light Balance;
Step-3: Creating Materials;
Step-4: Final Rendering;
Step-5: Color Correction

Figure Int-1 Diagram of the 5-Step Render Worldlow

Considerations: If you have ever practiced a discipline, like piano or volleyball in my


case, the notion of "basics" will be very clear to you. I've had a certain level of experience
with both piano and volleyba ll. They are my two great passions. The only way to correctly
carry out a technical movement is to do it slowly at first, without adding any particular
difficulties that can distract you from th e basic gesture. Developing a clear idea of what
to do starts by conscientiously and rigorously analyzing the simplest things first. The
same rule naturally applies to rendering, lighting and photography. Only once you have
perfectly mastered the basics, will you be able to manage more and more complex
scenes, while maintaining the "simplicity of vision" obtained.
Moreover, a successful outcom~ in any project, of any size, relates directly to your ability
to effectively break it down into many smaller and more manageable projects. This is the
core idea behind the 5-Step Render Workflow 0 (5SRW).
CHAP E l - FIRST STEPS JN V-RAY

Details about the 5-Step Method


As mentioned earlier, each step acts as a constraint for the one after. The successful outcome
of an image is consequently very much tied to the first two steps in which the result that
we wish to achieve is basically defined. Furthermore, 'in setting the light balance - which
is crucially important - the foundation will be laid for three-dimensionality in your image.
Interestingly, very few parameters are used in these early phases but their combinations are
countless.
The most obvious and common mistake is not defining your objectives well before starting
a render. You can try everything, from adding reflections or gloss to raising parameters to
their maximum. But try as you may, you will not substantially affect the result.
Things won't change, in fact, until we turn our hands to the "foundations" of the image: the
Framing (Step-1 ) and above all, the Light Balance (Step-2).
The Creation of Materials (Step-3) and Final Rendering (Step-4) appear to be the most
arduous steps, as they are characterized by the use of many parameters. They are really quite
coherent procedures, however, if they are tackled in an orderly fashion.
Finally, Color Correction (Step-5) is carried out using Photoshop, to achieve perfect white
balance. This is impossible in the render phase, just as it is impossible in a real photographic
shooting. Using Photoshop, we can also achieve better contrast and sharpness.

Considerations: This book focuses particularly on the three central steps: Light
Balance, Materials and Final Rendering. I've chosen to use the inductive method, as I do
in my workshops. Every topic has a very important theoretical introduction, followed
immediately by practical application, which is thus seen as the implementation of the
concepts presented beforehand. This way the parameters don't only become one simple,
logical consequence. By training our minds to follow a certain way of reasoning, we will
also be able to address other different situations and problems, using simple logic.
PHOTOGRAPHY & RENDERING With V-RAY

The Right Version


The concepts presented in this book are general and draw inspiration from photography
and materials. The analyses can therefore be applied to any software and any rendering
engine on the market. Nevertheless, we will use 3ds Max and V-Ray to implement them.
V-Ray by Chaos Group, is a photorealistic rendering engine and is currently produced for
various types of software, including 3ds Max, Maya and Softimage by Autodesk, Rhinoceros
by McNeel and SketchUp by Trimble. In this book we will opt for the 3ds Max version and all
the files in the attached DVD can be opened using the 2010 version or later.
According to the reasoning of this book, the "right version" is a relative concept. The contents
are suitable for any version of V-Ray, from 7.50 to the latest version 2.3, in which new options
exist but the basic functions are still the same.
The minimum requirements to follow along with the book are:
3ds Max 201 o (or later);
V-Ray 2.0 (or later).

Note: There are also versions of V-Ray for Cinema40 and Blender. These are versions
based on the same core (SOK) by Chaos Group but developed by Laub/ab and Andrey M.
lzrantsev respectively.

Activating V-Ray
The V-Ray rendering engine is a plug-in that is installed into 3ds Max in our case, which
operates inside its work environment. A basic knowledge of 3D Studio Max and its interface
is advised in order to get the most out of this book.
After installing V-Ray, launch the V-Ray Licenses Service then open 3ds Max. To set V-Ray
as the rendering engine you need to go to the Rendering panel through the drop-down
menu Rendering> Render Setup (or press Fl O).
In the bottom rollout menu of the Common tab inside the Render Setup panel, Figure 1-2,
you can find Assign Renderer, w here you can choose your graphics engine.

lia1 Renmr 5e1up: iweu1t ScdM 1tenc1em l'"C>' I a I!@!!


Render eemenis 1 Rayhe2r I Advarud ~tirlj I

Figure 1-2
c.mnor. I Rer'dettr I
Render Serup panel
with the Common
tab and the Assign Sa\>11
AS89'1 ~
Renderer rollout menu
selected. The three dot
butcon which you'll
~ DdaASallhRmdmr
Mot.rial Edlxr. ' fait Sallh Rmdmr
CJ
- ::J ~
use to choose the
Rendering engine has
~: ~ SallhRet'deror p
been highlighted.
Save as Df:fil&.jts I
CHAPTER 1 - FIRST STEPS IN V-RAY

Upon clicking the icon marked by th ree dots"': Figure 1-2, the Choose Renderer dialogue
box will appear, Figure 1-3. Here you can select a Rendering engine, such as V-Ray NFR
2.30.01 for example, Figure 1-3;

Oef.!Ut Sarine Renderer


mentlll ray Renderer
~Hardware Renderer
~
- t I
Figure 1-3
YUE Fie Renderer
The Choose Renderer
dialogue box where
you can choose your
graphics engine. V-Ray
NFR 2.30.01. has been
highlighted.

Note: Also appea ring in Figure 1-3 is the V-Ray RT graphics eng ine, a software designed
for real-time previewing of renders. It works with V-Ray 1.50 or later.

Once t he rendering en9ine has been selected, Figure 1-3, the Render Setup panel, Figure 1-4,
will contain all t he functions for working with V-Ray.

rRender Setup; Y-by NFR 2J0


_ .01_ _ ~ El Q;Q
l

c:onvnon I v11ay I IndrectA.rnination I Settings I Render Elements I


r.._
+ _ _ _ _ _ _C:..
-...._ ""'-P.._
ITITl..... arame ""'s_ _ _ _ _ ___,l l
~ter

r.+ Emal Notiticat1ons I1 Figure 1-4


r.+ sa1pts I1 T he Render Setup
Assigl Renderer I dialogue box after
Production: ~-R&y lfR 2.30.01 d selecting the rendering
Mater1al fdtor: P-Ray NFR 2.30.01 d [ii engine
~-Ray RT 2.30.02
ACUveShade:
0
save as Oefilults 11

Presetj---
Ylew: IPerspecllve .. .!J

After setting V-Ray for rendering and V-Ray RT for real-time rendering, you can save t hem
as default engines by clicking on Save as Default, Figure 1-4, so that every time you open 3ds
Max, this setting will already be active.

THIS CONCEPT IS ILLUSTRATED IN P&R-VRAv \ CHAPTER 01 \VIDEO \ V10Eo-01-1 .MP4 ~


PHOTOGRAPHY & RENDERING w ith V-RAY

What Is V-Ray RT?


V-Ray RT is an additional function of V-Ray that quickly creates previews that are very
similar to the final render.
These previews, Figure 1-5, provide a decisively more exciting and rewarding work
experience in real t ime, as very little time passes between setting up the scene and having
a perception of the final outcome.
You need only activate RT to see a render appear in just a few seconds. This updates itself any
time a change is made: whether it's repositioning objects or changing lights, cameras and
materials. Thanks to immediate feedback from V-Ray RT, setting up scenes is considerably
faster.

Figure 1-5 Two images depicting previews generared in jusr a few seconds. They are updated
automatically every time the camera is moved or a material or lighr is changed. T he images are
grainy bur they give perfect feedback abot1t the scene.

From version 2.0 onwards, V-Ray RT can take advantage of the processing power of both
the processor (CPU) and the latest graphics cards (GPU).
With the exception of some particular materials, like VRayFur (for creating filaments) for
example, it is possible to obtain a very precise preview of the final outcome that will be
generated as a normal production render. You don't need to know a lot to use RT correctly.
You just need to activate it and then click the ActiveShade button to create an immediate
preview of the scene.

Note: Up to version 1.5, V-Ray RT was a separately installed component and only
supported CPU processing. From V-Ray 2.0, it has become part of the software,
supporting both CPU and GPU processing.
How to Activate V-Ray RT
CHAPTER 1 - FIRST STEPS IN V-RAY

-
V-Ray RT can be activated in different ways. One way is through the Render Setup dialogue
box, by clicking on the ActiveShade opt ion, Figure 1-6,. To launch the render in real time, just
click on ActiveShade, instead of the traditional Rendering button, Figun~ 1-6.

~ R~ Setup: VRay RT 2.30.112

Ccmnon I V-Ray RT I
r+ _________a.
~1~
110
~1~
Parame
=o::~~~
-------
r+ Eina11Nodficallons
I +
Figure 1-6
Produdlon: P-RvN'R :i.30.01 .:J T he Render Setup
dialogue box showing
Mateial Edtnr: ~ ..... :n _.., ..:J II
the ActiveShade
ActiveShade: ~
p-Ra
~y -R~
T 2.
~30-.=
oz--- d options

Pre.etl---
..,..,,1~ S

AciiYeShilCI<:: il'~RT 2.10.01 -d Figure 1-7

II ~ as~r.Ats _J
I Pan of the Render
Serup dialogue
box sho"'ing che
l 1Pr~
("~
I Pre.et:!
~1~ e B Production and
Rendering options

THIS CONCEPT IS ILLUSTRATED IN P &R-VRAv \ C HAPTER 01 \ V IDEO\ V 10,Eo-01 - 2 .MP4 ~

Considerations: To see previews of the various exercises in this book, the reader can
either use V-Ray with "draft" parameters (illustrated in Chapter 3 - (j/oba/ Illumination
and lrradlance Map) or V-Ray RT. The goal is the same: to get an idea of how your work
is progressing. For this reason, the two methods are used indifferently throughout the
videos accompanying the various exercises.

Once the ActiveShade mode has been activated, you can immediately see that the render
panel switches from five, Figure 1-8, to two tabs, Figure 1-9. The Common tab is still the
same, while next to it we only find V-Ray RT, Figure 1-9.

Figure 1-8
lfal Rmd4!r Sftupc V-Ray NfR 2.JOfil Part of che Render
I Ccmnon v-Rav tndrttt aama11an setli'IQs erup dialogue box
showing five tabs
l ~~ ------~C..=
=o~oP~~~_,=='"c=.__ _ _ _ ___,11
"""'"'l\kolinn<

F igure 1-9
1(21 Render Setup: V-Ray RT 230.02
Part of the Render
I common I V-Ray RT l Serup dialogue box

-----~:)
showing only two cabs
PHOTOGRAPHY & RENDERING with V-RAY

As mentioned earlier, V-Hay RT provides different real-time rendering engines: CPU,


OpenCL and CUDA, Figure 1-10.

tfi Rencb Sdup: V-Ray RT 2.30.02


~ I V-RayRT I
- - - - - -bid' 13 'liiQiil

,-- r--d
1
:e depth
GI depth
- rs- :j
p- ~
32 bit fi'ame buffe
r
V-RayRT

~ md

"!:!~&""c.i
Raybu!de size~
Rays per i:ixol

........ r
rr-- .:J
.:J
I

Figure 1-10 -

=~ - ~r~-,~
Pare of the Render .]
Setup dialogue box
ro,o-
x. render time :j m. I m~ ~nCl (single kernel)
showing the V-Ray RT
tab and three engines
.:J
poths per i:ixof W-- PU It t CIA:IA lslnole kernel) I
for real-time rendering:
CPU, OpenCL and :it render ru~r l[p~e~ ~
Show mask r Max. noise io,OO 1 .:J
CUDA
.vrscrne eJ<pOrt

r
r Elaport :rsa:ne lie j
roo n't render (just export) JI
.,~-
e

_
!Disabled
r =r
.., ef: t:
r
r
r
~
YRayProxy objects
X-Ref sanes and contaiien

~~a"'~- ~ .:.i I r llbJllac:em<nt


Par11de systems
r Motion tiLr

Prcsetl---
\'lcw 1Per9p!ctive a

Note: If you own an earlier version of V-Ray than 2.30.01 , the CUDA engine type will not
be visible in the V-Ray RT tab, as in Figure 11-10.

The biggest difference between them is the hardware they use and the processing speed
they offer. Here are some of the main differences:
CPU: The processing is carried out by the central processing unit. This is not the fastest
engine but it supports a greater number of V- Ray characteristics. The graphics card is
not used so it is easier to manage the windows while rendering is underway.
OpenCL: The processing is carried out by graphics processing units (GPU). This can be
much faster than the C:PU engine but, because the graphics card is used, working with
the windows is slower, as the video is refreshed less frequently.
CUDA: The processing is carried out by graphics processing units (GPU), optimized for
NVIDIA cards. This results in better performance than OpenCL.

Considerations: If you're! a beginner, don't be intimidated by these technical terms! The


rest of the book uses an .approach that takes its reference points from photography and
simply applies them to rE!ndering in the most straightforward and linear way possible.
When we take picmres, our cameras automatically
1: correct them to make them a little brighter. This
compensation occurs automatically to bring the
final result closer to human perception. In this
chapter, we will see how to best set up 3ds Max
and V-Ray to prepare them for compensation,
just like a real camera. First we will illustrate
some concepts, and then the various commands
and options. There are, in fact, different ways to
compensate, even though all of them aim to do the
same thing: to add Gamma 2.2 to the image.
The method we will explain is simple and effective.

-- The first part relates to setting your preferences


and the second refers to the settings required
for all your files. We will.finish the chapter by
analyzing some of the interesting functions of the
V-Ray frame buffer.

.e
~
I
PHOTOGRAPHY & RENDERING with V-RAY

Gamma Compensation
Before commencing any practical exercises in V-Ray, it's first of all necessary to understand
the behavior of cameras and sensors, in order to replicate their effects with our V-Ray
software.
Now we will examine Compensation using the Gamma curve (also called Linear Workflow),
one of the fundamental topics, which, together with Exposure and Light balance, forms a
basis for t he complete control and success of a photographic render.
Throughout your experience you may have obtained a render which was too "dark" or
"burnt", that is, so illuminated that you get completely white areas. It's a typical situation,
especially when rendering interiors. When a render looks too dark, we immediately try to
increase the intensity of the lights. It's rarely possible, however, to achieve good, diffused
lighting because the image burns straightaway. Let's analyze what causes th is problem and
how to solve it.
Any sampling system - which, in the case of a camera, is made up of its sensor - captures
information along a certain response curve that is very different from the response curve
in the human eye. That's why, without requiring any intervention on our part, cameras
are programmed to add a compensation curve to the data they gather. The purpose is to
bring the photo as close as possible to the perception that human beings would have when
observing the scene in real life.
The human eye tends to perceive things much more clearly than sensors do. We can
therefore see how, if this compensation curve were not applied, the result would be a very
dark photo. This Is how we get the dark renders we mentioned earlier.
We don't have sensors in our case, but V-Ray is, in all respects, a kind of "simulator" of them.
As such, it replicates their various features, including sampling, which as we saw earlier, is
different from human perception. For this reason, to produce photos with V-Ray, we simply
have to do what cameras do automatically: apply a compensation curve - usually a
Gamma curve with a value of 2.2 (the closest average value to correct compensation).
Theoretically, an image could alternatively be "compensated" afterwards, for example,
with the Gamma tool in Photoshop. There are, however, some contraindications, like the
"bleaching" of colors and the clea r incidence of artifacts in the shaded areas.
For this reason we will demonstrate how to compensate an image during rendering. This
will solve all problems from square one, just as any camera does.

Note: The rendered images (Figure 2-1, Figure 2-2 and Figure 2-3) on the opposite page
have also been used in Chapter 6 - Managing Materials, to help you understand how
materials are assigned to objects.
CHAPTER 2 - COMPENSATION USING THE GAMMA CURVE

Figure 2-1 is a classic example of an uncompensated image. The dark areas are too dark and
the contrast is too intense. This makes the lighting impossible to control. The problem is that
we are simply not replicating a camera's behavior.

Figure 2-1
An image
rendered witho11t
compensation. It is
too dark and has ver}'
strong contrast.

Figure 2-2 is the image in Figure 2-1 compensated in post-production using Photoshop.
The Gamma curve makes everything brighter but images are inclined to be bleached, and
artifacts can emerge in the shaded areas.

Figure 2-2
The rendered image
compensated in
post-pr:oducrion.
The image contains
signific11nt artifacts in
the shaded areas.

Figure 2-3 has been compensated during rendering. The process occurs at the time of
rendering itself, so the scene appears brighter in general, while the textures and colors keep
their tones and correct contrast. In this case, no artifacts are visible in the shaded areas.

Figure 2-3
The rendered image
compensated during
the rendering process
PHOTOGRAPHY & RENDERING with V-RAY

Applying Gamma to the Scene, but not to the Textures


The average generic value for the Gamma curve, that is, the value that causes the image
to best resemble human perception, is 2 .2. By simply adding Gamma 2.2, we solve the
problem of compensation.
We could add Gamma to a render through the 3ds Max preferences, but if we add it t o
everything indiscriminately, something strange happens to the textures, Figure 2-4.

Figure 2-4
An image rendered
without Gamma
2.2 (A), the image
rendered with
Gamma 2.2 (B),
the image rendered
without applying
Gamma to che
cexcures (C)

Figure 2-5
How che wood
texture appears
in chc Material
Editor

The image in Figure 2-4 (A) has not had Gamma applied to it. The one in Figu re 2-4 (B) has,
but it has been applied to everything. What happens to the t exture of the wood, whose
original color can be seen in Figure 2-5? Why does it appear so washed out after adding
Gamma, Figure 2-4 (B)? In the previous parag raph we stressed how cameras automatically
add Gamma 2.2 to shots, so here's a little clue: textures are photographs. We therefore have
to prevent them from receiving a double dose of Gamma. The bleaching of the image,
Figure 2-4 (B), is due to the fact that the texture has had Gamma 2.2 applied to it at the time
of shooting and then another dose of Gamma 2.2 during rendering.

So to recap, we need to:


1. Compensate the rehder usihg a corrective Gamma curve, equal to 2.2.
2. Prevent this correction from being applied to the textures because, being photographs,
they have already been corrected during shooting.

Setting Up 3ds Max for Compensation


So far, it's all been theory. Now we will look at how to interpret this theory in the best way
possible, using 3ds Max and V-Ray. The method has been divided into two parts, both of
which must be carried out.
PART 1: This concerns the correspondence between the Material Editor, render and textures.
Changes to preferences need only he done once, Figure 2-7, as they are saved afterwards.
PART 2: This concerns the compensation of the image produced. In this case, we have two
parameters to set for each new file, Figure 2-8.
CHAPTER 2 - COMPENSATION USING THE GAMMA CURVE

Compensation Part 1 - Avoiding Gamma on the Textures


The following options will prevent textures from receiving Gamma twice and from producing
that washed-out effect, Figure 2-4 (A). These settings will make the colors correspond in
the Material Editor and the Render. Change your preferences by clicking on the title of the
Customize menu, then on the Preferences... option, Figure 2-6. Now, in the Gamma and LUT
tab of the Preference Settings dialogue box, Figure 2-7, activate these options, Figure 2-8.

Custornitt I MAJ<Scropt Help ~


CIJSlomize U-intttface.-

lood Wstom UISd1ane.-


~Custom UI Sdwme.-

Reomt to Startup uyout


lock UJ loyout Alt.0 Figure 2-6
ShowUI
The Customize drop-
down menu with the
Preference:. option
~ lkerFlths- highligh ced
Configure system Paths...

UniUSctup...

Plug in M.Ngct-

- I ~ I Radositv I _,111,.y
~ CO.- and WT ~

Mal2tlals and Colors--~


Figure 2-7
Prefe.re.nce Settings
dialogue box with
the Gamma and
LUT tab selected and
the relati,re options
highlighted. Check
these settings every
time you reinstall
3ds Max or change
workstation

OK c.ncel I

Here are some details about what each option in the Gamma and LUTtab in Figure 2-7 does:
Enable Gamma: This activates 2.2 correction.
Materials and Colors: By ticking the two options, we ensure that Gamma correction
affects both the Material editor and the Color selector. The colors will appear lighter.
Input gamma: By setting a value of 2.2, we indicate that the "input" textures already
have Gamma 2.2, (being photos), and should therefore not be altered.
Output Gamma: By setting 1.0, we tell 3ds Max to save the image without correction.
PHOTOGRAPHY & RENDERING with V- RAY

Compensation Part 2 - For Each New File


For each new file you need to allow the Gamma correction to be incorporated into the
processing itself, through the Render Setup dialogue box, Figure 2-8. This is opened by
clicking on the F10 function key.
Set the Gamma to 2.2 in V-Ray:: Color mapping.
Activate the V-Ray:: Frame Buffer.
Keep in mind that these should always be the first two operations you complete when you
open any new work file.

~ Render Sdlip: V-Ray NfR 2.lODl

Figure 2-8
Render Serup
dialogue box w ith
the two options
Gamma and Enable
built-in Frame
Buffer highlighted
jP- Enil>le t.At-tlframe Buffer
j., Rondor ID memory fi'amt bu
L ~las~
in the V-Ray::Color
mapping and V-Ray::
r"lput r...articn - -
p Getr-*'1ion liom MAX
Frame buffer menus
I
11~ r=--~
6~ 1024><768 I i~1200 I
~;.]
..., 0
~'600 I 12llOl<9EO I l!J~isu I

.. IPmciJction . Prnet:J
R8'der
("~ \1ew:1~ e

Considerations: Why do we use Gamma in Color Mapping and not Output Gamma {see
Preference settings, Figure 2-7)? I always prefer simple and effective methods, but to
explain why, we need to carry out a little technical analysis.
V-Ray's Anti-aliasing is made for optimizing processing so it doesn't perfect the
calculation of the details in the dark areas, which are effectively less discernible to us.
It sets a "threshold" under which any details in the shadows become approximate. This
makes the processing faster overall.
If we add Gamma through the "Output Gamma" setting, it will be added after the
processing and the shaded areas that are lightened could contain artifacts, caused by
this approximation.
For this reason, it's preferable to add Gamma 2.2 in Color mapping, Figure 2-8. This way
the Gamma is applied during processing and the artifacts don't appear.

Note: When you change the Gamma preferences, the color picker in the Material editor
also appears different. The color distribution is unbalanced and tends towards lighter
colors. The whole system has been geared to resemble human sight, which is more
sensitive to medium and light tones than it is to dark ones.
CHAPTER 2 - COMPENSATION USING THE GAMMA CURVE

Exercise: How to Compensate an Image


In this exercise, you will see how to set up a render by applying the steps related to
Compensation for the first time.
Start lds Max and V-Ray and set t he Gamma in your Preference settings as explained earlier
in the paragraph Compensation Part 1 -Avoiding Gamma on the Tex tures;
1. Open the file Chap02-01-busnelli-bohemien-sofa.max, located in the folder P&R-VRay
I Chapter 02 I Exercises. The file contains a 30 model from designconnected.com, with
a neutra l grey material assigned to it, a V-RayPhysical Camera and a Plane VRayLight.
2. Complete the first two operations as explained in the paragraph Compensation Part 2:
set the Gamma in Color mapping to 2.2 and activate the Frame Buffer, Figure 2-8.
3. Activate Global illumination in the Indirect Illumination tab, Figure 2-9, and finally, click
on Render or press SHIFT + Q together. You will see V-Ray carry out some Prepasses,
(which we will examine in depth in Chapter 3 - Global Illumination and lrradiance Map).
A good starting render, Figure 2-10, appears in the V-Ray frame buffer window, Fig ure
2-11 , which we will analyze in the next paragraph.

~ Render Setup: VRay NFR 2.10.01 (]0000


Qimnm J V~y I lndrectllmnotlon I Set&lgs j I
Render Elements

. V~v:: Indirect......tlon (GI)

- P' On Glcziusttcs -
r Rfledive
P' Rofrlld!Ve
Post?~

ConlTast rr.o- .:J


c.cntrast ~ ro;s- .:J
Arrti<nt ocWsion -
Savat1onrr.o- .:J ran ro;e- .:J
Radius I10,ocn .:J
Figure 2-9
Render Setup dialogue
box with the Indirect
SlMvsW- .:J illum.inacion tab
Prtnary bounces selected and the
[ MlM~ rr.o- .:J GI engine l1rrac1ance mop -I option for activating
G lobal illumination
rSea>ndary~
- ""tiple' rr.o- .:.I GI<ngin@ lerua.fti= -I highlighted

Pr-tl1---
-=1P~ -~

Figure 2-10
The render result.
This 3D model is
called Bohemian
sofa by Busnelli.it
and comes from the
desig)lconnected.com
library

THIS EXERCISE CAN BE SEEN IN P&R-VRAv \ CHAPTER 02 \ VIDEO\ V1DE0-02-1 .MP4 ~


PHOTOGRAPHY & RENDERING with V-RAY

V-Ray Frame Buffer


The V-Ray frame buffer, Figure 2-11, is the window in which your renders appear.

.....
f
I V-R.yf....,., buff" - (100%af640x 480) LEJ'.:8~
1~ ? 1919 '9rml x ~ ii m llllB o

Figure 2-11
The V-Ray frame
buffer window
showing some
options for
managing the
rendered image

The V-Ray Frame Buffer in Fig ure 2-11 contains a set of tools which are very useful during
the production and checking phases of the i mage, which we will analyze throughout the
paragraph.
An interesting characteristic of the V-Ray frame buffer is that it visualizes 32 bit images.
These are images that contain more informat ion than a video can visualize_ When we save
an image in 8 bit format, such as a JPG for example, some information can be lost.
But exactly what information is being lost?
Let's look at an example. Open the file Chap02-01-busnelli-FINAL.max, used in the Exercise:
How to Compensate an Image.Type the value 300 for the Multiplier in the V-Ray light (Plane),
Figure 2- 12. If you launch a render, you'll get a particularly overexposed image, Fig ure 2-13.

O l ~I Rt.1 ~l ~l~
1~J1.9>to1
1Modi1\trllst

Figure 2-12
Pare of the
Modify panel for
the VRayLight
with the
Multiplier option
highlighted

Figure 2-13 Rendered image with marked overexposure in the central :areas
CHAPTER 2 - COMPENSATION USING THE GAMMA CURVE

Before continuing to explain how to control the exposure, let's analyze the meanings of the
icons highlighted in Fig ure 2-11 , and what they do:
Show corrections control (a): This displays the panel for controlling your corrections.
Force color clamping (b): This shows a "white patch" where there is overexposure,
(which is what already occurs naturally).
View clarnped colors (c): This shows the overexposed areas in white and the correct
areas in grey.
Show pixel information (d): This displays information about the individual pixels.
Use colors level correction (e): This enables you to adjust the levels.
Use colors curve correction (f): This enables you to adjust the curves.
Use expo1sure correction (g): This enables you to adjust the exposure.
When we click on the button (a), Show corrections control, Figu re 2-11 , the Color corrections
panel appears, Figure 2-14. It contains a set of options that allow you to correct the exposure
of the image in the frame buffer.
_ _ _ _d
~.oo

Figure 2-15
The image with
overexposed
areas shown in
black
1.00
Figure 2-14 [ jCurvt C.olOfCOtrldion [0..0lJ0,1lJ

Color corrections
panel
...u
"" 1

/
/

t ,1 I/
... /
I/

...u /
v Figure 2-16
The image with
O)
/
0.2 overexposed
...
1/
/
ateas shown in
0,lf.10,l0,30,,4D,50.ll,7 0 . l l.11J white

By clicking cn the button (b), Force color clamping, you can deactivate the "white patch"
on the overexposure and some areas with different coloring will appear. They represent the
overexposed areas by degrees, Figure 2-15."Force color clamping" is usually only deactivated
for checking the exposure and the button is generally left active.
By clicking on the button (c) View clamped colors, you automatically deactivate Force
color clamping and reveal the overexposed areas. This is another checking tool and is very
similar to the previous one. Instead of showing colored areas, it colors the overexposed
areas white and the correctly exposed areas grey, Figure 2-16.

THIS CONCEPT IS ILLUSTRATED IN P &R- V RAv \ C HAPTER 02 \ V IDEO\ V 10Eo-02-2 .MP4 ~

Note: To se~e the render under normal conditions, just activate the Force color clamping
button (b), Figure 2-11, which is active by default.
-
Exposure of a 32 bit Render
PHOTOGRAPHY & RENDERING with V-RAY

If we change the exposure control, Use exposure control, Figure 2-17, we can easily
understand how a 32 bit image contains more information than a video can visualize.

Figure 2-17
Pan of the \/-Ray frame buffer
window with the Use exposure
control button highlighted

Click on the Use exposure control button, Figure 2-17, in the V-Ray frame buffer, Figure
2-17, then on the Show corrections control button. This will open t he Color corrections
panel, Figure 2-18, where you can change t he exposure by moving t he little triangle at t he
top, Figure 2-18.

Figure 2-18
Pan of the Color corrections panel
showing the triangular symbol used
to change the exposure

The basic exposure value is +0,00 and indicates that the exposure hasn't been changed.
If, however, you bring it slightly towards the left, Figure 2-18, you can lower the value. The
image becomes less and less bright and the areas that were overexposed before will now
contain visible details and outlines, Figure 2-19. This is an advantage of using 32 bit images.

Figure 2-19 Rendered image result after correcting the overexposed areas in the Color corrections panel

Note: The effect of correcting the exposu re of the image through the V-RayFrame Buffer
can also be seen in Video-02-2.MP4.
CHAPTER 2 - COMPENSATION USING THE GAMMA CURVE

Exposure of an 8 bit Render


If we save a render as a .JPG (an 8 bit file format) and open it in Photoshop or in another
photo-retouching program, then change the exposure, we will immediately see the
difference between a 32 bit image, Figure 2-19, and ar:i 8 bit image, Figure 2-20.

~
Predefilto: Pmon~le . ""- Q!S

EsposiZlone: --
-1,93
Annula

)' ;t [LJ
Sposbmento: 0,0000 lfJ Anteprma

Correztone garrrnil: 1,00

Figure 2-20 Image result with exposure lowered in Phoroshop

You can see that the overexposed areas of the image saved as an 8 bit, Figure 2-20, become
grey when the exposure is reduced, while in the 32 bit image, Figure 2-19, lowering the
exposure reveals all the details correctly.
Here the brightness has been reduced, but the lost details cannot be recovered. The problem
is that, in this case, those details have not been saved anywhere.
Small "miracles" like this are also possible w ithout using the V-Ray frame buffer. You just need
to save the render as an .EXR format, (32 bit format, among the most used for this type of
correction), and if you lower the exposure in Photoshop, you will achieve the same outlines
as in Figure 2-19.
The fact remains, however, that the V-Ray frame buffer is a very practical and immediate tool.
In conclusion, the 32 bit format is useful when you need to change and manipulate an
image, but once it is finished, you can go ahead and save it as a JPG (8 bit), or better yet, in
an uncompressed format like .TIF.

Considerations: As you might imagine, more could be said about the differences between
8, 16 and 32 bit formats, but the purpose of these examples is simply to highlight the
utility of 32 bit images in managing overexposure.
Global Illumination
and l~~adiance Man

Global illumination and Jrradiance Map are


1:2 two keywords we use to enter the world of
photorealism. The.first tool for photographic
simulation we will encounter is the very algorithm
that made V-Ray famous: the lrradiance
Environment Map, more commonly known as the
lrradiance Map. The idea of working with drafts
initially, and proceeding slowly towards the final
product, is as old as art itself An artist has the
ability to look at a draft and see what the final
product will be like. The outstanding.flexibility of
the Jrradiance map allows us to easily adapt it to
these kinds ofsituations.

- Jn this chapter, we will look at the idea behind


the Jrradiance map and its fundamental aspects,
particularly exploring how to set up a draft render.
PHOTOGRAPHY & RENDERING with V-RAY

Introduction to Global Illumination


When a light source doesn't fall directly onto a scene-for example, when the sky is covered
in clouds or when the sun is filtered through curtains into an interior, a homogeneous and
uniform environment is created, with what we call Diffused Lighting, Figure 3-1 .

Figure 3-1
Photographic
image created by
Giordano Vanni of
an interior render
wirhom direct lights.
Jr is o nl> illuminated
br diffused lighting.

When light encounters an obstacle, it doesn't stop, but bounces. It bounces an infinite
number of times off surfaces, objects and dust, and all of these obstacles contribute to
creating the diffused lighting we also call Indirect Illumination.
Up to a decade ago, it was unthinkable that a common computer could have the power
needed to carry out such a complex and demanding calculation. Practitioners thus resorted
to various kinds of tricks to roughly simulate the effect of indirect lighting. They would
scatter various point lights around the scene, for example. This was very hard work and the
results were mediocre. In the first years of the 21 st century, the first software that allowed
indirect lighting to be calculated, finally arrived. Photorealism thus began, and it found very
fertile soil in the field of architecture.

Considerations: I, personally, find the definition "photorealistic render" misleading. I


don't like it. I prefer Photographic Render. Words materialize ideas and for this reason, I
like to use different words every so often. This helps me grasp the deepest meaning of
things. I must emphasise that live perception is one thing and ph otography is another.
So what are we really reproducing with what we call photorealistic renders: reality or its
"representation" through photography? There's no doubt about it: what we practice is a
type of photography in all respects. From it, we obtain: language, problems, styles, and
infinite possibilities for composition, lighting and creation. That's why I really like to use
the term "Photographic Renders': to remind us that, in the end, even if we use different
means, what we are creating is actually a photograph.

Various rendering engines have been developed in recent years and each has followed
its own strategies for increasingly improving and speeding up the way indirect light is
calculated. V-Ray immediately distinguished itself with its "special" algorithm, used to
calculate the diffusion of indirect light: the lrradiance Map. With outstanding performance,
speed and flexibility, the lrradiance Map is the main algorithm we will use to spread light.
CHAPTER 3 - GLOBAL ILLUMINATION AND lRRADIANCE MAP

lrradiance Map
V-Ray has many options for calculati ng Indirect Lighting. They allow us to balance quality
and speed according to the type of render we are working on: tests, intermediate trials, final
images or animation.
We won't go into the technical details of the various options V-Ray offers for calcu lating
indirect light, but to start off, we will look at a series of five settings. These settings will be
ana lyzed in the paragraph Wha t the Five Global Illumination Settings Mean on page 24.
They allow us to quickly define how the indirect lighting will be calculated in a test render.

How to Set Up Indirect Illumination


Open the Render setup panel by clicking on the F10 key. Activate the calculation of indirect
lighting in the V-Ray:: Indirect illumination tab, Figure 3-2, by setting the option to ON.
Set the other options as shown in Figure 3-2.

!iii Ronde Setup; V-l!ay NFR 2.10.ot

V~y:: lrdrectlk.ll'inaticn (Gt) - - - -- - 'I

---
Pon GI caustics
r
P
Rdealve
Refi-acUve

[Primary bou~
tlple_Jl,_O _ ;J__Gl_ .._1111_ ie_ l_llfadanc:emap I Figure 3-2
Render scrup dialogue

r_Sealndwy
_
~~-:~GI=--
..~~-ier.u=Urjrt=cad>e
========;;;;;;;;;;;;;;;;;;=~~11
box showing the
options co be sec in
the V-Ray:: 1ndirecc
I illumination, V-Ray::
Irradiance map and
V-Ray:: Llghc cach e
tabs

I
Pr.....t

v-:1~ ~
Rerdtt
---1
I:
As you may imagine, by setti ng Low and changing the Subdivsfrom 1000 to 500, Figu re 3-2,
we are reducing quality and processing time. This sets up V-Ray to carry out a very rough
calculation of the Indirect lighting. What we are interested in at this early stage, is producing
a draft. Its purpose will be to verify whether we are headed in the right direction or not.
Artefacts like stains, grain and poor contrast between surfaces will vanish automatically
once we move from the draft to the final render. For now, your goal is to memorize the
options used so as to acquire aptitude in these operations. Keep in mind, however, that
these operations won't affect the substance of an image, but only its definition. If the
image already doesn't "work" in the draft, we can't hope to solve the problem by simply
manipu lating the options in the Indirect illumination tab, Figure 3-2.
PHOTOGRAPHY & RENDERING with V- RAY

What the Five Global Illumination Settings Mean


Now that we understand the meaning behind the lrradiance map, let's briefly analyze
what each of the five Global illumination settings do in a test render. After setting Indirect
illumination to ON, the other options should be set as follows, Figure 3-3, as already shown
in the previous paragraph:

' ~ Render Setup: VRay NFR 2.10.ot CE:] 13 ~

comnan I v~v I Incl-ect111.ri\atlcn I Setltngs I Render Bements I


-
- IUnhatlon ~
- -V.;ta~:: Ird'ect - -
h

~Gtcawtlcs- Post-processing ~ Ambient oaluslon -

r Rtflecttvt Sevotlcn rr,o- ;J r0n [0,8 ii


' P Refracl!Ve Contrast rr,o- .;J I
Radus 10,oar .;)
Conlrast ~ ro;s- ii Slbtvs~ ;_!

Figure 3-3
Render setup dialogue
[Primary bolnc:es
., rr.o- .i.l Gt tnglnt 111r~ 1NP .
box showing the
I~boulces - -
options that need to
be set in the V-R.1y::
I
~--rr.o- .;,J 1 Gt engincll~t cad1e - - - I
Indirect illumination,
V-Ray:: lrradiance map
- V.ftav:: llr.clance"""'
[ Mt.,p-esets
and V-Ray:: Light cache
tabs
I 2 Cl.rrent presej llow .I I
~ 4~ tSh;~~ p I
Basic parameters
ro~: r:r-- ;J CJr lh
II M ot rle: p-- ;j Nrr ro,J ;J - ""' 9fil I I
- V-ftay:: li!tlt cache

1-;er--~1
Ir~
'
1a:u2 :;J

.
Scalo:1-
I
s1;::;:~ 1
.
I
~
Ii lnerati\.'e Preset:
(" AdNeSllacle view: IPenpecUve .!J

1. Set Light cache as the secondary bounce, t hat is, as the system for calculat ing w hat
happens to the light after its first bounce. Light cache is definitely the most effective of
all the possible methods, being very efficient in terms of speed/ results.
2. Set lrradiance map to Low: This "paints" the indirect light very roughly, which is perfect
for a draft.
3. Activate Show calc. phase.This allows you t o view the rendering during the processin~
phase. Having it active or not will not change the final result but it's an excellent way t)
see a preview straightaway.
4. Set Subdivs: to 500 in the V-Ray:: Light cache. This is a low value, which is good for tests.
S. Activate Show calc. phase, as in point (3), but this time under Light cache. This is
another way to get a quick preview of the scene.
Only points (2) and (4) establish that we will be calculating draft Global illumination. So, t)
move from "draft''to"fina/'; these are the values you will change.

Notes: The two"Showcalcphase"options (points 3 and 5 in Figure 3-3) give you a preview
ofthe final result while rendering is underway. Obviously, this won't change the final render
outcome. Nevertheless, it's a .very useful function, particularly in the case of static renders,
because it gives you ah idea of what is happening straightaway. Hidden and forgotten
objects, a material that hasn't been assigned, or even a render seen through the wrong
camera can be detected immediately so you can stop and relaunch the render correctly.
CHAPTER 3 - GLOBAL ILLUMINATION AND IRRADIANCE MAP

What Are Prepasses?


The word Prepass indicates the steps in the processing of a render, Figure 3-4. If we set the
type to draft, on ly 2 Prepasses are carried out, while with other types there are 3, 4 and even
5 Prepasses.

t!iQl
Total Mimallon:
Figure 3-4
Qrrent Task: Prepass 3 of 'I... (00:00:03,6) (00:00:<>'1,S OSI) Rendering dialogue
box with the Prcpass
item highlighted

Rendering Pr~:

I Frame t o
tof l Total
Last Frame Time: 0:00: 11
Elas>RdTime: 0:00:00

Two settings allow you to regulate the number of Prepasses, or Steps. These can be found in
the /rradiance map rollout menu and are the Min Rate and Max Rate, Figure 3-5.
,_
Figure3-5
Part of the Render
setup pnnel showing
the options in the
frradinnce map tab

If we select Very low from the drop-down menu, the numbers that appear in the check boxes
are Min rate: -4 and Max rate: -3, Figure 3-5.
When we set High for the final render, these change to -3 and 0. What does all this mean?
With the Min rate and Max rate, we are indicating the minimum and maximum amount of
detail we want, where O is the maximum. Here are some examples:
Very low: ...... -4 and -3=V-Ray will complete two steps (-4, -3) and two prepasses.
Medium: ....... -3 and -1 =V-Raywill complete three steps (-3,-2, -1 ) and two prepasses.
High: ............. -3 and 0 =V-Ray will complete four steps (-3, -2, -1, 0) and four prepasses.
Notes: Among the Current preset options, you'll also find Very High, which sets the
maximum value to 1. If O corresponds to 1 pixel, choosing a value of 1 as the maximum
detail means that the render process will be carried out multiple times on each individual
pixel. It only makes sense to have Max rate= 1 for small images that are rich in detail. By
choosing Custom from the Current preset menu, you can custom ize the Min rate and Max
rate values and if you enter -4 and -4, the processing will be completed in a single step,
or just one prepass.

So Min rate indicates the minimum quality of detail with which to start (-4 is fairly low), while
Max rate indicates the maximum quality to be reached (0 indicates 1 pixel, so the finest
detail possible). The intermediate Prepasses are calculated automatically.
One question naturally arises at this point: If the detail we wish to reach at the end of the
processing is the maximum (Max rate= 0), why complete all these Prepasses? Why don't we
set Min/Max straight to 0/ 0 in order to solve everything faster in a single step? The answer
lies in the next paragraph, The Metaphor of a Painter.
PHOTOGRAPHY & RENDERING with V-RAY

The Metaphor of a Painter


Imagine having to paint a big wall. You have a large bucket full of paint and three different-
sized brushes. How do you test the colors? You take the biggest brush, paint a sufficiently
large area and see if it's okay, Figure 3-6. You aren't interested in going all the way to the
edges and painting in the details. You just need to get an idea, a quick coat, a draft. Nobody
would paint a wall perfectly, just to try out a color.
Once you've approved the test, it's time to paint the wall more carefully, attending to the
corners, avoiding contact with the ceiling, the wall sockets and so on. You will also start
using smaller and smaller brushes.

Figure 3-6
An image suggesting
a wall with colors
being tested

You will use a medium-sized brush to get close to the edges of the wall, and when you are a
few centimeters from the delicate areas, you'll finish off with a very small brush, in order to
ensure the maximum possible control, precision and speed.
The lrradiance map doesn't have brushes, but in a way, it seems to paint indirect light onto
surfaces and it uses reference areas t hat are conceptually identical to t he brushes.
Using t his comparison, -4 represents a large brush, and as we gradually come closer to 0, the
brushes become increasingly smaller. This i s what V-Ray effectively does in each prepass. It
paints indirect light more and more accurately, using smaller and smaller areas each time,
and stopping only at the points where it's necessary.
From now on, we will always use the presets Low and High because with just one click they
also prepare other valu es for t he lrradiance map. What we are interested in is speed and
practicality, and not getting lost among all the options.

Notes: Although we will always use the presets, it's useful in any case to know what the
concepts of Min rate and Max rate mean and what happens during rendering.
CHAPTER 3 - GLOBAL ILLUMINATION AND IRRADIANCE MAP

The Relationship Between Prepasses and Scenes


-
To get a clear idea of how Prepasses influence the calculation of indirect light in a scene, look
at the following images. As you can see, each time a "finer" Prepass is added, the appearance
of the contaclt shadows - and the shadows in general - improves. Looking at the four
versions of the image in Figure 3-7, you can see that while the shadows improve, other
aspects remain completely unchanged.

Figure 3-7 A sequence of images rendered using different Prepasses, from Very Low (1), to Low (2), then Medium
(3), and finally High (4). This simple scene is illuminated by a generic ambient light.

Shadows asid1e, there are certain elements that don't change when you improve or worsen
the calculation of Global illumination. They are:
1. The impaict of the lighting on the scene.
2. The colors (and the textures, for that matter).
From this we can gather that it's not necessary to have a precise calculation of the indirect
lighting to verify whether the lights are working and whether we are succeeding in obtaining
the effect we wanted. For this reason, it's better to work with low values for the lrradiance
map and the Subdivs of the Light cache the whole time, and only use the options lrradiance
map= High and Light cache = 1500 at the end, to obtain a higher defin ition render.

Notes: You c:an try this concept out by launch ing different renders with the options Very
Low, Low, Medium and High for lrradiance map in the file Chap03-01- armchair.max,
located in the folder P&R-VRay \Chapter 03 \Exercises.
PHOTOGRAPHY & RENDERING with V-RAY

How to Save a Render's Settings


Each setting we create in t he Render setup panel - and not only there - can be saved as a
custom preset. It's a very convenient solution for carrying out a whole set of operations in a
si ngle step rather t han having to repeat them each time.
Just go to the Render setup dialogue box, Figure 3-8. Click on the Preset: drop-down menu at
the bottom and choose Save Preset...

l ~ RenderSetup: VRay NFR2.10.01 ~~Preset Categori6 i!Qil


c.omnon
c.omnon V-Ray I lndiect hnilabcn I SetUnlls I Render Bements I Effects
envtonment
V~ay:: lndiectlbmatfon ~GQ

-
~ Rend Elements
...
cauStics-
Reflective
Post'iJ'o=silg
Sabsatfon rr,o- :J ran (Q,8.;j
An'blent ocdusion -
I
Refi"aclfVe W- _;J RadiJs p s,'laf .:J
Contrast
Cootrastbase ro;s- :I Subdvs ~ .:J

1Preset: Js..vr Pr.....t... I I l


~: 1~ 81 Render
s-._J cancel
I
Figure 3-8 Render setup dialogue box with the Preset: option Figure 3-9 Select the Preset
highlighted. This opcio:i is available on every tab of the Render Categories dialogue box to
secup dialogue box. choose a category

After choosing a name for the Preset, on ly select the V-Ray ADV 2.xx.xx category, (V-Ray NFR
2.10.07 in this case, Figure 3-9), so as not to change anything else when you load the Preset.
To obtain an even faster draft render, you can also save the following setting as a Preset:
in the V-Ray:: Image sampler (Anti-aliasing) rollout menu, Figure 3-10, choose Adaptive
subdivision instead of Adaptive DMC (the default value). The only thing that interests us for
now is getting quick drafts, so we will tackle the meaning of Anti-aliasing when we deal with
the final settings in Step-4 on page 173.

~ Render Setup: VRay NFR 2.30.Gl.

Comnon I V.fla'( I Indirect lumatfon I Settings I Render Elements I


Figure 3-10

~
Render serup dialogue
box with the Adaptive
subdivision option .. . ~

highlighted. This allows AntlalaSirlg USinO av~


ttarea fit...
you to obtain a draft Size: fi;5 !.J
even faster.

Preset: 1-- -
VleW: !Perspective ~

Considerations: Personally, I often set another two options in the Settings: tab. I
deactivate the Show Window so that V-Ray's messages doesn't appear during rendering,
and I activate Low thread priority. With the latter option active, V-Ray has fewer priorities
and it's possible to use ot her applications while rendering.

THE WHOLE DRAFT SETIING CAN BE SEIEN IN P&R-VRAv \ CHAPTER 03 \ VIDEO \ V10E0-03-1 .MP4 ~
Most of the difficulties related to using cameras in
1: rendering don't particularly depend on knowledge
of the parameters, especially if the camera we are
talking about is the V-Ray Physical Camera. This
tool is an identical copy ofa real DSLR camera,
and as such, it faithfully foiiows the same rules.
The focal length, diaphragm aperture, exposure
time, white balance and the effects ofcombining
these properties, from the Depth offield to the
Bokeh effect, are concepts that should.firstly be
learnt outside the software.
In this chapter, we will lay the foundations for

- setting up a scene with a virtual camera, the V-Ray


Physical camera.
PHOTOGRAPHY&. RENDERING with V-RAY

A Comparison Between the DSLR Camera and


the V-Ray Physical Camera
In some respects the V-Ray Physical Camera, Figure 4-1 , is identical to the dear old standard
Camera in 3ds Max. It doesn't have a better sensor or a more expensive lens, since we are
still in a virtual environment where nothing is physical. Ultimately, the V-Ray camera doesn't
influence the quality of the scene, but it does provide us with a set of options that can make
our work similar to reality, at least as far as exposure is concerned.

ta! ~ @J(ID ~I
o~ '1gp. ~ ~
jVRav
Figure 4-1
Pare of the command
panel showing the
Cameras bucton, the
VrayPh)'SicalCamera
function and some
. Bokeh effec~
of its options
I
bladel;............. r ~
rotal!on {deg).. ,...
:
ro;o- _;_]
center bias ro;o- :
orisot-opy ro;o- :

. 8asicparametors _j
-
I
t)1Je.. .. ........ ,Slill am

The V-Ray Physical camera is a simulation of a real camera, Figure 4-2, and is able to mimic
its main properties. Basically, with a V-Ray Physical Camera we create a "photographic shot"
of a 30 scene, just as a DSLR takes a photo of a real-life scene.

A B
Figure 4-2
S<:hematic
represencarion of the
V-Ray Physical camera
(A) and an image of a
DSLR camera (B)

Physical Camera : 30 simulation =DSLR camera : real world


Logically, if our 30 world has been replicated faithfully, with the correct proportions and
"without artince", nothing is more natural than to interact with it using this tool.

Note: "Without artince" means faithfully replicating a 30 world. Rather than resorting to
special tricks, treat the scene as though it were real. Excluding objects with certain lights,
assigning bright materials to the ceilings because they are dark, or reducing the light of
the sun are actions that won't produce a simulation that is consistent with reality.
CHAPTER 4 - THE DSLR CAMERA INV-RAY

Luckily, we have some advantages over the real world. While it's true that the Physical Camera
can mimic tlhe characteristics of a DSLR camera (aperture, shutter speed, and sensitivity),
it still isn't a1ctually a real camera and consequently doesn't suffer some of its setbacks,
particularly in terms of low lighting.
A photographer with a DSLR camera in low light conditions must always balance the
exposure time with the sensitivity of the sensor. The risk is granularity because in real life,
raising the sensitivity of the sensor has the side effect of producing little flecks over the
whole image. With low sensitivity on the other hand, (where we avoid grainy images), we
need a longer exposure time, and therefore must be carefu l that the photo doesn't blur and
that it doesn't contain any moving objects.

Note: It's dlifferent if you are actually seeking a blurred effect to create dynamism, but
here we arE~ in the field of stylistic choices, where everything is intentiona l.

All these pro blems have been partially solved thanks to the Still Life genre, in which we don't
have to deal with moving objects, as would a sports photographer, for example.

Note: In th:! field of pa inting, the term Still Life indicates a pictorial depiction of inanimate
objects (flowers, fruit, vegetables, game, or objects of use). In photography, this t erm
has been adopted to describe the photographic techniq ue for capturing any inan imat e
object.

To conclude, here are some typical advantages of our virtual 3D environment:


Grain do1~s not occur as a result of the sensitivit y of the sensor.
We don't need a good tripod.
We can use the DSLR camera simulator to facilitate our work.

Considera1tions: Over time and through experience, I've had the opportunity to meet
several, very valua ble people in t he field of 3D graphics and rendering. It is by no means
a coincideince that the best always have a great passion for photography and practice it
either for amusement or in t heir profession. A photograph ic eye is definit ely one of the
most important things t o have as a personal skill. The secret is to treat the scene as if it
were real -- position lights correctly, try to get an idea of reality through observation
and find innages to help you aim t owards a fi nal outcome.
PHOTOGRAPHY & RENDERING with V- RAY

The Basic Properties of a DSLR Camera


The basic properties of a DSLR camera, which we will also use in the form of parameters of
the V-Ray Physical Camera to generate images, are:
Aperture of the diaphragm (f);
Exposure time (expressed as fractions of a second);
Sensitivity of the film/sensor (ISO);
Focal length
It is of fundamental importance that you are familiar with these basic notions. You will need
them to understand the parameters in the V-Ray Physical Camera panel.
The Aperture of the diaphragm, indicated with the letter f (usually in italics), is a value
that represents the aperture of the diaphragm at the time a photo is taken. It can be almost
closed, with values of 16 or 22, or very open, with values of 4, 2 or 1.8, Figure 4-3.

f1.8 f 13 f20
Figure 4-3
An indication of
meJ values of me
diaphragm and their
corresponding graphic
representations

The aperture of the diaphragm affects two aspects, Figure 4-3: the Quantity of light entering
and the Depth of field.
The Exposure time indicates how long the sensor will be exposed to light. The longer the
exposure time, the greater the amount of light captured. This value is always expressed in
fractions of a second: 30 really means 1/ 30 and 500 means 1/500. So 30 is a longer exposuwe
time than 500, which is actually only a very brief instant. The exposure time, as far as Still Life
is concerhed, only affects the amount of light captmed.
The Sensitivity (ISO) regulates the degree to which the sensor reacts to light. The higher
this value is, the more light captured. If you increase the ISO, this helps you to capture light
faster and avoid long exposure times, but the price to pay is graininess. In our case, grain
doesn't exist, so, as in real life, greater ISO values only correspond to a greater amount of
light captured.

Note: When film was in use, it was necessary to change films in order to change the
sensitivity. With digital cameras you only need to turn a dial.

In rendering therefore, setting a greater exposure time is the same thing as increasing the
sensitivity and the outcome doesn't change. For this reason, to increase the amount of liglht
captured in all the examples that follow, we will only ever change the Exposure time, or
Shutter speed, which is one of the V-Ray Physical Camera options.
The V-Ray Physical camera is a simulator that replicates a DSLR camera and this is of
particular benefit to those who use one already and have worked with one for some time.
If a photographer knows fro'm experience that for a certain type of interior the correct
exposure is a given combination of f, Time and ISO, he/she can use this knowledge to
obtain a realistic outcome in V-Ray.
CHAPTER 4 - TH E DSLR CAMERA IN V-RAY

The Focal length is the distance between the middle of the lens and the sensor.
Changing the Focal length, Figure 4-4, produces the following effects:

---- ~, l
senso r field field Figure 4-4

I of view

I
of view A schematic

f--_
-:_ --- ~~t -
representation of the
effect of changing
the focal length. By
increasing the focal
length we narrow the
focal field of view
length focal length

It brings the subject closer or further away, Figure 4-5, by widening or narrowing the
field of view.
It changes our perception of perspective, Figure 4-6.
The shorter the focal length, the more marked the perspective, and consequently, the framed
area will be larger (Wide-angle lens).
The longer the focal length, the more the perspective blurs and the flatter everything
becomes. The field captured is consequently narrowed (Telephoto lens).

Figure4-5
An image s hot with a
wide-angle lens (17
mm). The field of
view is very large and
the perspective is
accentuated. The road
mackedlr rends towards
the vanishing point and
the trees appear distant
from o ne another

Figure 4-6
An image shot with
a relephoro lens (100
mm). The road lines
appear more parallel
man widt the previous
lens and the trees
appear closer together.
With this focal length,
everything looks more
compressed

If we synthesize the lenses into categories based on their Focal length, we have:
14-24 mm I Wide-angle lenses
24-70 mm I Medium lenses
70-200 mm /Telephoto lenses
While a photographer must always have a variety of lenses available, which can result in
considerable expenditure, we can use any Focal length in the world with just one click, by
entering our d1esired value into the V-Ray Physical Camera.
PHOTOGRAPHY & RENDERING with V-AAY

How Focal Length Affects Composition


As specified earlier, focal length widens or narrows the framed field, accentuating or
flattening perspective. So, which one do we choose? Photographers are forced to deal w it h
reality. They have to analyze the space available and the possible viewpoints that will make
a photo as realistic as possible. This is particularly true if it's an architectural photograph,
where the composition of lines and forms is fundamental.
If you want a wide field of view1 choose a wide-angle lens, but be careful to check that there
aren't any objects too close. If there are, their deformation will be very noticeable.
In the case of an interior, a wide-angle lens creates a wider field of view in all directions,
so the floor and ceiling will be overly present in the frame, Figure 4-7. We could, if need
be, consider alternatives to the canonical format of 1024 x 768 pixels. In this case, simply
choosing a different format with which to cut away the excess field of view at the top and
bottom would help contain the distortion that a wide-angle lens inevitably produces. In
fact, photos taken with a wide-angle lens often have ulong" formats. In this case, cropping
the image, as in Figure 4-8, improves the composition.

Figute 4-7
An example of a 3D model
of a shopping centre,
framed with a wide-angle
lens (focal length = 22 mm).
The format has the classic
proportions of 1024x768.
T here is too much ceiling
and floor showing, as
a result of the marked
perspective deformation
near the camera.

Figure 4-8
An example of a 30 model
of a shopping centre,
framed with a wide-angle
lens. The composition
improves immediately after
thP i m~gp is r.roppecl.
CHAPTER 4 - THE DSLR CAMERA INV- RAY

The Rule of Thirds


When talking about composition, we mustn't fail to mention the Rule of Thirds.This is a very
famous rule, in which a visible space is divided into three, with the purpose of highlighting
the most interest ing positions in a photographic composition.The most interesting positions
are those marked by the intersection between the vertical and horizontal lines, Figure 4-9.
If you place one or more subjects so that they appear in the intersection between the lines,
you can create a more interesting and dynamic effect in your images.

Figure 4-9
A graphic example
of the rule of thirds,
indicated by a grid of
horizontal and vertical
ted lines

\
With a little practice, it's not hard to do this by eye. Nevertheless, software programs like
Photoshop or Lightroom can help you do it, using very simple tools, especially from version
CSS onwards. Just activate the "Crop" tool and a 3x3 grid will appear. Th is grid provides an
instant reference for the 4 canonica l points of interest, Figure 4-9.
Apart from Composition and the Rule of Thirds, other aspects you shou ld evaluate include:
The frame height: This varies according to the subject you are depicting and the
effect you wish to obtain. If you want to reproduce a design object, like an armchair for
example, the frame height shouldn't be above 1 m from the ground. If it is, unsightly
deformat ion occurs.
Focal length of the camera: - This allows you to frame a wider or narrower field, as
explained in the paragraph The Basic Proper ties of a DSLR Camera on page 32.
Contrast base: - This is fundamental in ma king the object we are depicting stand out.
For example, if the object is dark, look for a light background.
By not on ly taking advantage of the lighting, but also considering the above aspects, you
ca n really improve the impact of your images and achieve satisfactory results.

Considerations: Always remember to fill up the frame. This doesn't mean t hat there
can't be any empty spaces. On the contrary, t here need to be, but be careful not to
leave empty spaces if there is no meaning behind them. In a harmonious composition,
an empty space always relates to a full one, just like in music. We could never have just
notes or just pauses - there is always a balanced relationship between the parts. The
same goes for images. Fill up the frame but take ca re to measure out the two elements:
full and empty spaces. You really j ust need to be aware of this idea and, with experience,
it will become more and more natural and spontaneous for you to create beautiful
compositions.
PHOTOGRAPHY & RENDERING with V-RAY

Depth of Field
In every photograph there is a field in which the photo is perfectly in focus. Then there
is a space in front of the subject and one behind it, in which the blurring can either be
imperceptible or very marked, Figure 4-10.

Figure 4-10
Ara image rendered using
a telephoto lens. The
focus is on the chair in
the foreground, while rhe
other chair is out of focus.

The area in which the image is perfectly in focus is defined as the Depth of field (OOF).
Three factors influence the field of focus:
The focal length;
The distance of the camera from the subject;
The aperture of the diaphragm (f).
.
The depth of field is shortened and causes a more pronounced blurring effect, when:
We use a telephoto lens;
We are close to the subject;
The diaphragm is more open (lower f values).
The reason can be explained by physics and concerns the relationship between the size of
the lens and the real world. It's very simple to apply these principles to rendering and you
won't need to deal with any parameters that do not correspond to reality. Nevertheless,
sometimes the depth of field effect is not noticeable because we don't know the basic rules.
This explanation is valid both for the DSLR camera and the V-Ray Physical Camera as the rules
and principles that guide a photographer are the same for those working in rendering.

Considerations: Attempting to frame everything is one of the most frequent


compositional errors. The purpose of composition, however, is quite different - to
focus the viewer's attention on a specific area by making it more interesting than the
other areas. Depth offield helps to create a hierarchy between areas, directing attention
to the most focused part of the photo. This automatically makes it the most interesting
area and gives compositional strength to the whole image.

Note: Working with Depth of field, both during the rendering phase and during Post-
production in Photoshop, also allows us to simulate various effects. These include the
Bokeh effect and Tilt shift,.which we will analyze in subsequent paragraphs.
CHAPTER 4 - THE DSLR CAMERA INV-RAY

Exercise: How to Simulate Depth of Field


Activating Depth of field is very easy. In fact, you only need to tick the Depth-of-field check
box and it's taken care of, Figure 4-11 .

I VBl .fti. l (@I CIDl ~ I


ocei ~ a@. ~ '

Figure 4-11
Part of the Command
panel of the
Yray Physical Camera
[+ Basic parame!Ers. showing the depch-of-
t+ Bokeh efteds field option
Sampling

depth-of-field ........ P'

SLbcrovs... ............ ~ =J

Actually, as we mentioned before, this is not the difficult thing - if we can talk about
difficulty at all. For the Depth of field to be noticeable; the focal length; aperture and
shutter speed need to be set as shown in the next exercise, simply following the basic
principles of photography. Let's look at a quick example to see how easy it is to apply,
without changing the framing, by simply adjusting the f value:

1. Start 3ds Max and V-Ray and open the file Chap04-01-dof.max, located in the folder
P&R-VRay I Chapter 04 I Exercises. Launch a Render to obtain the image in Figure 4-12.
2. Select the V-Ray Physical Camera and tick depth-of-field from among its options.
Th is activates the calculation of Depth of field, which is deactivated by default.
3. While in the V-Ray Physical Camera, lower the f value from 8 to 2, which corresponds
to a very open Diaphragm. This will cause an enormous increase in the amount of light
entering. Balance this by reducing the Exposure time from 40 to 500 in the shutter
speed option of the V-Ray Physical Camera.
4. Finally, launch a render to obtain the effect you can see in Figure 4-13.

Figure 4-12 Render without dep th of field Figure 4-13 Render with depth of field and the same
exposure time

THIS EXERCISE CAN BE SEEN IN P&R-VRAv \ CHAPTER 04 \ VIDEO \ V10Eo-04-1 .MP4 ~


PHOTOGRAPHY & RENDERING with V-RAY

Extreme Depth of Field: Tilt Shift


The Tilt Shift technique, which is becoming increasingly fashionable in photography and in
videos for advertising, appeals to our perception of depth of field. A depth of field effect -
that would be physically impossible in real life, given the distances concerned - is created
in post-production. The image of a landscape shot with any lens would, as a rule, always be
in focus, Figure 4-12.

Figure 4-12
A beautiful photo
of Ravcllo, on r.he
Amalfi Coast. All
parrs of the image
are in focus.

If we blur the bottom and top parts of the photo using Photoshop and only leave the centre
in focus, we create a situation which is unreal in itself, but which, if our minds accept it, leads
us to the conclusion that it's a scale model, Figure 4-13. With a scale model, in fact, this would
be possible because the lens would be large compared to the model being photographed.
This optical illusion, which is based on a brilliant short circuit of the mind, can be created
using Photoshop.

Figure 4-13
A phoro.~raphic image
of a landscape with
only the cenual pa.rt
in focus. The rest has
been blurred using
Photoshop.

To be able to obtain a Tilt shift effect, the ideal is to use a photo shot slightly from above.
Then, to create this absurd depth of field, just blur everything using Photoshop or another
photo-retouch program, and leave the central part in focus.
You can intensify the effect by increasing the saturation and contrast, or in the case of a
video, by speeding up playback. It's very easy to do and can give you a great effect.
CHAPTER 4 - THE DSLR CAMERA IN V-RAY

The Bokeh Effect


The Bokeh effect is the direct consequence of a very limited Depth of field. Objects that are
far away from the focused area take on particular forms, such as colored hexagons, circles
or ellipses, Figure 4-14.
Bokeh originates from the Japanese word - boke - which indeed means blur, (or more
literally "mental haze").

Figure 4-14
An image rendered with
the following values: f8 /
shutter 80/ ISOlOO (A).
T he other render (B) had
an equivalent exposure
time but a much more
open diaphragm: fl.8/
s hutter 1600/I SOlOO

Bright objects produce this effect in a much more noticeable and <r i ~l ~l l (WI J'tl
artistically captivating way. Determining factors for the Bokeh
o~ ~ ao.. ~l\
effect are the aberration of the lens and, above all, the wide 1"'1.>y
aperture of the diaphragm. Here, the Depth of field effect has been Figure 4-15
deliberately exaggerated, Figure 4-14, and the fact that we've Part of the command
chosen a long focal length (160 mm) gives it greater emphasis. panel with the blades
Bokeh~~ option highlighted
The Bokeh effect, however, is not simply a very blurred light.
blades............. P is- _;j
Rather, it is a true geometric shape appearing in the image, Figure .... ... 0,0
4-14 and Figure 4-16. We can simulat this effect by ticking the center bias........... ro,o- _;j
blades option, Figure 4-15. omotrcpy ........... ro;o- ~

Figure 4-16
The rendered image
after changing the blades
option to values of 5 (A)
and 4 (B)

Notes: You can verify this concept by opening the file Chap04-02-bokeh.max in the
folder P&R-VRay I Chapter 04 I Exercises. Using active DOF and the options f1 .8/shutter
1600/isolOO, we obtain image (B). By activating the blades option with an associated
value of 5, t he blurred lights change to pentagons (C), or squares if the value is set to 4
(0 ), and so on.
PHOTOGRAPHY&. RENDERING w lth V-RAY

White Balance in Exteriors


Environments are almost never neutral. There's always a light source or a colored surface
that tends to influence the color of the entire image. Consequently, if you take a photo of
that environment, it will also inevitably be conditioned. Very synt hetically, "setting the white
bala nee" when taking a photo means ensuring that t he colors in that photo (or rendering)
are as balanced as possible, and this can be done by neutralizing the presence of any
dominant colors.
Let's look at an example of an exterior photographed with a blue sky. The sky would literally
fill the photo with blue if it weren't for the fact that when we use digital cameras, the white
balance (WB) is often set to automatic mode, so we rarely notice the problem.
For the sake of demonstration, imagine taking a photo with the automatic white balance
deactivated. In these conditions the dominant blue of the sky tends to produce a photo t hat
is tinted all over with this color, Figure 4- 17. To set the white balance, we need to indicate
which component we intend to neutralize - the blue in this case, Figure 4-18.

Figure 4-17
An unbalanced
photographic image
wich a dominant
blue color

Figure 4-18
A phorographic image
chat has been correctly
balanced by eliminating
the dominant
blue color
CHAPTER 4 ~ THE DSLR CAMERA IN V-RAY

Setting the White balance means restoring the color balance of our image, so that we can
-
appreciate both its warm and cool components. To visualize this concept, imagine the colors
are arranged along an axis, from warm to cool colors. Let's place our image above this axis,
as in Figure4-19.

Figure 4-19
A schematic
representation of
image balancing
using equivalence

warm balanced cool

In this case, Figure 4-19, the photo clearly has a dominant blue color so everything tends
to be bluish. The warm components can hardly be seen at all. Balancing the image means
rebalancing the colors by subtracting a bit of this blue. If we move the image towards the
centre, the cool colors are reduced and the warmer components emerge, Figure 4-20.

Figure 4-20
As schematic
representation of
image balancing
using equivalence

warm balanced cool

Note: Setting the white balance by eliminating the dominant color doesn't mean that
the sky won't be blue anymore! The sky will be a bit less laden with blue but will still be
the same color. At the same time, the areas illuminated directly by the sun, (the warm
components), will have a more appropriate color and the w hole image will be balanced.
The V-Ray Physical Camera has a default value of "065" for white balance. This is usually
good for exterior rendering, as it subtracts blue from the images.
PHOTOGRAPHY & RENDERING With V-RAY

White Balance in Interiors


When we find ourselves in an interior space, there are generally no strong colors bleeding
onto the scene. Although the blue of the sky can enter through a glass window or door, it
is never strong enough to condition the whole photo. In these cases, we take a "neutral"
approach, which in the V-Ray Physical Camera means obtaining the correct setting by
changing the white balance option to Neutral, Figure 4-21 .

IYlil.1@>j @JJ ~l l ~I ~ ,@lm1 ~I


Figure 4-21 Figure 4-22
Pare of the Cameras o cei '1 D a. ~ ._. OCic;3 'D i2.~' Pa.rt of chc Cameras
command panel showing lwtav lwtav command panel showing
the white balance oprion the white balance option
set to leutral set to its default value of
065

Given that 065 is the default value, Figure 4-22, one of the most frequent errors is to leave it
set to that value. This produces a very unbalanced result, Figure 4-24.

Figure 4-23 Figure 4-24


An interior An interior
with the white with tho:
balance correctly white oolance
set to eur~ral incorre-:tly set
coD65

The image in Figure 4-23 looks right, as the walls basically appear white, while in Figure 4-24,
something about the coloring isn't working. If, during our first attempts, everything already
appears a bit reddish, it means we haven't changed the white balance. This is the problem
in 90% of cases. By leaving the default value (blue 065) active, we are telling the camera t::>
eliminate the blue, but since there isn't any of this color to t ake away, the image becomes
unbalanced in the other direction, and looks reddish.
Basically, to determine the right white balance, we simply need to make sure we:
Balance the blue when rendering an exterior (the default value of 065 is generally okay).
Balance the white (by setting Neutral, which in fact means don't balance), when workin ~
on an interior.
It's important notto forget t his aspect. A neutral image is the easiest to work with and is best
for managing materials, textures, colors and contrast. We will finish perfecting the white
balance in Photoshop, using a simple t echnique that we'll examine in Chapter 13 - White
Balance and Contrast.

Note: In the paragraph Color bleeding, on page 88, we will analyze a particular case
in detail. We will see a red floor that "tints" all the white walls with the same color and
explain how to eliminate this dominance using a specific color.
CHAPTER 4 - THE DSLR CAMERA 11\i V-RAY

Exercise: How to Balance an Interior


-
In this image, Figure 4-25, it's clear that the default balance of 065 is making the whole
image appear reddish. Excluding particular circumstances, an interior is almost always
neutral, so we will use a neutral balance setting.
1. Start 3ds Max and V-Ray and open the file Chap04-03-balance.max, located in the
folder P&R-VRay I Chapter 04 I Exercises. Launch a render to obtain the reddish image in
Figure 4-25.

Figure 4-25
A n interio r render.
Both the areas
illuminated by the sun
and those in shadow
appear co be covered
by a red veil.

2. To restore the correct color balance, set the White balance to Neutral in the V-Ray Physical
Camera panel, Figure 4-21 .
3. Launch the render again to obtain the correctly balanced image in Figure 4-26.

Figwe 4-26
A balanced interior
render. T he various
components can be
clearly seen: warm
sunlight and neuttal
walls.

Unlike point-and-shoot or DSLR cameras, the V-Ray Phys;ca/ Camera doesn't automatically
change the white balance value according to the situ1ation. We have to do it. By checking
the White balance option, we can always be sure that the result will meet our expectations.

Considerations: Some people may prefer the image in Figure 4-25 to the one in Figure
4-26. White balance, however, is not a question of taste but an objective characteristic.
Thanks to the white balance, we can try to represent colors in the most correct way
possible, using the white areas as a reference.
CHAPTER 4 - THE DSLR CAMERA IN V-RAY

Framing in Tight Spaces


The choice to use a wide-angle lens in a small space is often not only dictated by purely
stylistic reasons, but by an objective physical difficulty. To photograph the interior of a yacht,
as in Figure 4-29 for example, the only way to take in as much field as possible is to use a
wide-angle lens, that is, a short focal length (ranging from about 14 to 24 mm). This causes
distortion and markedly altered proportions.
In the field of 30, however, there are various solutions.
We could hide a wall, launch our render and then make it reappear, for example. The problem
that arises under these circumstances however, is that the distribution of light changes. In
fact, without that wall, more light enters from outside. The opposite problem cou ld also
occur- the available light cou ld leak, thus reducing the overall brightness.
The solution is the Clipping plane, a widespread tool throughout various software programs
and rendering engines, which we'll look at in the next paragraph.

Figure 4-29
An image rendered by
Simone Marulli in which the
focal length option has been
used to create the effect of a
wide-angle len~

The Clipping Plane Option


The solution to problems regarding framing in tight spaces is at your fingertips. You can
avoid using a wide-angle lens by ticking the Clipping check box, located in the Miscellaneous
rollout menu, Figure 4-30, and adjusting the two parameters below:
near clipping plane
far clipping plane

!>Ifl11 1~el (;11 ~ 1


o cei (j 1a ~ ~ "*
l\'R.oy

,- r ~T~ 1 Figurc4-30
;a~~~ Part of the command panel
(+ Name and Color _j showing the clipping options
r+ Bd<.eh effects Ji in the Miscellaneous rollout
r+ l!Mkpnnt~ menu
[ t Sei1ijfi .. p
I+ a.tllr1lon b
- Misaloneaus ~
~- ...... r-
dipping............... p
near ~ plane .. Jo,Oon .!J
far diPlli1g plane .... p.ooo,o ;
PHOTOGRAPHY & RENDERING with V-RAY

All This in the V-Ray Physical Camera


On the previous pages we explored the concepts guiding the use of a real DSLR camera.
As we continue to repeat, the V-Ray Physical Camera is nothing more than a virtual DSLR
camera for 30 rendering. It has the same parameters and works in the same way. This is its
strength. You'll find the Physical Camera in the Create > Cameras > V-Raycommand panel
and, once you've placed it in a scene, you'll be able to set the various options shown in
Figure 4-27 and Figure 4-28.

Gue$$ vat. I Guess hertz.

~row......... r
fooJsdistilncc ....... ~ ;J
""PW-"' ...... ....... l'7

Figure 4-27 OJSb:Jm


Figure 4-28
Part of the lenpe-ahre......... ~ ! Pan of the
VrayPhysicalCamern VrayPhysicalCamera
sMl!r ~ {s"-11200,0 ;J
command panel command panel

flm ~ (ISO)..... (iiio;O ~

Slmp!1g I
d.pth-offidd....... .r
motion blur........... r
subdvs.. ............. w-- ~

Ive-1bht1ft.slift.........
hcrizonta!
ro:o- ~
..... ro:o- ;.I

type: Still Cam I camera, Figure 4-27;


focal length: The 40 mm default indicates a medium lens, Figure 4-27;
f-number: Aperture of the diaphragm, Figure 4-27. Lower values indicate that the
diaphragm is more open and more light consequently enters. This is the only value we
will change to simulate Depth of field;
white balance: It is set to 065 by default, Figure 4-28. This setting generally works well
for exteriors in daylight. It subtracts blue in order to neutralize the color of the sky;
shutter speed: Exposure time, Figure 4-28. This is the only value w e will change to
capture more or less light;
film speed (ISO): Sensitivity of the sensor. This captures more or less light but we won't
be changing its value;
Guess vert. I Guess horiz.: These values allow us to correct vertical and horizontal
perspective distortion, Figure 4-28. This is mostly generated when we use a short focal
length (wide-angle lens), and the lens is not pointed directly forwards, but upwards or
downwards instead.

Note: 065 stands for Daylight 6S00K, which is the average value generally acceptable
for exteriors. 075, 055 and 050 refer to t he different possible color temperatures of the
sky: from cooler, like D75 (7500~K), to a/most warm, like D50(5000K). The latter values are
more suitable for balancing the red of a sunset.
PHOTOGRAPHY & RENDERING with V- RAY

If you increase the near clipping plane value, you'll see an additional red plane moving
away from the camera, Figure 4-31 . This plane represents the point from which the framing
will start, while the far clipping plane is the limit beyond which the camera will no longer
capture anything.

Far clipping plane

Figure 4-31
Graphic cliagram of a
camera, indicating the y
clipping planes, where \
the framing will start

z
~x
Near clipping plane

Note: In Chapter 15 - How not to Freak Out, you can watch Video-15-01.mp4, w hich
deals with the effect of the Clipping plane.

Note: From V-Ray version 1.5 SPS onwards, t he red clipping plane is visible in the
viewport, while in earlier versions, it isn't. Even in versions in which it isn't visible, the tool
still works in the same way. You can get feedback on the framing using the camera view
in the viewport.

Thanks to this function, you can frame tight spaces without using a wide-angle lens and
without removing walls. Simply place the camera outside the scene and position the red
near clipping plane, Figure 4-31 , beyond all the obstacles.
light Balance

A rendering is not JD. On the contrary, it is just like


1: a photo - a 2D image, whose three-dimensionality
is nothing more than an illusion generated by the
play oflight and shadows. We are now going to take
an in-depth look at the V-Ray Light tool and its
role as a digital copy ofa studio bank light. We'//
examine some ofthe options that will allow us to use
it, just as we would use a bank light in real life.
The purpose ofthis chapter is to understand how
to organise your lights and give them a clear
hierarchy. Primary, secondary andfill lig hts are the
three elements you'll work with and blend together

-- to obtain a convincing three-dimensional effect. This


kind ofapproach will make the light as "modeling"
as possible - which is, after all, the true purpose of
balancing it. Once you've done that, the rest ofthe
creative process may take longer and be richer in
parameters, but it will certainly be a lot simpler.
PHOTOGRAPHY & RENDERING with V-RAY

Types of Lighting
There are two main types of light:
Natural light;
Artificial light.
By Natural light we only mean the light generated by the sun.This light is made up of parallel
rays and even though it is filtered by our atmosphere, it generates well-defined shadows
when it hits the Earth directly. Its color is neutral white, but this can vary considerably
according to the conditions it encounters.
Artificial light, on the other hand, is produced by candles, lamps, beacons and spotlights.
This too can be direct or indirect and can vary in intensity and color. Artificial light produces
conical shadows and has a very strong intensity close to the source. This intensity drops off
rapidly, however, as the light spreads out into the space.

Considerations: Why do we consider sunlight to be constant? Is it a different kind cf


light, perhaps? Sunlight also drops off, or decays, throughout space. Unlike cirtificizl
light, however, the decay of sunlight is only discernible over astronomical distances.
There would certainly be a difference in the light intensity between Mercury and Earth,
but this difference would be absolutely indiscernible between two points on Earth itsel.r.
That's why we consider sunlight to be a constant, even though it actually folk>ws the
same rules as any other light source.

What Are Bank Lights?


Certain light sources emit softer and more diffused lighting. They are used a lot in
photographic studios, and are known as bank lights, Figure 5-1 .

Figure 5-1
An image of a
bank light

Bank lights come in various shapes. and sizes and can be used to create soft or directional
lighting. They can be rectangular, circular, or umbrella-shaped. They can rotate and ne
suitable for a large number of subjects.
Inside a bank light there is a spotlight (a direct light emitter), which is always concea ed
behind a translucent veil. This produces diffused lighting when direct light passes through
it. In computer graphics this kind of light is simulated by an Area light and, in fact, 1this is the
first type of light source we will examine.
CHAPTER 5 - LIGHT BALANCE

Light Sources that Can Be Simulated Using V-Ray


To access the light sources available in the V-Ray rendering engine, just open the Create
panel, click on the Light category, Figure 5-2, select V-Rayfrom the drop-down menu, and all
the available light types will appear.

~ 1 6>1 111 ~1 Figure 5-2


0 ~~ ra. ~~n1. Part of the control
panel with the
1~ Create tab o;clcctcd,

~
the Lights categor)
r ObjectType
..... ] highlighted and che
~I I \'RaylES J \'-Ray rendering
y~ ~yS1a1 j engine sh0\\1ng its four
N!me and Cclor b available lights

There are four light source simulators in V-Ray, Figure 5-2:


VRay Light: This offers a variety of applications, Bank lights (Plane type) being the most
common;
V-Ray IES: Spotlights with t heir relative photometric data profiles (standard IES);
V-Ray Ambient light: This substitutes Global illumination. It is unrealistic, but quicker.
We won't be using it, as it doesn't simulate the natural decay of light;
V-Ray Sun: The sun.
As mentioned earlier, the V-Ray light has various uses. What we will focus on now is the
Plane type. A Plane light is a light panel that emits indirect light and faithfu lly imitates a bank
light, even in the way it's used.

Note: In some cases, like in interiors for example (see Chapter 17- Rendering Interiors), the
V-Ray Light will be used in "portal" mode, which is a completely different way of using it.

The advantage of a V-Ray Light, compared to a real bank light, is that it is still a virtual object
and as such, we can modify it, duplicate it and alter it to our liking.
While in a real studio one has to navigate around the space required and the costs of working
with a great number of lights, we theoretically, have infinite possibilities. This is not always
an advantage, however. In fact, it is often our limits t hat determine our outcomes.
So even though we may have an infinite number of possibilities available to us, the most
important rule to follow when creating a photographic render, is to reproduce the very
same conditions that exist in reality. It may sound obvious, but it actually isn't at all. It
implies that the problem of rendering shifts from knowing how to use a software program
to understanding how light really works and how to photograph it.
PHOTOGRAPHY & RENDERING with V-RA't

V-Ray Light Parameters


The main parameters of the V-Ray light, Figure 5-3, that we can control, are:

Type: The shape of the light source;


lilll.Jri.l l@>I ~ ~I
o ceim~ f2)_ ~, Units: Unit of measurement for the light intensity;
Multiplier: The value of the light intensity;
-r
IYR.av
ObjedType -,,
I AulDGtld
~witot 'IRevlES I
Mode: The color and temperature of the light;
Size: How big the light is;
:ayAmbionllJg 'IReySl..n
We can also activate a set of options, the most important of which
+ Name and Color __J
Pilfillllt'li!rs I are:
Double-sided: Emits light from both sides;
Invisible: Becomes invisible;

Note: The Invisible option can produce a strange perception. Have


you ever seen light coming from an invisible source? Nevertheless,
Figure 5-3 it is useful when we are integrating a V-Ray light to somethi 1g
The Create control
self-illuminating. When we have a luminaire, we can simulate the
panel showing the
main parameters of light it emits by placing an invisible V-Ray light near it.
the V-Ray Light Half-lenglh: ~ :
Half...tdlh: ~ ~
r. r:o.o--=- Store with irradiance map: This quickly, but roughly, calcul :ites
shadows using the lrradiance map;
The Affect diffuse/ specular/ reflections options, Figure 5-3, allow
you to enable and disable the effects of these three aspects. The); are
usually all enabled, which reflects reality, but if we disable them, this
is what happens:
Affect diffuse: OFF, the light source does not affect the text.1res
or colors. It basically doesn't emit light;
Affect specular: OFF, the light source does not appear in specular
reflections;
Affect reflections: OFF, the light source does not appear in
reflections.

One problem that is often encountered is that a light source that has been hidden from the
camera inevitably appears on reflective surfaces.
In real life one has to find the right angles in order to avoid unwanted reflections. In V-Ray
we can use the Affect specular/reflections options to ensure that a light illuminates but
doesn't appear in reflections.
While on one hand this is convenient, it is also clear that taking this kind of approach mi)kes
things look"abnormal" and can easily create unrealistic results. It is more logical and rearistic
to find the right angles, even in a render.
In other cases however, disabling Affect specular/ reflections is very useful, for instance,
when we use a V-Ray Light to emit on behalf of something else. In this case, it makes sense
to disable the reflections, as it is the luminaire that needs to be reflected, not the V-Ray light
that is simply emitting on its ~ehalf.
CHAPTER 5 - LIGHT BALANCE

The Store with lrradiance Map Option


Using Store with irradiance map, (which for the sake of brevity we'll call StorelM), we
can speed up processing considerably. The shadows generated by the V-Ray Light will be
roughly calculated using the lrradiance map. So, if we use this parameter, we can control yet
another aspect related to speed, Figure 5-4 and Figure 5-5.

Figure 5-4 Jn this image the StorelM option has been Figure 5-5 In this image che Storel M option has been
deactivated. The shadow is very pronounced and the activated and the shadow is calculated by the Irradiance
processing time is longer. map. If it's a draft phase, and we are working with very
low quality, the processing time will be shorter.

Note: We can uncheck the option before the final render, but we don't always have to.
There are some situations, in fact, in wh ich it can be useful to activate Store/M for the
final rendering, when there are a lot of lights in the scene, for example. In that case, we
could make a selection, choosing to deactivate Store/M just for the lights from which we
expect the most detailed shadows to be generated. The other, less significant lights, will
generate less defined shadows, in exchange for higher speed.

If you deactivate StorelM, you will obtain more defined shadows, but at the same time you
may notice that the shadows produced are a little grainier, Figure 5-6.

Figure 5-6
Grain in the shadows as
a result of deactivating
StoreIM
- PHOTOGRAPHY 8t RENDERING with V-RAY

Keep in mind that every time we come across any form of grain, there will always be a
Subdivs option somewhere to control it.
The rule is always the same:
+ grain > - definition > - time
-grain > +definition > + time
When the grain is in the shadows generated by a V-Ray Light, as in this case, the value of its
relative Subdivs, Figure S-7, is that of the V-Ray Light itself. The default value is 8, Figure 5-7.

Note: When StorelM is active, the value specified under Subdivs is not used to increase
the subdivisions of the direct light. It is taken into consideration, however, to improve the
definition of the specific lrradiance map for that light.

IV Ignore light normals


r No decay
1Considerations: The default value of the Subdivs option lends
Figure 5-7 r ~t portlJj r \Ille
Part of the Create P Store With Irr~ mai: i tself well to tests, Figure 5-8 and Figure 5-9, but it's possible to
panel in the V-Ray P Affect diffuse rchange it to eliminate grain in the fina l rendering. There isn't one
Light category p- Aff'Kt speo.Aar
perfect value that works in all cases, but if you just make a couple
showing the P" ~reflections
of attempts and use the "Render region" option to help you, you'll
Subdivs option
quickly find the right value to make the grain in your shadows
disappear.

Figure 5-8 The Subdivs default value of 8. The Figure 5-9 The Subdivs have been increased to 30.
shadow is sharp but contains a little bit of grain. The shadow is sharp and the grain is indiscernible.
This solution naturally requires a longer processing
time.

Note: You can verify this concept by opening the file ChapOS-01 - storeim.max, located
in the folder P&R-VRay I Chapter 05 I Exercises. Change the value from 8 to 30, to observe
the different levels of granularity in the shadows.
CHAPTER 5 - LIGHT BALANCE

The Size-Intensity Ratio


There is a close connection between the Size, the Multiplier and the light actually produced.
If we create a Light area of SO cm x SO cm and keep increasing the intensity, you'll notice that
the emitted light becomes more and more intense. Tnis is intuitive enough.
The same thing occurs if we keep the value of the Multiplier at 3.0 for example, and increase
the size. In this case too, the light becomes more and more intense.
So, a small-sized light source with a high Multiplier value emits the same amount of light as
a large V-Ray light with a low Multiplier va lue. The difference lies in the effect they produce.
The first will be sharp, Figure 5-10, while the second will illuminate in a much softer and
more encompassing way, Figure S-11 .

Figure 5-10 The effect of a point light Figure 5-11 The effect of an encompassing light

This dynamic on ly occurs, however, if we use the "Default" system to measure how the light
is emitted, Figure S-12.

Type: !Plane 1
I F Enable viewpart.tiading Figure 5-12
!ntensity- -
Part of the Create

Units:I==~
panel in the V-Rny
Light category with
the Default option
highlighted

The Default option, Figure S-12, allows us to assign an approximate value to the light so that
behaves as we have just described.
There are various units for measuring light, but one example is Watts (radiant power).
Watts represent the power emitted by a light source, so if we specify that a light source will
emit 200 W, this value won't change even if we change the sizes - it will still be 200 W.
What changes is the effect produced: sharp, Figure S-10, or encompassing, Figure 5-11. In
any case, the final result won't be influenced by the unit of measurement, so each person
can choose the one he/ she prefers.

Note: In this book we will always use watts - firstly to remain faithful to realit y, and
secondly, so that we'll be free to change the size of the V-Ray Light without overly
influencing the light emitted.
PHOTOGRAPHY & RENDERING with V- RAY

Basic Lighting Scheme


In the previous paragraphs we explained what a V-Ray Light is. Now we will use some of
them to recreate a photographic set, treating t hem as Bank lights.
Let's begin with a very simple but effective lighting scheme. Two lights are positioned, one
on the right and the other at the top, in such a way as to surround the object and give it the
correct shading to make it appear three-dimensional, Figure 5-13. It's important to keep in
mind that the problem with three-dimensionality is all in the lighting and not, as one might
think, in the 30 software. How many times have you heard that a photo looks flat, even
though it is a real photo, taken in the real world? It is the light that flattens it or gives it three-
dimensionality - it is the light that gives subjects volume. In this case, avoid placing a light
behind the camera, but rather, position the sources as in the following diagram.

F igure 5-13
A diagram
showing two
lights from above
(A) and from
the side (B),
positioned to
simulate studio
lighting

Naturally, you mustn't think of this set-up as a rigid scheme. The important thing is to keep
your purpose in mind at all times: lighting and three-dimensionality. With experience, your
ability t o judge the ideal arrangement of lights will get better and better.

Figure 5-14
A variation of che
previous diagram,
showing the lights
positioned to the
sides, seen from
above (A) and
from the side (B)

Balancing lights in two different ways can produce two completely different moods. In fact.
having an intense light above, Figure 5-13, suggests a ceiling lamp, Figure 5-15 (A}, while
two lateral, uniform lights, Figure 5-14, give a sense of environment light ing, Figure 5-15 (B}.

Figure 5-15
A rendered
image with a light
positioned above
(A)
and another with
lights positioned
co the sides (B)
CHAPTER 5 - LIGHT BALANC:

Simulating Part of an Interior like an Object


The scheme we just applied to an object can also be usefu l for lighting parts of interiors. For
example, if we want to render the corner of a room or a piece of furniture, we don't need to
build the interior and then recreate the lighting.
The method we will illustrate below is extremely quick and simple. We must emphasise that
it's a rough solution and that it is always preferable to reproduce reality as it is, with all the
walls and openings. Nevertheless, the advantage of this procedure is that even beginners
can use it straightaway to obtain fairly decent results. We can imagine this section of an
interior, Figure 5-16, as an open stand. Like all unclosed spaces, Figure 5-17, the light bounces
less, producing less shading. On the other hand, it's faster to render and extremely simple
to illuminat e.

Figure 5-16
A rendered
image that is
almost devoid of
materials, allowing
us to best observe
the distribution
of light

Figure 5-17
An illustrative
diagram for
rendering part
of an interior,
showing the
positions o f the
lights (A) and
camera (B)

Note: In Chapter 6 - Simulating Materials, we will explain how to work with and assign
materials to th is scene, Figure 5-16, using a practica l exercise.
PHOTOGRAPHY&. RENDERING with V-RAY

Classic Three-Point Lighting


Even though, in the last few examples, we have only used two V-Ray lights in the scene, this
is actually nothing more than a simplified version of the most basic of schemes: three-point
lighting.
We can, in fact, also use a third light source. The three lights can then be classified as:
Primary light (Key light);
Secondary light;
Tertiary light (Fill Ilg ht).
The hierarchy of the lights is related to tthe importance that each of these assumes, or the
intensity with which each source engages the scene and the subject. That's why the Primary
light source (the key light) is decisively more intense than the others, establishing how the
scene is to be interpreted, the direction of the shadows and the atmosphere in general.
The Secondary light source helps to soften the shadows that the primary light source
produces, without generating prominent shadows of its own. It never competes with the.
Key light. Finally, the Tertiary light source, or Fill light, completes the lighting in places the
other lights can't reach. It's a light that fin ishes off the scene if necessary, by illuminating the
areas of shadow t hat sometimes form in a composition.

Note: In traditional t hree-point lighting, the fill light is considered to be the secondary
light source. In the case of interiors, however, you may find that shadowy areas remain
even after you've positioned your primary and secondary lights sources. In these cases,
it is actually the tert iary light source that we use to "fill in" the dark areas. For this reason,
we wi ll always refer to the tertiary light source as t he fill light.

The use of the three lights is subjective and depends on the photographer's needs and the
effect he/she wishes to obtain. By obser ving the figures below, we can better understanc
the extent to which the success of an image is related to the correct balance between the
various lights:

Figure 5-19 Fignre 5-20


An image The image
with only the with only the
primary light seccndary
ligh

Figure 5-21 Fig-ire 5-22


The image The image
with only the obtaned using
tertiary light all three lights
CHAPTER 5 - LIGHT BALANCE

Chromatic Contrast
To make the light balance more interesting, we can also create chromatic contrast by
adjusting the color temperature of the light sources.
This is a very simple trick to carry out and it generates anice effect. We'll set the primary light
source to have a sl'ightly warm tone and the secondary and fill lights to be a little cooler.
Although we still only have neutral materials in the scene, correctly balanced lighting and
slight undertones of color can already produce very interesting images.
The color of a V-Ray Light can be assigned by clicking on the Co/or box in the Intensity section,
Figure 5-23. In cases in which the ch oice of color is exclusively tied to the emission of a warm
light or a cold one, it is much easier to use the Temperature option, Figure 5-24, whose value
refers to the temperature in kelvins, j ust as in light engineering:
0-5000 K, warm light;
5000K, white;
5000- 10,000K, cool light.

Figute 5-23 Intensity IntNlsity Figure 5-24


Part of the Create JRa<ian--tpower--~-
Units: ..... I.kits: ,....JRaclan--tpo-we-r-~-
... Part of the Create
panel in the V-Ray Multiplier: ~ .:.] Multiplier:~ _;_!
panel in the V-Ra)'
Jjght category Light category showing
Mode: jeo1or Mode: jrempera~
showing the Color the Temperamre option
option highlighted in
Color:~ Color: 1.--- --.1
highlighted in the
the Intensity section Temperature~ Tem,peratise:I~ ~I Intensity section

How to Balance Using Three-Point Lighting


If you open the file ChapOS-02-light-balance.max, you will find that a generic material has
been assigned to the whole scene and three lights have already been positioned, but with
very low values. Work with one light at a time to try to recreate the effects shown in Figures
5-19, 5-20 and 5-21 . It's rea lly important to work on the contribution of each individual light
source separately, keeping the other lights off, to assure ourselves of its effect.
After you've finished adjusting each light (Primary, Secondary and Fill), finish off by turning
them all on at the same time. Finally, take advantage of color temperatures to make your
itnage even more interesting, Figure 5-26.

Figure 5-25 Viewport showing the Y-Ra)' Llghts Figure 5-26 Final result for reference

You can check the final result by opening t he file ChapOS-03-light-balance-FINAL.max.

THIS PROCESS IS ILLUSTRATED IN P&RVRAY \ CHAPTER 05 \ VIDEO\ VIDE0051.MP4 Eil


PHOTOGRAPHY & RENDERING with V-RAY

Balancing an Interior
The most important thing when balancing is to create a structure in which the lighting
hierarchy you intend to create is very clear. As we saw in the previous exercise, no light
competes with the others, and thei r roles w ithin the scene are well-defined. The outcome is
a decisive, three-dimensional image that doesn't confuse the observer.
When working on an interior, we must also always reason in terms of primary, secondary
and fill lights. Lamps, spotlights and any bank lights outside the frame, can also be organized
into a hierarchical structure, without leaving anything to chance.
In Figure 5-27 for example, it's clear that the ceiling lights are the primary light source, the
spotlights are secondary, and the bank lights outside the frame, (on the stairs and behind
the sofa), are fill lights that distribute light in spaces that would otherwise remain in shadow.

Figure 5-27
The result of
setting the
ceiling lights
as the primary
light source.
This image
has been taken
from a render
by Francesco
Romanucci

In Figure 5-28 some of the roles have been inverted. The spot lights are the primary light
source, the ceiling lights are the secondary source, and the fill lights haven't changed.

Figure 5-28
The result
obtained by
setting the
spotlights as the
primary light
source

The fundamental thing is that the hierarchy is clear. Having achieved that, no set-up is better
than any other: it all depends on the purpose. For a catalogue whose scope is to show all the
furniture together, Figu re 5-27 is undoubtedly more suitable, w hile Figure 5-28 would be
perfect for a lighting company that manufactures spotlights.
CHAPTER 5 - LIGHT BALANCE

How to Balance an Interior


If you open the file ChapOS-04-balance-interior.max, you will find a generic material
assigned to the w hole scene, the V-Ray Physical Camera irn place, Global illumination ready
for testing and all the lights ready, but with very low values assigned to them.
If you launch a Render, you'll get a flat result without any "forms': Figure 5-29.

Figure 5-29
The starting
render. We will
use this ro give
form to the scene
by adjusting the
various lights
available to us

The three types of lights in the scene are listed below, Figure 5-30:
Cei ling lights (V-Ray Lights);
Spotl ights (V-Ray IES);
Bank lights (V-Ray Lights outside the frame, on the staircase and behind the sofa).

c~
Figure 5-30
A depiction of an
interior drawing,
showing the
lights available
in the scene:
Ceiling lights (C),
Spotlights (S) and
Bank lights (B)

c~

In this phase we needn't worry about how Spotlights or Global illumination work in detail,
but we should instead focus on just two aspects of the lights: the intensity and color
temperature. Adjust these elements to try to imitate the results illustrated in Figure 5-27
and Figure 5-28.
The process of setting the light balance is always the same: cha nge one group of lights at
a time, starting with the primary lights. When you think they are correctly performing their
appointed task, move on to the next group.
PHOTOGRAPHY & RENDERING with V-RAY

After separately fine-tuning the three groups, finish off by turning them all on.
When photographers work with bank lights in a studio, they often use the expression
"modelling the light''. This is a very good description for what actually happens when we
balance lights. We need to learn to consider light as a pliab~e material, which in turn gives
form and t hree-dimensionality to the scene.
The render in Figure 5-27 is simply the result of a precise balancing procedure; the settings
used to achieve it were the following:
Ceil ing light: power = 400 watt I 5500K (primary light source);
Spotlights: power = 12,000(*) I 4500K (secondary light source):
Bank Light on the staircase: power= 400 watt I 4000K (fill light);
Bank Light behind t he sofa: power= 150 watt I 4500K (fill light);

Note: (*) The value of 12,000 for t he power of the Spotlights is actually expressed in
candelas, so don't worry if it apparently seems off the chart s.

Note: You can check the value settings used to obtain the render in Figure 5-27, by
referring to the file ChapOS-05-balance-interior-FINAL.max.

Light balancing isn't such a difficult thing from a technical point of view. We only need to
adjust a few things: the position of the lights, their intensity and their color temperature.
The rea l difficulty is knowing how to recognise and create the lighting hierarchies that allow
us to control the light and be aware of what it is doing. The V-Ray parameters are simply a
matter of course.
The following are the light balance values used to obtain the render in Figure 5-28, in which
the primary light source is made up of spotlights:
Spotlights: power= 25,000 I 4500K (primary light source):
Ceiling lights: power= 80 watt I 6S00K (secondary light source);
Bank Light on the staircase: power= 700 watt I 4000K (fill light);
Bank Light behind the sofa: power= 100 watt/ 4000K (fill light);
Using th is method, you can create various interior lighting situations.

Note: You can check the value settings used to obtain the render in Figure 5-28, by
referring to the file ChapOS-06-balance-interior-FINAL.max.

The whole process, from activating Global illumination to rendering, can be seen in:

P&R VRAv \ CHAPTER05 \ V10Eo \ V10Eo-05-2.MP4 5"

Considerations: Obtaining a good image with just one neutral color is not an easy task. It's
like cooking with very few ingredients and still managing to create a tasty dish. The more
three-dimensional you can make your image in this phase, the easier it will be to apply
colors and textures later. That's why a good light balance is a surefire recipe for success.
Simulating Mate~ials

Following light balance, simulating materials is


1: one of the most important - and at the same time
engaging - topics we will cover.
There is an endless number of materials and
most of them can be analyzed simply, based on
their properties of reflection, refraction and the
glossiness of their surfaces.
We need to fir~t ofall acquire some basic
kn.ow/edge about the physics ofsurfaces to then
understand how to work with the A1aterial Editor
parameters to simulate the materials.

- The first part ofthe chapter will be dedicated to


helping you understand materials in general and
in the second part, you will practice creating a
render.


PHOTOGRAPHY & RENDERING with VRAY

Introduction to Using Materials


A quote by designer Riccardo Blumer very accurately describes a typical situation that occurs
when we have to create photo realistic images, where the materials play a primary role:
"Of all our five senses, sight is definitely the most deceiving and the one that least allows us to
know reality... sight is presumptuous because it thinks it knows what it's seen at a single glance,
but actually, it has only really got a sense of it'~
If sight is presumptuous, memory is even more so. Avoid t rusting your memory - or worse
yet, your imagination - at least during this learning phase. Search for some images of the
material you int end to simulate because what interests us is not just the material itself, but
also how to "represent" it photographically.
This is a fundamental rule for creating accurate simulations with materials, and is followed
by t he major companies who produce special effects.

Fresnel and Metallic Reflections


Let's begin by distinguishing between the two categories of reflections: Fresnel and
Metallic.
The degree of Fresnel reflection is not constant, but varies. These kinds of objects have a
very slight reflection when observed front-on and reflect more and more as the angle of
incidence of our gaze becomes more tangential to the surfaces.
The billiard ball in Figure 6-1 is more reflective at its edges, while it's central part hardly
reflects anything at all. This is because our view of the outer part is more tangential to it s
surface. Another typical characteristic of a Fresnel reflect ion is that it has its own color.
Despite the evident reflections along the contours of the billiard ball, Figure 6-1 (A), we can
say without hesitation that the ball is black, with no doubt whatsoever.

Figure 6-1
An image of an
object with a rresnel
reflection (A) and
one with a mecallic
reflection (B)

The other kind of reflection is Metallic, Figure 6-1 (B). In t he case of the second sphere, we
are dealing with a well-known material: chromed metal. If we look at its reflections after
seeing the fresnel ones, we notice a different effect.
All the reflections in the chromed metal have the same intensity, no matter what the angle.
Furthermore, the material doesn't have a color, or rather, the color we see isn't its own but
merely a reflection of t he surrounding environment. If t he chromed metal object were in a
completely red room, it too would appear to be red.
CHAPTER 6 - SIMULATING MATERIALS

The Reflection of the chromed metal object is constant in both views in Figure 6-2, while
the table obviously has a Fresnel reflection. The lower we go and the more tangential our
view of the surface becomes, the more its reflective capacity increases.

Figure 6-2
Images of an
object from two
different points
of view, showing
the effect of the
reAections

We have thus analyzed the first very important difference between Fresnel reflections
and Metallic reflections. Now we can distinguish between them by summarizing the most
common materials that have these properties, in the following table:

Metallic reflection Fresnel reflection


Chromed metal Wood
Gold Plastic
Silver Water
Leather
Glass

To conclude, let's look at another example and consider the reflection produced by a pane
of glass. The glass appears less reflective when photographed front-on, but its reflection
increases as the view becomes more tangential, Figure 6-3.

Figure 6-3
Images of a pane of
glass photographed
front-on (A) and
from an angle (B).
In image (B) the
reflection in the
glass is much more
pronounced due to
the view being more
tangential. This is
the fresnel effect

Even asphalt behaves like a Fresnel. The reflections of headlights in the distance are more
pronounced than those a few meters from us. This occurs because at a distance our gaze is
more tangential to the surface. So, to remember whether a reflection should be considered
Metallic or Fres.nel, just ask yourself: Is it Metal? No, well then it reflects as a Fresnel. If the
situation is inverted, the answer is obvious.
PHOTOGRAPHY & RENDERING with V-RAY

Reflections on Surfaces with Varying Degrees of Glossiness


Shiny surfaces produce extremely sharp reflections, while rough surfaces tend to blur what
is reflected onto them. Let's appeal to a bit of elementary physics for help in understanding
exactly what happens in these two situations.
When a beam of light hits a smooth surface, it is reflected back intact, Figure 6-4.

A
Figure 6-4
Diagram depicting
the reflection of
mirrored rays (A)
and t11e real effect of
a shiny floor (B)

The situation changes when the beam of light encounters a rough surface. This type e>f
surface won't reflect the light beam intact but will instead tend to shuffle it around. That's
why rough surfaces create blurred reflections. To indicate that a surface is rough, we u~e
what's called the Degree ofShine, Glossiness, or Gloss: the lower this index is, the rougher tre
surface is said to be.
Here is a typical diagram, show ing a beam of light encountering a rough surface, Figure 6- 5:

Figure 6-5
Diagram depicting
rhe reflection of rays
o ff A rough surface
(A) and rhe real
e ffecr on a rough
Aoor (B)

The term Glossy is frequently seen in the control panels of V-Ray, Mental Ray and other
rendering engines. Obviously though, the concept of glossiness wasn't invented by software
developers.
Glossy simply means smooth and shiny. Paint with 90% glossiness indicates paint that s
shiny, but not completely so. In our work, the materials we typically encounter which present
this kind of property in their reflect ions, are natural wood, brushed metal and opaque plasti.:.
To understand better still how to classify materials, in which category would the material in
Figure 6-6 (A) go? It 's a simple brushed metal. So why does it appear grey?
CHAPTER 6 SIMULATING MATERIALS

A B

Figwe 6-6
An example of
brushed metal (A)
and non-brushed
metal (B)

When a surface has a very low level of glossiness, (i.e. it is very coarse), the light ray
containing the image of the surrounding environment stri kes the object but bounces off it
in a completely "confused"way. It's so confused as to reflect back a single color, the"average"
color par excellence, grey. It's like mixing various colors of tempera paint in a glass of water.
Figure 6-7 definitively clarifies the relationship between the degree of shine and the degree
of "confusion': so to say, of images reflected off a surface.
The lower the degree of shine (glossiness), the more the reflections "mix together': to the
poi nt in which they appear so blurred as to reflect back a single color.

Figure 6-7
Render of a series
of balls shewing a
grad ual reduction
in glossiness

When this occurs with a fresnel reflective material, we can make another observation:
everything in nature reflects light, including us, our faces and the clothes we wear.
If this weren't the case, we would all look like moving black splotches. Th is doesn't mean we
should set reflections for every object we simulate. Try to simplify the calculation as much
as possible, stopping at the point where visual perception can't tell the difference. Only
consider materials reflective if the light that reflects off them is significant. Where it isn't
significant, just consider the reflection to be nonexistent. In Figure 6-8, the last ball has no
reflection applied and yet it is very similar to the second last one, which has a reflection, but
also a very low level of glossiness.

Figwe 6-8
A r ender of a series
of balls with m edium
Fresnel retlections,
sho'l.ving a gradual
high high medium low low absent reduction in glossiness
100% 90% 60% 40% 20% absent

We get to a point in w hich very low glossiness tends to smear the reflections over the whole
surface, giving the sphere a single color. In cases like these, for the sake of simulation and
saving processing time, we can avoid considering the object reflective at all, as the effect
won't substantially change our perception of it.
PHOTOGRAPHY & RENDERING with V-RAY

Refraction
Refraction is a phenomenon that occurs when light passes through something, like glass or
water, and is distorted by it, Figure 6-9. A classic example is an object immersed in a glass of
water. The object appears to break apart, Figure 6-9.

Figure 6-9
An example of an
object immersed
in some Wlltcr
contained in a glass
(A), and objects
contained in a
ceramic mug where
refraction doesn't
exist (B)

Refraction is also concerned with the amount of light that can pass through the refracting
matter.The following diagram, showing the way refraction behaves, is similar to the previous
one, except that in t his case, the rays pass through the matter and undergo a small change
of direction and attenuation, Figure 6-1 O. Rays passing through a shiny surface remain
compact, allowing us to see through them clearly.

A
Figure 6-10
Diagram depicting
rays passing
th.cough glass (A)
and the real effect
on a glass door (B)

Rays passing through a rough surface mix together and show what is behind them in a
confused way. This is the classic case of frosted glass, Figure 6-11 .

8
Figure 6-11
Diagram depicting
light rays passing
through a rough
surface (A) and
the real effect on
a pane of frosted
glass (B)
CHAPTER 6 - SIMULATING MATERIALS

Index of Refraction (IOR)


The Index of Refraction (IOR) is the degree of deformation that light rays are subjected to
when they pass through an object. The higher this value, the greater the deformation they
undergo. Every material has its own IOR. Here are a few examples:
Water: 1.33;
Glass: around 1.5 for the various types;
Diamond: 2.4 .

Considerations: I won't disti nguish between glass and water in the simu lation phase
because they don't create substantia lly different results in t he image. On the other
hand, it's a good idea to pay attentio n to the IOR w hen dealing with jewelry, given t hat
t he IOR of diamonds is very different from that of glass and water. It's obviously not
"mathematically" correct to overlook the IOR, but in this phase there's no use dwelling
upon details that won't affect t he final outcome.

General Guidelines for Analyzing Materials


To recap, when we have a material to analyze, we just need to ask ourselves seven simple
questions in order to create an accurate enough description of it:
1. Color: Is it a solid color or has it got texture?
2. Reflection: Is it reflective? How reflective is it: a lot, average, a little or not at all?
3. Mode of reflection: In what way does it reflect? Is it metal? If it's not metal, it's fresnel;
4. Surface quality (for Reflections): Is the surface on which the reflection occurs shiny or
rough? How rough is it?
5. Refraction: Does it refract? How much does it refract: a lot, average, a little or not at all?
6. Surface quality (for Refractions): Is t he surface on which the reflection occu rs shiny or
rough? How rough is it?
7. Is its refraction colored?
We haven't unveiled any great mysteries with these seven questions, but by putting them
in order, we now have all the information we need to simulate a material correctly, without
wasting time. Once we've completed this kind of analysis, filling in the parameter boxes of
the Material Editor, Figure 6-12, will simply be a matter of course.
V-Ray, Mental Ray, Final Render and all these kinds of rendering engines have to assess
these aspects in some way, in order to simulate a material. Moreover, they are all concerned
with real life and real life is the same for everyone. It couldn't be any other way.
Always keep in mind that no software program invents anything new. In 90% of cases the
parameters in V-Ray come from physics or photography, which is why we are working hard
to deepen our understanding of these subjects.
This is the best basis for rendering with awareness and for gaining complete control over
your images.
PHOTOGRAPHY & RENDERING with V- RAY

The Material Editor


Each of the real material aspects condensed into the seven questions in the previous
paragraph has its own space in V-Ray's base material, VRayMt l.
To access the panel containing VRayMtl, just press the M key and the Material Editor w ill
open, Figure 6-12. Now click on the Standard button (the 3ds Max default materials) and the
long list of materials available in 3ds Max appears in the Material/Map Browser panel, Figure
6-12. We will only use materials linked to V-Ray, in particular VRayMtl, which allows us to
create almost any material.

Iii Mate11al Editor 01 Omult


Utirrties 'i' js..arcti by Name .. .
t Ml1 llbrerl-.m1t LIB

Materials
+ stonderd
V~ NFR 2.10.01
VRaV251dedMll

~
Figtue 6-12 cQ ~ VRoyflaltuMtl
VRoyUghtMtl
Compact Material
~ ~ IfJlil I >< I <\D ' ' I ati I @. ~. ID C1t Q VRoyMtl
Edi.tor palette
showing the
J' I01 0e'-'t St.lderd I I
I.
Standard button
and the Material/
Map Browser panel
lerm
- -Blm -Pameters
r
J
Wire
FllCI! Mop
r
i
2-6icled
Faceted
l Vlay()vemdeMtl
VRoySlmbl ontMtl
VRr(VectorDlsplllR

with VRayMtl Ir - Bade I + Scene Matellals

I'aAnu.ntc=i r:::
E~r~
highlighted + Simple Slots

Diffim:c = J
~SpeoJor=c=i _J ~=rioo;J
_J

-SpeoJorlt!tights- - - - - - - - -
JI
SpeoJor Level: fO : J
Glossiness: fiO ~ _J
111 Softl!n: fD.l i.

t Exllnded Parameters h
[ t ~ b
[+ Maps
+ DyrwnlQ Prapertles

r+ lhctXMari.,-
+ rnonlll ra:r Comedian
OK cancel
I

Note: From the 201 1 version of 3ds Max onwards, two types of Material Editors are
available: Slate and Compact. These are simply two different interfaces. To cater to as
many users as possible, I will always refer to the Compact version, Figure 6-12, because
once you select the V-Ray material, the panel is the same. The only thing that changes is
the way to get to it. Those with 3ds Max 2011 or later have Slate set as the default so to
activate Compact, you just need to choose the Modes > Compact Material Editor option
from the Material Editor palette.
CHAPTER 6 - SIMULATING MATERIALS

How to Implement the Seven Questions in VRayMtl


-
You have three sections available to you in VRayMtl, Figure 6-13:
Diffuse (color);
Reflection;
Refraction.

I"@ ~ ~Iii x 1-a ~ 1~ 1ID.1m111 (!} Q


pi I01-0er.ut YRayM~ J
- enc: parameters _J

llffuS<! - _j R~ ro.o- :j _j
Rellecti<>n ---------~

Reftect- _j
r::- ;J.Jfl Fresnel~""'1lons rr Figure 6-13
R ft. glo<s:nes. ~ :j _, _,,,. ' r-- ~ Parr of rhe
&bclvs re- _;j Max rs- .!; depth compact Material
u.einl2fpolalian r Eia1ai1or - Editor palette
"' dist.nee p - :~ r r- :I showing the
Rofi'adion
Retract - ...J
Glossb= ~ _;__ - '

SJdvsra-- .:_
u.e inb!rpalalian r
~ct shadows
I
Affect <hamels Color crjy
r
T
Max depth

-r
!OR fl,6""
rs- :
Foo ai1or 1=:=J
Foo .u~
Fog bias
:

n;o- .;.
ro;o- :
VRayMtl sections

Cispersion r r- :J

For Diffuse, you can choose whether to assign a flat color to the whole object or assign a
texture to it. My advice is to be careful not to choose colors that are too bright and saturated,
which is possible when you are selecting a color using the color picker.
These kinds of colors only make sense on a monitor, as the screen is a light emitter. Most real
materials reflect light and are never too saturated.

Note: Translucent materials obviously exist in nature: they include human skin, wax,
some marble stat ues and soap. The cases however, are very few compared to the number
of materials we usually encounter in an architectural render. For now we won't analyze
this particular type, but will concentrate on acquiring the basis for simulating materials
just using VRayMtl.
PHOTOGRAPHY &. RENDERING with V- RAY

Set the Reflection amount in t he black box next to the name Reflect, Figure 6-14. A grey
scale is used, in which:

Figurc6-14 -~l'UonFlded
~- .--
~~~~~~~-_---,1'
Part of the i'lfatcrial
I : l'fetndrctlec1kn r
Editor palette Refl. ~ ri;o- : r- :
showing the SlMos ~ : Max des>lh rs- :
Reflection section U5t ilt<Jplla11an r Eidt cdar -
o.m 111tsu r- : r r- :

Black = No reflection (default value);


Intermediate greys = The material reflects in proportion to the lightness of t he grey;
White = Maximum reflection.
If the reflection type is Fresnel, tick Fresnel reflections. If you don't, V-Ray will automatically
simulate metallic reflections.
The degree of glossiness (shininess/ coarseness of t he surface) is set under Ref/. glossiness,
with values between 1.0 and 0.0:
1.0 = Perfectly shiny (default value);
0 .9 = Slightly coarse;
0.7 = Coarse.

Considerations: For values lower than 0.4 t he effect is lost, so I never use t hem. I
simplify by considering t he object non-reflective (Reflect= black).

Set the Refraction amount in the black box next to the name Refract, Fig ure 6-15. Just like
with Reflection, there is a grey scale in which:

Figure 6-15
Part of the Material
Editor palette with
the Refraction
section selected
II
Refi-ect-
Glossttss

51.WYS~ :
rr.o- :1
user.i.rpc1a11a11
A~s1w1ows r
r
Affect c:hannds lca1cr rif
!CR
Max depth

l'ogcdar~
Fog~
Fog bias
-r
rr,r- ;J
rs- ~
rr.o- : 1
ro:o- :.i
Cllptr9cln r r- :
Black = No refraction (opaque material, default value);
Intermediate greys = The material refracts in proportion to the lightness of the grey;
White = Maximum refraction.
The degree of glossiness (or shininess) to be discernible through the material is set by
Glossiness with values between 1.0 and 0.0 - the same principle we analyzed in Reflection:
1.0 = Perfectly shiny (default value);
0.9 = Slightly coarse;
0.8 = Coarse;
0 .6 =Very coarse.
CHAPTER 6 - SIMULATING MATERIALS

Considerations: For lower values the Glossy effect in Refraction is more or less the
same, but the processing is much longer, so I never use values below 0.6-0.S.

In short, for each of the seven questions listed in the paragraph General guidelines for
analyzing materials, on page 67, also carried over to Figure 6-16, there is a part of the
Material editor in which you can apply the observation made, as a parameter, Figure 6-16:

ld ~ I ~El I x 1 ~ I to I ~ I @ . Im ID " Q
I' I01 -Default YRaYMd J

Rl!flection
Figure 6-16
2 Reftect - _J Parr of the
; glo -- rro- ;J _J[l Fresnel refleciions r ,.,...
Reff. Qlossiless ri;o- .:.l _J ...,, -~ r-
;j _
compact Material
SIMvs rs- ;J Max dfpch ;Jrs- Editor palette with
the seven questions
u.e.,~- r Eldtcdor -
Ch c1stance :::-;- ;J r ~ 'a r-- ;., II represented

-r
"
as numbers
Rr.fractm
5 f Refrac:t- _j IOR~ .;_l_J corresponding to
parameters
6, .
,, G1om1ess ri;o- iJ _, Maxd.plhrs- .;.I
II Sdxivsrs- r_:j
Use i'lil=rpoeticn
E. D
Fog a>1or
Affect sh'9dows r Fog rrdttplior 1,0

lc:dor ~ ~
t diamels

Tronsluc.ency
DiSPet$iOn r
T~ , . . . . , _ - - - -. - SQtter "~
Fog bias fo;O
ibl ~ ~ J

pr.o- ;J
7

Back-side a>lor c=:J _j Fv d,4Jck co.ff rr.o- ;j


~ jlooo.o ;] L.qitmulbphe, n:o- ;J

1. Color: Is it a flat color or does it have texture?


2. Reflection: Is it reflective? How reflective is it: a lot, average, a litde or not at all?
3. Mode of reflection: In what way does it reflect? Is it metal? If it's not metal, it's fresnel;
4. Surface quality {for Reflections): Is the surface on which the reflection occurs shiny or
rough? How rough is it?
5. Refraction: Does it refract? How much does it refract: a lot, average, a little or not at all?
6. Surface quality {for Refractions); Is the surface on which the reflection occurs shiny or
rough? How rough is it?
7. Is its refraction colored?
PHOTOGRAPHY RENDERING wi h V-RAY

Setting Up a Material and Optimizing


The Material Editor should not be a starting point, in which to test out reasonable or less
reasonable theories, inspired by the parameters we find there. The Material Editor is the
finishing point. into which we put all the fruits of our previous analyses.
We have to think outside the parameters and have a clear idea in mind of what we wish to
simulate. We then use the options to implement our idea and nothing more. This doesn't
mean that play and experimentation should be abolished. Playing with V-Ray and testing
its various options is very fun. It's even more fun and profitable, however, when this rests
upon a solid basis that will allow you not to be a slave to, but rather, a master of the options.
The parameters we'll use for almost the whole chapter relate to giving specific qualities to
materials. At the end, we will look at the other parameters - the secondary ones - needed
to optimize rendering time.
Although the parameters are mixed into a single work space -the VRayMt l work space - they
form two distinct categories:
Category 1: Parameters that allow you to give surface properties to a material and emulate
it;
Category 2: Parameters that allow you to perfect your calculations, whether you're working
in draft mode or launching a final render.
The surface properties of materials can be implemented by working with the parameters
in Category 1. We will now look at some concrete examples of analyzing various materials
and examine the relative choices you have for implementing them. Once you've acquired
the basics on material properties, we can then explore some of the parameters concerning
optimization in Category 2.
CHAPTER 6 - SIMULATING MATERIALS

How to Interpret the Material Tables


What we have written until now allows us to easily simulate a set of materials which, if we
limit ourselves to the field of architectural rendering, includes almost all of the materials that
are usually used.
In this paragraph you'll be provided with information you'll need to interpret the material
tables on the following pages. The tables summarize t he analysis and implementation of
each of these materials.
You can pract ice applying all the settings in these material tables by opening the file
Chap06-01 - Simulating-materials - START.max, located in the folder P&R-VRay I Chapter
06 I Exercises. Set the various parameters (which you can find in the tables and Material
Editor diagrams on the following pages) in the Material Editor, then assign the material to
the object and launch the render.
To create any material, don't go directly to the Material Editor. First ask yourself the 7 questions
(see page 67), and from the analysis that follows, set. the parameters that represents its
implementation. In each Material analysis table, Figure 6-17, you will find a summary of the
Questions, Analysis and Implementation:

MATERIAL ANALYSIS TABLE


Questions Analysis Implementation
Color Red 1 Red (dark) Figure 6-17
An =mple of the
Reflection High 2 White Material analysis
rabies presented on
Mode of reflection Fresnel 3 Fresnel option the following pages
Surface quality (reflection) Glossy 4 Glossiness 1.0 (default value)
Refraction - 5 -
Surface quality (refraction) - 6 -
Colored refraction - 7 -
After you've asked yourself the questions, made your analysis and implemented it, you will
have created the material. All you need to do then, is assign it to the object.

Note: Assigning a material to an object can be done by dragging the material preview
image onto the object, or preferably by selecting the object from the Material Editor,
Figure 6-18, and clicking on the Assign Material to Selection icon.

~
Figure 6-18
~
Part of the Material Editor
ta ''~th the material prC\~ew

"' ~I ~iiJxI ~ rossa


:. ~
pla$lica
@. m: D "
VRayMU
image and the Assign
Macecial to Selection icon
highlighted
LJl.:,__ Baslcpnmeters J

Note: The settings for the materials analyzed on the following pages can also be seen in
the file Chap06-02 - Simulating-materials - FINAL.max, located in the folder P&R-VRay \
Chapter 06 \ f xercises.
PHOTOGRAPHY & RENDERING with V- RAY

Table: Glossy Red Plastic

Figure 6-19
A preview of a glossy
red plastic material
with the following
op tions applied to it

MATERIAL ANALYSIS TABLE


Questions Analysis Implementation
Color Red 1 Red (dark)
Reflection High 2 White
Mode of reflection Fresnel 3 Fresnel option
Surface quality (reflection) Glossy 4 Glossiness 1.0 (default value)
Refraction - 5 -
Surface quality (refraction) - 6 -
Colored refraction - 7 -

The Material Editor palette in Figure 6-20 shows the options to consider if you want to create
a g lossy red plastic material, Figure 6-19.

ray
I_
I Muse-
D
\/) Y,

1 _J
V-Ray PowerShader

Rou!tness fO,O .;J _JI


Figure 6-20 Re7 Reflectc::=::J .J 3 I
Part of the !V(atcrial
Editor palette. The
[ 91os-= r:- .:.J _J[l FrS'lelrellectians P' Ii
Rd.~ ri;o- .:.J _J Fr fiT"" _;j
numbers in red !lliM ~ W- Max dep1h rs-- .;j
refer to the exact Use interpojatlon r Exit color -
point in which the Dim cSstanre ~ .;J r "" t ~~ .;J

-r
implementation shown

r
in the rable occurs.
ever use colors that
are too b right in the
Re&=~j Max~C:l~,6 ~
SubavsW- ~ E;
diffuse box (1) Use nll!rpoladon r Fog a>lor c::=::J
Affi!ct shadows r Fog nU1**r f1,0" .:.J
Affrctchomelsjahonly Fogblas (D,O" _;j

I
I! -~~,--~
llis:perslon r Ab rso.o .;j

Note: The settings in Figu re 6-20 can also be seen in the file Chap06-02 - Simulating-
materials - FINAL.max, in P&R-VRay \Chapter 06 \Exercises.
CHAPTER 6 - SIMULATING MATERIALS

Table: Varnished Wood I Polished Marble


-
Figure 6-21 Figure 6-22
A preview of a A preview of a
varnished wood polished marble
material with the material with the
following options following options
applied to it applied to it

MATERIAL ANALYSIS TABLE


Questions Analysis Implementation
Color Wood/Marble 1 Texture
Reflection Medium 2 Medium grey
Mode of reflection Fresnel 3 Fresnel option
Surface quality (reflection) Glossy 4 Glossiness 1.0 (default value)
Refraction - 5 -
Surface quality (refraction) - 6 -
Colored refraction - 7 -
These materials, Figure 6-21 and Figure 6-22, are not very different from the previous red
plastic. There's just a little less reflection and a texture in the Diffuse channel, Figure 6-23.

Basic parameters

Figure 6-23
lliffuse Parr of the Material
[ lliffusec = : J ~ ~ ro.o ~u] Editor palerte
numericallr showing
Reflection

2 ~fleet- _J 3
[ " go ~es.s rr.o- _;] fl Fttsnel refkodfons ~ L
the options set co
obtain the materials
4 ~. glosftss ['i;O"" _;j _j Fre. !OR W- _;j _j above. The "1\1" at
SIMvs
Use r.~tion
rs- ~
crn dls!ZlnCC ~ ~ r
r
Max dc!>th

"
E>cit ai1or -r:-=--
"'
rs- .:J
:
point 1 indicates that
a texture has been
mscrted under Diffuse.

-r
The color will no
longer be taken imo
~&act - _j IOR;6" _;j _,
~ _J ;o- .:J Max depth rs- .:J consideration. At point
2 a medium reflection
s..w.... rs- .:J El<..
Use i>~ticn r Fog ai1or c = : J has been set, using
~ shedows r Foo ~liPki" ;o- ,;J medium grey - RGB
Affect dlamels ICdor only Fog bias ro.o ; 129,129,129
llisptnicn r .e ~ :J

Note: The settings in Figure 6-23 can also be seen in the fi le Chap06-02 - Simulating-
materials - FINAL.max in P&R-VRay \Chapter 06 \Exercises.
PHOTOGRAPHY & RENOERlNG with V- RAY

A Trick for Obtaining Good Chromed Metal


To obtain good reflections, memorize the following procedure. You should carry it out
automatically every time you set up a material in which reflections are everything - like
chromed metal, for example.

Considering that chrome doesn't have any color of its own, but takes it from the environment,
and that the reflection can't be 100% perfect, we will adopt this pair of settings:
Diffuse must be set to Black and Reflection to 'Almost White'.
These two settings are strictly connected and must be applied together. You can see a
preview of the effects in Figure 6-25.

Improving your Chromed Metal


Chromed surfaces appear more beautiful and captivating, the more"contrasted" they seem.
In fact, it is no coincidence that even in photography, the contrast of metals is increased
during post-production. Our instincts would therefore lead us to set the highest reflection
possible, entering pure white into the Reflect box, Figure 6-27(2). However, the perfect
reflection doesn't actually exist, and at the moment of reflection, a small amount of light is
dispersed in any case. That's why, instead of white, we will always use a color that from now
on we'll call "almost white" (RGB 220, 220, 220).
With "almost white'~ we can also create a distinction between an object and what is reflected
in it. Without this distinction, the two things would appear to be one single object. In some
cases, this creates a confusing effect between the shapes. In Figure 6-24 (A) you can see that
the outlines of the sphere are not clearly discernible.
When we set the reflection to "almost white'; however, there is a side effect: we can see a bit
of the default grey in diffuse, and this tends to cloud the reflection, Figure 6-24 (8 ).
We can avoid all this by setting Diffuse to black, thus obta ining a "contrast'' with the
background. Now the outline of the sphere can clearly be seen, giving us the best possible
contrast, Figure 6-24 (C). You just need to remember this simple rule: Diffuse: black and
Reflection: almost white.

A B c Figure 6-24
Rendering of thtee metallic spheres:
wich the reflection set ro the maxi mum, the
outlines get lost (A)
with the reflection almost set ro the maximulll,
we can see the grey diffuse setting (B)
with the reflection almost set to the maximulll,
and diffuse set to black, we get defined outlines
and maximum contrast (C)

Considerations: When we simulate glossy or brushed metal and there are vast areas of
black in the final render, it means that the object is surrounded by emptiness: this is the
space vacuum of 3ds Max. Sometimes this can create a good effect, other times no. We
generally always try to ensure that this doesn't occur by closing the scene.

Note: Mirrors should be simulated like normal chromed metal. They are actually made
from a glossy and very reflective layer of silver.
CHAPTER 6 - SIMULATING MATERIALS

Table: Chromed and Brushed Metal

Figure 6-25 Figure 6-26


A preview of a A preview of a
chromed metal brushed metal
material with the material with the
following options following options
applied to it applied to it

MATERIAL ANALYSIS TABLE


Questions Analysis Implementation
Color No color 1 Black
Reflection High 2 Almost white
Mode of reflection Metallic 31No Fresnel option
Surface quality (reflection) Glossy I slightly rough 4 Glossiness 1.0 I 0.9
Refraction - 5 -
Surface quality (refraction) - 6 -
Colored refraction - 7 -

These materials, Figure 6-25 and Figure 6-26, only differ in their Refl. glossiness options. The
chromed metal has a default value of 1.0, while the brushed metal has a value of 0 .9 .

Figure 6-27
Part of the Material
Editor palette,
numerically showing
the options set to
obtain the materials
above. For metal, we
Refraction
set Diffuse to black
Refi"oct- _j !OR ff,6-' ,;,j _j (1) and Reflection to
Glossinoss rr,o- zJ _J Max depth rs- ~ almost white (2)
9:Jbcivs rs- r~
u.., 1nl8p0ia11on
Exit oo1or -
l'O!l cob" c=:=J
r
Affi!ct sliadows J Fog multlplcr ,;,jrr,o-
Almtdlamels lcc1or oriy .. R>o bios [D.O""' ,;,]
Dispersion r Abbe rso.o- _iJ

Note: The settings in Figure 6-27 can also be seen in the file Chap06-02 - Simulating-
materials- FINAL.max in P&R-VRay \Chapter 06\ Exercises.
PHOTOGRAPHY 8t RENDERING with V- RAY

Table: Opaque Blue Plastic

Figure 6-28
A preview of an
opaque blue plastic
material with the
following options
applied to it

MATERIAL ANALYSIS TABLE


Questions Analysis Implementation
Color Blue 1 Blue
Reflection Medium-high 2 Light grey
Mode of reflection Fresnel 3 Fresnel option
Surface quality (reflection) Opaque 4 Glossiness 0.7
Refraction - 5 -
Surface quality (refraction) - 6 -
Colored refraction - 7 -
Opaque materials seem less reflect ive, but it is actually the reflection that appears more
dispersed. That's why, if we lower the Glossiness, we normally increase the reflection,
precisely to compensate for the loss of intensity.

llasic paramem

Diffuse

affuse - _J Roughness Jo.O ,;J _J


Figure 6-29 Reflection
Part of the Material 2 Reflect c::::::J _J 3
Editor palette, HiliQl>t~ rr.o- ,;J _J[l Fresnelrefledions ~ fl
numerically showing Refl. gtossin= ~ ,;j _j Fresnel !OR irr- ,;j _j
the options set for the ~ctvs rs- ,;.1 Max depth rs- z.i
material above Use lnt:erpoiatian r Eldt cclor -
Dim dsta~ )25Hlc ,;j r Dim fa off ro:o--- ,;j
Refractkln

Refract - _J !OR~ ,;J _J


Glossiness rr.o- zj _J Max depth rs- zj
subdvs rs- ,;.1 Ex>tco1or- r
Use interpolation r fog cclor c:=:J
Affect shadoNS r Fog multil)lier fi;O .=.J
Affect channels leo1ar only fog bias Jo.O .=.J
llsperslon r ~ rso.o _;.)

Note: The settings in Figure 6-29 can also be seen in the file Chap06-02 - Simulating-
materials- FINAL.max in P&R-VRay \Chapter 06 \Exercises.
CHAPTER 6 - SIMULATING MATERIALS

Table: Natural Wood

Figure 6-30 Figure 6-31


A p review of A preview o f
naturnl wood narur:il wood
material 1 with the mate rial 2 with
following options the follo\l~ng
ap plied ro ic options applied
to it

MATERIAL ANALYSIS TABLE


Questions Analysis Implementation
Color Wood 1 Wood texture
Reflection Medium 2 Grey
Mode of reflection Fresnel 3 Fresnel option
Surfrace quality (reflection) Opaque/very opaque 4 Glossiness 0.75 I 0.6
Refraction - 5 -
Surface quality (refraction) - 6 -
Colored refraction - 7 -

Again, the two materials, Figure 6-30 and Figure 6-31 , only differ in their Ref/. glossiness
options, with 0.75 in the first case and 0.6 in the second. For values lower than 0 .5, the effect
of the light on the surface becomes insignificant.

Basic parameters

',JV 1r2"/ V-Ray PowerShader

Dffuse 1
[
Diffuse- !!.I ~ io.o- _;J _JI
Rl!tloction Figure 6-32
2 Rrlltc=::J _J 3 Part of the l\larerial
....._ :o- ~ _J fl Fr.....i rel'lecbons P IL Editor palette,
R.tft. ~ (0,JS .:J _j I" I r- ;,_j numerically showing
Slbdivs p- _;_] Max depth rs- _;_] the optio ns set to
Use 1nb!fpalation r ec11 cdor - obtain the material
Dlmdls111na 1~n.0<: il r Dim t 0 ro:o- .ii above

-r
Rl!fracti<on; ;; -=== ===----====..:::
Refi".act - _j !OR ;6"" .:J _j
~ ;a- .:J _J Max depth rs- _;j
Slb<lvs ~ .:J
~hte'pclotion r foll ..... c=J
AffMt~ r Fog nU1*i ri:o-
_;j
AIMt ch.-nds leo1ar <riy Fog bill io,o- ,;

~ r r--:

Note: The settings in Figure 6-32 can also be seen in the file Chap06-02 - Simulating-
materials - FINAL.max in P&R-VRay \Chapter 06 \Exercises.
PHOTOGRAPHY & RENDERING with VRAY

Suggestions for Good Glass


For glass, we use a very similar approach to the one used for the reflections of the chromed
metal. Glass has no color and can't be perfectly refracting, so we will set t he following pair
of options:
Diffuse must be set to Black and Refraction to 'Almost White'.
Thanks to the "almost white" color, we can avoid confusion among the forms, as illustrated
in Figure 6-33. No matter how sheer a pane of glass is, some light is always lost. That's why
we also apply the "almost white" value in this case, Figure 6-34. To avoid clouding t he glass,
Figure 6-34, set Diffuse t o black to get as much contrast as possible. Also with glass, strong
contrast looks better, Figure 6-35.

Figwe 6-33 Figure 6-l4


With me Refraction
With the
set to its maximum
Refraction set to
(white), the glass can't 'almost white',
be distinguished from the glass appears
the background
cloudy as a result
of the defrult
grey setting for
Diffuse

Figure 6-35 Figure 6-56


\V1th diffuse /\ render \ith
set to black and the Affect
refraction co Shadow option.
'almost white', This optio1
the best result is should always
obtained be activated for
glass

The same rule applies again in this case - Diffuse: Black and Refraction: 'Almost white'.
Another option must be added for glass in particular: Affect Shadows, Figure 6-39.
This opt ions allows direct light to pass through the material.
It's a good idea to pay attention to this check box, especially if the glass in question is a
window. If you forget to check it, direct light can't pass through it and you'll basically find
yourself with a sun t hat doesn't pass t hrough the windows and doesn't illuminate the
interior. These situations can cause us to waste hour upon hour in the rendering phase,
before figuring out what the problem is.
CHAPTER 6 - SIMULATING MATERIALS

Table: Glass I Frosted Glass

Figure 6-37 Figure 6-38


A preview of a A preview of
glass macerial with a frosced glass
a glossiness value material with a
of 1.0, assigned co glossiness value
a box created in of 0.8
front of the object

MATERIAL ANALYSIS TABLE


Questions Analysis Implementation
Color No color 1 Black
Reflection Medium 2 Medium grey
Mode of reflection Fresnel 3 Fresnel option
Surface quality (reflection) - 4 -
Refraction High 5 Almost white
Surface quality (refraction) Glossy I a little rough 6 Glossiness 1.0 I 0.8
Colored refraction - 7 -
The mater ials in Figure 6-37 and Figure 6-38 only differ in terms of their Glossiness options,
Figure 6-39, which only relate to refraction.

[ ffuse OOfuse - _J ~~ ;LJ]


Reftection Figure 6-39
2 Rcllod- _j 3 Pan of the Material
n .,.,,.. rro- ~J_Jfl Fresnel relledlons P' rl Editor pnlette,
Rell. glosst>ess n:o .:J _J ., r.;-- .:.! numerically showing
~~;.. MAxdopth~ :
the options set to
Usen~Uon r f>ltcdor -
tft<i5tarn ~ .:J r ~ : obtain the marerials

-r
above. When we speak
r Rehc:tlon
about the glossiness
5 Rcfracti==:J _, ICR Ji;6 : JII of gbss, we are always
6 ~ ro;s- ;_, _. Maxdo$>1h ~ : referring co glossiness
9.blw~_;,
~~11on r
"'
Fooo:bi==:J
in the Refraction
section (6)
I Affect lf>adows ~ I Fog lllAti*r n:o .:J
Affi!Ctml"'or1y
Oisporsion r
Fogbios(o,o ~
. ~ J!_J
lj

Note: The settings in Figure 6-39 can also be seen in the file Chap06-02 - Simulating-
materials - FINAL.max in P&R-VRay \ Chapter 06 \Exercises. Apply the material to a box
created in front of the object, Figure 6-37.
PHOTOGRAPHY & RENDERING with V- RAY

Table: Colored Glass


Figure 6-40
A preview of
a glass material
applied tO a small
box created in
front of the
object. T he color
is more intense on
the sides than at
the from.

MATERIAL ANALYSIS TABLE


Questions Analysis Implementation
Color No color 1 Black
Reflection Medium 2 Med ium grey
Mode of reflection Fresnel 3 Fresnel option
Surface quality (reflection) - 4 -

Refraction High 5 Almost white


Su rface qualit y (refract ion) - 6 -
Colored refraction Green ish 7 Green RGB (200, 255, 190)

You can create colored glass by setting t he Fog Color, Figure 6-41 , and keeping Diffuse black
The intensity of the Fog color changes depending on the thickness of the object, just like
w it h rea l glass, Figure 6-41.

Figure 6-41
Part of the Material
Editor palette, 2 Reflect- _j 3
numerically showing ;;, .gn:~ ~ .:.J J [L Fresnel reftectiOnS P' [L
Refl. glossiness~ .:.J _J F"t:mel !OR ~ .:.J _J
the options set to
obtain the material
Sulxivs j's-- .:.J Max depth rs-- _;j
Use Interpolation r Eleit color -
above. At point 7, the
Fog color is set to
Dim cistMaq 254,()c .:.J r D'm fohff ro.o- .:.J

-r
Refi'ac1kln
200,255, 190
5 Refi'act c::==J _J !OR fi;6' .:.J _j
GlosSiness:o- ~J_I Max de9th rs-- .:.J
SUbdvs j's-- .:.J exitoolor
use Interpolation r 7 Fog oolor c::==J
Affect$hado-NS P Fog multiplier rr,o- .:.J
A-ffect channels ...
,Coi_or_only
_ _ Fog bias ro:o- .;J
Dispersion r Abbe f50,0 .:.J

Note: The settings in Figure 6-41 can also be seen in t he file Chap06-02 - Simulating-
materials - FINAL.max in P&R-VRay \Chapter 06 \Exercises.
CHAPTER 6 - SIMULATING MATERIALS

Table: Gold
-
Figure 6-42
A preview of a
gold marerial wich
the following
options applied
ro ir

MATERIAL ANALYSIS TABLE


Questions Analysis Implementation
Color No color 1 Black
Reflection High 2 Yellow-orange
Mode of reflection Met allic 3 No Fresnel option
Surface quality (reflection) Slightly brushed 4 Glossiness 0.9
Refraction . 5 -
Surface quality (refraction) - 6 -
Colored refraction - 7 -

Gold is a metal whose reflection is strongly dominated by a yellow-orange color. To obtain


th is effect, simply insert this color into the Reflect box, Figure 6-43. In all the examples until
now, this box has only contained shades of grey.

::J
y .owerS.hade~
I

Figure6-43
Pare of the Macerial
Ediror palerce,
numerically showing
the options sec co
obtain the material
above. At point 2, the
reAecrion has been sec
to the color RGB
255, 120,0

Note: The settings in Fig ure 6-43 can also be seen in t he file Chap06-02 - Simulating-
materials - FINAL.max in P&R-VRay \Chapter 06 \Exercises.
- PHOTOGRAPHY & RENDERING with V-RAY

Optimizing Material Rendering Time


By consulting and setting parameters in the material tables, you have learnt to analyze and
apply the behavior of real surfaces to VRayMtl. Now we will look at the "definition" aspect,
and learn how to control the time and accuracy of our results, beginning with the Glossiness
of surfaces.
Every surface has its own degree of coarseness - a grain that is more or less discernible
to the touch. With a single Glossiness value, it's possible to have a more or less accentuated
grain. This is nothing more than the size of the imperfections on the surfaces, Figure 6-44
and Fig ure 6-45.

Figure 6 -44 An image of a frosted glass pane Figure 6-45 An image of brushed metal with
with fine and coarse grain fine and coarse grain

We can create different types of grain using the Subdivs parameter. In this case the Subdivs
option just below Ref/. glossiness in the Reflection section, Figure 6-46, adjusts the grain of
the reflections, while the Subdivs in the Refractions section, Figure 6-46, adjusts the grain
of the refractions. Mathematically speaking, the number entered in the Subdivs establishes
how accurate the glossiness calculation should be.
Basie parameters

F ig u re 6-46
Part of a panel of
the Material E ditor
palette, showing the
Subdivs options for
[Dlffust!
Reflectioo
Diffuse - .J ROUQMess ro.o ,;.] _j I
adjusting the grain
for reflections and
Reflect C:J _j
refraction s. The value
Hi1ight ~losmess ;r- ,;j _j fl Fr~ r eflections r fl
Rtft. ~ ~ : Fresnel IOR ru- _;,] .J
of 8 for Subdivs is
an average value.
S<Mvs 8 Max dopth rs---- ,;J
use nborpoilion Exit color -
By inc.reasing the I
Dim dislllnce 1co,O ,;J r Dwn fat off fQ.O""' ,;J
value, the g rain
becomes fine and by
decreasing the value, !OR ;r- ,;j _]
rhe g rain becomes Max dopth rs---- .;J
Elcitco1o< - r
coarse. T he rendering
Use intl!q>olation Fog color C:J
time is directly Affect shadows I Fog mul~ier ~ _;j
proportional to the Affi:ct channels jColor orly Fog bias fD.O .iJ
Subdivs value
llspersloo r Abbe rso:o .ii

Note: You can verify these con.c epts by opening the files Chap06-03-Grain-Reflections.
max and Chap0604GrainRefractions.max, located in the folder P&R-VRay \ Chapter
06 \Exercises. Change the Subdivs values to observe the differences in terms of rendering
time and results.

~84"
CHAPTER 6 - SI MULATING MATERIALS

If you notice that some surfaces need more definition, raise the values from 8 to about 40-
50, keeping in mind however, that the processing will be inevitably longer. For this reason,
my advice is to change them only if the materials still appear grainy after completing the
final settings in Step-4 (see page 172).

Considerations: During tests, especially if I'm using frosted glass, I lower the Subdivs of
the refractions, sometimes even to 3. The Glossiness of the refractions in particular, has a
big impact on the rendering time and can cause a considerable increase in processing.
This is less noticeable for the glossiness of reflections.

The 'Use Light Cache for Glossy Rays' Option


For quick renders, there are a couple of shortcuts that allow you to reduce the rendering
time of the Glossiness. Just activate the Use Light Cache for Glossy Rays option, Figure 6-47,
which, as Its name suggests, uses the Light cache calculation to speed up the processing
of all the glossiness. This can obviously lead to imperfections but in most cases they are
indiscernible. In exchange, you will further reduce the rendering time by about 20% of the
overall time. This is especially useful in the testing phase.

la! Render Setup: VR.y NfR 2l0.ot


Figure 6-47
v~~~ Pnn of chc Render
~0oniir-111rs --- Serup dialogue box
Sl.tict.s: nooo- .:. Starechdli# P
with the Indirect
5"""""-=ro;or- _; 9-a1c.~r
u._..pe.. r illununation tllb
~1Sa- selected and me
IUlberof_., ~ ~
Adlpltw~ r
r Use light cache for
glossy rays option
Flier: jNt:1re1t highlighted
lnterJ>.~= ~=J

The 'Use Interpolation' Option


For each individual material, there is also a second short cut regarding interpolation. This can
be used both for the Glossiness ofthe reflections, as well as for the Glossiness ofthe refractions,
Figure 6-48. When we want the result to be sharp, it's advisable not to use interpolations.
Under some circumstances however, it can be useful to speed up the glossiness calculation
by rounding it using interpolation.

Refteclan
Rellect - .....J
" r-- _; _Jil
Reft. gloainoss ;o- : _,
~~ : Figure 6-48
Part of a p-.tnel of the Material
Ediror palene showing the Use
Reftact - _j !OR ~ _; _J
mrerpolat:ion options
~ ;o- .;) _J Max depti is- :
~ rr=; 1 k- r
u. nterpolatian P I Fog co1o1c=i
AffKl shadows r FoD ..-.iier rr.o- :J
A~ chamets jCclor oriy Fog bias io;o- ;J
Olspenlon r r-- .
PHOTOGRAPHY & RENDERING with V-RAY

Once Use interpolation has been activated, we can change the parameters in the two
rollout menus below: Reflect interpolation and Refract interpolation, Figure 6-49.

Figure 6-49
The parameters of the Reffect
interpolation and Refract
interpolation rollour menus
in !he Material Edicor. These
become active when we sdect
the Use interpolation option.

The numbers - 1 I -1 next to the words Min rate I Max rate work in t he same way as the Min
rate I Max rate of the lrradiance map. The higher the Max Rate number is, the more accurate
the estimation w ill be, depending on the number of Subdivs.

Considerations: When I want an approximate result, which is however acceptable


and without art ifacts, I increase t he max from -1 to 0 and increase the Subdivs of the
Glossiness to anything up to 30. This solves the problem of artifacts, which are a typical
result of interpolation.

When you have vast surfaces with low Glossiness (0.7-0.6), which don't need to have sharp
details, it's a good opportunity to use interpolation. The image in Figure 6-50 was rendered
without interpolation, while Figure 6-51 was rendered with it.

Figure 6-50 A render of an e.xterior using the 6nal Figure 6-51 A rendtr of an exterior using the 6nal
parameters {Step-4), showing a black ?aved surface parameters (Step-4), showing a black paved surface
with a glossiness value of 0.7 I subdivs 8. Total time: with a glossiness 'l"'lllue of 0.7 I subdivs 30 and "Use
21 min - Region time: 4 min. The red box indicates imerpolations" activated. Total time: 19 nl.in - Region
the render region rim e: 2 min

The total time seems to vary just a little but, if we limit the Render region to the black surface,
Figure 6-50 and Figure 6-51, you can see that the processing time related to that region
has been reduced by 50%. The interpolation actually produces less accurate results, so it is
most commonly used for vast surfaces with a low subdivision value. These are situations in
which we can be satisfied wit h an acceptable outcome in exchange for increased speed. For
surfaces in which high definition and precise calculation is required, it's always better to use
t he direct calculation of g l ossin~ss (without"interpolation").

Note: You can verify t his concept by opening the file Chap06-05 - interpolation.max,
located in the folder P&R-VRay \Chapter 06 \ Exercises.
CHAPTER 6 - SIMULATING MATERIALS

The Max Depth Option


When two mirrors are positioned in front of each other, an infinite series of reflections are
generated. The same thing happens if we have multiple overlapping glass panes: the glass
in front will reveal all the panes of glass behind it.
The Max Depth option, located both in the Reflection box as well as in the Refraction one,
determines the maximum number of interactions possible, after which the calculation will
stop. The default value is Sand usually works well in most cases.

A Word about Glass and Reflective Objects


Here's one more piece of advice regarding the simulation of reflective and refractive objects,
such as glass, metal, plastic and materials that are enriched by reflections of the scene
surrounding them. We must point out that the output of these surfaces is enhanced by light
and by the objects that reflect off them in the scene.
We can infer from this that if a material isn't "working': it's worth checking its settings, but
above all you should also check the context in which it has been placed. Ask yourself the
following questions:
Are there actually any objects to reflect?
Are there actually any objects to show behind the refraction?
Is there a light source generating highlights?
Photographing glass and metal is one of the most difficult things to do, even in real life.
These bright and shiny surfaces always create a good effect in an image, but even in real life,
photographers have to pay a lot of attention to the angles of incidence of reflections and to
overlaps in refractions.
We need to pay just as much attention. We can't expect to put an object into a scene, apply
a couple of parameters and hope we automatically get a good result.
Always keep in mind that photographing glass means finding the right method, lighting
and context with which to"represenf' it in the best way possible.

Considerations: I often ask myself: Why build a material by hand when there are whole
libraries full of materials ready for use and there are even websites that allow you to
download some ofthem for free? The answer is control.
You can definitely purchase some excellent ready-to-use materia,l libraries or download
materials free from www.vraymaterials.de, but one thing should never be lacking: your
ability to check, control and adapt each and every material.
PHOTOGRAPHY &. RENDERING with V-RAY

Color Bleeding
When we complete a render of a room with white walls and a red floor, the walls become
"contaminated" by the color of the floor, Figure 6-52. Actually, the same thi ng happens when
taking a real-life photo.
In computer graphics we define this phenomenon as Color bleeding, but the result
it produces isn't a fault in the rendering engine. Even in a real space, if there is a strong
dominant color, it's only natural that this will condition the whole image, Figure 6-52.

Figure 6-52 Figure 6-53


A rendered image The image
with a Color rendered after
bleeding effect balancing the
dominant color

There are a variety of tricks in V-Ray for altering the behavior of materials and (partially)
solving the problem. In th is book, however, we are tackling the various subjects by referring
exclusively to the world of photography, so we will treat the issue as a natural problem of
dominant colors.
From this point of view, you simply need to adjust the white ba lance of the V-Ray Physical
Camera. Set the white balance to custom and in the box, select the color to be balanced - in
this case, the washed out red color on the walls (RGB = 70, 110, 130). Without balancing,
we would get the image in Figure 6-52, but by changing the white balance we obtain a
decisively more balanced image, Figure 6-53.

GUess vert. I Guess horlz. J Guess vert, J ~s hollzj

Fignrc 6-54
specify fooJs........ r Sl>Cdfv foo.os........ r
focus distance....... I>o va : J Figure 6-55
focus dstance....... 1so...0<r ~
Part of the control Part of the control
elCJ)OSUt~............. P' cxpmu'e............. P'
panel of the panel of the
VRayPhp;ical Camera.
'1!Jlet11ng ........ r;r rr.o- .:J ..;oiel1i'lg........ (V rr.o- ~
VRayPhysical Camera.
..tile balance !Ntuo-al .tile balance O.Sb:m
Setting white (neutral) The RGB color (170,
OJSb:m balance .....
means that no color 110, 130) set in the
teJrt>eralUre. ........ '~
will be balanced. The custom balance box
red will bleed over !hrtt!!r speed (s"-1 lso,o .:J is subtracted from the
the whole image, as in
<1Ute1 ~ (de\l). r::;r.- : J image, making it more
Figure 6-52
$h<i:ter dfset (deo) io.o- :J
lateocy (s)......... rn;u- .:J balanced, Figure 6-53
fllmspeed (ISO) ..... poo,o :j

Considerations: It should be stressed that these kinds of striking defects arise from an
unreal situation: a completely white room with a large red floor, Figure 6-52. If the room
were full of various objects, the color would be diffused. It would blend in, everything
would be balanced and the problem would be solved naturally.

Note: You can verify this concept by open ing the file Chap06-06 - Color-bleeding-
balanced.max, located in t he folder P&R-VRay \Chapter 06 \Exercises.
CHAPTER 6 - SIMULATING MATERIALS

How to Create a Materials Library


Now that you've learnt how to create and manage materials, you can save them into your
library, without having to re-create them each time. Let's look at how to save the materials
we've created and find them again.
After adjusting the various options of a VRayMtl, click on the Put To Library icon, Figure 6-56
(B). This will open the Put to library dialogue box, in which you will assign a name to the
material, for example Natural wood 1.

tia1 Mattrial Editor naturale 1


Utilities

c] O.
~D.
111
Figure 6-56
~
Material Editor palette
~
with the Get Material (A)
~ and Put to library (B)
~ B ~ icons highlighted
(:!I~ I ~" I X I ~ I 1;.~ ~I @.I Bri Ib ~ ~
~ I1egno ...11n1e 1 \1Ra)111d I

I
!)jfMc ~~~~~~~~~~~

[ Dffuse- !ii ROlJ!tnoss ro;o .!J _J

Cl ick on the Get Material icon, Figure 6-56 (A), and the Material/Map browser will open,
Figure 6-57. The new material will be visible in a Temporary Library. Click on the little black
triangle, highl ighted in Figure 6-57, to create a new library, then drag the material from
the Temporary Library rollout menu to your new library. Now, every time you click on Put to
Library, you can save your new materials directly to t he library you've created.

ia_MateriaVM1p Browser
.._F<n by Name ...
-- ~1
+ Ml1 libreri1.mat uel
+Materials I Figure 6-57
+Mae I Material/Map Browser palette
showing the material and
t Scene Materials I ! the little black triangle used
+ Sa!!]ElSlots I ro select the New Material
Ternoorarv Ubrarv LIB Library
Legno natural 1 (VRayMtl) I

The whole process for creating a materials library can be seen in:

P&RVRAv \ CHAPTER 06 \ V 10Eo \ VmE006 1.MP4 ~


PHOTOGRAPHY & RENDERING wlth VRAY

Creating Materials for a Scene


After analyzing the characteristics of, and ways to create a material, it's now time to put most
of the concepts illustrated into practice.
In the following exercise, you will create an interior render, Figure 6-58, starting with a file,
containing all the 30 models, the lighting, the camera and the render settings. Your job will
be exclusively concerned with the Material Editor and the final Rendering.

Figure 6-58
The final image
to obtain after
assigning the
materials and
launching the
v render

Exercise: How to Create Materials and Launch a Render


1. Start 3ds Max and V-Ray and open the file Chap06-07 - LivingRoom - START.max
located in the folder P&R VRay \ Chapter 06 \Exercises \ LivingRoom.
2. Click render to obtain a finished render like the one in Fig ure 6-59, in just a few minutes.
For the sake of simplicity, only the books have materials assigned to them. There are
imported blocks. A generic material has been assigned to the remaining objects.

Figure 6-59
A.n image
obtained
from the file
LivingRoom
-START.max
by launching a
render of the
scene containing
materials applied
only to the books

3. Create all the materials, or more precisely: the parquet, chair, light fixture, bottle of wine
and glasses, paintings, clock and decorated wall, using the information in the following
tables as a reference. The textures used to create the materials can be found in the
folder P&R VRay \ Chapter 06 \ Exercises \Living Room.
CHAPTER 6 - SIMULATING MATERIALS

PARQUET ANALYSIS TABLE

Questions Analysis Implementation


Color Wood wood-flooring-005.jpg
Reflection Medium Grey
Mode of reflection Fresnel Fresnel option
Surface quality (reflections) Opaque/ very opaque Glossiness 0.75 I 0.6

LIGHT FIXTURE ANALYSIS TABLE

Questions Analysis Implementation


Color Marble marble_arco.jpg
Reflection Medium Grey
Mode of reflection Fresnel Fresnel option
Surface quality (reflections) Glossy Glossiness 1.0 (defau lt)

PAINTINGS ANALYSIS TABLE


Questions Analysis Implementation
Color Paintings keith (1-2-3).jpg
Reflection Medium Grey
Mode of reflection Fresnel Fresnel option
Surface quality (reflections) Glossy Glossiness 1.0 (default)

CHAIR ANALYSIS TABLE


Questions Analysis Implementation
Color Black Black
Reflection Medium Grey
Mode of reflection Fresnel Fresnel option
Surface quality (reflections) Opaque Glossiness 0.70/ 0.75

Note: Given the d istance of the camera, the "black leather" material of the chair can be
simply simulated as a black, reflective and opaque surface (as though it were plastic). The
folds of t he 30 model wi ll contribute greatly to creating the illusion that the material is
leather.

The other objects in the scene, like the bottle, glasses, spheres and ornaments can be
assigned materials to your liking.
PHOTOGRAPHY & RENDERING with V-RAY

There are two more materials worth noting, more precisely, those referring to t he "Light
sphere" and the "Decorated wall" object.
4. To create the materia I for the "light sphere''. use a V-Ray Light Material, Figure 6-60. This
is a self-illuminating material.

~ ~ ~111 X ~ I ~ ~ . I i(J tl Q
/ Sfera........,... ~ ~tMd

Figure 6-60
Part of the Material Editot
palette showing the material
slide, the type of material
and the self-muminating
intensity of the "light
sphcrc"matecial r Enit ldlt en bad: *"'
r ~~(lllWa @lpOSn
r ""1ll>IYcc1ar by oi>adtv
!JsPace: ri:o- .:..
DSM-don

5:~:~;.J

5. To create the mat erial to be applied to the "decorated wall" object, use the basic 3ds
max material Blend. This creates surfaces with two materials, and also uses a map to
generate decorations. For Material 7, Figure 6-61 , apply the color beige to the VrayMtl,
and apply brushed metal for Material 2. These are combined using the texture in Figure
6-62, which you load into the Mask option, Figure 6-61 . The white part is rendered using
Material 1 and the black part using Material 2.

l.t
~
ta
I" ~ I ~e I X 1~ I ~~ I~ I .Im I t?t Q
/ IVo de<:aato elerld
Figure 6-61
Part of the Material Editor
Mo!<rill "llll<rill#l.334 (~yHllJ ~ en~
palette with the type of
material, the cwo internal Mamial 'llterlal 133S (Wla!M~) r rn~

materials and the mask Map # J05 (rnn2.~ I " ' (' nte-aclNe
highlighted ,..,.-..,t: u,u ~

r u..,a.-v.
Ti'ansttlon zone:
l.Qler: ~ .;J
lower: ~.:]

Figure 6-62
The image file mask2.jpg, used
to "separate" the C\VO materials
and loaded to the Mask channd
of the Blend material
CHAPTER 6 - SIMULATING MATERIALS

6. After creating the materials, assign them to the objects in the scene. Before launching
the final render, it's advisable to use the Render region and the test settings, or V-Ray RT
(see paragraph What is V-Ray RT? on page 6), using the "Draw region" option.
7. Finally, change the lrradiance Map to High, the Light Cache to 11500 and set the anti-
aliasing to Adaptive DMC min=1/max=40 to obtain the final render, Figure 6-63.

Figure 6-63
The final
image obtained
after creating
and assigning
materials and
launching the
render

Note: Once both the lighting and the framing "work" (as is evident in Figure 6-63), the
processes of adding materials and launching the final render are slightly longer, but also
much more coherent.

Note: The render file in Figure 6-63 is Chap 06-08 -LivingRoom - FINAL.max, located in
the folder P&R-VRay \Chapter 06 \Exercises\ LivingRoom.
E1nosu1e

Exposure is one ofthe most important themes in


1 :2 photography. Understanding how it works and
what it involves is fundamental ifyou want to have
complete control over your image.
This chapter is dedicated to in-depth theoretical
analysis. The difference between the eye and the
camera, the limitations ofcameras, and the three
kinds ofexposure that derive from them (correct,
underexposed and overexposed) are extremely
important aspects in developing an understanding
of Color Mapping and its implications.

-- The predominant purpose ofthis chapter is


to analyze the various aspects ofthe field of
photography and consequently apply them, using
the V-Ray software.


-
The Reality Button
PHOTOGRAPHY & RENDERING with V-RAY

Everyone dreams of having a rendering software so advanced that it includes a reality


button - a button that is able to produce a spectacular and realistic photographic image
with just one click.
Unfortunately, such a reality button doesn't exist and it couldn't ever exist for one simple
reason: our perception of rea lity is a complex combination of many factors t hat we use our
experience to put together. Software couldn't do this for us. Consider that, in the end, it's
possible to take ugly photos, even with a normal camera.
What we expect from a high impact photographic render is something more than just
an image that looks real. A communicative and engaging result is produced through a
combination of elements, ranging from the choice of framing, the composition and the
organization of the scene, to the right lighting and harmonious colors. All these elements
must build on an accurately modelled 3D object, correctly mapped with high resolution
textures.
If you are working on a render and want to create a strong impact, you must be able to make
choices that draw all these aspects together. From this point of view, no rea lity button cou ld
compare.

Research, Visualization and Rendering


As it must be clear by now, the secret to a successful image isn't a "reality button': or a
combination of V-Ray parameters, but above all, it's our ability to imagine and pull together
a vision.
Vision: This is something imaginary but at the same time already organized and clear in our
minds. It is just waiting to become an image.
The problem is that very often, we start working without having a vision to actualize.
Just like in any kind of project, if the goal we wish to reach is not clear, the journey will
always be confused, the working time longer and the result left up to chance.
Every process is made up of a few main steps:
1. Research (for images relating to the work you need to produce);
2. Creation (of a clear vision in your mind);
3. Production (materialization of the vision through the parameters).
Research is the on ly thing you need to do to help your imagination. Continuously stimulate
your mind by reading magazines, books, taking photos and filing anything that impresses
you.
Creating the result you want to obtain in your mind, in a clear way, is the most difficult part
of the whole process.
Produce photorealistic images through the correct use of the parameters of the software,
- V-Ray, in our case. Put into effect everything you previously researched and created in
your mind.
CHAPTER 7 EXPOSURE

The Eye vs. the Camera


Is the human eye better than a camera? To answer this question, think about the effect of
overexposure you can see in the photo in Figure 7-1 . A comp letely white area is evident,
showing a considerable loss of detail. In real life an observer would never detect this
overexposure, just as he/ she would never see a person as being completely black w ith the
sunset behind them, Figure 7-2.

Figure 7-1 A photographic image showing Figure 7-2 A photographic image showing a classic
overexposure. It's impossible to detect ani details on silhouette effect against the Light
the white wall

The reason is simple: overexposure and underexposure are consequences of the limitations
of photographic sensors. These sensors are unable to capture the whole range of light that
we find in nat ure, so each time we take a photo, we have t o choose which part of the light
we will capture and which part we w ill renounce. Our eyes, on the other hand, have "very
fine sensors" (cone cells and rod cells) and a "super-full-mega-HD display" (the cerebellum).
They have no problem whatsoever capturing or visualizing anything t hat is visible.
In technical photographic terms, the human eye can capture differences in brightness equal
to 2,000:1, the equivalent of about 11 stops. A camera can only capture differences to the
value of 8:1, that is, 3 stops. Whether you are familiar with these terms or not, it's clear that
there's a big difference between the human eye and a camera.
When we photograph, or produce renders, we are trying to represent t he world, mediated
by this. limitation. That's why there are a set of tricks that make life easier.
Professional ph otographers know these things well. They also know how to solve the
problems and obtain excellent shots by putting themselves in the right conditions, in which
t he range of light is no greater than what can be captured. This means shooting at dawn or
sunset, (when the light isn't too intense), avoiding taking photos against the light (unless it's
intentional), taking photos when it's cloudy, and so on.

Considerations: People working on renders often tend to dig t heir heels in, insisting on
using every parameter possible to try to solve exposure p roblems. The same problems
are encountered in real life and remain insurmountable if we don't use photographic
tricks. In this case too, many problems and t heir relative solutions are external to V-Ray.
The V-Ray software is merely an application, and knowing t he true causes of problems
is the most logical way to grasp solutions and best take advantage of it.
PHOTOGRAPHY & RENDERING with V-RAY

The Three Types of Exposure


As the first American advertisers declared: "A picture is worth a thousand words': We will
illustrate three types of exposure using the following photographs.

Figure 7-3
An image with the
correct exposure. The
Light range is easily
contained as the cloudy
sky helps co weaken ani
excessively strong light

Figure 7-4
An underexposed image.
The light range is too
broad. The photographer
has chosen to capture the
highlights of the sunset
and renounced the low
ones, so the shadows
are completely black.
Th.is can be a desired
result, and is called the
'silhouette' effect

Figure 7-5
An overexposed image.
The light range is too
broad. Not all the
highlights have been
captured in the image,
causing the so-called
burnt effect to appear in
some areas

While in Figure 7-4, the loss of shadows is a sought-after style that generates the Silhouette
effect, in Figure 7-5 the overexposure is an objective mistake, as it produces whole areas of
white and results in the loss of important details.
Having overexposed areas can sometimes be nice, as long as they are small, and as long as
they don't result in the loss of important details. For reasons thus far unexplained by science,
the eye receives much greater pleasure from light areas than dark ones. That's why losing
details in the shadows isn't as traumatic as losing them in the illuminated areas. That's also
why, if we have to give up a part of the liglht, it's better to cut out the low lights and keep
the highlights.
CHAPTER 1 - EXPOSURE

Technical Aspects of Exposure


In the next few paragraphs we will closely examine the exposure problems that any
photographer may encounter when using a camera. This is fundamental knowledge for
learning a set of aspects that are practically identical in rendering.

Tone Compression or Color Mapping


The three kinds of exposure explained in the previous paragraph can be represented using
the following symbols, Figure 7-6, in which the straight lines indicate the light ranges in the
scenes and the squares represent the capability of the sensors.

Figure 7-6
The straight line contained inside the square
ind icates correct exposure (A), the line sticking out
at the bottom indicates that the low lights have not
been captured (underexposure) (B), while the line
sticking out at the top indicates that the highlights
hav-e been lost (overexposure) (C)

The real truth is that the camera is not the only thing setting us a limitation. If it were even
possible to capture a broader light range (and it is possible thanks to RAW formats), the
problem that immediately follows is that screens wouldn't in any case be able to show it. The
brightness value of pixels ranges from 0 to 255, and can't go above that. So we are dealing
with a true physical limitation.

Considerations: Paper, from this point of view, is even more limited. While a screen can
live off its own light, paper only lives off reflected light. This limitation is what makes
video images more "beautiful" than printed ones.

This doesn't mean that we can't photograph or render images containing a broader light
range than can be visualized. In these cases, the only way to get a correct portrayal without
overexposure, is by compressing the tones so that they fit into our "square':
Needless to say, we don't have to invent anything new, as this technique already exists in
photography. The process is called Tone mapping or Color mapping. There are various
definitions but the idea is the same: compress the tones of an image so that they fit into the
visual space available.
Up until now, we have always represented the tones with a straight line and the visualizable
range with a square, Figure 7-6. So if we have excess tones, we have no choice but to bend
this straight line to make it fit into the square. In other words, we move from a linear
representation to an Exponential one, Figure 7-7.

Figure 7.7
B An example using
this symbolism
of the conversion
from linear (A) to
exponential (B)
PHOTOGRAPHY & RENDERING With V-RAY

In V-Ray, the representation of tones is set to linear mode by default and this is always the
best option w hen we have a limited light range. When this becomes too broad, however,
we can move to the exponential representation of tones, by selecting the V-Ray > Color
mapping >Exponent ial tab, located in the Render Setup dialogue box, Figure 7-8.

~ Render Setup: V-Ray NFR 2.10.()l [)1 @_1~


Common I V-Ray I Indi"ect illumination I Settings J Render Elements I
r. V-Ray" Authorization IJ
r -t V-Ray:: About V-Ray Ii
Figure 7-8 t -t V.({ay:: Frame buffer b
Render Setup: l -t V-Ray:: Global switches b
V-Ray dialogue [ -t V-Ray:: l""'!l" sarnple- (Antialiasing) ji
box with the V-Ray [ -t b
V-Ray:: Adaptive subdivision image sampler
tab selected. The r ...;.
-t_ _ _ _ _ _ _V_-Ra
..._.Y ::.-..
..... En~v.r
._.
onmen t _ _ _ _ _ ___,b
----....-
image shows the V-Ray:: Color mapping I
V-Ray:: Color
mapping panel Type: ILJM !!!Mlik :, r Sub1lfxel mapping
Lil'l.,ar muJlinlv r ~output Cl~mp J.,veJ: ~ _;_)
with its various
kinds of options
rmmmiill P
HSY exponential
Affect backgrouid
Intensity exponential r Don't affect colors (adaptation only)
Ganvna corr~n
_ _Intensity gamma
r Linear workflow

[ -t Reinhard :: Camera

I
4i& ProdJctfon Preset: j----
r ActiveShade View: jPerspedive ~

The two big categories to consider when talking about Color mapping are:
Linear multiply;
Exponential.
Even t hough the following compression mod es may seem completely different, they are
actually still part of the Exponential category:
Exponential (basic exponential);
HSV Exponential (exponential t hat preserves the colors. It produces more saturat ed
colors);
Intensity Exponential (exponential that preserves the intensit y);
Reinhard (a combination of Linear multiply and Exponential).
The logic behind each of t hese settings is in the various d ifferences shown in brackets. These
differences are almost non-influential, especia.lly during the learning phase.
Finally, Gamma correction and Intensity gamma work, as you might guess, on the Gamma.
This topic is addressed in Chapter 3 - Compensation Using the Gamma Curve.
CHAPTER 7 - EXPOSURE

Color Mapping: Reinhard


Reinhard doesn't add anything new to the previous Linear multiply/ Exponential options,
but it's very interesting because, if used with awareness, it allows us to take advantage of the
best of the two. The Reinhard method mixes linear andexponential mapping and the Burn
Value option, Figure 7-9, determines the degree of mixing between the two. With a value of
1.0, the mapping will be carried out in a completely Linear way while, with a value of 0.0 it
will be totally Exponential, Figure 7-10.

V-R.ay:: Color mapping Figure 7-9


Type: . -111t
,...,RMI\- -d-----
... r Sib-pixel mapping Part of the V-Ray tab
r damp output c e. ~ ~ with the V-Ray:: Color
: 17 Affect bod<ground mapping panel selected,
~&.r-n-
va"!"
lu-e: ....,1""'
,o""""''"";"ll r Don't affect colors (adoptlltion only) showing the Reinhard
Gomma: ~ ~ r Lttar woricllow type and the Burn value
option highlighted

Note: Using intermediate values, for example by setting Burn value= o.s means that the
first half of the tones will be linear and the second half will be exponential, or compressed,
Figure 7-10.

Figure 7-10
With Reinhard I
we can render
the first half of the tones as
linear and the second half with
exponential. The Burn value
Bum= 1.0. decides where the cransition
Burn = 0.0 Burn = 0.7
occurs.
(exponential) (linear)

It might be a good idea to use values like 0.8 - 0.9. In this way you can keep the linearity of
the image in the low and medium tones (= greater contrast), and just compress the parts
with highlights, which are generally the ones that "exceed" the image.

Figure 7-11
Here a light from
above is causing a little
overexposure (A), which
is highlighted in black
(B). This is easy co Ex
using Reinhard with
a Burn Value of 0.8
(g - just enough to get
the small overexposed
area to fit

When there is excessive overexposure you will have to lower the Burn value by a lot in any
case, sometimes even to 0.0. Here we might as well use Exponential directly.
The ideal would be to always stay in Linear, by purposefully putting yourself in conditions
in which there is no risk of overexposure.
Linear ensures greater contrast, but there are some conditions, (like light sources being
present in the frame or too close to the walls), where it's really not possible to use it. In these
cases, we will render in Exponential, or Reinhard mode. In any event, it's not so much about
establishing a hard-and-fast rule, but about understanding the cause of the problem and
the way the tools work, so as to make appropriate choices each and every time.
PHOTOGRAPHY & RENDERING with V-RAY

Color Mapping Without V-Ray (after Rendering1)


Another possible choice is to carry out your Color mapping after rendering in V~Ray, that
is, to treat the finished render usi ng another software. Moreover, there is no Exponential in a
DSLR camera! What do photographers do in critical situations? They use a technique based
on multiple exposures: they place the camera on a tripod and photograph the landscape
using different levels of exposure. For inst ance, three p hotos are taken. The first captures
the dark tones, the second captures the medium ones and finally, a third photo captures
the highlights.
After that, t he photographer works on the three shots, generally using a software program
ca lled Photomatix (one of the most famous of its kind). This program has a guided procedure
for combining identical photos with different exposure values into a single one, by taking
advant age of the light captured in each shot.
When using V-Ray, you don't need to save renders with different exposures. You only need
to save it in .EXR format from the V-Ray frame Buffer and then follow 1the guided procedure
to compress the t ones using Photomatix.

~ V-Ray frame buffer- (50% of 1500x112.5) j~~~


)RG8cokw T fiifiifii e rii1 Iii> x ~ ci[* m II 1 -0
~ ixel information
Pixel X, Y: 956, 312
Cclor (float): 1,144, 1,131, 1, 113
Figute 7-12
Color (lMlit): 65535, 65535, 65535
T he V-Ray frame
COior (8-bit): 255, 255, 255
buffer dialogue Cdor (Web): #flllff
box and an
indication of the
Pixel information,
obtained by right-
clicking anywhere
in the render

~
rencle< time: 'l'orendertine fii % [!E' ~ iii 1:1 [C F

Greater Compression, Less Contrast


Exponential Color mapping, that is, the compression of tones, only exists as an operation
because V-Ray calculates much more than is possible to visualize on a monitor. We already
addressed this topic on page 16, in the paragraph V-Ray frame buffier, but in this chapter,
which is dedicated to exposure, we will complete many of the concepts.
Although overexposure appea rs as flat white areas containing pixE~ l s at their maximum
brightness (RGB = 255, 255, 255), V-Ray actually calculates and keeps a record of exactly
how much the brightness of these pixels has surpassed the limit.
In other words, behind the overexposed white that we see, there is more information than
we can imagine. Let's look at a practical example of this.
Open the file Chap 07-01-Color mapping.max, locate!d in the folder P&R-VRay I Chapter 07
/Exercises, and render it using Linear multiply. Place 1the mouse on an overexposed point,
Figure 7-12, and right-cl ick to obtain the values of the underlying pixel.
CHAPTER 7 - EXPOSURE

You will find values in the Pixel Information window, Figure 7- 12, as specified below:
Pixel X,Y: indicates the coordinate position of the pixel in question.
Color (float): white corresponds to 1.0, but as you can see, the values exceed that. This
is proof that "beyond" that white, there is more information. That extra data, which has
been calculated but isn't visible, is data which Color mapping can use to compress, in
order to make everything fit into the visualizable light range.
Color (16 bit): indicates 65535, 65535, 65535, that is, the maximum visualizable value:
white.
Color (8-bit): indicates the RGB color 255, 255, 255, (the maximum value), of the selected
point.
When we use Exponential Color mapping, the excess values are compressed to fit into the
RGB 0-255 range.
The overexposure vanishes and, while on one hand we have regained some details of the
image that were previously lost in the overexposure, we have also given up some contrast.

i ] VRayframe buffer [50% of 1500 x1125) LE_ @I~


IRGB cdor 19f919 riil .. x ~ :il'li ill 19

Pixel X, Y: 982, 404


c.o1ar (float): Cl,l90, o,eas. o,an
Cdar (16-tit): 58320, 58030, 57601
Cdar (ll~t): 227, 226, 225
Cdar (Web): #ele2d

Figure 7-13
The V-Ray frame
buffer dialogue box
showing a poinc in
the overexposed
area and the Pixel
informatio n dialogue
box to the side

Figure 7-13 was created using Exponential Color mapping. If we right-click on the same point,
we can see how the maximum values in Color (float) tend towards 1 without ever exceeding
it. The same thing can also be seen in Color (8 bit), in which the values tend towards 255,
255, 255.
Only by comparing Figure 7-12 and Figure 7-13, can you observe and grasp the relationship
that exists between the compression of tones and the resulting contrast. Let's go deeper
into this issue. On the next page we will use an example in reverse to try to show you how
and why compressing the tones reduces the contrast.
PHOTOGRAPHY &. RENDERING with V-RAY

Figure 7-14 has been altered using Photoshop and shows why compression leads to loss
of contrast.

~
~
~
~
JI JI Jf

Figure 7-14 A correccly exposed photograph with only visualizable tones


in the light range. This is represented in the histogram of die Levels
dialogue box in Photoshop, with the sliders for dark and light tones shown

CQCJ
~
~
~

JI " "
liJPreYlew

Figure 7-15 The same photo as the previous one, Figure 7-14, but this
time overexposed. The sky appears practically white, as shown in the
Levels dialogue box, with the positions of the tone sliders highlighted

In Figure 7-14 , the details of the sky can be seen well and a certain amount of contrast can
also be seen. In Figure 7-15, the sky has been purposely overexposed by moving the two
levels sliders. Consequently the contrast has decisively increased in the lower part of the
photo (in the medium and low tones).
Basically, the fewer tones there are, the more "contrasted" the image appears and vice versa.
It's no wonder, then, that the final render in Figure 7-13, produced using Exponential appears
flatter and less "contrasted" than the one produced using Linear, Figure 7-12. This is the
normal consequence of compression. Moreover, you just need to be aware of it and restore
the contrast by making good use of the curves, both in the V-Ray Frame buffer and then later
in Photoshop.
CHAPTER 7 - EXPOSURE

The same thing happens when rendering. If we have overexposed areas, we will have greater
contrast in the rest of the image. On the other hand, if we compress the-tones so that we
can visualize all of them and not lose any details, we wil I consequently lose contrast over the
whole image. Even though we always try to avoid overexposed areas, there isn't one perfect
solution. For example, in many interiors (real ones) we voluntarily choose to overexpose the
exterior in order to gain more contrast and to draw more attention to the rest of the picture,
Figure 7-16.

Figure 7-16
A photographic
example of an
interior in which
the photographer
chose to cut out the
highlights

Having an overexposed window is often inevitable, especially if the openings are small
compared to the interior space, Fig ure 7-16. On the other hand, it's easier to capture the
interior and exterior correctly in a single photograph, if the windows are very large, Figure
7-17. In fact, the latter situation is easy to photograph, even in real life.

Figure 7-17
An example of a
render showing a
window and the
landscape (interior
and exterior) by
Gioele Fusaro
PHOTOGRAPHY & RENDERING with V- RAY

Exercise: How to Manage the Exposure in a Render


In this exercise you will see how to manage the exposure of a render by analyzing two cases
concerning an interior: one made up of a wall and a large window, and the other of a wall
and a substantially smaller window.
1. Start 3ds Max and open the file Chap07-02-Exposure.max, located in the folder P&R-
VRay \Chapter 07 \Exercises. The file contains an interior.
2. Note that the exposure time, or shutter speed- which is 200 by default - has been set
to 70, to allow the V-Ray Physical Camera to capture more light, Figure 7-18. Launch the
render to obtain the image in Figure 7-19.

$pedfy fociJs ........ r


Figure 7-18 fooJsdJsbrlce..~ l ;:t'<l,i:.:r ,;J
Parr of the V-Ray Physical exposure... .. ..... .. . F7
Camera parameters panel vignetllng ........ P' ~ .!.]
with the exposure time value white balance INeu1r111
highlighted. To increase GJSlxlm bal~ncc . ... ~
the e:i,:posure rime, we need teft1>erallxe ......... (5soo.o .!.]
co lower the shutter speed st.ltter speed ~"-1 po;o-- :
value from 1/200 to 1/70 slilier angle (deg). I !80,0 _;,
sl.Jtter offset (d09) io,o- _;_j
l.>\<!(lcy(s)........... io,o- .!.]
fin speed (lSO) ..... [loO:O _;_j

Figure 7-19
An interior
rendered using an
exposure value of
1/70

3. Right-click the mouse to select the UnHide all option. This reveals a wall covering a large
part of the window. Now less light can enter and in fact, if you launch the render again
without changing anything, the internal part of the image will appear decisively less
bright, Figure 7-20.
CHAPTER 7 - EXPOSURE

Figute 7-20
An interior
rendered using an
e:1.'j)osure value of
1/70 but with part
of the window
replaced by a wall

4. To get the same illumination of the interior space as in Figure 7-19, we have to increase
the exposure time by bringing the shutter speed to 20. In this case however, the exterior
will appear overexposed, Figure 7-21 .

Figure 7-21
!vl i (\ teriot
rendered with rhe
shutter speed sec
to 20. Remember
that the shutter
speed is expressed
in fractions of
a second. So 20
is a longer rime
than 70 because
it is actuall)' 1/20
rather than 1/70
of a second

S. To obtain the same illumination as the interior space in Figure 7-21 , while preventing
the exterior from being overexposed, set the Color mapping from Linear to Exponential,
as in Figure 7-22. Launch the render to obtain the image in Figure 7-23.
PHOTOGRAPHY & RENDERING with V-RAY

~ Render Supc V-Ray NFR 2l0.31 r;;-J Gl ~


Figure 7-22
Render Sccup
OmnCln I V-tlay I lncfttct ..,.,.tlon Setlhgs RMdor &ments

dialogue box with


V-Ray:: Color
mapping selected
and changed
from its default
value linear, to
Exponential
Preset:l--- Rorder I
""""'l~~e .!]

Figure 7-23
The interior
rendered using an
exposure value
of 1/20 with
E.'<ponential color
mapping

Other hypothetical situations for this scene could be:


The sun entering from the right;
The sun entering from the front;
The sun high at noon;
The sunset;
The floor being very light;
The wall being very dark;
The window-wall also covering the window on the left.
We can imagine numerous combinations of lights, objects and openings, but in the end,
what happens each time something changes is that the light range becomes narrower or
wider, just like an accordion.
When we say that every scene is a story in itself, it's true, but the principle behind managing
the exposure is always the same. Light surfaces that are illuminated indirectly help to make
direct light more even. The same surfaces illuminated directly by the sun broaden the light
range and generate vast areas of overexposure.
CHAPTER 7 EXPOSUR

More generally, when we are dealing with soft lighting, we will never have exposure
problems. The light range is reduced so it's very easy to get the whole image to fit within
the available range. Problems occur when this range broadens beyond measure, as a result
of very strong lights in the scene. These could be the sun, the sky or artificial light sources,
such as light bulbs.
There are three possible options in these cases:
We can choose what to expose and voluntarily leave the rest over or underexposed;
We can find a way to dodge the problem by taking advantage of a low sun, avoiding
backlighting, or hiding the light sources;
Or we can compress the tones using Exponential Color mapping so that everything fits
into the available range.
The last solution may doubtlessly seem like the best. It is certainly the most immediate, but
the truth is that a best choice doesn't exist. It all always depends on the style you want to
give to your render.

Note: On a real photographic set, various tricks are used to contain light sources that
are too strong: curtains, tinted glass or little black flags. Nobody ever wants a light range
that's too broad to photograph.

THIS EXERCISE CAN BE SEEN IN P&RVRAv \CHAPTER 07 \VIDEO\ VIDE007-1.MP4 ~


E1teriiori Rendeiing

In this chapter, we will bring certain peculiarities


1: of exterior scenes into focus.
Firstly, we will look at some typical ''photographic
tips " for exteriors. Then we'// explore some
technical advice for dealing with the typical
difficulties that this kind ofrendering poses.
Various theoretical considerations are contained in
the chapter. These aim to increase your awareness,
in preparation for the subsequent chapter, which
will be much more practical, and which will be
dedicated to sun-sky simulation.

'

PHOTOGRAPHY 8r. RENDERING with V-RAY

The Characteristics of Exterior Rendering


From a lighting point of view, the simulation of an architectural exterior in daylight is one of
the simplest situations. There is only one light in the scene: the sun. You just need to pay a
bit of attention to the exposure. There are five typical points involved in exterior rendering:
1. Framing;
2. Positioning the light source;
3. Realistic sky/backgrounds;
4. Absence of the horizon;
5. Vegetation.
Think of these five p oints as a kind of mini-guide that can help you to verify whether or not
you are on the right track. We often get lost in details that are irrelevant to the work as a
whole. For this reason, with the five main points, we don't run the risk of letting anything slip.
Naturally, we mustn't think that just by following these guidelines, we will produce a
masterpiece automatically. Memorizing each of these elements, however, can help you
keep your compass well-oriented while you work, without taking anything for granted.
A quality photographic image is always the result of a complex combination of components,
each of which does little on its own, but which together contribute to bring our image closer
or further away from realism. This again leads us to a way of thinking that we can synthesize
into the following expression:
I can imagine and know what I want > I'm looking for the parameter to carry it out
Before commencing a rendering project, have what you want to achieve in mind and t h en
use the software to reproduce what you've already imagined.
In the following paragraphs, we will analyze all these points, considering both tlheir
photographic and technical aspects.
CHAPTER 8 - EXTERIOR RENDERING

Framing
The height of the frame and the perspective deriving from it, is the first piece of information
we see. It communicates the size and proportions of the object we are framing in an instant.
So, if we position a camera at a height of 30 meters, this will lead the viewer to perceive our
render as a "scale model'; Figure 8-1.

Figure 8-1
f\ rendered image with
a camera positio ned at
a height of 30 m. This
generates the scale model
effect

Figure 8-2
A rendered image \\~th
a camera positioned at a
height of 1.70 m. This
create~ a realistic effect

We are used to seeing real buildings from our height (approximat ely 1.60-1.70 m), Figure
8-2, and this is the correct position for a camera if you want to build a scene in which the final
purpose is photographic rendering. Framing a building of a certain height from the bottom
towards the top, automatically means a slight deformation in the lines going upwards. This
is natural perspective distortion that must be expected in such situations, and it is more
and more marked the shorter the focal length is. Framing upwards with a wide-angle lens
produces strong deformation.
In architectural photography, it is customary to solve this problem by using a certain lens,
called a perspective control Jens, which corrects the effect of the perspective distortion,
making the lines vertical and perfectly parallel.
While it's true that many people use these lenses, it's also true that there's another whole
group of people who don't use them, as they consider this type of correction to be wrong.
So, what's the best thing to do?
There isn't one best thing - it's simply a question of individual choice. First and foremost,
you need to have a clear idea of whether you want the optical distortion effect to emphasize
t he height of a building or whether it's just a side effect and doesn't add anything to the
image, but rather, creates a disturbance.
PHOTOGRAPHY & RENDERING with V-RAY

How to Eliminate Distortion in V-Ray


While in reality we need to use a special lens to eliminate perspective distortion, Figure 8-3,
in our case, we only need to place a V-Ray Physical camera in the scene, Figure 8-3, and click
on Guess vert, Figure 8-4. In an instant, V-Ray will calculate the right value to correct the
distortion.

Figure 8-3
A schematic
representation of the
V-Ray Physical camera
(A) without eliminating
distortion and the
relative corresponding
image (B) (_,

tal ~ 1 ,~l 1;JI J't' Oltfil..l 1el@JIJ'tl


o cei CJ D 112. ~ ~ o cei CJD l!2. ~ ~
l~v 1~y
I
rt
+ Namund Color
llokeh etrecu
11
r,
+

Figure 8-34 Figure 8-5


Part of the Pan of the
VRayPhysica!Camera
til>t............ ,Stl cam VRayPhysicalCamera
command panel tcr90ted. .. .. . F' t ~ command panel
showing the default ftngate w,m) ....... f36,0 _;] fin oate ()llmJ....... I36,o .;J showing rhi> Gni>ss vi>rr
focal IMQth ()Tim)... f..o,o _;] focal lenvth ()Tim)... fl,O ,;,j
settings function active and the
rcv................ r J..-.;,927 ,;J rov................ r I ,,az~ _;]
zoom factor.......... r:o- iJ zoom factor .......... r:o- _;] relative value obtained
horizontal off$el ... ro,o- ~ horlionlal offiet.... ro,o- .!J
ver1ical offset....... ro.o-_;j verllc.al offtet.. .... ro;o- .!J
f~ ............. ra.o- ~J klumber ............. ra.o- .!J
tNget dlst..nc&.. .. .. 1u2,B01 ,;) tor11< t ,i,tonc~, .. . JTI2]6; :
wrtical sl'ift......... ro.o- _;j vertlahhlft........ 0,326 :
ha(l:zontahlilft. ..... ~ .!.] horizontal lilift...... ~.o
I
Guess vert. I Guess holtz. I ~ert'JI ~horiz. 1
'

Figure 8-6
A schematic
representation of the
V-Ray Physical camera
(A) with distortion
eliminated and the
relative corresponding
image (B)
.
L
CHAPTER 8 - EXTERIOR RENDERING

Balancing Light/Shadows
Rendering an exterior in daylight is easy to do from a lighting point of view. Our primary
light source (the sun) produces flat lighting and the only perceivable nuances are in the
shadowed areas. These shadows are the elements wecan use to creating harmony and
undertones that give images more movement and three-dimensionality. In each of the
following examples, Figure 8-7, the only thing that changes is the position of the sun.

Figure 8-7
Three renders
(A-B-C) of an
exterior in sunligh t,
in which only
the position of
the primary light
source - the sun -
has been changed

Figure 8-7 (A) was rendered with the sun front-on and high up. This hasn't allowed many
sh adows to form (which are important for three-dimensionality) and hasn't produced a lot
of nuances. Furthermore, the high sun is casting a very strong light, which has surely created
exposure problems in the white areas.
Figure 8-7 (B) is interesting, as the sun is behind the subject and only illuminates a segment
of the wall at the top. Here it's all about indirect lighting. The image is "attractive" because of
the many nuances contained in the shadows. It's a very poetic image but it doesn't say much
about the building. For a more artistic and atmospheric depiction, this image might even be
preferable. We mustn't forget however, t hat the purpose of an architectural photo is not just
to excite, but also to give information about the building and the volu1mes it is made up of.
Tihe best and most interesting solution is Figure 8-7 {C). The sun is a little lower and casts
a soft light without excessive contrast. It is positioned at a slight angle and hits some
protruding parts of the building. This creates shadows that tend to "stretch out" over the
fac;ade, making its shapes even more evident.

Considerations: To achieve a good balance between light and shadows when rendering
an exterior in daylight, I prefer to have more than half of the image in direct light and the
rest in shadow, making sure that the sun isn't too high and that it enters from the sides.
PHOTOGRAPHY & RENDERING w ith V- RAY

Figure 8-8
Another two
examples of
the effects of
the light source
direction. A render
by Francesco
Duggento

Considerations: Figure 8-8 (A) is a classic example of bad lighting. The sun is coming
from behind the camera and produces a flat image, in wh ich the roundness of the
columns is indiscernible. Th is translates into inadequate three-dimensionality in the
scene.
In Figure 8-8 (B) the light is comi ng from the side, at an angle somewhere between 45
and 60, making the roundness of the columns more evident and providing indirect
lighting on the other side of the dwelling.

Elongated Shadows
In image 8, Figure 8-8, the shadows capture interest. Thanks to angled lighting, they create
a very interesting effect as they stretch out over the building.
Elongated shadows are always beautiful to look at. They generate a wide range of hues and
also help the viewer to better understand the structure and volumes, thus increasing their
perception of three-dimensionality in the image.

Note: The "elongated shadow" effect always works very well, even in interiors. Unlike with
photography, you don't have to wait for the right time or be at a strange latitude in order
to have the sun exactly where you want it. You simply need to set it up in V-Ray, as we
will see in the Exercise: How to use a V-Ray Sun light on page 123 in Chapter 9- V-Ray
Sun System.

We have ascertained that to avoid "flat'' images and obtain elongated shadows, we just need
to allow a certain ang le between the camera and the light source. In fact, we often say that
the two must form an angle of 30- 45 between them, and the light mustn't be behind
the camera, as this would flatten the scene. Naturally, this is a reference method often used
to photograph objects in a classic studio. It can, however, also be applied to exteriors, and
should certainly be taken into consideration if you want to get an idea of how things work.
CHAPTER 8 - EXTERIOR RENDERING

Realistic Sky/Background
In Figure 8-9 the sky takes up a lot more space t han you would imagine.

Figure 8-9
A rendered image
with a clear sk)' as a
background

The sky, Figure 8-9, takes up almost 30-40% of the picture and in other types of frnming,
this percentage could increase even more. The sky is therefore a very important part of the
image and we must pay the right amount of attention to it.
The V-Ray Sun System, which we will look at in the next chapter, automatically generates
the sky (V-Ray Sky) with the right intensity and tones, all perfectly in proportion to the sun
and the camera. This doesn't exclude the possibility of substituting it with a different sky,
maybe even with some clouds, to make the whole scene more int eresting.

Figure 8-10 A rendered image showing the sJ.y u,;th Figure 8-11 A rendered image showing the sky with
flat clouds that lack perspective clouds in perspective

The first render, Figure 8-10, has certain aspects that really don't add up. What are they?
The perspective of the clouds;
The color tone of the sky.
In Figure 8-1 O the background photo is flat: in fact, it's a photo taken of the sky, vertically.
The clouds appear flat and lack perspective. Figure 8-11 on the other hand, was taken of the
horizon. The clouds have perspective and depth and are in perfect harmony with the scene.
With the help of Photoshop, the tone of the sky should also be aligned to the colors of the
rendered scene, so that everything appears well-combined and there don't appear to be
tw o separate parts.
The wrong sky can ruin your entire image. At the same time, a beautiful and detailed sky,
which is perfectly blended with the 30 scene, can make it extremely captivating, as in Figure
8-11 . We will see how to achieve this kind of outcome on page 129 in the Exercise: How to
Replace the VRaySky in Post-Production.
PHOTOGRAPHY & RENDERING With V-RAY

Absence of the Horizon


When carrying out a render, one of the aspects that shouldn't be underestimated is the
horizon. In the best case scenario, there will be some hills or buildings in the background.
There is almost always an object within our sight. A vacant horizon falls outside of our
everyday experience. Leaving an infinite plane in sight behind the object therefore
diverts our attention towards this unreal landscape, Figure 8-12, taking it away from the
photographic render itself.
You should therefore avoid showing the flat line of the horizon in your renders. C:over it with
trees or buildings, resorting to the tricks you consider most effective, Figure 8-13, but never
show a flat and empty horizon.

Figure 8-12 A rendered image with a flat horizon

Figure 8-13 A rendered image with the horizon covered, by Stefano Capuano
CHAPTER 8 - EXTERIOR RENDERING

Vegetation
Anyone could confirm that vegetation makes an image more beautiful, yet the issue goes
much deeper than you might imagine.
There is a scientific theory called the "Savanna Hypothesis; which states that human beings
prefer open fields with typical Savanna trees to closed, complex and untidy landscapes.
Regardless of one's culture, environments similar to a savanna, that is, those characterized
by open spaces, even, green fields, and the presence of waterways and trees, are preferable
to other environments - even natural ones - like mountains or the jungle.
The issue is seemingly related to man's evolution. In antiquity, those who l ived in environments
like this survived more easily than those who found themselves in environments like the
jurngle or an inhospitable desert. In the practical world of communication, this translates
into using lawns, trees and shrubs to make any exterior more attractive. The same thing
goes for rendering. Vegetation is a winning formula and a true breath of fresh air for the
viewer.
Even from a strictly 30 point of view, vegetation greatly increases the level of quality
perceived in an image, as it contributes in a critical way to increasing the detail - one of the
fundamental aspects of rendering.

A B Figure 8-14
The render of this
building is fairly
simple (A). If it
we.ren't for the
vegetation (B),
the image would
have much less
value. Render
by Francesco
Duggento

The hardest aspect of dealing with vegetation is the fact that plants and trees always have
many polygons, and scenes can reach millions of polygons j ust because of the vegetation.
At this point it becomes fundamental to be good at using layers and managing scenes,
and externalizing the most polygon-heavy models, using V-Ray Proxies (see Chapter 10 -
Simulating Vegetation and Textiles on page 148).

Note: How do we obtain vegetation? Various software programs have been created for
the purpose of generating trees and vegetation. Trees can be created by clicking on the
Foliage button in 3ds max, which can be found in the Create panel > Geometry > AEC
Extended. They are fairly poor quality, but can be used immediately. The best choice is
to use the libraries sold at www.evermotion.org, where various kinds of vegetation have
been gathered.
Ivy, on the other hand, can be perfectly simulated using a 3ds Max plug in, t he Ivy
generator. Finally, for grass, we can also use Vray Displacement and Vray Fur, which we
will explore in Chapter 1O - Simulating Vegetation and Textiles.
PHOTOGRAPHY&. RENDERING with V-RAV

Considerations about Night Renders


Unlike in daytime rendering, w here the primary light source is the sun (VRaySun), in night
scenes there are various primary lights. They are artificial, usually a warm color, and each one
illuminates just one part, without affecting the whole scene. There are multiple primary light
sources, but they are contained.
When we talk about night architectural photography, we are never actually referring to the
dead of night. The preferred time is dusk, when the sun has gone down but the sky still
holds a small amount of bluish luminosity. This acts as a secondary li9ht source and gently
illuminates the parts that are not directly reached by the artificial lights, showing their
outlines. If it weren't for this, some areas would be too dark and wouldl lack detail.
[n the night render in Figure 8-15, there are various primary light sources (artificial, with
a contained effect), and a feeble bluish light coming from the sky. Re-creating the play of
warm/cool light between the sky (cool) and the artificial lights (warm), is what gives the
sensation of a night image. In other words, this is the typical light balance for night rendering.

Figure 8-15
An image of a
night render by
Mauro Melis

Another aspect for which a dayt ime render, or a photo, is different from a night scene, is that
here the light source is framed directly. In daytime renders the primary light source - the
sun - is almost always high up and outside the frame, while in night scenes, the primary
light sources, lamps and spotlights are often part of the image.
It can sometimes happen that an artificial light, like a spotlight, can be just as dazzling as
the sun. So what's the problem? It's the same thing again: as a result of the framed light
sources, the light range of a night render is too broad to be captured entirely. If measures
are not taken, it is inevitable t hat the result you obtain will contain larne burnt areas around
the light sources.
This is a problem that can occur both with rendering and with live shooting. How can we
solve it? How can we capture the whole light range? As described in Chapter 7 - Exposure
- by compressing the tones so that the excess ones are brought back in. In the case of
V-Ray, we use Exponential Color Mapping instead of Linear multifPly. The problem that
derives from this is an inevitable loss of contrast, but we can deal with that later, during
post-production.

~12-0\
Now that we've tackled some important theoretical
1: aspects in the previous chapter, its time to see how
to apply them using V-Ray.
We will analyze the V-Ray Sun System - made up
of the sun, sky and camera - as a whole. A couple
ofsimple exercises will then show you how simple
it is to use these tools to illuminate exterior scenes
in just a few steps.
We will also look at a logical way ofsubstituting
the sky background generated by V-Ray with one
ofour own choice. We will conclude by simulating

-
an exterior by night. Again, this lighting situation
doesn't appear out ofnowhere, but is another
example that adheres to the most important of
rules: setting the correct light balance.

.8
~
I
PHOTOGRAPHY & RENDERING with V-RAY

lighting in Exterior Simulation


There are three useful elements for re-creating the brightness and light typical of exterior
simulation: the Sun (the primary light source), the sky (the secondary light source) and a
camera with which to capture our renders.
In V-Ray three tools put these three elements into practice. If used together, they can make
life easier and create a very realistic result. They form the V-Ray Sun System.
This system is made up of the following tools:
The V-Ray Sun, Figure 9-1 ;
The V-Ray Sky (which is automatic and related to the sun);
The V-Ray Physical Camera, Figure 9-2, (see Chapter4-TheDSLRCamera).

o IVli1 1~@I !gllJ'l >I\lll 1(>1!g]J~I


o~m ~ ~ ~l\ o~~ a !Ql.. ~i\
Figure 9-1 Figure 9-2
jVRay II/Ray The Cameras panel
The Lights panel with
ObjcctTvpe with the Physical
the VRaySun tool
highlighted
r AulDGtid
Camera tool
l/Rayl9it I VRavlES I highlighted
tavAmbientUgj I VRaySun I I!
r- Name and Color h

Note: It is recommended that you use these three tools together without altering their
physical nature. This will maintain their reciprocal calibration, allowing you to optimize
your time and keep all the parameters coordinated to ensure your scene has the correct
lighting and hues.

V-Ray Sun
Figure 9-3
T he V-Ray Sun
System is just like a
huge photographic
studio with the sun
(primary light source),
the sky (secondary
light source) and a
V-Ray Physical
camera
Camera

Considerations: An exterior is actually just like a big photographic studio. There's a


primary light source, the sun, and a secondary light source, the sky. Not changing the
intensity of these two components is equivalent to not changing the light balance that
Mother Nature has made us accustomed to, Figure 9-3.

Note: Changing the default value of the sun's brightness (intensity multiplier= 1.0) is an
example of altering the natural' balance of the elements and should be avoided.
CHAPTER 9 V RAY SUN SYSTEM

Exercise: How to Place the V-Ray Sun in a Scene


In this first exercise you will see the main characteristic of the V-Ray Sun lighting effect.
1. Start V-Ray and open the file Chap09-01-FirstSun-START. max, located in the folder
P&R-VRay \ Chapter 09 \ Exercises. The Global illumination (see Chapter 3 - Global
Illumination and /rradiance Map ) has already been set in this file and all the objects in
the scene have the same generic materia l assigned to them.
2. Use the Lights panel, Figure 9-1 , to place a V-Ray Sun and a Physical Camera, Figure 9-2,
in the scene as shown in Figure 9-4.

Figure 9-4 Top view of the positions of the V-ray Figure 9-5 An example of the render obtained
Physical Camera (A) and the V-Ray Sun (B) in a scene

3. Once you've placed the V-Ray Sun in the scene, a dialogue box will appear, Figure 9-6,
telling you to add the sky element and link it to the sun. Accept by clicking on YES;
1
v-Ray Sun
Figure 9-6
Would yoo like to automatia!ly add a VRaySky environment map? V-Ray Sun dialogue box
asking you if you would
like to add the sky or not

4. Launch the render by pressing the SHIFT + Q keys together to obtain the image in
Figure 9-5. You can check this by opening the file Chap09-02 -FirstSun-FINAL.max.

You need only place a camera and the sun, without touching any of the parameters. As you
can see in Figure 9-5, the intensity of the light, the hues of the sky and the sharpness of the
shadows are all in sync with one another. This is the great thing about the V-Ray Sun System.
In the following pages we will analyze some parametric aspects that will give you even more
control when working with the V-Ray Sun.

Considerations: To position the sun and camera, I followed the simple rules outlined
in Chapter B - Rendering Exteriors . The camera and the sun form an angle of about 40
and I've avoided overexposure problems by not placing the sun t oo high. Fina lly, I've
sought the right balance between the areas illuminated directly by the sun and the
areas in shadow.
PHOTOGRAPHY & RENOERlNG with V-RAY

V-RaySun
Although the contro l panel has quite a few parameters, Figure 9-7, it actually carries out
most of the work automatically. In fact, you only need to place the V-Ray Sun in your scene,
as shown in the previous exercise, to immediately obtain an acceptable result.

- VRaySun l'Mamelrr.5 The V-Ray Sun automatically casts light whose intensit y and color are
Figure 9-7 onablod........................ li7 d irectly proportional to its tilt angle, just like in nature. The midday
Part of the VRaySun r
rMslble.... " ' .... .
sun is strong, generates marked contrast and casts almost white
affect diffuse................. P
panel showing
affect speo.ilar............... P' li.ght, while at sunset t he sun is much milder and encompassing and
some of the main
cast 8tmosplierlcshodows P'
parameters; the generates softer light with hues ranging from red to blue.
turbidity............. p;o--- _;j
imcnsiry multiplier, To change the hue .and intensity, you only need t o change the
size multiplier and
shadow subdivs
position of the V-Ray Sun object in the space. The distance doesn't
matter. What counts is its ang le of inclination to the horizon, Figure
9-8 and Figure 9-9.

A
Figure 9-8
A depiction of a lighting
scheme showing the
V-Ray P h;rsical Camera
and the VRaySun (with
the sun high) in side view
(A) and the corresponding
render (B)

A
Figure 9-9
A depiction of a lighting
scheme showing the
V-Ray Physical Camern
and rhe VRaySun (with
rhe sun low) in side view
(A) and rhe corresponding
render (B)

The intensity can not only be changed through the position of the sun, but also using the
intensity multiplier parameter, which works just like the potentiometer of a light bulb.

Considerations: It's completely unrealistic to imagine taking a photo and changing the
sun when there's too much light. During my workshops I always maintain that changing
the sun is a kind of megalomania ..Jokes aside however, these kinds of alterations should
be avoided, especially as they set off a chain of effects that ruin the realism and take us
far away from our goal. Too much light should be treated as an exposure problem, as
we've already seen in Chapter 7 - Exposure.
CHAPTER 9 - V- RAY SUN SYSTEM

Another interesting parameter is the size multiplier, Figure 9-7, which is set to 1.0 by default
(a setting that mimics reality). This parameter is used to change the degree of blurring in the
shadows, while with shadows subdivs, Figure 9-7, we can control their definition.
Let's take the photo in Figure 9-10 as an example. Here, ~olar rays encounter a tree. The
shadow is very sharp close to the roots, but the further away we go from the tree, the more
the shadow tends to blur. This effect is the consequence of the rea l relationship between the
size of the object and the size of the sun.

Figure 9-10
A photograph
showing that the
greater the projection
distance of the
shadow, the more
blurred it is

In physical terms the size multiplier changes the size of the solar disk without changing
its intensity, thus creating shadows with m ore marked b lurring. This is a clear example of
an alteration of reality that isn't too invasive. When you need a bit of atmosphere, you can
use this effect in moderation to help make the image more poetic, without changing the
light balance of the V-Ray Sun System. If you increase the value of the Size multiplier to 3, the
shadows will be blurrier, Figure 9-11 , than with a value of 1, Figure 9-12. You can improve the
inevitable increase in grain using Shadow Subdivs, Figure 9-7. Higher values create cleaner
shadows in exchange for a longer processing time.

Figure 9-11
A render launched
after increasing the
size multiplier from
1.0 to 3.0.
The blurring of the
shadows is much
mo re evident.

Figure 9-12
A render launched
with the size
multiplier set to its
default value of 1.0
PHOTOGRAPHY & RENDERING with V-RAY

There is actually always grain in the shadows, even w ith the normal default values. It is
even more significant when the shadows are very long or cast from a distance. Imagine for
instance, a tree in a garden, casting shadows onto the wall of a building, Figure 9-13. This
is a nice effect but, given the projection distance, the outlines of the shadows will appear
significantly grainy.

Figure 9-13
An indication of an
enlarged area of the
render with shadow
subdivs set to 3 (A)
and 30 (B)

In Figu re 9-13 (A), the size multiplier option is set to 1.0 (the value that adheres to the rea l
proportions of nature) and the shadows cast onto the wall appear grainy. If we increase the
value of shadows subdivs from 3 to 30, we obtain a softer effect, Figure 9-13 (B).

Considerations: It's best to carry out this perfecting process after completing Step-4. If
the shadows still appear grainy, I take advantage of t he Render region to concentrate on
one area and find the right minimum va lue to ma ke the grain disappear.

How to Set a Specific Place, Date and Time


There is a system in 3ds Max that allows you to assign a specific place, date and time to the
sun in your scene.This option is called Daylight and it's a system that the V-Ray Sun can easily
interact with. Just select the Systems icon, Figure 9- 14, then Daylight, and finally create the
object in the scene. You can also change it in the Modify tab, Figu re 9-15, by setting VRaysun
as the type of sun .

~ tfll 1~llIDI ?-I i) ~ Jti. l ~l (WJ ?- 1


Figuxe 9-14 ocei ~ ~~ ~ Ioayllghto01 I Figure 9-15
jstandonl 'Modifier list Part of the
Part of the
Create panel
,---- -- -
Modify panel
showing the
- r Object Type
A!JtoQid
I showing the
System icon and Banes I RiiQArrv I VRaySun and
the Daylight .....d I SUtight 1 the Setup button
bu non lfi Dayl~t I 11
- Day&ght Parameters I-
used to access
- the parameters
c:. ...r""'t "1 &Clive

A rollout menu will appear at the bottom of the


~jVRaySun I .. for changing the
place, date and
~t f;1 Ar;tivt
panel, containing all the controls typical of the V-Ray I Skylght . time

Sun. If you click on Setup, Figure ?-15, you'll access a Position

panel in which you can set your desired coordinates, r Manual


'8 '2,a..,, Trne and location
including the city, t ime and year. r Weather Data File

-
I Setup...
I
CHAPTER 9 - V-RAY SUN SYSTEM

V-RaySky
As we mentioned earlier, once you've created the V-Ray Sun, a box pops up asking you if you
want to add a VRaySky as the "Environmentmap'; and in fact, it is to here that we will add this
new element. Just open the Environment and Effects dialogue box, Figure 9-16, by pressing
8 on the keyboard.

1121 Environment and Effects ce:::~


Enviromient I E~dS I Figure 9-16
The Environment
- Comnon Parameter$ I
- Blldqound:
Color:
C=:J
I EIMronmeit Map: P Use Map
Oefault\IRaySky ( VRaySky )
I
a nd Effects dialogue
box: showing the
VRaySky element,

-
(which unlike the
Glob.. Ughttlg:
nit: Lev~ : VRaySun is not

1
Ambiont:
[:=J ~ .;! present in the scene),
I and the Use map
option
(+ E><posure Control Ii
[+ Atmosphere Ii
-

Note: When working with lights, it may be necessary to turn them all off and only work
with one at a time. In these cases, it can also be useful to turn off the sky. To do so, just
deactivate the Use Map option, Figure 9-16.

In some cases, after agreeing to add the VRaySky, you could come across a warning window,
Figure 9-17, notifying you that the slot is already occupied by another VRaySky: "Would you
like to replace it with the new VRaySky?"You've probably deleted the sun and added a new
one. Click on "YES" to proceed, Figure 9-17.

V-RaySlcy Figure 9-17


The V-Ray Sky dialogue
There already Is a map In the Erwtonment slot. Would you ll<t to ~plac@ it? box showing a warning
about replacing the map
with a new VRaySky

The V-Ray Sky is not simply a background image. Apart from generating a sky that physically
corresponds to reality in terms of colors, it affects the scene by casting a very blue light, just
as the sky normally does. In real life we may not notice it, but this effect is very common in
real photos, Figure 9-18.

Figu.re 9-18
A photograph in
w hich che blue
compo nent of
the sky is visible
on the shadowed
side of the statues,
while the areas
illuminated directly
have a warm
dominant color
PHOTOGRAPHY & RENDERING with V- RAY

How to Control the V-Ray Sky


Accessing the parameters of t he V-Ray Sky is very simple. Once you've created the V-Ray
Sun, you first of all need to open the Environment and Effects dialogue box, Figure 9-19, by
pressing 8 on your keyboard. Also open the Material Edi tor dialogue box, Figure 9-20, from
the Rendering > Material Editor > Compact Material Editor menu. Drag the Environm ent M ap :
DefaultVRaySky to a free slot in the Material Editor, Figure 9-20. You w ill be asked to specify
the Instance (Copy) Map method via a dialogue box, Figure 9-20. Choose Instance to obtain
all the parameters for t he V-Ray Sky, Figure 9-20.

~ Environmnt and Effcts ~ Material Editor - DefaultVRaySky CEJl GI [JD


Environment I Effects I Modes ~
Oi;_;;,
pti_;;.
on.;;.,
s ~~=-

-
Bad<ground: - - - - -- -- - -.
Color:

'IRa Paramel2rs
Render Preview
maooalsun node...................................................... P"
Atmosphere I sun node.. .. .... ...... .... None I
Effects: sun turbicity............................................. ~ ~
Add ... sun ozon<! ........................... ............... ...... ~ ~
Delete sun htenslty multfPier ................................. rr,o-- .iJ
J:r Active sun size multiplier....................................... fr.o-- iJ
r
sun invioi>le............................................................
Movel4J sky rnodol ................. jPreetham et al.
f\'loveDown indirect hortz lum .................... ... .. .... ..... ..... ]2sooo,o .ii
Name: Mer~

Figure 9-19 The Environmem and Effects Figure 9-20 The Material Editor showing the V-Ray
dialogue box showing the E nvironment Map, Sky parameters and the Instance (copy) Map dialogue
which you need to drag into a free slot in the box
Material Editor

Considerations: In nature the su n and sk,y are not two distinct element s. The solar rays
actually generate the blue sky as t hey pass through the atmosphere. For t his reason, it
is logical that all the values of t he V-Ray Sky are a direct consequence of the inclination
we assign to the V-Ray Sun.
In V-Ray however, you can also separate them. You just need to t ick t he manual sun
node check box, Figure 9-20, and from that moment the two elements will work
independently. Looking at an example, if you reduce the "sun intensity multiplier" of
the VRaySky, Figure 9-20, you can lower t he brightness of the sky w ithout lowering the
direct light of t he sun.
As you might imagine, this can easily lead to unnatura l results, so I would advise aga inst
altering the set balance, especially if you are still learning.
CHAPTER 9 - V RAY SUN SYSTEM

Exercise: How to Replace the VRaySky with Another Sky in Post-Production


In this exercise you will carry out all the steps related to working w ith the V-Ray Sky and you
will see how to place a new sky as the background for a render.
1. Start 3ds Max and V-Ray and open the file Chapo9~03-building-FINAL.max, located in
the folder P&R-VRay \ Chapter09 \ Exercises. Everything is all ready for the final rendering.
Launch it by pressing the SHIFT+ Q keys.
2. Save two versions of the render, first as a .PNG (ensuring you have ticked the Alpha
Channel check box, Figure 9-21 ), and then as a .JPG.

Note: If your .JPG and .PNG images appear washed-out after you've saved them, it
means that the Output Gamma option in t he Gamma and Lut tab, located in the menu
Rendering> Gamma/ Lut setup... , is set t o a value of 2.2 instead of 1.0.

PNG ConfigU<ation ~ Figure 9-21


~~ ~~~~~~~~ T he PNG Configuration dialogue
(' Oplidttd paette (2S6) box, which appears once you've
fl RGI! 24bit (16.7Mlcn) clicked on the Save image icon of
(' RGI! 48 bit (281Trllon) the V-Ray frame buffer window.
(' Gnl)'OQ!le 8 bit {256)
The Alpha Channel option allows
(' Grayscole 16bit (65,536)
you to save the whole image,
Ip~dlame! Ir In~ leaving transparency in the areas of
the scene in which no objects are
OK I <:.anooj
physically present,

3. Start Photoshop and open the two renders (.PNG and JPG) you just saved, together
with the file New-Sky.jpg, located in the folder P&R-VRay I Chapter 09 I Exercises.
4. Drag the JPG render over the image New-Sky.jpg, holding down the SHIFT key so that
you obtain two perfectly centred layers.
S. Next drag the .PNG file over it to obtain the layer sequence in Figure 9-22.

liftlll
Honnalo [ 3 I
()pldli:
Figure 9-22
Bloc.: 0 d + Rfolq>.1~
Layer panel in Photoshop
!ii" ~ R.endor PffG showing the sequence o f layers
coi:responding ro the dragged
images
l~LJ nuovo-o~.Jpg

6. Now activate and deactivate the Render JPG layer, Figure 9-22. The differences in terms
of hue, intensity and saturation between the VRay Sky and the one we want to use as a
new background wi ll appear evident.
7. Use the Hue/Saturation - Color Balance - Curves adjustment layers to try to get the New-
Sky.jpg layer to look as much as possible like the layer containing the render w ith the
VRaySky, Figure 9-23. After several attempts and a bit of experience, this becomes easy.
To obtain a nice effect it actually doesn't matter whether the two skies are identical, as long
as they are more or less similar.

Note: You can check the final result by opening the file New-Sky-FINAL.psd, located in
t he folder P&R-VRay \Chapter 09 \Exercises.
PHOTOGRAPHY & RENDERING with V-RAY

UYelU
NollMlo

Btoc:.' 0 .$1 +8 Rion1"'~


Figur e 9-23 l'~iD- PNG
A list of the
l ~ RenclerJl'G(vri1Y$kydi r~to)
adjustment layers
in the Layers panel 19 ~j [JI Loto sx delciolo piU sano
used to adjust the
New-Sky.jpg image
to make it appear
19 l!Ji D- - - - - - curve

more similar to " ~~ D .._._,C"dor.


1' li:li D R~ahmmcne
the "Render JPG"
containing the
VRaySky 19

Figure 9-24 The New-Sky.jpg background before Figure 9-25 The New-Sky.jpg background after being
being adjusted in Photoshop adjusted in Photoshop

We can obtain notable improvements simply by correctly replacing the VraySky with
another one rich in clouds and details, but still consistent with the one generated by V-Ray.
It's obviously a subjective matter. You may like Figure 9-24 more than Figure 9-25, but
reaching a beautiful final result is not the purpose of this exercise. This is just a simple
method for obtaining skies that match those generated by V- Ray and Figu re 9-25 appears
objectively more consistent.

Considerations: In Figure 9-23 you can see an "Exposure" adjustment layer. Thanks to
a gradient mask, this helps to make the left side of the sky slightly da rker. This detail
shouldn't be underestimated: the sky does appear darker on t he side opposite to where
t he sun is. Even in t he JPG render with the VRaySky we used as a reference, this is very
clear. So, if we use a new sky that doesn't have th is gradient, we have to re-create it,
using Photoshop to improve t he consistency of the image.
CHAPTER 9 .. V RAV SUN SYSTEM

,
Exercise: How to Simulate a NigheRender
Even for night renders we have to reason in terms of primary and secondary light sources.
In this case we don't have the sun and the sky, but instead we have artificial lights (1st light)
and the sky (2nd light) .. The idea therefore remains the. same: to create the right balance
between these elements.
In this exercise you will carry out all the steps to achieve the correct exposure of a scene
containing a VRayLight and the VRaySky, recre.ating an exterior by night. At first glance the
exercise may appear to be complex and vre.ry articulated; but actually the following ten steps
were designed to help the reader undersitand a way of reasoning, rather than simply obtain
a render.
1. Start 3ds Max and V-Ray and open1the file Chap09-04-night-START.max, located in
the folder P&R-VRay \Chapter 09 \Exercises. In the scene there is a V-Ray Physical Camera
with the default values set and a number of artificial lights set to 200 watt. Launch a
render to see the starting point, Figure 9-26.

Figure 9-26
A renderwith
onl)' artificial
lights, captured
with the default
exposure time
of the V-Ray
Camera, 1/200 of
a second

2. It's dusk so you'll have to ir:icrease the exposure time. A shutter speed set to 200 works
well with sunlight, but here we need a longer exposure time, given that there is low
lighting. First select the V-Ray Physical Camera and set the shutter speed to 10 in the
Basic parameters section of the Modify panel. Also set the white balance to Neutral,
given that you don't have a blue sky, as you would in daylight. Now launch the render,
Figure 9-27.

Figure 9-27
The render with
just the artificial
lights, captured
with the e.."<posure
time set co 1/10
of a second
PHOTOGRAPHY & RENDERING with V- RAY

Here we'll allow ourselves to use a little"trick"to imitate the subtle azure light of dusk. We're
going to take advantage of the V-Ray Sun and the V-Ray Sky in a particular way:
3. Place a Dome type V-Ray Light in the scene, Figure 9-28. For Units use the"default" (never
use watts in this case!) and set the multiplier to 0.01, Figure 9-29.

- Ob~In>! I
r AUIDGrid
I VRayllght VRoy!ES I Figure 9-29
!ayArrillentull! VRay5l.n I
Part of the
Figure 9-28
Nome and Color I VRayLight
An example of [ioome I Modify panel
showing
a Dome V-Ray
Light (A), which
-Gen""" Porometers I suitable
can be positioned P' On .Exdide options for
anywhere in the Type: !Dome . I
setting cypical
environment
scene p EMblf! Ylowport shd'og
lntensi., lighting nt
Units: jo..r.ut (image) . dusk
l'lJlti~: rom- ii
Mode: jColor- .
Color: I I
Tempeniue: li:.soo,o 1J

4. From the TOP view add a V-Ray Sun, (with its relative VRaySky), behind the VRay Physical
Camera, .at about 45 to the horizon. Turn it off by unticking the enabled check box. In
this case the V-Ray Sun has only been placed and deactivated because we need it to
control t he V-Ray Sky.
5. Press the 8 key to open t he Environment panel and drag the VRaySky into the Texture
slot of the VRaylight!dome, copying it as an instance, as we saw on page 128 in the
paragraph How to control the V-Ray Sky.
6. Click Render Production (or launch the render in real time RT) to obtain the image in
Figure 9-30.

Figure 9-30
The night render
with arti11cial
lights and
environment
ligh ting

Note: For some strange reason, the light emitted by the V-Ray Sky sometimes isn't correct
if the V-Ray Sun hasn't been created in the top view.
CHAPTER 9 - V- RAY SUN SYSTEM

7. The balance between the artificial lights and the dusk is working fairly well. Now try to
enhance the scene by adding chromat ic contrast (see paragraph Chromatic contrast
on page 57). Set the color temperature of the V-Ray Lights to 3500K to obtain the
effect in Figu re 9-31 .

Figure 9-31
A render with
environment
lighting and warm
artificial lighting,
obtained by
setting the color
temperarure of the
V-Ray Lights co
3500 K

This seems okay, but our eyes, w hich are probably accustomed to it by now, don't realize
that we can still do something to improve the "night" effect. We can balance the Camera
on the warm hues so as to eliminate them and make everything cooler. This is done in
photography to eliminate the warmth of the artificial lighting that reverberates in the night
sky above cities.

8. Set the white balance of the V-Ray Physical Camera ""1~ bolana: Ir-au~ Figure 9-32
custom b&ince ..... 1 The V-Ray Camera option
from Neutral to 4500 by selecting the Temperature
~rohtt.. ....... 1 ~500,() : used co subtract the warm
option from t he drop-down menu, as in Figure colors from tihe scene,
sb.ltwspoed (sAJ rw.o-:
9-32. Now launch the render, Figure 9-33. making the sky cooler

Figure 9-33
The render
obtained with
artificial lighrs,
environment light
and white balance,
to generate cooler
colors
PHOTOGRAPHY & RENDERING with V-RAY

9. This last inevitable setting has "drained" a bit of warmth from the sky, but also from the
artificial lights. Correct this by changing the color temperature of the V-Ray Lights from
3500 K to 3000 K to obtain the final render in Figure 9-34.

Figure 9-34
The render
obtained with
slightly warmer
artificial lights

10. The jagged-edge effect visible along the edges of the V-Ray Lights, Figure 9-35 (8 ),
is due to the anti-aliasing, which doesn't always work well in the overexposed areas,
especially with lights. To eliminate the problem, activate Sub-Pixel Mapping and Clamp
Output in the Color Mapping rollout menu, Figure 9-35.

11 Render Setup: V-Ray NFR 2.10.ot [.} S ~


A

Figure 9-35
The effect of applying
the Color mapping
options hig hlighted (A)
Conwnon

Type:
I V..i\ay I

junear multiply
!n<iirect illumination

Dark multiplier: r:.o- : P


p
I Settings I
V..i\ay:: color ma g
P Sub?xel mapping
da"l'oulput
Affect bad<Qround
Render aements

level:
I

ror-- .;,I ~
---
1----
and the effect without B!jght multiplier: r::o- ~ r Don't affect colors (adaptation only) B
r
-----
I
Gamma:~ ~ Linear wa1dlow
the highlighted options
activated (B)
IProdudion Preset: 1----
(' AdiveShade View: !Perspective ~ ...... l __"*lililiill

Figure 9-36
The image obmined
after apply-ing a
slight curve, using
the Curve tool in the
V-Ray Frame buffer.
The final file is
Chap09-05-night-
FINAL.max

THIS EXERCISE CAN BE SEEN IN P&R-VRAv \ CHAPTER 09 \VIDEO\ V1orn-09-1.MP4 ~


In this chapter we will explore various functions
1: for obtaining realistic effects when simulating
vegetation and carpet. We will explain the meaning
and usefulness of Bump, Displacement, VrayFur
and Proxy.
This chapter is dedicated to ''pure" tools, that
is, tools with which you need to gain confidence,
but which don~ require you to have a strong
theoretical background in order use them correctly.
Using the files provided, you can put these tools
into practice, and receive further assistance from

- the videos that briefly explain how each of them


works.

.8
;:
I
PHOTOGRAPHY & RENDERING with V- RAY

Introduction to Bump and Displacement


Bump and Displacement are methods used in computer graphics to give surfaces a relief
effect using black and white maps, in which the white represents maximum relief, black
represents minimum relief and all the grey tones are the intermediate levels. The advantage
of these systems is that the result is visible in your renders but no polygons are actually
moved or modelled.
Although the final purpose is the same for both, the two systems are completely different.
With Bump, the rendering engine creates a play of light that deceives the eye, convincing
us that there is really relief and coarseness. It's a quick method that uses few resources and
which carries out its job very well under certain ci rcumstances. No geometry is actually
produced - it is just the light and shadows that give us the effect. In fact, you need only cast
a light onto an object with a bump map to see that the profile has remained unchanged.

Note: The bump loses incisiveness when the view is more tangential to the surface,
Figure 10-1 (A). Given that no polygons are produced, the sensation is that the surface
remains flat, especially from far away. On t he contrary, when the surface is front-on, the
play of light and shadow is often sufficient, Figure 10-1 (B).

Figure 10-1
The bump effect on
a flat surface with a
view tangential to the
surface (A) and the
bump effect on the
same surface, but with
a frontal view (B)
A B

With Displacement, a map is also used, just like with Bump. The difference, however, is
that the map is used to generate new polygons, which is why "real" shadows form in this
case, Fig ure 10-2. If we cast a light onto our object, you will notice that the profile has
actually been changed by the displacement effect. With this technique the polygons really
exist. They are only created by the rendering engine during the production phase, and
in fact, the effect isn't visible in the viewport. Displacement is a more costly method in
terms of time and resources but it offers a decisively more realistic result. This doesn't mean
that Displacement is better than Bump. The best method should be chosen each time,
depending on the situation.

A B
Figure 10-2
The Bump (A) and
Displacement (B)
effects
CHAPTER 10 - SlMULATING VEGETATION & TEXTILES

Displacement as a Channel or Modifier


There are two different options when using a map for displacement:
Using the "Displacement'' channel of the material, Figure 10-3;
Using the VRayDisplacementMod modifier, Figure i 0-4.

(i21 Moten.I Editor 01 D<fault

oreo. IMoclfier u.t


(j) VRayOisplacelnentMod
Ill Sox

D.
[J
F igure 10-3
The Material
~ I

~
Editor palette
showing the ~
Displace channel (o ts - Pl>rMIOl!rS
-
I~ ~ l ~lil IX I~ I~ I ~ 1@.1111 10 Cl ~ 1'ype
(' :Ill~ l)iindscape)
~ !01-0erau1 ~yMti I fl :l[)~
Figure 10-4
(' &bdvislon
A panel showing rhe
An. rot!ltlon J100,o _;JP- Nonc
parameters of the
Rehct 1100,0 .;JP Nonc Conmonparams
VRayDisplacemenclvfod.
~ 1100,0 _;JP" None Tmnap
modifier. The list of
!OR 1100,0 .;JP None
Tronsll=t p oo,o .:.JP- None
~
I modifiers appears if we
&.mp : P' Noone Texlu'edlan ri-- .:j have an object selected
~splace None Alter texmap P' and the parameters of the
Nonc
Ffter bk.<jo,ocn ~ VRayDisplacementMod
P' None Amol.llt 11,0cm ii are only assigned to the
Slift lo,0cm .:.J selected object.
W3te" ~ r
10,llcn iJ
Rdotiw: ID bbox r
201T'OllP'l!I
Res<3ltbon ~ ;j
Pl'eM>on rs-- .:J
Tight bo.nls P
30 IMIJl)irlg{slhtrision -
Edge leng1h rr.o- .:Jxxels
View-dopondent P'
Max subcM ~ _;]
'Nlt bounds f;1"
u.e objert mur
~aintlnlJitv r
fdQerre$ ~ .:.J
-~1r
Spitmclhocl: jQuad .
Tl!JCIMIPnii:~:j
T911VlPlllU: W- .!}

The tool is the same in both cases. What makes the two met hods different is that the
VrayDisplacementMod modifier, Figure 10-4, is optimized and offers many more controls
than the channel does, Figure 10-3. You just need to know the characteristics of each of
th em and you can then evaluate which of the two methods to choose.
The material channel is good for applying Displacement to surfaces without thickness. It
would be suitable, for example, when simulating a lawn. In this case the properties can be
controlled by a central box located in the render panel, Figure 10-5.
PHOTOGRAPHY & RENDERING with V- RAY

lliD Render Setup: V-Ray NFR 2l0.o1 ~r:-"I


Common I V~ay I Inclttct Jlk.mination J Settings j Render Elements I
r+ V-Ray:: DMCsampler
Figure 10-5 V-Ray:: Default clsplac:ement
T he render setup P' OVerride Max's
dialogue box \Vith
the Settings tab and
I Edge lenglh ~ : jllfxels I AmcUlt rr,o- ~ Tight ba.lnds P
View-dependent P Relati~ to bbox P
the V-Ray::Default
Max sil>divs ~ ~
displacement rollout
menu selected [+ V-Ray:: System

~ IProruction ,.. Preset : J - - -


("" ActlVeShade 1/Jew: jFront !J Render I

The most interesting value in the Default Displacement rollout menu is the Edge length,
Figure 10-5, as it determines the level of definition that the new geometry created by the
displacement will have. For values greater than 4, the definition decreases, while for lower
values, it increases. The default is usually already the best value.
The controls for extruding a surface using the Displacement channel, Figu re 10-3, can be
activated through the box next to it, and as for all channels, the defa,ult value is 100. Make
sure you change this value before launching a render, otherwise you could find yourself in a
tropical jungle of polygons, as 100 is too high a value for Displaceme!nt.

Considerations about the VRayDisplacementMlod Modifier


With the VRayDisplacementMod modifier, Figure 10-4, the possibilities you have for
manipulating the Displacement effect increase significantly. Some important points of the
panel are:
1. 30 Mapping:This allows you to apply displacement to 30 objects;
2. TexMap:The field in which to load the displacement map;
3. Amount:This ind icates the maximum value for displacement;
4. Shift:This allows you to shift the starting point of the extrusion up or down;
5. Keep continuity:This generates points of continuity between e>Ctruded surfaces.

The Shift option may not seem very useful but it actually is. You can take advantage of it to
prevent a surface with displacement, Figure 10-7, from intersecting with objects resting on
top of it, Figure 10-8.

Figure 10-6 An image without Figure 10-7 Displacement Figu re 10'-8 D isplacement applied
Displacement applied to the Aoor with to the Aoor with Amount = 2 cm
Amount= 2cm and Shift = -2 cm
CHAPTER 10 - SIMULATING VEGETATION & TEXTILES

It often happens that when you extrude a plane by 2 cm, for instance, this plane intersects
with the objects resting upon it, Figure 10-7. Just enter the negative value of the extrusion
in the Shift field. If you extrude by 2 cm, set the Shift value to -2 cm, Figure 10-8. In this way
the surface will still be raised by 2 cm, but it will begin extruding from 2 cm lower, thus lining
up perfectly with the objects resting on it, without intersecting with them.

Considerations: Using the material channel or using the modifier in 20 mode is almost
the same thing when you need to map a flat surface. The VRayDisplacementMod
modifier actually looks better and is faster. For this reason, I always prefer the modifier
to the channel, as it performs much better all round.

Note: To avoid alignment problems between the map in the diffuse channel and the one
used in Displacement, always make sure you have corresponding maps of the same sizes.
PtiOTOGRAPHY & RENDERING With V-RAY

Simulating Grass and Carpet (Short Strands)


io simulate English grass, carpets and generally any object "with short strands'; the easiest
and most immediate thing to do is to use tne VRayMtl displacement channel.
Displacement only has one control, located next to the channel, which is set to 100 by
default. (Other controls can be found in the panel Rendering > Render setup > Settings >
V-Ray default displacement}.
To create a nice English lawn or a rug, we need to use a suitable displacement map, Figure
10-9, as well a.s a good texture. The texture blends with the Displacement relief, Figure 10-1 O,
to make the whole scene more credible.

Figure10-9 Figure 10-10


Grass texture to t\ texture with tones
load into rhe Diffuse of grey ro load into
channel the Displace channel

Note: Like for all channels, the Displacement value is set to 100 by default. We advise you
to lower it to 4 or 5 to begin with, as 100 is too high. The render will take a bit longer, but
the result will be decisively nicer, Figure 10-11.

Figure 10-11
J\ render with a lawn

To make your lawn even more realistic, you can create some slight imperfections in the
ground, for instance. Using the Push/Pull tool located in the EditPoly modifier, you can
easily create dips and humps so as to replicate the unevenness of a real lawn, Figure 10-12.

A B
Figure 10-12
A render of a
lawn with some
deformities (A)
and the same
deformities
visualized in
wireframe mode
(B)
CHAPTER 10 SIMULATING VEGETATION &. TEXTILES

To create a short-haired rug, Figure 10-15, you could use the Displace channel of the material
but for this kind of object, it's preferable t o use the VRayDisplacementMod modifier in 20
mode.

Figure 10-13
An image of
several rugs
rendered using
Displacement

A simple and im med iate method for producing a good rug, Figure 10-13, is to create a very
slim box (about 0.01 cm) w ith 5-6 subdivisions on each side and then apply a Turbosmooth
modifier with a couple of interactions.
The visual outcome will be a slightly rounded rectangle that will allow the hair t o be perfectly
distributed, even when using the 20 method.
For a better underst anding of these concepts, Video-1 0-1 indicated below, will further
clarify what we've said here.

THIS CONCEPT IS ILLUSTRATED IN P&R-VRAv \ CHAPTER 10 \ VIDEO \ VIDE0 10-1.MP4 5lj

Note: You can check the settings of the various parameters by opening the file Chap10-
01- carpet-displacement.max, located in the folder P&R-VRay \Chapter 70 \Exercises.
PHOTOGRAPHY & RENDERING with V-RAY

The Displacement of 30 Objects


To emphasize the physical quality of a wall using Displacement, the best choice is to use
the modifier in 3D mode. One option that we can't do without is Keep Continuity, Figure
10-14, which has purposely been created to solve a well-known problem that often forms
along edges.

D """"*1gfstbcMsion
edge 1-th ~ i)ix.is
"1cw-dqie dc11t ~
Hoxsbdvs~ .
F igure 10-14
llght bol.llds P'
Part of the
VRayDi$placementMod
modifier panel with the Edge 111resh Cl,05
Keep continuity option Vector dispiacemoit r
highlig hted Spit method: I~
Te>onapm'1: ro,o- 1j
Tl!JOMl)max:~.;J

Without Keep Continuity activated, each face tends to extrude frontwards, leaving spaces
between one surface and the next. Thanks to the Keep Continuity option, (which is only
available in 30 mode), V-Ray literally builds polygons that serve as joints, creating a realistic
effect, Figure 10-15.

Figure 10-15
An itnage
rendered
without
activating the
Keep continuity
option (A) and
another one
with the option
activated (B)

Note: If, for example, there is a surface like a wall in the foreground or entering
sideways, Displacement really makes a difference. If the wall is front-on however, and
perhaps far away, then it's better not to use th is option and use a bump instead.

Just like many of the other tools, Displacemen,t isn't a magic wand that can produce good
results automatically. Our contribution is fundamental and to get a good result, we need to
combine two elements well. These are:
A suitable Displacement map;
An oblique light that brings out the imperfections.
Even in photography you need to pay attention to these things. Photographing an uneven
surface doesn't automatically produce a visible effect in the shot. To enhance these
characteristics, you need suitable lighting, and oblique lighting in particular.
CHAPTER 10 - SIMULATING VEGETATION&. TEXTILES

Figure 10-16
An image
rendered with a
frontal light. T he
irregularity of the
wall is practically
indiscernible.

Figure 10-17
An image rendered
with a light at a
45 angle. The
irregularity of
the wall is more
evident.

Figure 10-18
An image rendered
with oblique
lighting. The
irregularity of the
wall is perfectly
visible.

In these three images, Figure 10-16, Figure 10-17 and Figure 10-18, the Displacement settings
and map are constant. Only the light varies. If the purpose is to bring out the irregular
appearance of the surface, the oblique lighting in Figure 10-18 gives the best result.
PHOTOGRAPHY & RENDERING with V-RAY

How to Create a Displacement Texture


It's not hard to create a Displacement texture. Just like w ith bump, you can often use the
same map you used in the Diffuse channel, after converting it to black and white and giving
it more contrast in Photoshop. When you have a surface that's rich in information, like a rock
for example, it's a good idea to give it a litt le treatment before assigning it, so as not to run
the risk of producing a surface that appears excessively "spiky': Figure 10-20 (A).
The treatment involves reducing the amount of detail using the Cutout filter in Photoshop
(located among the Artistic filters), and then "smoothing" it out using t he Gaussian Blur
filter.

Figure 10-19
The image of a
colored texture used
in the Diffuse channel
(A), che same texture
in b/w and with
added cona:asr (B),
the texture treated
using the Cutout filter
(C) and the texture
treated using the
Gaussian blur filter
to sofcen the edges
(D)

If we apply the textu re directly in b/w with contrast, Figure 10-19 (B), we get a spiky
Displacement with too much information, Figure 10-20 (A).
If, on the other hand, we add the above-mentioned filters to the texture, we obtain a texture
similar to the one in Figu re 10-19 (D) and the result of the Displacement will no longer be
spiky, Figure 10-20 (B).

Figure 10-20
A rendered image
showing the spiky
effect of using a
b/w texture (A) and
one a:eated using the
Cutout filter (B)
CHAPTER 10 - SIMULATING VEGETATION &. TEXTILES

How to Use the VRayFur Function


-
It's very eas;y to use the VRayFur function. The first step is to create
the object that will be covered in fur. With the object selected, choose
Geometryfoom the Create command panel, then VRay, and finally, click
on the VRa~vFur button, Figure 10-21 . . ~T!E! h
Once you've clicked on the VRayFur button, you will immediately
notice that1the selected object is covered in filaments, Figure 10-22 (A). ~~
VRal*xr I
VRa)i'lone I
VRayf<Jr
VRaVSclher

'I
[ N.vne and Color
IVRaif'loOO I
A I .. Par~ttt I
s.uroe cbJed:
t!o><'lOI
I
Leogth tl5,llcm .:

- ~ .i
.i
Gravity 13,0cm
Bendrr.o- .i Figure 10-21
Tap ~ ;_ Command
panel for the
Sdos ~.:J VRayFur
Knots ~ .:J function
Flat,..,,,,. 17
Figure 10-22 3D object covered in filaments obtained using the VRayFur funcrion Variation
(A) and the result produced by VRayFur after rendering (B) lll'ectionvar ~ :
Leogthvar ~ _;.
Tl1doles<var~.i
VRayfur g12nerates a series of splines on the surface of the selected Gra>tty ., ~ .i
object. The!;e splines are calibrated to behave like real fur, Figure 10-22 Cistriiution

(A). r Pe<face ~ :
,. p.,.,.. ~ :
In the scenie the VRayfur is represented by a square-shaped base, Ref.rr..,,.10
Placemont "
Figure 10-22 (A), to which you can assign a color or a texture that will
.. fnli'cbject
consequently color the fur. r Sdeded faces
rMator1a1 P-- .:.l
The paramE~ters, Figure 10-21 , contained in this object, function fairly
intuitively: 1length, Thickness, Gravity, Bend, and Taper.
r:::te W-<00rchite
a....n.i - _;J
In the Variation box you can control the haphazardness of the fur. The
default values produce a good effect in most cases. {+ !:!!!! b
r+ \'lewport ~l 11
Pay attention to the Distribution box, as it is used to adjust the density
of the fur. In this case, it's advisable to activate the Per area option,
always starting with very low values like 0 .01 for instance, to prevent your computer
crashing or becoming excessively slow. With low values, you will get little fur - which is
ideal for adjusting all the parameters - and you can then thicken the fur on the object prior
to renderinig. At that point, you can change the parameter from 0.01 to 3.0 or 7.0 -10.0,
depending on how dense you want to make it and what computer/memory you are usihg.

THIS CONCEPT IS ILLUSTRATED IN P&R-VRAv \ CHAPTER 10 \ VIDEO\ Vmeo-10-2.MP4 ~

Considerations: At the end of this video I assign the VRayHairMtl material. This is a very
simple material to use and is available in V-Ray version 2.20 or later.

Note: You can verify this concept by opening the file Chap 10-02- F:ur.max, located in the
folder P&R-VRay \Chapter 70 \Exercises.
PHOTOGRAPHY & RENDERING with V-RAY

VRayFur is also very convenient for generating tall grass, Figure 10-23, or carpets rich in
filaments, Figure 10-24. It's very easy to apply, as shown in the following video.

Figure 10-23
A rendered
image showing
grass generated
wirh longer
filaments

THIS CONCEPT IS ILLUSTRATED IN P&RVRAY \ CHAPTER 10 \ VIDEO\ VIDE0103.MP4 ~

Note: You can verify this concept by opening the file Chap10-03-Lawn.max, located in
the folder P&R-VRay \Chapter 7O\Exercises.

In the same way that we apply VRayFur to a plane, to simulate grass, we can also apply it t o
a plane to simulate a hairy rug, Figu re 10-24. The procedure is identical to the previous one.
A different color has been assigned to each rug.

Figure 10-24
A rendered image
showing filaments
generated on rugs

Note: You can verify this concept by opening the file Chap10-04-Rugs.max, located in
the folder P&R-VRay \Chapter 70 \Exercises.

Considerations: Unlike w hen I use Displacement, I 1Prefer to apply VRayFur to a plane


without any thickness for these kinds of rugs.
Simulating Ivy
CHAPTER 10 - SIMULATING VEGETATION & TEXTILES

-
It can be useful to simulate ivy and it's always a fun thing to do. The following image was
created by one of my pupils, Figure 10-25.

Figure 10-25
A fantasy image,
rendered with ivy on
the walls and on the
subject, created by
Daniele Ludovisi

Ivy adds detail and realism to exterior scenes and a script makes simulating it easy and
intuitive to use. The script is free and was created by Manfred Grim, based on the Ivy
Generator by Thomas Luft.

Note: Download the script from the website www.guruware.at and just copy the gw_
lvy.dlo file (after unzipping it), into t he 3ds Max plugins folder.

Once you've copied the gw_lvy.dlo file, start 3ds Max. You will find a new item in the
Geometry drop-down menu: Guruware, containing gwlvy, the ivy generator.
You just need to p lant a "seed" and make it grow to your liking by clicking on the Grow Ivy
button. You can then stop the growth by clicking on the Pause Growth button.

THIS CONCEPT IS ILLUSTRATED IN P&R-VRAv \ CHAPTER 10 \ VtoEO \ VtDE0 10-4.MP4 ~

Here is some advice about the ivy generator:


Use the Autogrid check box to help you plant the seed.
Always use real scale models, otherwise the ivy could appear too small or too large and
you'll have to resize it. If the model is correct, the scale and proportions will be right
immediately.
gwlvy automatically uses textures that it finds in the maps folder in 3ds Max. If ivy
appears in the scene without leaves, you just need to copy the maps located in the folder
P&R-VRay \Chapter 70 \Leaves of the DVD into the maps folder you'll find in the 3ds Max
installation folder.
PHOTOGRAPHY & RENDERING with V-RAY

Memory Problems? V-Ray Proxy


Dealing with vegetation is never simple: it looks great, but it comes at a high price in terms
of polygons. In fact, while a basic model may have 100,000 polygons, others can reach over
20 million if you add trees, plants and grass in general.
A lot of storage space is required to manage all this data, and in any case, there is a limit
over which your computer is always at risk of crashing if you don't apply the appropriate
remedies. The solution is V-Ray Proxy. It's a very simple tool that allows you to externalize
any object to prevent it from weighing on the scene.

How to Create and Import a Proxy Object


It's very easy to create a Proxy object. The following steps and video will clarify the procedure:
1. Select the object you want to externalize.
2. Right-click and select V-Rayexport mesh from the context menu.
3. Type the name of the new external file in the panel, Figure 10-26.
4. Specify that you want a placeholder by activating the Automatically create proxies
option, Figure 10-26.

VR'f mesh fXPOlt ~


Fold<r: C:~sers~lelte\pocumenls\;!doMox~ Browse I
r Elcport ol selected objects In a siigle fie
{assumes coni>ln~ vnnesh pivot is at coornte origin)
Elcport each Sl!ledl!d object In a separate ~
(presenes the pivots of inclvlcbll objects)
Fief alJero.vrmesh I Browse
Figure 10-26 r Specif> llf! me$h Pld< prev1e" ...~
VRay mesh export
dialogue box
r Elcportanlnwllion ~.mraogc; ISa!r>eriNtlo!lange
P' ~"""'" "' s Wing export Slart fr61'1e: ---- ~
i3ldftOI : noo- ,;_j

OK canc..i

S. Once you've clicked OK, a schematic figure will appear in the scene, Figure 10-27.
This represents the object in question, but without the weight of the polygons it had
beforehand.

Figure 10-27
A proxy object in
the foreground,
represented by the
outline of a tree
CHAPTER 10 - SIMULATING VEGETATION & TEXTILES

The Proxy, Figure 10-27, can be multiplied and scaled beyond limit, Figure 10-28, and your
computer won't have any data storage problems, even with very large numbers.

Figure 10-28
There "~-ould be" 100
million polygons in
this render, but thanks
co V-Rar Proxy, all the
models can be taken
out of the file and the
scene can be managed as
though it only had a few
polygons.
The aligned ttees allow us
to see the infinite number
of polygons present

THIS CONCEPT IS ILLUSTRATED IN P &R-VRAv \ C HAPTER 10 \ V IDEO\ V 10E0-10-5. MP4 ~

Note: When you change computers, remember to transfer not only the 30 model and the
t extures, but also the .VRMESH files that you've exported.

Note: In order to better manage the materials assigned to the Proxies, make sure that
you only have one material for each Proxy. If you have various objects, save the proxies
separately, or, to speed things up, merge all the objects into a single one using t he Attach
function in EditPoly. A single material (Multi/Sub-object) will automatically be created with
its relative sub-materials.

To import a Proxy object into our scene, it's obviously necessary to have the file in .VRMESH
format. Proceed in the following way:
1. Select VRayProxy from the Create > Geometry > V-Ray panel.
2. Click on the point in the scene In which you intend to position the proxy and a dialogue
box w ill open. Select your .VRMESH proxy file.
3. The proxy will appear in the scene and you can assign a material to it - the same one
it had before being transformed into a proxy.

THIS CONCEPT IS ILLUSTRATED IN P &R-VRAv \ CHAPTER 10 \ VIDEO \ V10Eo -10- 6.MP4 ~


PHOTOGRAPHY & RENDERING with V-RAY

Exercise: How to Create the Curtain Effect


In this exercise we will analyse anot her kind of material, VRay2SidedMtl, suitable for
simulating translucence in objects without thickness. It is therefore useful for imitating the
effect of light passing through a curtain.
1. Start 3ds Max and V-Ray and open t he file Chap 10-05-curtain-START.m ax, located
in the folder P&R-VRay \Chapter 10 \Exercises. The scene is ready w ith all its materials,
lights, the sun and the Global illumination settings. The only thing you need to work on
is the curtain material.
2. Launch a render to see your starting point and you will obtain an image similar to t he
one in Figure 10-29.

Figure 10-29
Initial sceoe with
a generic material
assigned ro the
curtain

3. Open the Material Editor, click on a free slot, type the name Curtain for the material,
click on Standard and select VRay2SidedMtl from the list of materials available in
V-Ray, Figure 10-30. Now drag it over to the Material Editor, Figure 10-31 .
4. Click on t he Front button, Figure 10-31 , add a normal VRayMtl, then set its Diffuse color
to RGB 2.20, 220, 220.

1~1~1 _ ;ri
I ~ Material/Map Browser ~
!Search by N:ame ...
~
+ Mia librerio.mot UBI
Matertals 11 I'@ ~ I ttliJ I >e I \i I~ I ~ I @.I m'9 I0 \\ ~
+ standard I / II Tondo Tll '/Roy2Sidecto1~ I
VRO)' NFR 2.10.01 I Parameters h
I VRay2SidedMtl
VRayBlendMtt
VRayCorPaintMtl
~ VRoyFastSSS
~ VRayFasts552 Front Material # 1 ( 'IRoyMH) __j
VRayFlakesMtl Backmall!ftal: =-- - -Non=---:===:!
Translucency: 0 Nale iI100,0 _;j
t'
OK I Cancel
I_J P' Force single-sided sub.,,,.terials
n - -

Figure 10-30 Par t of the Marerial/J\fap Browser wirh Figure 10-31 The parameters of the VRay2SidedMtl
the VRay2SidedMtl highlighted with tlie Front field highlighted

5. Assign the Curtain material you just created, (with the name Tulle), to the curtain object
and launch a render to obtain the image in Figure 10-32.
CHAPTER 10 - SIMULATING VEGETATION & TEXTILES

Figure 10-32
An image of the
curtain with the
VRay2SideMtl
effect

6. If you want the solar rays to pass through the curtain and project onto the wall, (which
is typical with very thin curtain s like tulle), you'll have to use the Standard 3ds Max
Falloff map. Click on the Material# 7 (VRayMt/) button, Figure 10-31, then select Opacity
from among the Maps options, Figure 10-33. Finally, add the Falloff map, Figure 10-34,
which w ill reveal the parameters for modifying the Falloff map in the Material Editor,
Figure 10-35.

Translicent .I100,0 ~ P' None I ;


Figure 10-33
8uTrC> jxi,o ;JP None I Part of the list of Map
Displace j100,o _;JP None I options showing the channel
Opacity j 100,0 .;WI None I where the Falloff map is to
Envi'onment P' None
I I_; be loaded

~ Mllerial/M p Bmw<er ~I
"ii' JSearch by Name ...

Maps
- St.>ndard I!!
. Bitmap
Camera Mop Per Pixel Figure 10-34
!~i Cellular
Part of the list of standard
. . Checke:r
materials in 3ds Max with
ColorCorredion II Falloff highlighted
Combustion
composltt
i'l Dent
I Falloff
Flat Mirror

r ~. iJ Cancel I

Opacity: pl !Mop#l .. Foloff I Figure 10-35


- Falloff Parameters h By changing the box

~~
shown in red, located
None
fr.'~ amongst the parameters
JiOO;Oi] None IP' :> of the Falloff map, we
FalloffType: lPerpencic.JIM / Paraltj ... can control the quantity
FaUoffDirection: jYJewlog DirecUon (Qmcra Z-Alds) of light passing through
- ~ ~
the curcain
PHOTOGRAPHY & RENDERING with V- RAY

7. Finally, change the dark color of the Falloff, Figure 10-35, to make it lighter and control
how many solar rays can pass through the curtain .. l aunch a render to see the rays cast
onto the wall, Figure 10-36.

Figure 10-36
Final render of che
curtain using che
VRay2SidedMcl and a
Falloff map

THIS CONCEPT IS ILLUSTRATED IN P&R-VRAY \ CHAPTER 10 \ VIDEO\ V IDE0107. MP4 ~

Note: You can verify th is concept by opening the file Chap1006-curtain-FINAL.max,


located in the folder P&R-VRay \Chapter 10 \ Exercises.

Considerations: Always keep in mind the difference in brightness bet ween the light s
involved - in this case, between the light in the interior and the light from the sun
that is being filtered through the white curtain. Normally this situation would generate
strong overexposure on the curtain material, but as you can see in Figure 10-36, neither
the sky outside nor the curtain appear overexposed. This is because the color mapping
has already been set to Exponential.

Note: For a simulation like this to be complete, a Portal V-Ray Light should be placed in
front of the curtain. In this exercise it hasn't been applied or mentioned, given that we
haven't yet covered this, but in Chapter 11 - The SRSW Method in Interior Rendering, we
w ill be able to go back to this exercise and add the extra element quite simply.
The 5-Step Render Work.flow (5SRW), developed
1: personally and together with other artists in the
CGworld group, is a very simple educational
method that undertakes to split the production of
a render into 5 very specific phases. These phases
are: Framing, Light Balance, Creating Materials,
Final Rendering and .Post-Production.
Each phase has its own concepts and parameters.
The most important aim ofthe 5SRW method is
to help you develop a solid frame ofmind that
includes all the guidelines you need to create a
render. Then, once you've mastered this general

-- approach, it will be easier to expand your


knowledge according to your specific needs.
In this chapter we will apply the 5 Steps to create
an interior render.

.8
;::
I

PHOTOGRAPHY Hi RENDERING wlth V-RAY

Introduction to the SSRW Method


In this chapter we will carry out the first four steps of the 5-Step Render Workflow (SSRW),
made up of the following points:
1. Analysis of the model;
2. Light balance;
3. Creation of materials;
4. Final rendering.
The fifth step, Post-production, will be dealt with in Chapter 13 - White Balance and
Contrast. The purpose of this exercise is to create uniform, diffused lighting throughout the
space - the soft and encompassing lighting that is often used in design catalogues.
To explain the 5-Step Render Workflow (SSRW), we'll examine an interior render, Figure
11 -1 and analyze the various fundamental phases used to achieve a photorealistic outcome,
Figure 11 -2.

F igure 11-1
The final image
of the interior,
rendered without
materials assigned,
which will be used
to explain the SSRW
method

F igure 11-2
The hnal image
of the interior,
rendered with
materials assigned,
and used to explain
the SSRW method
CHAPTER 11 - THE 5SRW METHOD IN I NTERIOR RENDERJNG

Step-1: Analysis of the 30 Model


Step-1 is dedicated to framing, but it is also a kind of control analysis for checking whether
your 30 model reproduces a set of characteristics - summarized into three very simple
rules - which will help us avoid a number of worries during the production phase.
Rule 1: Each model must always be in 1:1 scale, but be careful not to confuse the scale
with the unit of measurement. You can set meters, centimeters, or kilometers, but a model
must always be scaled 1: 1. So, a seat can be equally represented as being 45 centimeters
or 0.45 metres tall. Objects must always be the same size as they are in real life.
Rule 2: The models must be sufficiently detailed. Rounded edges, small details and folds
are not just decorative aspects of a render. They are fundamental and contribute in a
critical way to the three-dimensionality of the image. The models used in this tutorial
and in the book are all from designconnected.com. They are all high quality and have
been purposefully modelled for photographic rendering.
Rule 3: The model must be "clean'~ without any overlapping faces or polygons that aren't
connected by even just a few millimeters. The cleaner the model is, the more we can be
sure that the result will not contain unexplainable artifacts in the render phase.
Having considered these three simple rules, we can move on to Step-2, which is dedicated
to setting the Light Balance. Keep in mind that we should never alter the lights in an unreal
way, for example by reducing the intensity of the sun or placing invisible floating light
spheres in the middle of a scene. V-Ray is a software program for photographic simulation:
the more we behave like real photographers, the more the simulation will look like a real
photo.

Step-2: Light Balance


As a starting point, set up a V-Ray Physical Camera with the following values:
F =8 (default);
Shutter speed= 10 (meaning 1/ 10);
ISO= 100 (default).
Set Color mapping from Linear (the default setting) to Exponential, Figure 11-3. This will
help create uniform, diffused lighting and soften any overexposed areas.

liij Render Setup: V-Ray NFR 2J0.01

Figure 11-3
!rype: 1~w Ir ~IMSll*1Q
--------r ~aulplt
Dlllt.U~: ~ : P' AffKt badvCUld
" r- : Render Serup
dialogue box with
u;r= : r cadapta11an ontv> I the Exponential
II 1tt111.Utiier:
!G:Mrna:p;r- iJ r
00n1 affttt....
u-worldlow _J option and Gamma
setting highlighted
V~y:: Frame buffer

Preset:I---
_, IP<rsp@Ctiw! eI
- ---
- ~
PHOTOGRAl!HY & RENDERING with V-RAY

Before continuing, let's analyze the scene in Figure 11-4, in order to predict how the natural
light will be distributed and whether we'll need support lights to brighten up any shadowed
areas.

shadowed area

,-- --- .... . ..---....


Figure 11-4
Top view of the ,,
,'
scene showing an
analysis of the areas
and the camera
2 J\ 0,./ ,,
'
'
'
'I
I
I I

,,
I I

,
,
I

' ''
'' , ,'

~~LI

Figure 11-5
Perspective view
of the camera as
placed in Figure
11-4

The natural lights available to us are the sun and the sky. Their light enters the scene, Figure
11-4, through two ''portals'~ one of which (Diffused light 1) appears in the frame in Figure 11-
5. Here we can certainly expect a conspicuous shadowed area to be generated behind the
sofa and on the side of the table near the V-Ray Physical Camera, Figure 11-4.
Assign a V-Ray default material to the whole scene, using the Render Setup dialogue box,
Figure 11-6. Tick the Override mt/ option located in the V-Ray:: Global switches rollout menu,
then click the None button and select VRayMtl as the type of material.
CHAPTER 11 - THE SSRW METHOD IN INTERIOR RENDERING

~ Render Setup: V-Ray NFR2JO.ol CEJ'13'~


Common I V-Ray I Indirect il.ninatlon I settings I Render Elements I
V-Rav:: Global s-Mtdles
Geometry
P ~t
IP Matmals
Reflectionfrelra<tian
Figure 11-6
Render Serup
r Force back face oJing
::=.=
r Max cleplh ~ _;! dialogue box with

r
::;~j;M:;;'ra::=t=i!lhts==lo=ff=wo=lh=GJ===.:: : ~ Fnter~
the Override mt!
fer GI option and the None
' button highlighted
"7 Hdden lights Transp. rutoff io;oor- ;I
in me V-Ray:: Global
P Shadow$ IP OYerride md: C NOriii 111
r Show GI oriy I" Glossy effects OYemce c:xoua<: .. . I
switches rollout menu

.. ,Produc1ion . l'teset: j - - -
r AcliveShade View: IPerspo!dive ~
-
Now add the sun and the sky, following the instructions seen in Chapter 9 - V-Ray Sun
System and set up Global illumination for a t est render:
lrradiance map = LOW
Light Cache = 500
The result of the test render, Figure 11 -7, appears "dirty" and full of artifacts but it is very
quick to carryout Th is allows us to get a quick idea of how the light is behaving, Figure 11-7.

Figure 11-7
The result of me test
render showing the
artifacts

Here we have three very common situations, Figure 11 -7:


1. There are ambient shadows in the scene but they are not very sharp.
2. Part of the interior is exposed to an excessively strong light source, which is generating
too much contrast and preventing us from ach ieving soft, encompassing lighting.
3. Part of the interior is in shadow.
We needn't worry about stains and grain at this stage. These kinds of artifacts are only
related to the definition and won't change the distribution of light, or our perception of the
light balance. These problems will be explored in Step-4, which is ded icated to the cleaning
and final definition of the render. For now we will concentrate exclusively on the lighting.

Note: The images in figure 11-4, Figure 11-5 and Figure 11-7 are part of the file Chap11-
01-interior-START.max, located in the folder P&R-VRay \ Chapter 11 \ Exercises.
PHOTOGRAPHY & RENDERING with V RAV

Environment Shadows
The V-Ray Sky, as is evident from the image in Figure 11-7, does not produce pronounced
shadows, and upon reflection, this is logical. Secondary daylight, that is, light coming from
the sky alone, almost never generates sharp shadows, as it arrives from all angles. When
light enters an interior, it passes through a window and this window becomes a kind of
"portal': It gives a precise direction to the light coming from the sky.
To create the environment shadows produced by the sky in an interior, you only need to add
a V-Ray Light at each opening. Position them 30-40 cm outside the windows, Figure 11-8,
and select Skylight portal. The V-Ray Light portal is basically more like a shadow emitter
than a real light.

Figure 11-8
Depiction of
a V-Ray Light
indicated by the
red arrow

A V-Ray Light portal should also be placed on the other side, creating the kind of
arrangement in Figure 11-9.

Figur e 11-9
Top view of che
room showing che
cwo V-Ray Light
portals

, .~ .n
CHAPTER 11 - THE SSRW METHOD IN INTERIOR RENDERING

This is a rule that generally always applies: create a V-Ray ~ 1 ~ 1 lii l @! lgll ~I
Light portal for every opening.
o ~II~ 62. ~ "
jVRav
Note: Even though we are going to use a second Portal
I - ObicctT~ I
r AulDGl1d
in this demonstration, it will be applied in a slightly l[ VRa~ VRayIES I
different way, as you will presently see. !ayAmblentugj ~VSlli I
Nome aid Coler I
As you can see, when we select the Skylight portal, Figure
11-10, a set of options, including intensity, color, and
r;
-
Gener>ll
P.....eters
I
visibility disappear. In fact, this is not a real light and will
not be used to increase the brightness of the interior. It will
P en
Type:
p
!Plane
EXdude

EMblo """'JX)rt shadtiil


.I Figure 11-10
The control panel of
simply be used to produce the direct shadows that V-Ray lnb!nsity a V-Ray Light with
sky wouldn't be able to create on its own. I.Wis: Jo.f.!ult @mage) the Skylight po rtal
The result, with just one V-Ray Light portal placed to the l'l.j....... :ro.o- .:.J option highlighted

left of the frame, can be checked by observing Figure 11-


Mode: jeo1or .
Coler; I I
11 . T""l"""hr": 16500,0 .:.J

r-
The ambient shadows are now decisively more defined but
Half-lenglh: j 10,0cm .:.J
the grain has also increased. We won't deal with that just Half-.odth: j 10,0cm .:.J
yet though. zo j 10,m:m .:.J
Options
At this stage, the grain is emphasized by the uniform
p ~t shado't ~
color of the scene, but only when we carry out the final r OOl..d>Je-sided
rendering, with all the colors and textures assigned, can we r r"'~
F1 Igwe light norm"<
make a correct assessment of how much we should "force" r Nodocov
V-Ray to produce a cleaner result. P skMit portal tr Sin-de
r Stare with irrodionc:e ma;
J;1 Afttctdilfuse
~ Aff!C:ts;l!!O.Jlar
P A~refledions

Figure 11-11
The result with only
one V-Ray Light
Portal placed to the
left of the frame
PHOTOGRAPHY & RENDERING with V-RAY

Creating Soft Lighting in an Interior


If an area is strongly illuminated, we don't have much choice: we can either make it appear
overexposed or the shadowed areas will be too dark. The dynamic gamma available to us is
very limited, so t o achieve soft lighting we need to ensure tbat no light is excessive.
For t his reason, we will try to "filter" the direct light of the sun using a curtain - a t rick
which is also used in photography. On one hand, we will avoid having to deal with excessive
contrast and, on the other hand, we can avoid showing an (inevitably) white exterior, given
that the amount of light outside is around 100 times greater, and would be impossible to
capture without risking overexposure.
We will use VRay2SidedMtl to simulate a curtain. This is a very simple mat erial to use and
has been designed especially for simulating translucent objects that have no thickness, as in
the case of leaves or curtains (see Exercise: How to Create the Curtain Effect in Chapter 70).
Place the curtain, which is momentarily hidden, by right-clicking on the scene, Figure 11-12.
Choose the option "Unhide by Name"from the context menu. Select the name'curtain' from
the relative dialogue box.
As you can see, the curtain object, Figure 11-13, was already in the scene but it had been
kept hidden to show you what would happen if it wasn't t here.

Figure 11-12
An image of the
scene with the
context menu visible
and the U11hide
l!J Name option
highlighted. This
allows us ro switch
on an object that was
previously hidden
using the Hide
S elecfio11 option

Figure 11-13
An image of the
scene after the
curtain object has
reappeared
CHAPTER 11 - T HE SSRW METHOD I N INTERIOR RENDERING

Launch the render to obtain the image in Figure 11-14. The curtain effect has been correctly
simulated, but something is still missing.

Figure 11-14
The render obtained
after revealing the
curtain object with
a Vray2SidedMtl
material already
assigned to it

A curtain bathed in direct sunlight, Figure 11-15, acts as a filter and effectively, in the render
in Figure 11-14, the light irradiating through it isn't as strong as one might expect in real life.
V-Ray simulates many things but in cases like this it is unthinkable that it could calculate
how much light passes through the curtain and irradiates through to the other side.
To realistically simulate the light diffused by our curtain, we will use another V-Ray Light in
Portal mode, this time employing the Simple option.
The Simple option allows the V-Ray Light to channel the external environment light into the
interior and to overstep any objects in its way - the curtain in this case.

Figure 11-15
A photograph
showing the effect
of light shining
duough a curtain
PHOTOGRAPHY Ek RENDERING with V-RAY

Place the V-Ray light, using the two options Skylight portal and Simple in the control panel,
Figure 11-16. Position it just inside the curtain, Figure 11-17, to obtain a more realistic result,
Figure 11 -18.

~ . -
P'
Typo:
On
!Plane
Ex<ble

J I
~ l:Nble~~
- lntensfty

lo.feJt tnage) .
ltits:
f.'Utlpler: ~ :1 I
Figure 11-16
Hodo: Jca1or
Cele<: I
-I Figure 11-17
Control panel T~1b.re: r:;u:-- :j J\n image
g..,
of a V-Ray light sho,~ing the
Half-len!)!ll: j 155.283o ,;j
showing the V-Rar light
Half-vdd!ll: l1t2.039o :j
options used positioned just
~ ~.;J
inside me curtain
~"""-
P c...t,st.~

Irr lnVl"..1lle
00t..*-sded

I r;; lMe light


I ..,..,,,
i;; SkMit PO<tol i;; ~

I
r
F1
Stort -Mtll ~mac:

Affect diffia
f1 Aff1'CtspeaJ.-
fi7 Affect reflK!ians _
l

Figure 11-18
The result of
the render with
a newV-Ray
light in Skylight
portal mode

Now the light on the wall next to the curtain, Figure 11-18, appears more consistent and
more in "relation" to the curtain's backlighting.
Furthermore, thanks to the reduced contrast obtained by "filtering" the sun's rays with the
curtain, the light ing has automatically become softer, (if we compare it with the highl:1
contrasted image in Figure 11-11 ), and the exposure is much easier to manage. Now we just
need to fix the shadowed area.

Considerations: It's worth pointing out that using curtains to reduce contrast and
make the light softer and easier to photograph, is first and foremost a technique used
by photographers in live shooting. All I've done is implement this concept into V-Ray.
CHAPTER 11 - THE SSRW METHOD IN INTERIOR RENDERING

Shadowed Areas
Even in real life, it is quite rare to find oneself in a situation in which an interior is alread y
perfectly illuminated. Artificial lights are always needed to help amalgamate everything. In
this case we will use a V-Ray light Plane.
We have to pay a lot of attention, however, every time we add a light. While it could help
to make al l the lighting more uniform, at the same time it could also flatten the forms by
excessively lightening the shadows that actually convey a sense of three-dimensionality. We
mustn't ever forget that each light"draws" new forms, so every time we add one, we have to
carefully check its contribution.
Turn off all the V-Ray lights in the scene, the Sun and the V-RaySky by unchecking the box in
the Environment tab, Figure 11-19, (accessed by typing the 8 key).

Figure 11-19
The Environment and
Effects dialogue box with
the Environment tab
selected and the Use Map
option deactivated

Add a new V-Ray light in the position shown in Figure 11-20. Use a power of 100 watts and
position it about 1 - 1.5 meters from the ground.
We usually try not to place these light in contact with other surfaces, like walls and floors, to
avoid overexposure.

Figure 11-20
An image showing
the V-Ray light
placed in the scene
- PHOTOGRAPHY&. RENDERING with V- RAY

The graphic result in the presence of a single light can be seen in Figure 11-21 .

Figure 11-21
The result of
the render in the
presence of a single
bank light

The range of action of a light is a very important aspect. In mathematical terms, light always
decays in accordance with the famous inverse-square law. Lighting is more intense near a
light source and it decreases rapidly as it moves away from it. So the distance at which we
position lights is fundamental. We need to estimate the area that the new light will cover.
Reactivate all the lights and compare Figure 11-21 to Figure 11-22:

Figure 11-22
The render result
with all lights active

The new light has definitely helped with the shadowed area of the table, Figure 11-22, and
since it decays quickly, it doesn't undermine the lighting near the curtain. It does, however,
illuminate the sides of the two sofas on the right a bit too much. It's not bad to have some
shadowed areas - on the contrary, they are fundamental in giving the image depth. So, we
want to light up the t able but not the sofas on the right, because with this light added to the
natura l light, the risk is that they "'{ill appear flat.
To ensure that the V-Ray Light illuminates the table but not the sofas, we need to contain
the beam of light emitted. In studios, this is done using barn doors and grids for Bank lights,
Figure 11-23, which laterally obstruct the light to limit its field of action.
CHAPTER 11 - THE SSRW METHOD IN INTERIOR RENDERING

Figure 11-24
Figure 11-23 Part of the control
Examples panel of a V-Ray
of grids and light with the
barn doors for Directional option
directing light in hlghlighted
a srudio

We can easily simulate this effect in V-Ray using the Directional option, Figure 11-24, which
is available from version 2.0 onwards. With a value of 0 .0 nothing happens, while at a setting
of 1.0, the barn doors are completely closed and the light is practically nullified. We are
interested, then, in values ranging from 0.1 to 0 .9, which indicate the gradual closure of the
barn doors.

Note: The more closed the barn doors are, the more the light is channeled, becoming
more intense as a result. To maintain the desired level of lighting regardless of how closed
the barn doors are, you'll have to reduce the emission strength.

Another solution for limiting the light to the sides, is to rotate the V-Ray Light, Figure 11-25
and Figure 11-26.

Figure 11-25 Top view with the light front on Figure 11-26 Top view with a rotated light

As you can clearly see in these top views, Figure 11-25 and Figure 11-26, the amount of light
falling on the table is practically the same - the only thing that changes is the diffusion of
light to the side. Thanks to this studio lighting trick, we get the same result with just a simple
rotation.

Figure 11-27 The impact of the frontal light Figure 11-28 The impact of the rotated
on the scene light on the scene
PHOTOGRAPHY&. RENDERING with V-RAY

Figure 11-29
The result of the
render with all the
lights active

Figure 11 -29 shows the fina l result with all the lights activated. Even though we have
combined natural and artificial light, the result is still fairly even and balanced. This is
certainly the most difficult step. It doesn't require extensive knowledge of the software, but
instead requires in-depth knowledge on how to use light to model a scene and obtain a
photograph or a render with nice, three-dimensional forms. If we look at the render and
perceive a sense of completeness, despite the lack of all the materials, it means that the light
balance has been set correctly.

Note: To improve the distribution of light, we have applied a curve in the V-Ray frame
buffer, Figure 11-30. This is very useful, especially when rendering interiors.

Figure 11-30
Color corrections
ilialogue box [Q,99"""[0;i8 Cur,. color contciion

0,9
__.
[0,"8; 1, 19)

0,8
>---- v
/
0,7
v
0,8
0,$ /
O.
I
0,3
I/
0,2
J
/
0,1
__. /
0,1 0,2 O.l 0.4 0,5 0,8 0.7 0.0 0,9

Note: The image in Figure 11 -29 can be found in the file CHAP11-02-interior-BALANCE.
max, located in the folder P&R-VRay \ Chapter11 \Exercises.
CHAPTER 11 - THE SSRW METHOD IN INTERIOR RENDERING

V-Ray Light Lister


With the latest versions of V-Ray, you can activate the V-Ray Light Lister, Figure 11-31, from
the Tools drop-down menu and reveal its dialogue _box, Figure 11-32.

-D I08;i~Ei
Ecftt IToOi5l Group Views Cttatt Modifitr> Animatio

I ~~'"~
...~ Optn Cont>iner Explorr
Now Sc""' Elcplorer...
0 ELI~
,, +
" ' JI Manag Sct11t &plor r...
Saved Sct11e Explorers Figure 11-31
Containm: Tools drop-down
lsolat Stltdion AltQ menu with the
Display Floater V-Ray Light Lister
Manag Layers. option highlighted
Manage Scene States...

Light lister...
VRay Light Lister

Mirror...
Amy...
Align
lia1 V-Ray Light Lister
eon11oura11on
[" (" Generol Settings 61 Al ~Is (" Selectrd ~Is (" Seledlon Set: j111vc1o sedlc
- 11e1res11 I
I
- Ll<ilts
V~y~ls
Color Temporaue Diff. Spec. R~Olust subd.
' OnName
Ji;; ~yllghl01 1so.o
Ml.I~
;.1o Ullts
r JS91.o ;.1 IRadant power <
Shaclools SUxlvs
F7
Bias Invisllle~t
rs--;J 10,o:lan ;J r ISi11>1e - p F7 17 (1500 ;J
JP ~yllghl02 (SM ;J Qr!s!l-IO,O ;JJRadant- ( p rs-- ;J (O,O:lan .:J r ~p p f7 11500 .:J
I Ji;; ~~trtt l2so,o ;J Qr (s9-o0,o ;JIRac1ant_..< - r;; ~ ;J lo,o2cm .:J r f;J F7 P' (1500 ;J
V~y s.r&y ~ts
I OnName lnt.ns. Ml.It Si>e lltit Sh. SUxlvs Sh. Bias Invisible t..Wtv Ozone Ph. Emit Rod. SkyModel Horiz. lhn. Caust subd.
I IP ~ySIM>Ol :a- ;J (i.0on ;J ~ ~llo,:lan .!.I r ~.;J lo,35 ;J(so,0on.;J!Pret1Mmetol. - (2sooo,! : (1500 :J

Figure 11-32 V-Ray Light Llstcr dialogue box

The V-Ray Ught Lister dialogue box, Figure 11-32, contains a list of all the lights present in
the scene: Sun, VRaylight, and /ES. Here the lights can easily be switched on, switched off
and changed.
The V-Ray light lister is a very convenient tool to use while setting your light balance. The
only light source that doesn't appear is the Sky, so to turn that off, you'll still need to open
the Environment and Effects dialogue box, (activated by clicking the 8 key), and uncheck the
Use Map option .
PHOTOGRAPHY & RENDERING with V-RAY

Step-3: Assigning Materials


Deactivate Override Mt/ (see page 157) and start adding different materials to obtain a
photorealistic (if grainy) image, like the one shown in Figure 11-33. All the assigned materials
can be found in the file Chap11-03-interior-MATERIALS.max, located in the folder P&R-
VRay \ Chapter 7 7 \ Exercises.

Figure 11-33
T he render with
materials assigned

Figure 11-34
The render without
materials assigned

If we compare Figure 11-33, (with all its materials), to Figure 11 -34 (without materials),
the common element - the lighting - is evident. If the light balance has been perfectly
accomplished, we need only add a few simple materials to obtain a preview like the one in
Figure 11 -33.
90% of the materials in the scene are simple plastics and colored glass, like the ones we
tested in Chapter 6 - Simulating Materials. Even the leather of the sofas has been created
without any reflection maps or bumps: just a simple Fresnel reflection, with a Glossiness value
of 0.7, and this is the result. The sofas are concrete evidence that "the model is everything''. In
this case, it is precisely the modelling of the folds that make it look like leather. Let's analyze
the technical aspects of the foll9wing materials in detail:
The parquet, which has a reflection map;
The carpet, made using displacement;
The light source of the lighting fixture I VRaylightMtl.
CHAPTER 11 - THE SSRW METHOD IN INTERIOR RENDERING

Parquet Material
To create the parquet material we used a Diffuse map, Figure 11-35 and a Reflection map,
Figure 11 -36, adjusting the reflection using parameters in the Material Editor, Figure 11 -37.

~.
~
~
Figure 11-35
Diffuse map
t:
\l ~ ~. )( ,. ~ ~ @. IE D <1t Q
P' I01- Oefalt

f! -- iii
~yMU
Figure 11-37
Part of the
Material Editor
paletce showing che
parameters used

L-- Clffi.R c::=:J .!!! Rcuctness ro.o- :I _JI

fi
Figure 11-36
ReAection map
,Re. ._l!_cti_~or _ellect__..~
...
,_ : r-'
_,, .!!) fl l'fHnei refkdons F7 fl
Reft. glol-.. ro,a- ~ ~ rrr- _;] _J
Slbcivs re- _;_] Mix depth rs-- _;]
Ule"'"""'"lion
ow c1stance r-" .:... r
Eldt cdar -
r-- ~

The light coming through the curtain and reflecting off the parquet floor is measured by the
reflection map, Figure 11-36, which not only softens the light on the floor, but also reveals its
underlying texture, Figure 11 -38, including the gaps. Without a reflection map, this surface
would appear very flat and wouldn't be a realistic parquet floor, Figure 11-39.

Figure 11-38 Figure 11-39


Render of the Render of che
parque t floor using parquet floor
a Reflection map withouc using a
Reflection map

One option worth activating to achieve sharper textures can be found within the channel in
which we apply the map. In the Filtering area, select None, Figure 11-40 for both the Diffuse
map and the Reflection map, so as not to apply any filters to the textures.

Figure 11-40
Pan of the Ma rerial Editor pale rte
with the Bitmap Parameters rollouc
menu selected. This increases the
rendering time but is needed co
obcain the sharp grain of the wood
PHOTOGRAPHY & RENDERING with V- RAY

Carpet Material
The carpet is a simple box with a thickness of 1 cm, to which a 30 VRayDisplacementMod
modifier has been applied, Figure 11 -41 , together with its relative texture, Figure 11 -42.

- Parameter$ ~
TVPe
(' 20m""'"""~'
30 mapping
('" SUbdMslon

Conmen params
Texmap
~;fl (Fig.11-42.jpg)

Texture chan rr-- _;j


Filter texmap P'
ro,oor- ii
Filter blur

Figure 11-41 Amount! i,oan ii


Part of the control Shift IO.Oan ii
panel of the Wat.< level r IO.Oan i.I Figure 11-42 The texcure used in the
VRayDisplacementMod Relative to bbox r VrayDisplacement:J.\fode modifier channel
II
modifier with the main ID mapping
parameters highlighted Rcsol\ioon rm- .ii For such a thin object and such a small displacement, you
Preo"""' ~ .ii
Tght~ds f.i
don't always need to activate the keep continuity option,
30 maP!ling/subdMsion - Figu re 11 -41 . Always do a test, in any case.
Edge length 13,0 ~xds
View-dependent P'
Max sub~ rm- .ii Note: Here, the Shift option can't be applied because it's
Tlfl>t baunds P' not a floor but an object that rests on the floor. So, given
Useobjectmd r II
Keep rontinuity r Ii that the thickness of the carpet will increase by 1 cm, it's
Edqe thresh ~ .;J a good idea to also raise the chairs and tables that rest on
Vector displa~ent r
Split.,.,thod; 'Quad .. top of it by 1 cm, Figure 11 -44, so they are not covered
over by the Displacement effect.
ro:o- .:J
Te>anap nin:
Texmap max: rr,o- iJ
n----n n

Figure 11-43 A render with the carpet covering Figure 11-44 The render after moving the table
the feet of the table and chairs and chairs upwards by 1 cm

Note: To move objects, it's advisable to create a selection group containing the table and
chairs. Then use the Move command and in the Move Transform Type -in dialogue box,
enter a value of 1 cm in the Z box of Offset: World.
CHAPTER 11 - THE SSRW METHOD IN INTERIOR RENDERING

The Light Fixture


A VRaylightMtl has been applied to the "Lamp Source" object of the light fixture, with the
Compensate camera exposure option active, Figure 11-45, to make it appear brighter.

~ Material Editor - lamp sorgmte


Utilities

[J O.
ciii
D.
II
<9.
~
~
Figure 11-45
~o ~
Part of the Material E ditor
I~ ~ l ~il I x I ~ Ii~ I ~ l @. /lfi ID Q ~ palerre wirh rhe Params
I J' ILlllrC> l50l'QCOll: ,. VRay!JrJilMU I rollout menu selecced and
the Compensate camera
exposure option highlighted

r "
otec:t ll!urM'lallon
~ &Jbdivs: r ~ OJtnff: 10,001 .!J I
Activating the Compensate camera exposure option, Figure 11-45, is generally enough, but
when you use Exponential Color mapping in the Render Setup dialogue box, you should
increase the Multiplier a littl, in this case by setting it to a value of 3, Figure 11-45.
Particularly in such a bright environment, this light source is not really considered to have
any bearing on the light balance carried out in Step 2. Still, it creates a nice effect, as it makes
the light fixture stand out against the wall behind it, Figure 11-46. It's therefore correct to
apply it in this phase, simply counting it as a material.

Figure 11-46
A detail of the render scene
framing the light fixture
to show its effect on the
background
PHOTOGRAPHY & RENDERING with V-RAY

Step-4: Cleaning the Image


The fourth step deals with cleaning your image. Notice how an image rendered with just
one material conta ins stains and looks grainy, while w ith textures and colors it appears less
so. Despite this, there is still some work to do: it is a little bit blurred, still appears slightly
grainy and contains some stains.
What we've done up until now has almost exclusively been concerned with the aesthetic
impact. What we'll be doing in this paragraph essentially deals with technical aspects of
V-Ray and none of the parameters we are about to list will ever be able to increase the
"beauty" of your image - only its sharpness and cleanliness.

Considerations: If you are developi ng your own image and the result isn't yet convincing,
it's no good wasting time on t his step and all its parameters. Go back and balance t he
lights well, choose a nice composition and ma ke more effective color combinations.

These are the parameters we will be working with:


Anti-aliasing: from "Adaptive subdivision"to"Adaptive DMC/ min 1 - max 40;
lrradiance map: from Low to High;
Light Cache: from SOO to 2000 I raytrace activated;
Noise threshold: from 0.0 1 to 0.005;
Various "subdivisions": if necessary from 8 to 20.
After fine-tuning these parameters, which we will analyze presently, we achieve a clean
result, Figure 11-47.

Figure 11-47
The final render with
parameters set for
anti-aliasing, Irradiance
map, Light Cache,
Noise threshold and the
various Subdivisions

Note: The image in Figure 11-47 is the final render, which has been "cleaned" using all
the necessa ry parameters. All its settings can be checked by opening the file Chap11-04-
interior-FINALmax, located in the folder P&R-VRay \Chapter 7 7 \Exercises, in 3ds Max.
CHAPTER 11 - THE SSRW METHOD IN INTERIOR RENDERING

Anti-a Iiasi ng
The Anti-aliasing we've used until now has been Adaptive subdivision, which is not very
accurate, but is excellent for tests because it is extremely fast. The final render, on the other
hand, needs to be much sharper, so for this reason, w e will use Adaptive DMC, Figure 11-48.

!'1i Render Sdup: VRay l*R 2J.O.D1 '-~ ' m iii!


Conmon I Y~y I lrdrttt biN!ian s..ttllgs I R<r>der Elements
.
~

V-Ral:: ~sander ~lillmingl ~


!Image .... Figure 11-48
.I
..----1 J
_IType: IAdaptilleCM: Render Setup dialogue
An........,,fi~ box showing the V-Ray::
P 0n IAreil l mage sampler (Anti-
area llt.r. alinsing) and V-Ray::
Sitt: rr.s .=.! Adaptive DMC im.1ge
sampler and their
options
r- V.flay;: ~live OMC !!!!fE aider
... llbcllis: Ii ;.] c ~: rsmw.....,
I 1-abctvs: rso-- ;.] I Use CMC ..... llYesh. P'

...
J
~
" IPl'odxlion ... Pr~t:I
r AclNeShacle '<lfw: jrw ... __@_,

To explain how these two types of anti-aliasing are different, we can say that Adaptive
subdivision defines the value of a pi:xel by taking into consideration the pixels around it,
while Adaptive DMC defines the value of the same pixel multiple times, as though breaking
it down into smaller fragments to determine its exact value.

Note: In technical jargon, Adaptive Subdivision and Adaptive DMC are respectively
defined as algorithms of undersampling and oversampling.

Adaptive DMC takes longer to produce a result, but it's much more accurate. In wood grain
for example, as in all t extures that are rich in detail, the differences are very evident.
The values adhered to by Min/Max subdivs, which are respectively 1 and 1O by default,
indicate the degree of precision of the anti-aliasing. Chaos Group suggests what they
themselves have defined as "Universal settings", with the values 1/100.These are the settings
that work best in most cases. Increasing the Max subdivs means increasing rendering time,
and the value 100 always works, even if it is preferable to use 40-50. It's up to us to find the
minimum val ue with which the anti-aliasing will produce a good result, while utilizing the
least possible resources. Finally, the default Anti-aliasing filter is set to Area.

Considerations: DSLR cameras also have settings that control the sharpness of a
photo, but sharpness is like salt: you can add it but you can't take it away. Photos that
are too sharp sometimes present problems with scaling in some areas - a flaw which
is impossible to remove. Many photographers prefer to take photos with medium
sharpness and then add more later, using Photoshop. I suggest the same approach in
rendering: leave Area as the filter (avoiding Catmull-Rom or Mltchell-Netravali, which
produce images t hat are too sharp), then put off perfecting the sharpness until the post-
production stage.
PHOTOGRAPHY & RENDERING With V- RAY

lrradiance Map
Up until now, we've been using the Low preset for our trials, but for the fina l render we
will use the High preset, Figure 11-49, which distributes the indirect lighting much more
accurately.

liii Render S.tup: V-Ray NFR 2l0.01 ~I~ ~


Common I H~ay J Inect illumination J Settings J Render Elements I
Figure 11-49
[+
.
V-Ray:: indirect dk.mination {2
v-Rax:: liradiance !!!!e
b
I
I
Re nder Setup
dialogue box
showing the V-Ray::
r Bult4n presets

Basic p.yameters
Current preset
lcustom
!!!n - ..
ris
Very low
lrradiance map Mnrate: ~ ~ drl! low lw calc. Jf>ase r
selected and the f"'>Xram: i o - ~ ~,,. ot Medun
Medun - an1maaon 0 do'ectlo#t r
Current presets HSph. s.ubd!vs: ~ _:j DIS': v Show samples r
High - anmatlon
Interp. samples: ~ ~ lmP fr Very high le camera palh r
' Production Preset: 1- - -
r AdfveShade ~w: !Perspective ~

Note: The most accurate system of all isn't /rradiance map, but Brute force. It's not an
approximating system, as it works on each individual pixel, while the lrradiance map
dist inguishes between the most "important" pixels (contact areas) and least important
pixels (flat areas). Brute force, Figure 1-50, produces extremely accurate results and brings
out all the details, but it also requires more time. The results are particu larly grainy and to
eliminate this effect you need to increase the value of the subdivisions by a lot (default 8).
The increase in processing t ime is significa nt, so this is its only point of weakness.

~Render Setup: V-Ray NFR U0.01 ~ I~


Common I V-Ray lndrect illumination J Settings J Render Elements J
Figure 11-50
[+ V-Ray;: fndlrect il.mlnatlon (Gt)
Render Setup
(+ V=Ray:: Irradiance map
dialogue box with
V-Ray:: Brute force f V-Ray:: Brute force GI

GI selected and
Subctivs highlighted (+ V-Ray:: caustics

Pr~otl---
View: !Perspective ~
CHAPTER 1 1 - THE SSRW METHOD IN INTERIOR RENDERING

Light Cache
It's hard to ascertain an absolute value for the Light Cache, Figure 11-51 , that wou ld be
suitable for any final render. Naturally, it depends on the scene and the size of the details
present.
Here are some indicative values for the parameters under Subdivs, Figure 11-51 , for each
situation:
500 works well when performing tests;
1000-1500 for medium-high quality images;
2000 and above for high quality images with a lot of detail.

~Render Setup: V-Ray NfR2.lO.Gl


c-r- I V-Aay I lnchctlumollon I Sdtings I

Sb:lre<h<:tlil#lt P
9-calc. phase p
Use....-apath r
J Figure 11-51
Render Setup dialogue
box with V-Ray:: Light
Adaptive 1ract1g r
cache selected and
r some of its options
highlighted
Ffb!r:1~1
lnt.rp .....P.,:~ :

11---
Preset
-: lrcp

Considerations: I often activate the Retrace threshold option, Figure 11-51. The
processing time increases but this helps the Light Cache to produce more accurate
results. It also avoids light leaks in the areas of contact between su rfaces, which can
sometimes occur if the calculation isn't accu rate enough. See paragraph Light Leaks on
page 226 in the chapter SOS: How not to Freak Out.

Note: The Sample size parameter (0.02 by default), Figure 11-49, can be reduced to 0.01
to produce more accurate results when the render contains small details. However, with
the same number of Subdivs, a smaller Sample size produces more "noise" in the image.
It's thus necessary to increase the value of Subdivs to compensate for the reduced Sample
size and obtain a clean image. The same rule still applies: time and precision are directly
proportional, so changing the parameters is equivalent to calibrating the calculation
based on the ratio of time, definition and the quality you wish to achieve.
PHOTOGRAPHY & RENDERING with V- RAY

Noise Threshold
The Noise threshold option can be found in the Settings tab of the Render Setup dialogue
box, Figure 11-52.

~ Render Sdup: V-Ray NFR 2.1001 Ee:)\ GJ ilili3ml


Figure 11-52 Camion I V-Ray I Indirect ill.mination I Scttilgs I R~ Elomont:s I
Render Sen1p
~y:.: D"1CSampler
dialogue box
showing the Sercings Adaptive amornt: (0;85 : l
tab and the V-futy:: I Noise tiiresnold: ro;or-- .!.l I Globill ...mdiw mt.it>1ier: ~ .!.l
DMC Sampler with Tme independent fv Path sampler: jSctti sampling
the Noise threshold
V-Ray:: Defaultclspiacement
option highlighted
Preset:j---
I
View: l'e'spedivc ~~

We can consider the Noise threshold option as a kind of general valve for controlling the
cleaning and sharpness of the image. The default value is 0.01. To test the image before the
final render, you can Increase the value of the Noise threshold; the image will' suddenly
become very grainy but the processing time will be much shorter.
In general we can say that:
0 .03: a lot of graih I very fast render;
0.01 : default value;
0.003 - O.OOS: both the time and accuracy of the processing of each pixel increases,
producing a very clean and sharp result.

Various Subdivisions
In spite of t he previous settings, there could still be some locarnzed grain in the rendered
image, determined by a great number of factors, such as: depth of field, individual materials
or V-Ray lights. If, despite lowering the Noise threshold, you still have some grain, you should
identify the cause and only raise the subdivs for that element before launching the final
render.
Some examples of possible increases are:
V-Ray Light: from 8 to 30;
Depth of field: (if activated) from 6 to 1 S;
Glossy materials: from 8 to 15.
Obviously, none of the suggested values is perfect. Do a quick check using a small Render
region and buckets to see whether increasing these values helps you get the clean image
you're looking for.

Considerations: The little rendering squares are called Buckets, Figure 11-53, and you'll
have one for each Core of your computer. When you are using a small Region, it's a good
idea to reduce the size of the buckets so you're sure you have all of them working.

Figure 11-53 V-Ray:: Systrm

Part of the Render setup dialogue


box with the options relating to the
default size of the little rendering
squares (buckecs) highlighced
CHAPTER 11 - THE SSRW METHOD IN INTERIOR RENDERING

Other Sky Models


For the sake of presenting th is exercise in a more coherent I !ayAn&iu.Jd VRa~ I
way, we made no reference to sky models. Nevertheless,
you can increase the environment light by setting the sky r- ~wed 1
1
to have a more intense "hori;zontal illumination': and this
- VRayS\11 Parameters I
can be done by selecting a different simulation model. enabled .................. "" . i;;
Figure 11-54
Select the V-Ray Sun and set CIE Clear as the sky model, 1nlllsllle........................ r TheVRaySun
affect clffuse................. P
instead of Preetham, Figure 11 -54. affect SDO<Ula-............... "1' control panel with
cast atmos;>heric shadows.. f'i the options for
The underlying opt ion, indirect horizon ii/um, becomes
b..rbdty ............. ;a- _;j changing the sk)'
ed itable automatically and the default value that appears ozone. ............... 10,35 ,;J highlighted
is 25,000. This value is already much higher than the inlen!;ity multipler n:o- .:J
previous brightness. Just to compare, the defau lt model sile nd~........ rr,o- ll
shadow aibdvs.... ~ _;]
Preetham corresponds to CIE Clear, set to 12,000, so this shadow bias......... Jo,2an .:J
new setting is practically double the previous one. phobln emit rd.ls. rso:ocn :

If you compare two renders illuminated by environment lighting alone, Figure 11-55 and
Figure 11-56, you will see the result change when we switch the sky model. In this case, we
haven't altered the camera's exposure at all.

Figure 11-55
A render with a generic
material and the default sky
model (Preecham)

Figure 11-56
A render with a generic
material and the CIE Clear
sky model, with horizontal
illumination set to 25,000

Considerations: This t ype of operation by no means alters the physics of the scene,
so it ca n be safely used t o prod uce excellent results when you want to increase the
environment lig hting in an interior.
01ne1 nights and HORI

In this chapter we will explore some of the


1: tools available in V-Ray that we can use to
illuminate our scenes.
We will look at some alternate ways to use
V-Ray Lights, the VRayLightMtl and JES
spotlights. Also, in particular, we will talk
about /BL and HDRI, finishing offwith
several exercises that use practical examples
and videos to clarify how to use these methods.
Although we are adding new tools to the ones
already introduced, the theory behind them

- is still the same. No matter how technical


the names of the objects are, the lights must
always and only serve to model the scene. The
more the lighting is able to make your scene
look three-dimensional, the better your render
will be.

.9
~
I
PHOTOGRAPHY & RENDERING with V- RAY

Other Kinds of V-Ray Lights


So far we've only used some of the various lighting tools available in V-Ray: the VRaySun
and the VRaylight, with the latter only as a Plane type. Th is choice was intended to allow
you to think more with your head rather than with the parameters.
However, the V-Raylight can be placed in the scene.1 not only in the shape of a light panel
(bank light), as we saw in Chapter 5 - Light Balance, but also as a sphere, or even as a rea l
object: Sphere and Mesh, Figu re 12-1 .

:i- Ifa!.I[@I~I .P"-~


0 <fill ~ l1ll. ~'
IVRay I

- Object Type ~
Figure 12-1 r AutoGlld

~ I
Lights panel showing VRay!ES
. VRaySIJ'I I
the parameters for
the different types of
I;
Name and Color
VRayLights 1J
-
Genl!f!ll
Parameters I
~on Exclude I
Type: , ,,_ ...
p - ..
- Dome
rnlert ~e
lklits: Mesh

Whatever its morphological appearance may be, this tool always works in the same way.
It always has the same options for intensity, unit of measurement, being invisible, and for
approximating shadows using store with IM. The only thing that changes is its shape, and
consequently, the direction in which its light spreads out.

Sphere Mode
In this case, the V-Raylight is shaped as a sphere, Figure 12-2, so unlike a plane, it emits
light in all directions. It's a suitable mode for simu lating artificial light, as it can be used as a
point source emitter.

Figure 12-2
The symbol for a
VRayLlghc Sphere

Note: VRaylight Spheres are sometimes used wrongly as invisible light sources placed
inside interiors to give them more light. In photorealism - meaning the authentic
reproduction of reality- these stratagems should be absolutely avoided, as they lead to a
series of inconsistencies t hat prevent the final outcome from looking real. To compensate
for low lighting, use exposure. Sometimes you may also add lights, but remember to
always use the same approach you would take in real life, if all you had was a camera and
some bank lights.
CHAPTER 12 - OTHER LIGHTS AND HORI

How to Create a V-Ray Light Mesh


In this mode the VRaylight allows you to create lights of any shape, based on a selected
mesh. It's a very convenient mode to use when creating illuminated false ceilings, for
example, or illuminated text li ke the neon tubes used in advertising signs, Figure 12-3.
However, there are actually no limits of any sort regarding the shape it can acqui re. The
procedure for setting it up is simple:
1. Create you r V-Ray Light I Mesh anywhere in the scene.
2. Go to modify and select the Pick mesh button.
3. Click on the object you want to convert to a V-Ray light.
The object in question will become a light in all respects, Figure 12-3.

THIS CONCEPT IS ILLUSTRATED IN P&R-VRAv \ CHAPTER 12 \ V IDEO \ V1orn-12-1 .MP4 ~

When we use a Sphere or Mesh light, it is most likely that it features in the scene to simulate
a light source. For this reason, it is completely viable that it will appear inside the frame,
unlike what happens when we use the Plane type to simul.ate a bank light. By definition, a
bank light remains outside of the shot.
In this case, when a very bright source, (a light bulb, for instance), is part of the image, the
tones need to be compressed using Exponential Color mapping. Sacrificing a bit of contrast
allows us to compress all the tones and not have overexposure. In cases such as interiors, or
exteriors at night, this choice is often imposed.

Figure 12-3
A V-Ray Light
object used in
"mesh" mode
and assigned to
normal geometry

Dome Mode
In this mode, what appears in the scene is just a symbol, Figure 12-4. This is the only type of
V-Ray Light that doesn't correspond to a real luminous object. It is actually an illuminating
dome that takes in the whole scene. It's very often used in combination with HORI maps,
given that it can produce di rect shadows. The topic of HORI will be analyzed in depth
throughout this chapter.

A B
Figure 12-4
A representation of
a Light Dome, as it
appear& when selected
(A) and unselected,
with just its symbol (B)
PHOTOGRAPHY S. RENDERING with V-RAY

V-Ray Light Material for Self-Illuminated Objects


Apart from objects whose function is to illuminate, there are also others that emit a certain
and limited amount of light in their functioning. Computer monitors, TVs, cell phones and
screens in general, are examples of these.
These surfaces feature both an image and a faint emission of light. In cases such as these, it's
advisable to use the VRay Light Material. As the name itself suggests, this is a material made
precisely for simulating objects that emit their own light, despite not being actuaE emitters.
It is really a very simple material, for which you can set color and intensity, (with the box
set to 1.0 by default), and then assign a texture by clicking on the dedicated button None,
Figure 12-5.

I~ ~ I ~ii I )( I\> I t.0tl I ~ I @. I~ lfl l ~ ~


I' j01 - Default I VRa)tlghtMd )

Params

Figure 12-5
Parr of the Material
Editor with the main
options and the new
Compensate camera
exposure option
highlighted
----'-Non
~ _ ____,IP
Oirect hination --------~

r on slbliv<: p- :
OirectX Maniloer

In the latest version, 2.0, the Compensate Camera exposure option has been added, Figure
12-5. Thanks to this option, the intensity of the light is calculated automatically in relation to
the exposure, making this type of surface appear illuminated.
Furthermore, by setting Direct illumination to ON, Figure 12-5, the object turns into a real
emitter, Figure 12-6. This emitter is complete with Subdivs for adjusting the grain of the
shadows generated, just like a V-Ray light without the Store with IM option activated.

Figure 12-6
A self-
illuminating ball
and photo screen
simulated using
VRayLightMtl
CHAPTER 12 - OTHER UGHTS AND HORI

V-Ray IES and IES Files


Because of their varying shapes, each and every (real) light fixture distributes light into the
surrounding space in its own way. It can cast light downwards, upwards, in both directions
0
or crosswise. It can give off hues that paint" surfaces in a particular way, generate nice
lighting that's rich in shading, or sharp, pronounced lighting. The representation of this
distribution is called a photometric curve.
The acronym IES is a standard introduced by the Illuminating Engineering Society of North
America that records the photometric curve of each specific light fixture as a file. These files
can then be used in any rendering software, and naturally also in V-Ray.

Note: Many of these .IES files are made available for free download by t he light
manufacturers on their websites. This way you can replicat e the exact effect of each
specific fixture in your renders.

Once you have the right .IES file, it is really very simple to simulate the exact light profile of a
given fixture. You simply need to create a type of light called V-Ray IES, into which you can
load your IES file by clicking on the button displaying the word None, Figu re 12-7.

Iii Jrc. e 1!17-


o <eitl ~ a. '
Figure 12-7 1~y Figure 12-8
Lights panel
showing the
~ ~Txpe -1 An indication of che

1 ~~1
correct application of a
VRaylES light light profile to a spotlight
and the button fixture (A) and the
labelled one, mistake that is sometimes
which you can use made when one forgets
to load your ms to add the corresponding
files spotlight (B)

Considerations: With VRaylES you can simulate a beam of light but not its source. So,
if you add a spotlight and it's visible, remember t o create the light bu lb using a simple
VRay Light Material, Figure 12-5.

Considerations: Avoid the mistake of adding an IES light profi le and not adding its
emitting source. Figure 12-8 highlights the way our perception of the image changes
with and without the emitting object.

THIS CONCEPT IS ILLUSTRATED IN P&R-VRAY \ CHAPTER 12 \ VIDEO\ VIDE0-12-2. MP4 ~


PHOTOGRAPHY & RENDERING with V-RAY

How Is a HOR Image Created?


HORI is a technique t hat arose and developed in the film industry. It was invented to solve
an often recurring problem: How to illuminate a 30 scene realistically, giving it the same
light as a certain environment and with all its va rious shades.
Imagine you have a 30 model of a car and you want to contextua lize it, as in the render
below, created by /van Basso, Figure 12-9. ls it really necessary to model the whole space that
surrounds it in 30? Not to mention re-creating the lighting, which can also have particu lar
shading and tones? HORI allows you to illuminate your 30 object and make it p1roduce
reflections, Figure 12-9 (A). However, to obtain a highly realistic outcome, you need to add a
backplate to t he backgrou nd (a photo taken in a location that has the same characteristics
used to prod uce the perspective of the 30 model in terms of exposure, focal length and
positioning). If you don't, the presence of the HORI map alone will not produce optimal
results, Figure 12-9 (8 ).

FigureU.-9
In these two renders
we can see the
difference between
an image that uses
a HDRJ map and a
backplate (A) and the
same tender of the
car using aHD Rl map
alone (El).
The rendet'S were
created by Ivan Basi;o
www.ivanbasso.co1m

To produce a HORI map, start by choosing the location you want to use as a backg1round.
considering the spaces and lighting. Position yourself in a precise spot and take various
photos from different angles and with different exposures. Try to ca pture the whole light
ra nge contained in t he space across the various photos.
Using a software prog ram like Photomatix Pro for instance, or Photoshop from version CSS
onwards, you can put all these photos together to obtain a HORI file. As you might imagine,
this type of file isn't just a simple photo, but much more. In fact, the abbreviation HORI
stands for High Dynamic Range Imaging, precisely because the map contains all that is
visible within its sequence of exposures. This is impossible to achieve in a single photo,
especially if we're talking about the sky. The backplate image, on the other hand, is a high
definition photog raph, used as a background, together wit h the HOR images, Figure 12-9.
There are many libraries containing these kinds of files, both free and for purchase. One
place where you can find many HORI maps is Paul Debevec's website, www.pauldebevec.
com.

Note: Contextualizations like the one in Figure 12-9 are always accompan ied by
backgrounds made up of high definition photos, shot in the same environment and 1under
t he same light conditions. In the Exercise: How to Illuminate an Exterior Using c;r HDR
Image on page 186, we w ill wsejust one HORI for everything, including the background.
This is possible, given that we are only simulating the sky. It's important to make sure
however, t hat the HOR image used has sufficient definition for t he size of our final render.
CHAPTER 12- OTHER LIGHTS AND HORI

Characteristics of HORI Maps in V-Ray


We generally only illuminate with a HOR Image when the subject is in the "open": for
example, a car, a cell phone or a building. We rarely use them for interiors, as these are dosed
30 spaces, in which the effect of a HORI {external) environment light would be almost
insignificant.

Note: There are some intermediate cases, such as a loft with huge windows, in which a
HOR Image could provide excellent results. For this reason, it's difficult to set a hard and
fast rule. It will be your job to evaluate this each time.

The following will illustrate the meanings of the main options used when dealing with a
HORI map, Figure 12-1 O.

~
~
ta
ftil X I ~ I ~ 1~ I !ID. B IllJ ~ ta
J' IMap <ti6 ~yK)RI I Figure 1~10
I. . Part o f the Material
Editor dialogue box
!~ " I-C'!' V-Ray PowerShader showing the VRayHDRI
control panel, (which is
found in the Material/
lhMp: I Map Browser), with the
~------
main options highlighted
MIA*lg type: sp..nca
l!!!!~~--.!!!"I
HoriZ. rotation: 0,0 .:J Rphorimnlllly r
Vert. rotation: 0 ,0 : Rp vertialy r
Proc.ming1~---------
0Ver!ll l!Ut ~ ;J Girmlll: rr.o- ;J
Render ml.it fr,;o- _;j lnterpOlallOn: lo.foult

Browse: This allows you to select the HORI file you are interested in.
Mapping Type: This indicates the type of HORI map (Cubic or Cross, Spherical, Angular
etc). The nature of the map can usually be guessed from the name itself.
Overall mult: This increases the light intensity of the map, even in the Material Editor.
Render mult: This increases the intensity of the map but doesn't make it visible in the
Material Editor.
Horlz.Nert. Rotation: This allows the map that wraps around the scene to rotate, both
vertically and horizontally. For maps of environments, the horizontal rotation is what
allows you to rotate the environment around the object.
One of the most common problems you may come across when using HORI maps is that the
render appears to be illuminated in splotches. If this is the case, the problem is the size and
quality of the map you're using.
A map which is too small doesn't have sufficient detail to illuminate the scene evenly, so the
result contains splotches. A HORI map rs excellent when it's between about 30-40 Mb in size,
while you need to be more careful with those around 3-4 Mb, as they provide inadequate
detail and consequently lead to a number of problems.
PHOTOGRAPHY & RENDERING with V- RAY

Exercise: How to Illuminate an Exterior Using a HDR Image


In this exercise we will use a well-known technique called IBL (Image Based Lighting), which
is easy to apply and involves combining a V-Ray Light dome with a HORI map.
1. Start 3ds Max and V-Ray and open the file Chap12-01-daytime-START.max, located
in the folder P&R-VRay \ Chapter 12 \ Exercises.
2. The scene is ready with all its materials and Global illumination already set up.The only
thing you need to add is a HORI map to simulate daylight.
3. Place a V-Ray Light Dome anywhere in the scene, Figure 12-1 1, checking that the
multiplier is set to 1.0 and the unit of measurement is set to the default, Figure 12-12.

. OojcdType I,
r AuloGrid
! VR~t VRaylES I
~ayAmblen~ VRaySt.n
I
f- Name and Col I
I
Figure 12-11 Figure 12-12
IVRayliltlto12
An indication Values to
of a VRayLight . Pllramders I start with
Dome placed ~General when using
anywhere on the F1 On Exdude a VRayLight
plane Type: joane ... Dome,
I IV Enable viewport shading together with a

Units: jeefatAt (unage) . VRayHDRI

Mul~: ;o-- ~

Mode: ICobr
I
.
Cdor: I
Ternpttalure: j6500,0 ~

4. In the V-Ray Light Dome control panel, click on the None button in the Use texture
area, Figure 12-13, to open the Material/Map Browser, Figu re 12-14. Here, select the
VRayHORI map.

OpUons
P Cast shadows
'i
,I ~ MmriVMap Browser ,.,.,1
!Search by Name ...
r OcxAlje-9ded
r 1nw.ble ' Splat
r;;- Ignore light nomials stucco
r Nodecay (J swin
r Sk)ilght portal r Simple Thin Wall Refraction

Figure 12-13 r S11:>re with irradiance mai: ' Toles


Figure 12-14
Pan of the V-Ray
P' Affectdffuse ., Vertexeolor
Part of the lisc of
Light Dome control
17 Affect Sl)e(Uar
P- Affect reflections I
VRayColor
VRayCompTex
I materials contai ned
panel with the button VRayEdgesTec
in the Material/
~
for loading your Map Browser with
VRayHDIU map
SUbdvs: ra- ii ~ VRayGLSL i
the VRayHDRI map
Shadow bias: lo,02cm ~ VRayHDRl I

v-
highlighted ,I highlighted
cutoff: jQ,001 il VRayMultiSilbTex

Texture: t. Waves

P- use texti.xe ~ Wood


.......
c .::::.~ :::::_:::..1 . v.oJlv NFO ., n n I
Resol>tion: ~ .;_j r-a<-il Cancel I 11'

Adaptiveiess: rr.o--;J II '-- "

5. Open the Material Editor and drag the VRayHDRI button, Figure 12-15, into a free slot
inside the Material Editor, Figure 12-16. Choose the Instance option from the Instance
(copy)map dialogue box that appears.
CHAPTER 12 - OTHER LIGHTS AND HORI

Opllons:- - - -
p castwdows
r Ooo.bie-<ic!ed
r 1nvblbl
p (g>c( i!tit normals
Figure 12-15
r No decay
Figure 12-16
r~1pcrta1r ~
Part of the: Pare of the
r Store mth naclarn mac:
V-Ray Light p Affcctdiffuse
Material
D ome concrol ~ Afftct speaW
Editor wirh
panel showing P' Aff.ct re~edlons the slot, the
the Map #466 ~: ---~1
Browse button
(VRarHDRI) S<Mvs.: r - ~ and the type
of Mapping
button to be Shadow bias.: J0,02an .:.!
dragged into a QJtoff: lG.001 ~ highlighted
free slot in the Horii. rotation: ro;o- _:JFtphortzmll!ly r
Material Editor Vert. rotzilion: ro.o- 1J ftp~ r
~ocessilg----------
Ov..-.1 irdt rr,o- .:.! Ganma: rr,o- .:J
Render irdt: rr,o- : I 1nt.fpoiatioo: jo.faUt

6. Click on the Browse button, Figure 12-16, t hen choose the Daily-spherical-cgworld.
hdr map, located in the folder P&R-VRay \Chapter 12 \Exercises. Finally, set the Mapping
type: to Spherical, Figure 12-16.
7, Position yourself in the V-Ray Camera view and launch a render from ActiveShade to see
a preview using V-Ray RT, Figu re 12-17.

Figure 12-17
A preview
characterized by
a grainy effect,
which is typical of
V-Ray RT real-time
rendering

In spite of its considerable ease of use, the realism obtained is precisely a result of the fact
that the light, the reflections and the background are in perfect harmony. They are simply
the content s of a single file, the HORI, which is able to transfer the same atmosphere of the
place in which it was taken into our scene.
At this point, you need only change maps and consequently adjust the exposure time of the
camera to obtain a var iety of different environments according to the particular HORI you
decide to use.

Note: You can check the various settings by opening the file Chap12-02-daytime-FINAL.
max, located in the folder P&R-VRay \Chapter 12 \Exercises.

THIS CONCEPT IS ILLUSTRATED IN P&R-VRAY \ CHAPTER 12 \ VIDEO\ V1oeo-12-3.MP4 ~


PHOTOGRAPHY 8t RENDERING with V-RAY

Exercise: How to Simulate a Night Scene Using a HDR Im.age


In this exercise you will see how to transform the previous daytime environment into a night
scene, applying the same concepts already seen in the Exercise: How to Simulate a Night
Render on page 131 . The scene you will begin with has already been set up to produce
a correct daytime render using the HDRI fi le Daily-spherical-cgwo1rld.hdr. Now you will
convert these settings for nighttime.
1. Start 3ds Max and V-Ray and open the file Chap 12-02-daytime-Jr:/NAL.max, located in
the folder P&R-VRay \Chapter 12 \Exercises.
2. Open the Material Editor and replace the HORI contained in the NORI daytime material
with the file Sunset-spherica/-cgworld.hdr, located in the folder P&R-VRay \Chapter 72
\Exercises. Launch a V-Ray RT render, this time using the internal "Cuda" engine (see
Chapter 1 - First Steps in V-Ray), and in just a few seconds you will get the preview in
Figure 12-18.

Figure 12-18
A real-rime
preview of the
render with the
shutter speed set
co 200

3. Naturally, there is less light here, so you'll need to select thE! V-Ray Camera and
increase the exposure time by changing the Shutter Speed to 30 and the White Balance
to Temperature (4000). This enhances the blues and makes it look more "night-like".
The window showing the real-time rendering will update automatically to the image
shown in Figure 12-19.

Figure 12-19
A real-time
preview of the
render with the
shutter speed
set to 30 and the
White Balance set
to4000K

4. The artificial lights on the ceiling, simulated using V-Ray Light Planes, have already
been placed in the scene, but are switched off. Switch them all on by selecting any one
of them and changing the first check box option to On, Fig ure 12-20.

. ?Mame~rs
I
Figure 12-20 General
~
Part of the V-Ray
Light control Type: jPlane
Exdlde
.I
panel with the On ~ Enable viewport shading

r..~J-- . :1
o ption highlighted Intensity

Multipler: ~ .?.J
..
CHAPTER 1 2 - OTHER LIGHTS AND HORI

5. This is what the new render looks like in V-Ray RT, Figure 12-21 .

Figure 12-21
A real-time preview
of the render with the
artificial tights activated

6. You can solve the overexposure problem and any possible jagged edges visible in the
right side of the image, Figure 12-21 , by activating Production render, setting the V-Ray::
Color Mapping to Exponential, and activating the two options Sub-pixel mapping and
Clamp output, Figure 12-22, as shown in the Exercise: How to Simulate a Night Render
on page 131.

1i9 Render Sup: V-Ray NFR 2JO.ol


Conman I V-Ray I Indirect ILri>ation I Setliigs I Render Elements I

I~ I
Figure 12-22
Ir+ V-Ra:t,;: ~sampler (Anlialaslng) Render Setup dialogue
- V-Ray;: Cclor lllilllPin!I box showing Production,
Ir-= !Exponential 3r'P" Clampou;
SU>?xe~ ; : fmf: rr,o- .;.!
Exponential Color
l\fapping and the options
Dark""''**'' rr,o- .;,j P Affttt badq<Uld Sub-Pixel mapping and
Bright""''**'' rr,o- .;,] r Don't affm cdors (adaptation orly) II
Galmla: ru- .;J r Lnear wcrlflow
Clamp Output, which we
can activate to prevent
II
I~
V-1\ay:: f<ame buffer overexposure and anti-
rP" eW>I! blilt.., Frame Buffer
II I . . . .... ....... '",_
""'- aliasing artifacts

~
Production Proset: I
(' ActiwShade View: 1VRa~ J!l

7. After using V-Ray RT, move to Production, Figure 12-22, and launch the render to obtain
the rendered image in Figure 12-23.

Figure 12-23
The final render,
slightly adjusted
using an "S" curve

Note: You can check the various settings by opening the file Chap12-03-nighttime-hdri-
FINAL.max, located in the folder P&R-VRay \Chapter 12 \Exercises.

THIS CONCEPT IS ILLUSTRATED IN P&R-VRAv \ CHAPTER 12 \ VIDEO\ VIDE0-12-4.MP4 5'


PttOTO-GRAPHY & RENDERING With V- RAY

Exercise: How to Create an Alpha Channel Using /BL


IBL, which is made up of a V-Ray Light Dome and a HORI in the texture channel, creates
perfect harmony between the I ighting, reflections and background. If we really want to
replace the background, however, this is not currently possible through t he Alpha channel,
seeing as the V-Ray light Dome causes the default to appear completely white.
It's therefore impossible to proceed as shown in the Exercise: How to Replace the VRaySky
with Another Sky in Post-Piroduction on page 129. As always, you can foll ow many roads to
achieve the same result. In this exercise, you will use t he Render Element to obtain both the
render (with the sky}, and the relative mask you'll use to replace it, in a single step.
1. Start 3ds Max and V-Ray and open the file Chap 12-03-nighttime-hdri-FINAL.max,
located in the folder P~rn-VRay \Chapter 12 \ E><ercises.
2. The scene has already lbeen set up for the final render. Select all the objects by pressing
the CTRL + A keys tog1ether.
3. With all the objects selected, set the Object Color to white in t he control panel, Figure
12-24. Now the w irefraimes of the objects will have all become white.

i> l ~ 1 1@1 ~1 ~~
~cei ~ ~@.. ~"
jstilndard PrimiliWS
I
Figure 12-24
Part of the control
- ObjectType ~I
r AutoGrid II
panel with the box for Box I Cone 11
changing the color of
the selected objects:
Sphere I ~Sphore 11;
Cylinder I Tube i'
highlighted Torus I l'yronid
Teapot I Plane II :I
r l'bnc: and C.olor I
[ 'i6 ei~bes Sel<ll!d
d
4. Open the Render setup dialogue box (by clicking the Fl Ofunction key), select the Render
Elements tab, Figure 1:Z-25, and double-click to select the VRayWireColor element from
the list.

iGl1 Rmder Setul" V-Ray NFR 2.10,!Jl ~~00


Rmd.,. Elemnts rI~
ColMKl<1 I V-Ray I lndi"ect Wunhtlon I Setting I Render Elemenls I VRayObjectID
VRoyObjcctSdcGt
~

VRayRawGlobaUllummtion
- Render El"""'ls I VRayRav.tighl>ig
P' Elements Active P' 1Display Elements VR&yRawRftection
VRayRawRm.ction
Figure 12-25 I Add .. 1-t,lerge . .. I Cielete j VRayRawShl>dow
VRayRawTotalighting
Render Setup dialogue Nome oblecl Fiter Type VRayReflection
OU
box with the Render VRayRefleciiooFilter
Elemen ts tab selected
VRayRefi'action -
VRayRefi'actionfilter
VRo~er!O
and the Add button VRa)ISampleRal!!
highlighted. This is used VRaySompler!nfo
VRayS<lf!Uummtion
to add the element you VRayg..dows
VRa~
"
~
want to render VRaySSS2
VRayTotaiUghlilg
VRayLndampedColor
1 ~r--.. .. I
. F .
~-
~

IProcktion Preset:
r Acti~de View: ~!ayPhysia>ICt :.,. ~ OK
I cancel
I

.19o:\
CHAPTER 12 - OTHER LIGHTS AND HORI

5. Launch a render. In the V-Ray frame buffer drop-down menu, Figure 12-26, three layers
will be visible: one is the normal render, another is the "official" Alpha (which can't be
used because it's completely white), and finally, there's the VRayWireColor, which can
be used as an alpha channel, Figure 12-27, to mask the sky and allow you to substitute
it with another one.

' Y frome buffer [100% of900 x405) Figure 12-26

!JiiBmm~~!il__rerere
Part of the V-Ray frame buffer
with the list of the three layers

J highlighted

Figure 12-27
A representation of the render
visible when you select the
RGB color layer (A) and the
mask visible when you select
the VRayWireColor layer (B)

Now you have everything you need to create a mask in Photoshop or in another photo-
retouching program. Place a new background underneath this masked area, as seen in the
Exercise: How to Replace the VRaySky with Another Sky in Post-Production on page 129.

THIS CONCEPT IS ILLUSTRATED IN P&R-VRAv \ CHAPTER 12 \ VIDEO\ V10Eo-12-5.MP4 ~

Considerations: Situations are always very diverse in everyday practice and this
procedure shouldn't be taken as "the solution'~ Rather, consider this exercise as a
sti mulus for reasoning. I have used VRayWireColor in a creative way to p roduce an
alpha mask. This proves t hat if you just focus on t he outcome you intend to reach first,
you will consequently choose the right direction to take. Remember, it shou ld never be
the opposite way around.
Oatimizing Rende~ing
lime

In this chapter we will look at some suggestions


1: for optimizing your production time in rendering.
When we speak about shortening the production
time ofa photorealistic image, one all too often
thinks solely about the time spent on the final
rendering, and not about all the time spent getting
to that stage.
Its important to know how to calibrate all the
aspects of the scene well - to approximate the
calculation as well as possible without penalizing
the final output. Its just as important however, to
acquire the right "set of tricks" to use all the way

-- through the process - from your initial research


to your final render - to save you days worth of
work.

.e
~
I
PHOTOGRAPHY & RENDERING with V- RAY

Dedicating Time to Research


The planning and research that ought to precede the rendering process are two aspects
that are often neglected, as they are considered to be a waste of time. We know, however,
that good preparation always improves both the result and the production speed.
"I spend a year lying on the sofa thinking, then I pick up a pencil..." This is how the famous Italian
architect Achille Castiglioni used to challenge his pupils during university lessons, when he
found them impatient to start their practical work immediately.

Figure 14-1
Achille Castiglioni,
archirecr
(1918-2002)
Photo by
Hugh FindJetar
copyright Achille
Castiglioni
Foundation

This is a powerful and valid lesson, both in design and in any constructive human activity for
which it is fundamental to define our objectives, and it allows us to form a clear idea of the
outcome we wish to reach.
So before getting your hands on V-Ray, clarify your ideas, conduct research and acquire
experience in preparing the terrain before commencing.
Find images that have light conditions similar to the ones you intend to simulate. This
way you can observe aspects that your imagination alone couldn't possibly visualize so
clearly (let alone your memory).
Look for the same style, especially in terms of the colors used.
Search for images of your materials, especially if they are particular ones that you've
never used before. This will help you to see how they are represented in photography.
Don't take anything for granted.
Find textures with suitable styles, sizes and repeatability (various textures from www.
arroway-textures.com have been used in this book).
Gather together all the 30 models that you will need to add to the scene (various 3D
models created by www.designconnected.com have been used in this book).
All of this research has a single goal:
To create a vivid image in your mind of the final result: your vision.
By clearly defining your desired outcome, you can be sure you will achieve it and that you
aren't just relying on chance.
CHAPTER 14 - OPTIMIZING RENDERING TIME

Settings for Draft Rendering


On page 23 we saw that we can use the settings lrradiance map (Low), Light cache (500)
and Anti-aliasing (Adaptive subdivision), for our first visualizations. These give us a qu ick draft
image.
Now here are some other tips, which if combined with the. previous. advice, can produce
drafts in an even shorter time:
For V-Ray:: lrradiance map, select Custom and set the Min and Max rate to -4/-4 , Figure
14-2. V-Ray will only carry out one prepass and the Global illuminat ion will be even more
approximate, but very fast.

~ Render Setup: V-Ray NFR 2.10.ot EE] l!ij!I '


CotTmon I V-llay I Indirect lluminallon I Sell*1g$ I Render Elements I
r+ V-!lay:: !ndrrect Mflmnatlon (GO Ii II Figure 14-2
. V-Ray:: liTadiano! !!!!!e I- Parr of the Render
[ ilult-in l)l"esei< Setup diaiogue
Cimnt presej lCuslDm
I I box showing the
Current preset and
IMaxrate:~ ~I
Basic parameters
Mn rate: J-4 : Cir lhresh: io.r-
Nrm lhreoh: ~
.ii
.iJ
Options
Show calc. phase
Show direct11ght
r
r
the Irradiance map
parameters Min and
n:>pn. """"""'' 1so .:. Dist th-esh: ~ .:J Show samples r Max Rate
Jnterp. samples: ~ .iJ lrirerp. frames: ---- .iJ Use c:amera path r

.. I ..
~
ti jProcilaiM Preset:
r AciiVeShade Viow: IPenpectfve 9 ~
- -

For V-Ray:: Image sampler (Anti-aliasing), select Fixed, Figure 14-3. The anti-aliasing will
not be calculated and all the outlines will appear jagged.

~ Render~ V- NFR 2JOm 5:al"":Jfii!l


Convnan I V-Ray I &kWect biination I Setthgs I Rend.r Elements I
. V-Ray:: Image sampler (Antlalaslng}

rlmag~
_ Type: IFixed
Antiallasino fllter
_:,I I
Figure 14-3
Parr of the Render
rv on IArea . .:ompull!S_Ant!alasing ust1g a variable
size area filter.
Setup dialogue box
showing Fixed and
Size: f1,S" .ii its relative default
subdivs value

V-Ra~:: Fixed ~ $ani>ler 1

[ ~vslrr-.:JI 1 I
. I
~
iW !Production Pre:set: 9

r AdlveShade View: jPerspect;ve ~

Try Rendering very small sizes, even just 640x480 pixels. You can set the size in the
Render Setup dialogue box, and more precisely, in the Common tab of the Common
Parameters rollout menu.
You don't need to work with high resolution at the beginning. It's easy to see the balance
and impact of the lighting, even with small sizes.

Note: What we've just described is not valid if you are usi ng V-Ray RT real-time rendering.
PHOTOGRAPHY & RENDERING with V-RAY

Store with lrradiance Map


We always activate Store with irradiance map, Figure 14-4, located among the controls of
any V-Ray Light, especially in the initial work phase. The shadows produced by the light will
be calculated using the lrradiance map and, given that this will be set up to work quickly,
the same thing will apply to the V-Ray Lights.

Options- - - - ,
p- Oist shadows
Figure 14-4 r oo..tile-9ded
Part of the control r lnWible
P' Ignore i!tit normals
panel of a -Ray light
showing the core with
r No decay

it.radiance map option

Before launching your final render, don't forget to uncheck Store with irradiance map.
Always keep in mind however, that if you have a lot of V-Ray Lights without this option
active, you could require a very long processing time. It's up to you to assess the situation
and decide whether to uncheck the box for all the V-Ray Lights, or just for the ones that cast
the most relevant shadows.

Using the Render Region and Buckets


The V-Ray frame buffer, Figure 14-5, like the standard frame buffer in 3ds Max, lets you
render just a part of your image, using the Render region option.

Figure 14-5
The V-Ray frame buffer
window showing the
Render region function
and its effect

This function is very convenient, particularly when you are close to the final rendering stage
and would like to carry out some localized tests. These could include:
Checking the effect of the light on a surface;
Checking for overexposed areas;
Checking the granularity of a material with Glossiness< 1;
Checking the granularity of the V~Ray Light shadows without the Store with irradiance
map option active.
CHAPTER 14 - OPTIMIZING RENDERING TIME

Under all of these circumstances, use Render region to immediately find out the information
-
you need, and save a lot of time.
When rendering small areas for quick checks, you should ideally reduce the bucket size from
64x64, Figure 14-61 to a much smaller value, like 20x20 or even 10x10.

Note: The llittle moving squares that appear in the V-Ray frame buffer during rendering
are called buckets. The number of buckets depends on the number of processors your
computer has.

~ Rmder S!tup: V-Ray NFR 210.01 G3j[6 ~


Coornon I V-Roy I lndlrtttlllumlnotion I Settings I Render Elements I

'[ +
r+ V-Rax:: OMC 5anl>ler
V-Ray:: DefaL.tt displacement
b
b
~ Figure 14-6
Part of the Render
-Royrasll!r parlllTIS I
IBf
V~F S~sb!ol
R~ r dvision Setup dialogue
Max. Ir depth: rso-- .i.J box showing the
JReg;onW/H
I ~-loafs;,.,, lo,ocrn .;J parameters used to
r
FllCl!fteve coet. ~ .i.f
D)MmicmomY limit ~- M8
~se ~~
R~lon sequence: Jrl'iangUlatlcn . modify the buckets

DofaUtge<>metry: ~ Previous ll.lnchanged ...


- Proset:J---
f/i jProdUciion
r Ac:tiveShade VleW! Jrop

You may find that with small areas, not all the buckets finish their work at the same time.
The ones that finish first remain inactive while waiting. By reducing their size we can be sure
that we are using them all simultaneously. With whole images, on the other hand, the fact
that some buckets lag behind at the end of the image is completely irrelevant.

V-Ray Scene Converter


If you have a scene with all Standard or Mental Ray materials assigned to the objects, you
can transform them all into V-Ray materials by right-clicking anywhere in the scene and
selecting V-Ray scene converter, Figure 14-7.

Figure 14-7
V.JlayVF8
Part of the context mem
vrscene exporter showing the V-Ray scene
.vrscene anmation exporter converter function
V-Ray Bitmap to VRayHDRI converter

Note: The major advantage of this option is that it transfers all the textures into the
various channels. However, when V-Ray converts a Standard material into a V-Ray
material, it also replicates its non-photorealistic characteristics. For this reason, the
various properties of the surfaces must be reset manually to create a photorealistic
material, as seen in Chapter 6.

THIS CONCEPT IS ILLUSTRATED IN P&R-VRAv \ C HAPTER 14 \ V IDEO\ V10E0-14-1.MP4 EJ


PHOTOGRAPHY & RENDERING with V-RAY

Disabling Trace Reflections


The first option in the V-Ray material Options rollout menu is Trace Reflections, Figure 14-
8. If we disable it, Figure 14-9, the reflections will not be traced completely and only the
highlights will be simulated. This simulation will be much more approximate because it is
fake and uses the Highlight Glossiness option - t hat you can unblock by clicking on the L
button, Figure 14-9, - instead of the usual Refl. glossiness option.

I Diffuse
[ Diffuse Oi~- _J ~ ro:o- .:.J _JI L OiffiJsc- _J ~ ro;o- _;.) _JI
Reftecllon Reftecllon
Reflect MI Relloct~ MJ
... 'lilt~- ~ ~ _] fl P' "'""'"'ftodlons rt
Reft.~ro,s- : 1 I ~ .. !OR ~ .:.J I
8 : Maxdeplh rs- ;J
~1nb!rpdotion r Elcitcc1or -
Oindst11ner pw,oc .:.Jr 01t.' off ~ ;J

-r Tr=
1;;;;:: acere== ~~r~~
= flectlons::;-
[ JJ Tracerefractions
1 ----''ii
Reflect on bad< side
I
Figure 14-8 Pan of the Material Edicor showing the Figure 14-9 Pan of the Mateiial Editor showing the
Refl glossiness and Highlight glossiness options, with Reff glossiness and Highlight glossiness options, \vith
Trace reflections active (default) Trace reflecrions deactivated

Figure 14-10 and Figure 14-11 show the resulting images:

Figure 14-10 The output of the parquet using the Figure 14-11 The output of the parquet using the
classic setting in Figure 14-8 (26 minutes) fake setting in Figure 14-9 (1 1 minutes)

As you can see in the red square at the top of Figure 14-10, the white and green cabinets
produce slight reflections on the floor, while there is no hint of these reflections in the render
in Figure 14-11 .
In the second render, with Trace Reflection deactivated, all the objects are ignored and only
the highlights are reflected. The image on the left is clearly more realistic, as something is
always lost in approximations. It's up to you to evaluate whether the time you will save,
(which in this case is over 50%), is worth the difference in output.

Note: The Highlight glossiness option only produces reflections of the lights that don't
have the "Store with lrradiance Map".option activated. The floor in Figure 14-11 appears
less bright because, unlike Figure 14-10, it is not reflecting any objects.
CHAPTER 14 - OPTIMIZING RENDERING TIME

Global Switches
When you are at an advanced stage in your work and you need to take a step back to make
isolated checks, the V-Ray:: Global Switches rollout menu is the ideal place to do so, Figure
14-12. As the name suggests, these switches allow you to activate and deactivate certain
characteristics of the scene, without having to precisely intervene on individual objects.

Common V-fl.ay J lndi'ect bWlation J Se~ Render Elements

V-Ray:: Global !IWltdles


Ma~ -

1p R~fi'Kllon 1
. I Max d$6i j .f
Ughlhg --=====:::; 1
r;; Maps Figure 14-12
f;; ~ts f;; Fd-.r maps P Fl-.r m"llS fat GJ Parr of rhe Render
Default IQhts !off with Gt Max transp. levels rso- :j Setup clialogue box
r;; ltddM lghts showing the main
r;; stiadows f;; Ovorrido mU: Nono
options foe the V-Ray;;
r Show GI orlY r;r Glossy effects Ovtn1de Elcdude ...
Global switches
rlnchctlllrhllbi
'. Don't render finol lmaQ
Ccfll>allllty
y=::~ys~ ro;o- : J
[ r Lf9Y SUlfsl<y/amera models

The most useful aspects to activate/deactivate are:


Displacement;
Reflection/ refraction;
Override Material.
Deactivating Displacement can be very helpful in cutting down the set-up time. Once it has
been set up and checked, nothing obliges you to keep it active while you work on other,
completely different parts of the scene. Likewise, you can disable the Glossiness of all the
materials by unchecking Glossy effects, Figure 14-12.
With the Override mtl: option, you can override all the materials in your scene and
assign a single one in their place. This is useful when you have already assigned all
your materials and you want to reset your light balance, for example. It would be
dispersive to reset it with all the materials assigned, or to apply one material to the whole
scene and lose the ones you've already assigned.
Using Override mtl:, you can create a generic material in the material editor and drag
it into the box reading None, Figure 14-12. From then on, every object in the scene will
appear to have that material. The materials will not have been deleted, but only temporarily
overridden. Once you've finished balancing, simply uncheck the option and everything will
return to the way it was beforehand.

Note: When you apply a new material to all the objects using Override mt/:, interior scenes
can sometimes turn black. This occurs for the simple reason that the generic material has
overridden everything and even the windows have momentarily turned grey, blocking
out the sun's rays. If this happens, hide the windows or exclude them from the override
using the Override Exclude button, Figure 14-12. Before launching your final render,
reactivate everything that you have disabled. This may seem like an insignificant piece of
advice, but actually the Override mtl is left active more often than you might imagine.
PHOTOGRAPHY & RENDERING with V-RAY

Sizing and lrradiance Map for Large Renders


A render that is to be printed at a size of 6 m x 3 m will never be looked at close-up, but
a1lways from a distance of at least 3-4 meters. It would be senseless to stick to the famous
resolution of 300 DPI in this case, as the file-size would be gigantic. 300 DPI is actually a high
resolution standard for formats of a very small size, like books or magazines.

Note: If we print an image on a 6x3 m poster at 25 DPI, which corresponds to 6000x3000


pixels, the details won't be noticeable from a certain distance. It's therefore normal to
print with a low DPI, and 25 is a good compromise. With 6000 pixels printed across 6 m, 1
pixel occupies 1 mm. This gives you an idea of how defined this kind of poster shou ld be.

What we've just covered concerns the size of the render, but how should we set the
lrradiance map under such circumstances? Can we still use "high'' to obtain good quality,
or would this be excessive?
Using High for a 6 m poster is like wanting to paint the fac;ade of a building with a finishing
brush.
The maximum detail for the surface of a building is clearly different from the maximum
detail for the wall of a room. It's all in proportion and that's why we need to modify the
lrradiance map values when it comes to calculating large-sized images.
!instead of using High, which has Min/ Max rate = -4/ 0, we use values like Min/ Max rate= -7/ -
~I,Figure 14-13.

-llla1 Rendr Setup: V-R.ty NFR 2.lOAll CE] @ liQ!J


c.cmnon I V~y I Indlrl!Ct lbnNtlon I ~ttrngs I Render Btmenls I
Figure 14-13 - V-ffav:: lmldana: ~

r---
Part of th<: Render [ Ut-hpt1!$ 1s
Setup dialogue box Cl.rront presot: jc.us!D!n .,.
s howing the Min/Max I
rate options
I Max rate:
HSph .
~ :~I ~ , .....,,ro.r- _;]
Knrate: r-r-

...WV.q so
_;j Q-11...sh: ~

ii Oisttt....h: ro.r- ,;J


,;J
r~~stiowcalc.phase
iffl .i oct icin
st- samplos
r
r
r
Int<q>. ro- _;j I~. ~ iJ
$0nl)les: & ""5. Uso avnero path r

The mathematical aspect is of little interest to us at this stage. The important thing is that
it's clear that -4 is a more than sufficient level of detail for a poster-sized image, as is O for a
s.creen image.

Considerations: These are the values I use and which I've always found to work so far.
My record has been a poster rendered at 5000 x 2150 pixels, printed at a size of 7x3 m
(approximately 18 DPI). The poster stood at ground level and was therefore very close
to the viewer, yet even from a distance of 1 m, it could be seen very clearly. The Min/Max
Rate values for t he lrradiance map were -7/-4
CHAPTER 14 - OPTIMIZING RENDERING TIME

Light Cache as a Preview


If your computer allows it, you can use V-Ray RT. If not, there is another method: use the
Light cache preview.
Assign a value to the Light cache t hat is high enough to generate a calculation and long
enough to produce a good preview. 3000 for a 1024x768 image should be quite sufficient.
Don't forget to activate Show calc. Phase, Figure 14-14, so that you can see the processing
underway.

~ Render Setup: V-Ray NFR 2l0.0l

common I v~y I indirect ilbrlnation I se~s I Render Elements I


V.ftay::~tCll~
,......1ers
cakllation parame .....,......................, Figure 14-14
5'lbdlvs: ~ : Part o f the Render
Sarrell sitt: 0,02 Show calc. phase P Serup dialogue box
Scale: !Screen l.Jsecamerapadi r showing the Calculation
Number of passes: rs--- _;] Adaptive !racing r parameters
Usedectionoonly r
~ jProdudion l'reset:J---
r ActlveShade View: jPespect!ve ~

Just launch t he render and stop t he calculation before the Light cache finishes, to get a
general idea of the impact of the lights in the scene, Figure 14-15. This method is sufficient
and very fast.

Figure 14-15
A render preview
obtained using the
light cache calculation,
blocked after 20-30
seconds. This is just
enough time for a
normal computer to
get this much detail,
which is sufficient to
understand how the
scene is working
PHOTOGRAPHY & RENDERING w ith V-RAY

Render Previews Using V-Ray RT


The fastest method of all for working with an excellent preview is the real-time render using
V-Ray RT, as mentioned in Chapter 1 - First Steps in V-Ray.

Comparing Images Using the VFB History


When you are at Step-4 of the 5-Step Render Workflow in particular, that is, the one dedicated
to cleaning up your images, the V-Ray frame buffer History (VFB History) tool becomes
an excellent ally to save you time. It allows you to compare two rendered images while
remaining in the VFB itself.

Exercise: How to Compare Renders Using the VFB History


In this exercise you will see how to compare two renders in order to quickly observe the
differences between them.
1. Start 3ds Max and V-Ray and open the file Chap14-01-VFB-history.max, located in
the folder P&R-VRay \ Chapter 14 \ Exercises. The scene has already been prepared with
all its materials and lights.
2. Launch the render and then click on the Show VFB History Window icon, Figure 14-16.
This will reveal a window to which you can temporarily allocate images, Figure 14-17.
Set up a folder to save the file.

Figure 14-16 R~ hKtoly s<tting<


Figure 14-17
Part of the VFB dialogue box W'B hlstary a:ni>palh:
Render history
with the how VFB history Mamuo size on dsk ~):
sectings dialogu
window icon highlighted box

Note: The Render history settings dialogue box, Figure 14-17, doesn't appear if the folder
for allocating files temporarily has already been set up in the past. In this case, you will
pass directly to the Render history dialogue box, Figure 14-18.

Render history IQ) ( Render history @


i;; nal>le W'B hlstary Options 1 p Enable VF8 history Options

Figure 14-18 I Save 11 lood I rOVel a.. I ~: lA>ed ~ o..r I Figure 14-19
~ ktB
Render history dialogue ~~ Render hisrory dialogue
box before saving the box showing previe\YS
render, with the Save Qp1+o1-\'fll~tary.max
1200xl341;(11,ln,59,8s
I
~
of the rwo renders
b1.1non lughlightcd saved
Qpl+ol--Nstary.max
1200X1318;ttl,3nl,18, ls

3. Click on the OK button, Rgure 14-17, if the Render history dialogue box isn't present,
Figure 14-18, and now, click on the Save button, Figure 14-18, to obtain a thumbnail,
Figure 14-19.
4. Change the material assigned to the chair and launch another render. Click on the Save
button to obtain another thumbnail, Figure 14-19.
CHAPTER 14 - OPTIMIZING RENDERING TIME

S. There are now two thumbnai ls in the Render history dialogue box, Figure 14-20. Select
t he first image and click on the Set A button. Select the second one and click on Set B,
Figure 14-20.

~ndor hi$to,y !U!


i;; Enable W'S 1-istory ()pGons J Figure 14-20
Saw load Remove ae. I Render history
IEJGJ-- dialogue box showing
thumbnails of the
cwo renders sa'"ed
and tbe relative
letters that appear
once you click on Set
A and Set B

6. After you've assigned Set A and Set B, a vertical white line w ill appear in the render,
Figure 14-21 . You can drag it towards the right or the left to compare the two renders
and easily check their details.

!] V-Ray frame buffer (50% of 1200x1348)


iRGl.. rerere
-............
-::-'-:-----.,.....,,,.....,....,-.,-----~

Figure 14-21
The V-Rar fume
buffer dialogue box
showing the vertical
line that separates the
two rendered images
you want to compare

THIS EXERCISE CAN BE SEEN IN P&R-VRAv \CHAPTER 14 \VIDEO\ Vmrn-14-2.MP4 ~


When working with software like 3ds Max or
1: V-Ray, its possible to run into problems related
to data storage errors, objects containing artifacts
. ..----~- after rendering, shadows with jagged edges and
many others.
In these situations your work can be continually
slowed down, not because ofproject dijficulties,
but due to constant technical glitches - sometimes
even obvious ones - which can cause you to waste
your precious time.
The purpose ofthis chapter is to tackle some of

-- the most common critical situations that you may


encounter while using the software. By presenting
a quick solution, it will help you avoid freaking out
when using V-Ray.


- PHOTOGRAPHY & RENDERING with V-RAY

Introduction to Technical Problems


In the following paragraphs, we will look at some of the most widespread problems and
most common mistakes you may run into. For each of the following critical situations, we
will briefly explain the source of the problem and how to solve it.

Considerations: When I have a problem that I can't identify straightaway, I start making
some attempts to eliminate the possible causes one at a time. I turn off the lights one
by one, I assign a material to everything, I disable the glossiness and I delete objects.
Each strategy has the purpose of isolating the cause of the problem. Once I've figured
out what the g lit ch is, it's very easy to understand why it occurred and how to solve it.

Splotched Walls
Splotched walls are a recurrent situation in interior rendering and are typical flaws of
approximation systems. Although they may be more or less pronounced, the fact remains
that these patches can be very annoying and unsightly. It's quite rare for t his phenomenon
to be evident on dark or textured walls. The problem does exist, even in these cases, but
isn't noticeable. On light, solid color walls, on the other hand, such artifact s are a lot more
evident, Figure 15-1.

Figure 15-1
A render
containing
splotches
(discoloration)
on the walls

If you're working in low resolution with the lrradiance Map set to Low and the Light Cache
set to 500, your render is likely to contain artifacts. The temporary imperfections produced
with low values allow you to obtain previews in a short time. In th is initial phase you really
shouldn't worry about artifacts or grain. You will take care of them in Step-4 of the 5-Step
RenderWorkflow, the step dedicated to cleaning your image for the final render.
It's a different story, however, if you have already fine-tuned V-Ray for your final render and
have already changed the settings:
lrradiance map from Low to High;
Light cache from 500 to 1500;
Noise threshold from 0.01 to 0.005.
CHAPTER 15 - SOS: HOW NOT TO FREAK OUT

If you've already changed these values and there is still some discoloration, you can intervene
directly on the number of light rays that the lrradiance Map is distributing within the scene:
HSph Subdivs. This option indicates how many rays there are in the space.
If you only have a few rays, it's like painting a "pointillis.t artwork" using just a few points: a
certain density of points is clearly needed in order to get an even result.
It is therefore necessary that a sufficient number of rays are spreading through the space, so
as to ensure a uniform result. The default value of 50 works well in many situations, including
dark, textured walls, or for exteriors where the light bounces very little.
The value can be increased for the final render, if need be. This will naturally cost more in
terms of processing time. In cases such as these, we increase the HSph Subdivs from 50 to
90 or 100, Figure 15-2, and the artifacts should diminish.

V-Ray:: Irradi~ map J


Figure 15-2
Part of the Render
Setup dfalogue box
showing the opcions
HSph. subdivs and
lnterp. samples in the
V-Ray:: Irradiance map
rollouc menu

Note: It's advisable to use the Render region to locally determine the minimum value
of HSpere Subdivs with which the area appears clean. This way, you won't just solve the
problem quickly, but you'll do it using the least resources possible.

Considerations: Sometimes, even when this value has been increased, the discoloration
remains. It can also be caused if an imported model contains imperfections, which
generate artifacts during processing. In these situations, if you want an clean image, you
need to make a compromise. Increase the lnterp. samples to 30-40 to"blur"the artifacts.
You will have a less accurate Global illumination map, but the image will be cleaner.

Spotty Surfaces
This situation often occurs when we import a scene from another software. The problem is
that the scene contains identical overlapping faces, Figure 15-3 (A). This creates confusion
during the processing phase and generates spots.

Figure 15-3
The image of an
imported model, with
flush surfaces and their
relative spots (A), and
the same model after
solvmg the problem
using Secondary rays
bias (B)

The best thing to do is identify the extra surfaces and delete them, or change the Secondary
rays bias option, located in the Global switches rollout menu, Figure 15-4.
PHOTOGRAPHY & RENDERING with V- RAY

lSa'I RendorS.Wp:V-R.yNFR 2.10.61 @ GI ~

Common I V~y I lnclrect......tian I Sdti>g$ I Render Elements I


V-Ray:: Global switches

I
Geometry
P' Displacanent
r Fcebad<faa!aAlg
I Matertols
p RrflodfonfrefracUon
r Maxdepth i : - - .;]
Figure 15-4 II ::Uug,~tjng;;;======::::: p Maps
Part of the Render P Lights f;r Flt!r maps P' Fite- maps fur GI
Setup dialogue box DefalAtldits IOffwl1hGI Maxtransp. levels~_;_]

showing the Secondary f7 ttilen Jgits Transp. wtoff lo;oo1 .!J


-rays bias option in the f7Shadows r~mtt: .,,. I
V-Ray:: G lobal switches
r Show Gt orly p GloAy effe<ts Ovecride Exdudo... I
rollout menu I Indrert1umation --"'!I
Ir 0ont render mai inagc Scconcloryravsblao ro;oor- _;_]

~J
Presotj
'1ew:I~ ~

By typing 0.001 , Figure 15-4, instead of 0.0, you can force V-Ray to separate all the faces in
a scene by such a small value that the visual result will not appear any different. It will be
effective enough, however, to overstep the mathematical error that the overlapping faces
have produced.

Considerations: When I import a complex item from a different kind of software like
Rhinoceros, it's very common to find a number of faces piled up. In cases like these,
it would take too long to delete all the extra faces so I solve the problem by setting
Secondary rays bias to 0.001 , Figure 15-4.

Grainy Areas
Just as splotches are typical flaws in approximation systems, grain characterizes direct
calculation systems, Figure 15-5.

Figure 15-5
A render
containing grain

As we saw on page 176, we lower the Noise threshold from 0.01 to 0.005 before launching
our final render. The granularity of .the whole scene is drastically reduced, while the
processing time increases. In cases in which there is still too much grain in some specific
areas, you'll need to act directly on the element that is generating it, as explained in the
paragraph Various Subdivisions on page 176.
CHAPTER 15 - SOS: HOW NOT TO FREAK OUT

Insufficient Memory for Huge Renders


When you launch a large-sized render, it's not rare to run into various kinds of memory
errors. If the root of the problem is the lack of data storage, the immediate solution is to
increase you r RAM or do one of the following:
Render in parts: Using the Crop function or using Blowup, Figure 15-6, you can choose
the area you wish to render and the V-Ray Frame Buffer will decrease to show only the
selected part. The rendered pa rts will then need to be put together using Photoshop.

l'2l Render Setup: V-Ray NfR 2J0.01


Corrrnon I V.ftay I lndl=tlllumNtion I Sctlilgs I Render Elements

Figure 15-6
nTieOutjlut ---------~ Patt of the Render
(I Siiglc Every Nthframe: ~ .:.J Setup dialogue box
(' ~ T-Segment? OTO 100 showing the Crop and
f' ~: io-- .:.) To ~ .:.) Blowup options in the
Fil lll.lnber Bas: io-- .:.J Common Parameters
f' Fremes 1,3,5-12 rollom menu. It's
advisable ro size the
ka tD Rend<!r
r various areas with a
[
lp90 Auto Region Selocted
Vlow certain margin, so as

'
~ ~~
to be able to use it
ApertureWidlhVivo): when lining them up in
'' 320x2~ I 720x'l86 I Photoshop
Heililt ~ .;J 610x'l80 I soox600 I
~ ,...,Pr-
oductlon
--- . Preset: 1- - - Render I
r ActiveShade l/tcw: IVRayt>hystc.alQ ~ ~

Render to raw: The V-Ray Frame Buffer allows you to save your image directly onto a
hard disk and save allocated memory. Tick the Render to V-Ray raw image file check
box in the V-Ray :: Frame Buffer rollout menu, Fig ure 15-7. Choose where to save your file
(as a .VRIMG or .EXR) and disable the Render to memory frame buffer option.

~ Rendtt Setup: V-Ray NFR 2J OD1 g Gl i!Q!l


COll1nOll I V-Ray I Inchct b*lation I Sct1i1Qs I Render Semer1ts I

I
r. _-
- V-Ray:: Flame buffet
FT Enable buit.., Frame eutrer
r Rend<!r to memory frame buffe1
Show last l/fB
I Figure 15-7
Pare of the Render
P Get resollaon ITom MAX Setup dialogue box
showing the " Render to
~~lidir
"I'
~.:J 6.;ox.;eo
I 1024:(768 I 1600)(1200 I memory frame buffer"
H"91t ~ 800x600 I 1~1 20<!Sx1SJ6 I and "Render to V-Ray
II
l""'IJ" osoect: rr.m- .;J JJ Pixe. aspect [l.O .:.J raw image file" options
V-Ray raw n...... file
in the V-Ray:: Frame
P" Render ID V-Ray raw mage fie I buffer rollouc menu
r Generate preview Browse ...
I
I
. I .
~
II !Production Preset:
(' ActiveSh&de View: IYR&yt>hysialle ~

Note: .VRIMG images can be opened in the V-Ray Frame Buffer, by clicking on the Load
image icon, located at the top, next to the Save image icon, while .EXR images are fully
supported, even by other software, including the most recent version of Photoshop.
PHOTOGRAPHY & RENDERING with V-RAY

Framing in Tight Spaces


When framing tight spaces, it's logical to use a wide-angle lens because if you don't, the
framed areas are too small. This occurs in real life as well as in computer graphics. Ideally,
you could step backwards and use a longer focal length, but the risk is that you won't have
enough space behind you and you'll end up outside the scene. Without "tearing down" t he
walls, the solution to this problem in an interior is clipping, Figure 15-8. It's a simple and
useful function that allows you to "see" from a certain point forwards, without changing
anything. While our view normally starts from the camera, in this case you can make it start
from any distance, crossing walls, doors and any 3D object in t he way.

v ..:..__ _,,-=,_
........
..c__J
c dopth~Mield. . r
~
Figure 15-8 motionbb........... r
chematic RMws............... ~ .iJ
representation of a
\/-Ray Physical Camera, [_,_~__J
a wall (A) and the near
clpplng............... P'
clipping plane (B) and
-clpplngplane.. 1103, 58 .!..!
far clipping plane (q .!..l
far clpplng ....... ... f"i65.8i
options
env range...... ro;o- ,;,J
env rango........ rmo;o ,;J
<Dne .... lseoctm

In Figure 15-9 the framing was made using a camera with a focal length of 30 mm, but due
to the distances at play, the cabinet near the camera appears enormous compared to t he
seat. We therefore need a lens with a longer focal length - a 60 mm for example - to
better convey the proportions, Figure 15-10. To use a 60 mm lens in an interior however, we
would have to move away to be able to frame the same scene, and this often isn't possible
because of obstacles in the way. Using the V-Ray clipping option in a virtual space, the
problem is easily solved.

Figure 15-9 A camera placed inside the scene with a Figure 15-10 A camem placed inside a scene with
focal length of 30 mm a focal lengch of 60 mm and the clipping option
activated

THIS CONCEPT IS ILLUSTRATED IN P&R-VRAv \CHAPTER 15 \VIDEO\ V10E0-15-1.MP4 ~

Note: The clipping plane option is available on both the Standard camera and the V-Ray
Physical Camera (see Chapter 4 - Our DSLR).
CHAPTER 15 - SOS: HOW NOT TO FREAK OUT

Highlights with Jagged Edges


Extremely light areas can sometimes have jagged edges, as in this image, Figure 15-11 .

Figure 15-11
A depiction of jagged
edges in the highlights.
This occurs frequently
with light sources

This is an anti-aliasing problem and to solve it, just activate the Sub-pixel mapping and
Clamp output options, located in the V-Ray:: Color mapping rollout menu, Figure 15-12, as
we saw in Chapter 9- V-Ray Sun System on page 134.

~ Ronder Setup: V-~ NFR 2.10.ot CE] ~ ~ I


I V-Ray I I Setliigs I I
--
COtMion

Type:
Indrect ilri>atio<i

V-Ray:o COlot
~11.ft.Y--mU-..,.-y---
""""*'
. 1p- SUb.p..l IMIJlli'l!I
Rendor Elements

I I
Figure 15-12
The Sub-pixel mapping
and Clamp output
_P ~au1put ~levd: ~; options activated to
DarlcmU~ ~ ~ P Afftttbadqouid
llli!iht ~: n:o--_;] r Don't affect ailors (adaplatic!l only) solve the problem of
Ganino:~ ~ r lftarwarkflow Ati.ti-aliasi~g

Pt-t:l1- - -
~,1~ .. ~

If you use the linear mapping, Linear multiply, Figure 15-12, the disadvantage is that, after
applying the Clamp output option to the image, it will no longer be possible to process
it as a RAW image. All superfluous information will have been eliminated, as is precisely
this reduction that makes correct anti-aliasing possible, Figure 15-13. If the mapping is
Exponential, on the other hand, there are few contraindications, given that all the pixel
values (Color float) are between O and 1 in any case.

Figure 15-13
The render without
jagged edges, thanks
to the Clamp outpur
and Sub-pixel mapping
options
PHOTOGRAPHY RENDERING with V- RAY

Edges of Objects with Displacement Opening Up


Applying Displacement through the Displacement channel, located in the Material Editor, is
equivalent to applying it to something flat. So there's no problem if you use this method to
map rugs, lawns and flat objects in general.
If you use the same method to apply it to three-dimensional objects, for example, if you
want the walls of a pillar to have a bit of noise, openings will start to appear along the edges.
It's not really a problem - it's just that it's wrong to use the displacement channel on 3D
objects. Instead, in cases like these, use the VRayDisplacementMod modifier and select 3D
mapping for the type. Then, to prevent openings along the edges, tick the keep continuity
check box and V-Ray will create polygons to keep the surface together, as we saw on page
142, in the paragraph Displacement of3D Objects.

Blurred Final Render


After you've assigned your materials and launched your final render, the scene can
sometimes appear slightly blurred and the textures grainy, even if the various Glossiness
Subdivs are set to SO. In all likelihood, you haven't changed the anti-aliasing, which is one of
the fundament al things to do before launching your final render (Step-4), as discussed in
Chapter 11 - Interior Rendering on page 173.
You can control the Anti-aliasing via the Render setup dialogue box, Figure 15-1 4, by
changing the Image sampler option and also the Anti-aliasing filter, if need be.

~ Render Sdup; V-Roy NFR ll0.01 ~ S ~


Commoo I V-Rby I lndirectlunnalion I Settirl!I> I Rmdcr 6emerit> I
Figure 15-14
Part of the Render
-
, I~~
V-Rav:: ~......., fA.it.n.""") I I
Serup dialogue
box showing the
_I TYP! 1~0MC -I I
r-~
l:i
Adaptive DMC and
VRay incFilrer options
p on ll'RaySlncflter 1r-Ray mpiementzillon of~ Sine flter. I
in the V-Ray:: Image - Si?: f3.0 :1 1 11

sampler rollour menu


jProdudlon Pr...~1---
r ActlveShado 'llewl IPonpocllve .!l

Considerations: It's very common to use the VRaySincFilter as an anti-aliasing filter. It


is, indeed, probably the most suitable filter, but personally I always prefer to get my
bearings by imitating the world of photography. DSLR cameras also have a parameter
that adjusts the sharpness of the photograph, but the correct approach is to take photos
that aren't too sharp. Sharpness can easily be added but it is impossible to eliminate. For
this reason, I always use the simple Area filter that V-Ray offers by default and wait until
the post-production stage before deciding how much sharpness to apply, see page 202.

Note: Sharp images and focused images are two different concepts. Sharpness is
exclusively concerned with the degree in which the discernible detail stands out in the
focused areas. Photos that are too sharp contain artifacts in areas with a lot of contrast.
a
That's why the sharpness settings on DSLR camera are usually kept at medium level.
CHAPTER 15 - SOS: HOW NOT TO FREAK OUT

Images Appearing Washed-Out after Saving


You may find that a render that appears correct in the V-Ray frame buffer appears washed
out when you open it in Photoshop or with another photo-retouch program. In this case,
the problem is that the Gamma has been applied twice:
Once the preferences have been set, as seen in Chapter 2 - Compensation Using the
Gamma Curve, they are usually not changed. If, however, you change your workstation or
reinstall 3ds Max, you need to remember to set your preferences again in the Preference
Settings dialogue box, Figure 15-15 :

r;r Enallle Ganvna,tUTCotrecuon


Figure 15-15
Display --------~ Mat.rials and COiors
Preferences Settings
(' Autodesk \'lew LUT J;; Affect Cdor Selectors
dialogue box with
&-......, ...1 P' Affect Material Editor the Gamma and
LUT tab selected
and die Gamma
llltmaJ> ties option highlighted
l nputGammo; 12,2
[ OutputGomll)ll: J1.0

The thing that usually misleads us is the fact that some versions of 3ds Max have the Output
Gamma set to 2.2 by default, Figure 15-15.
If you intend to use the V-Ray:: Color mapping Gamma with a setting of 2.2, (see page 14), you
need to deactivate the one in Output Gamma by changing its value back to 1.0, Figure 15-15.
Another option that can lead to this error is the sRGB icon in the V-Ray frame buffer, Figure
15-16. This mustn't be used in our procedure or else we will already see a washed-out image
in the V-Ray frame buffer.

Figure 15-16
The sRGB icon
highlighted in the V-Ray
frame buffer

Mistakes when Saving!


You may be distracted and save an image in which Gamma has been applied twice. The
double gamma can be recognized in an instant and you don't necessarily have to redo
everything to repair the damage from this kind of memory lapse.
Gamma is just as easy to remove as it is to add. Open the image in Photoshop and set the
Gamma to 0.45 in the Exposure dialogue box, Figure 15-17. This is t he inverse value of 2.2,
so it removes the wrongly added gamma from the image.

Jesposizion
Figure 15-17
Predefinito: Personalc OK I
Exposure dialogue box
Annulla II (Image > Adjustments
Esposizione: 0,00
> Exposure...) in
)' ,[2) Photoshop showing
Spostamento: 0,0000 0 Anteprima the Gamma Correction

I Correzlone gamma: 0,45 11


option
PHOTOGRAPHY & RENDERING with V- RAY

Light Leaks
Structures placed one on top of the other can produce "light leaks': Figure 15-18. Even w ith
the vertices snapped together, sometimes the contact between the objects just isn't perfect,
revealing little strips of light between one object and the next.

Figure 15-18
A render showing
several points where
light is leaking


This problem is related to the number of samples placed by the Light cache and it can be
solved by ticking the Retrace threshold check box, Figure 15-19, located in the Light Cache
rollout menu. The Global illumination calculation time will certainly increase, but the light
leaks will be eliminated and the shadows will have an even greater consistency. You can
observe the difference by comparing Figure 15-20 and Figure 15-18.

- Y~y:: t lnht c.iKhe


Olbialfan paromet!fs
Figute 15-19 ~ :~.;] .. Sim dtect Iii# f;;
r
Part of the Render Sam!>le size: ~ .:.l Show ai1c. pi,_

setup dialogue box


showing the V-Ray::
l
I tbrherofpasses:~
Scale: 1Sat!...
.iJ
U..COlllCl"apad>
Adoptive tr<tdng r
r
USC <lirections or-I r
Light cache rollout RDRSlrudlon perwneb!rs
menu and the Retrace
threshold option
Pl"e-lilber:
1w,.,.t:_..__...
r rio- .:.l
~ ....... ~ ... Fiber: lf'leat
~..._ lhr..ndd: i;:; ~ .:.l I
Inberp. san"ll)les: ~ .iJ
----

Figure 15-20
The image rendered
after activating the
Retrace threshold
option. The light
leaks have been
eliminated and
the consistency of
the shadows has
increased


White Pixels (the Sun)
CHAPTER 15 - SOS: HOW NOT TO FREAK OUT

-
It's hard to count the number of causes of little, seemingly unexplainable white dots. One
circumstance that often occurs cain be seen in Figure 15-21 . The points highlighted in the
red box seem to appear out of nowhere, but they are actually caused by the sun being
reflected off the glossiness of the floor, and being fragmented in the process.

Figure 15-21 A render showing little dots Figure 15-22 T he same render without noise.
polluting the image. You'll find this image on the You'll find this image on the DVD in
DVD in P&R-VRay \ Chapter 15 P&R-VRay \ Chapter 15

Although it manifests itself differently here, the underlying problem is the same as the
.aliasing seen on page 223. We can therefore use the same solution: activate Sub-Pixel
Mapping and Clamp Output (in t he Color Mapping rollout menu).

Note: We could also elitninate the cause of the artifacts from square one, by using the
sun's Invisible option, located among the VRaySun parameters. This will not alter the
physics of t he scene in any way.

Image Blurred when Saved as a JPG


To the eyes of a viewer, an image saved as a .JPG at 100% (with no compression) is not much
different to an image saved in another uncompressed format, like TIFF. To verify this, save
an image in the two formats and compare them.
Nevertheless, images that were in focus in 3ds Max, can sometimes appear blurred after
saving. If this happens, check that the window that appears before saving as a JPG has the
following settings:

~ JPEG Image Control


ImageCOnlral -------~

worse Quaity: 100 Best


Figure 15-23
JPEG Image Conttol
FileSize dialogue box that
appears when we save
the liJe as a JPG from
Normal Smoo"*>g: o the V-Ray frame buffer
Index E
Exposure, the three types 98
Exposure time 32
Shutter speed 44
Symbols Eye vs. Camera 97

5-Step Render Work:flow (5SRW) 154 F


Step- I : Analysis of the 3D model 155
Step-2: Light balance 155 f-number 44
Step-3: Applying materials 168 Focal length 32
Step-4: Cleaning the image 172 Composition 34
Force color clamping 17
A
G
Activating V-Ray 4
Gamma 10
Adaptive DMC 173
Adaptive subdivision l 73 Global illumination 22
Anti-aliasing 173 H
Aperture of the diaphragm 32
f-number 44 HDR1 184

B I
Bank lights 48 IES file I 83
Bokeh 39 Index of Refraction (IOR) 67
Bumping 136 Trradiance map 23 174
ISO 32
c Film speed 44
Carpet material t 70 Ivy Generator 147
Chromatic contrast 57
L
Classic three-point lighting 56
Clipping Plane 45 Light balance in an interior 58
Color bleeding 88 Light cache 24, 213
Color correction 194 Light Cache 175
Color grading 194 Lighting 48
Color Mapping 99 Lighting, basic scheme 54
Color Mapping: Reinhard l 0 I Lighting in exterior simulation 122
Color mapping without V-Ray 102
M
D
Material Editor 68
Depth of field 36 Material tables
Bokeh 39 Chromed and brushed metal 77
Tilt Shift 38 Colored glass 82
Displacement 136, 142 Glossy red plastic 74
Displacement as a channel or modifier 13 7 Glass I Frosted glass 8 I
Displacement of3D objects 142 Gold 83
DSLR camera 32 Natural wood 79
Aperture oftbe diaphragm 32 Opaque blue plastic 78
Exposure time 32 Varnished wood I PoHsbed marble 75
Focal length 32 Materials analysis, general framework 67
ISO 32 Materials library, how to create 89
Max Depth option 87 v
Multiplier 53
VFB History 214
N View clamped colors 17
VRayDisplacementMod 138
Noise threshold 176 V-Ray frame buffer 16
VRayFur 145
p
V-Ray JES 183
Parquet material 169 V-Ray light 50
Prepasses 25 V-RayLight, other types 180
Dome mode 181
R Mesh mode l 81
Sphere mode 180
Realistic sky/background 117 V-Ray Light Lister 167
Reflections, fresnel and metallic 62 V-Ray Light Material 182
Reflections on glossy and coarse surfaces 64 V-Ray Light Mesh 181
Refraction 66 V-Ray Physical Camera 44
Render region 209 V-Ray Proxy 148
Rendering exteriors 112 Y-Ray RT 6, 214
Absence of the horizon 11 8 V-Ray Scene Converter 209
Framing 113 Y-Ray Sky 127
Realistic sky/background 11 7 How to control the V-Ray Sky 128
Vegetation 1t 9 V-Ray Sun 124
Rendering, settings 207
Rule of thirds 35 w
s White balance 40, 42, 195
Histogram 199
Show calculation phase 24 White balance in Lightroom 195
Show corrections control 18
Shutter speed 44
Simulating grass and rugs 140
Store with irradiance map 51 , 208
Subdivs 24

T
Technical problems 218
Edges of displaced objects opening up 224
Final render blurred 224
Framing tight spaces 222
Grainy areas 220
Jagged-edges in highlights 223
Splotched walls 218
Spotty surfaces 219
Three-point lighting 57
Trace Reflections 2 10

u
Use exposure control 18
Use interpolations option 85
Use Light Cache for Glossy Rays option 85
Acknowledgements
A lot of energy went into creating and de eloping this book but it wouldn't have been
enough had it not been for the contribution of those who, voluntarily or not, have
accompanied me throughout the past two years.
My heartfelt thanks therefore go out to:

Carmine di Feo and Ivana Salte/Ii, who assisted me in all the workshops with no effort
spared;
Crescenzo Mazza , professional photographer, whose advice l' ve always sought since starting
this book;
Dimitar Dinev, for always supporting me and for proofreading the technical content as a
Chaos Group con ultant for V-Ray;
Chaos Group, for its upport and for giving me the chance to be the world fir t V-Ray
Licensed Instructor-
Fabio Allamandri, for introducing me to Gabriele Congiu and GC Edizioni;
CGworld, for believing in the 5-Step Render Workftow method and for bringing the
5SRW certification to (jfe;
Javier Martinez, world-famous CG artist for his sugge tions expert advice and long chats
about V-Ray;
Austris Cingulis 30 artist, for allowing me to use some of bis 30 models and textures
Alessandro Bernardi prominent expert in the world of color correction for hi essential tips;
All the readers who have been following my blog for years and wbo bave appreciated
its easy viewing, as well as all the cour. e participant who have taken part in my live
workshop throughout Italy.

Finally I extend my sincerest thanks to:

Gabriele Congiu, as editor of the book, for making it much better than J could ever have
imagined;
GC Edizioni, for believing in the project and in the development of a planning method for
rendering;
My family, for always supporting me in my immen e de ire to explore;
My grandmother who if she were here, would walk proudly along the treet with the book
under her ann
Ivana, my girlfriend, for the attention, love and support that never fell short for even a
econd.

Ciro Sannino
A PHOTOGRAPHIC PHOTOREALISTIC
APPROACH RESULTS
Studying the r eal w orld Through the simple
with the ba ~~S from and systematic use
physics. materials. of the powerful V-Ray
lighting and ph otog raphy rendering engine


PHOTOGRAPHY & RENDERING with V Ray is based on the S St epRenderWorkflow (sSRW) method.
It is an educa t io nal fo rmat made up o f fi ve simple steps fo r creating pho to realistic renders In the field
of pre-visualization for a rchitecture, mechanics a nd design. It use s photography - and the basic concep ts
behind i t - as a point of reference.
Framing, Lighr Balance, Materials, Final 5ertings and Posr-Produccion are t he five crucial p hases in the
innovative S-Step Render Workflow (SSRW) met hod. Examined w ithout technicalities. t hese phases
form a si mpl e and deliberate pathway that aims to guide and encourage full awareness o f each step
leading to the creation of any kind of render.
Each t opic has a t heoretical Introduct ion, designed to p repare the reader for the p ractical use of the V-Ray
p arameters. In this book, the final outcome is not intended to be an end in itself. Instead, t he focu s is p laced
on the process used to achieve it. In line with this l09ic. the various exercises and videos accompanying
the book are m eans, rather than ends, t hat will allow you to reason with greater awareness.
The book is targeted both to readers w ho have never used V-Ray, as well as those who already have
experience w ith the software and are simply looking for a way t o org anize their ideas simply and with
great er coherence.

TOPICS COVERED IN THE BOOK:

First Steps in V-Ray Compensation Using t he Gamma Curve Global Illumination and lrradiance Map The OSLR
Camera in V-Ray Light Balance Simulating Materials Exposure Exterior Rendering V~Ray Sun System Simulating
l/egetation and Text iles The SSRW Method and Interior Rendering Ot her Lights and HORI White Balance and
Contrast Optimizing Rendering Time SOS: How not to Freak Out

CIRO SANNINO
V-Ray Licensed Instructor
SSRW Official Instructor

CONTENTS OF THE ATIACHED DVD:


Iss~ 91e -asseel12a .4
Att,1rhed to th~ hook I\ ii OVD conl.t111111~ d fol<ter <nll~<I P&R-
VRoy. In whoch you will find .MAX file>, videos relating to l>e
-r
concepts explained and .JPG files ot the images contained 1n
Ir ;llro conta1n3 JO oiode!s fronl deslgnconne-ct.ci.
-t!;lliF";
9

Autodesk
Authorized Publisher
G GC edizioni
Ciro Sannino

PHOTOGRAPHY
& RENDERING
with 0v.ray

@- GC edizioni
Copyright 2013 by GC edizioni
ALL RIGHTS RESERVED

GC edizioni
Corso America, 57
09032 Assemini (CA)
Ph. and fax 070-8809018
www.qcedizioni.it
libri@gcedizioni.it

A uthor
Ciro Sannino

Publishing, Graphics and L ayout


Gabriele Congiu

Editing and Revision


Barbara Sulis

T ranslation
Johanna Worton

Printing
Nuove Grafiche Tjpografia Puddu S.r.1
Zona industriale Ortacesus
Via del Progresso, 6
09040 Ortacesus (CA) Italy
Ph. 070-98 19015

ISBN
978-88-88837-28-4

Printing completed in February 2013

The authors and publisher accept no liability for damages of any


type arising from the improper use of the program.

All brands cited herei.n have been registered by their respective


producers, patticularly Autodesk and 3ds Max. which are Autodesk
registered trademarks; V-Ray has been registered by Chaos Group.

All rights reserved. No part of this manual can be reproduced,


translated, copied or transmitted i.n any form or by any means,
without the publisher 's prior w ritten consent.
CONTENTS

Introduction .................................................................................V
The Publisher ............................................................................................................................... VI
Who Is the Author?. VI
Objective of the Book ............................................................................................................... V,I
How the Book Is Structured .................................................................................................... VI
Style Guidelines .......................................................................................................................... VI
Contents of the DVD-Rom ...................................................................................................... VI
Principles and Methods ........................................................................................................... VII
V-Ray Certification for Users ................................................................................................... VIII
V-Ray Certified Professional ............................................................................................. VIII
SSRW Certification for V-Ray ............................................................................................ VIII
Minimum Hardware Requirements for V-Ray .................................................................. IX
The Ideal Workstation for Using V-Ray.......................................................................... IX
Who Is Chaos Group? ................................................................................................................. IX
Who Is 3DWS? ............................................................................................................................. IX
Who Is DesignConnected? ..................................................................................................... X
Who Is ArrowayTexture? ........................................................................................................ X

CHAPTER 01 - First Steps in V-Rav .................................................1


The 5-Step Method .................................................................................................................... 2
Details about the 5-Step Method ................................................................................... 3
The Right Version ........................................................................................................................ 4
Activating V-Ray fJ ................................................................................................................... 6
What Is V-Ray RT? ........................................................................................................................ 6
How to Activate V-Ray RT fJ .................................................................................................. 7

CHAPTER 02 Compensation Using the Gamma curve ................. 9


Gamma Compensation ............................................................................................................ 10
Applying Gamma to the Scene, but not to the Textures ....................................... 12
Setting Up 3ds Max for Compensation ........................................................................ 12
Compensation Part 1 - Avoidi ng Gamma on the Textures .................................. 13
Compensation Part 2 - For Each New File .................................................................. 14
Exercise: How to Compensate an Image ~ .......................................... 15
V-Ray Frame Buffer~ ...................................................................................................... 16
Exposure of a 32 bit Render ............................................................................................. 18
Exposure of an 8 bit Render ............................................................................................. 19

III
PHOTOGRAPHY & RENDERING using V- RAY

CHAPTER 03 Global Illumination and lrradiance Map................. 21


Introduction to Global Illumination .................................................................................... 22
lrradiance Map ............................................................................................................................ 23
How to Set Up Indirect Illumination ............................................................................. 23
What the Five Global Illuminat ion Settings Mean ................................................... 24
What Are Pre passes? ................................................................................................................. 25
The Metaphor of a Painter ................................................................................................ 26
The Relationship Between Prepasses and Scenes .................................................... 27
How to Save a Render's Settings fJ ................................................................................... 28

CHAPTER 04 - The DSLR Camera in V-Rav ............................... 29


A Comparison Between the DSLR Camera and the V-Ray Physical Camera ......... 30
The Basic Properties of a DSLR Camera ........................................................................ 32
How Focal Length Affects Composition ............................................................................. 34
The Ru le of Thirds ....................................................................................................................... 35
Depth of Field .............................................................................................................................. 36
Exercise: How to Simulate Depth of Field fJ ........................................ 37
Extreme Depth of Field: Tilt Shift .................................................................................... 38
The Bokeh Effect ................................................................................................................... 39
White Balance in Ext eriors ....................................................................................................... 40
White Balance in Interiors ....................................................................................................... 42
Exercise: How to Balance an Interior...................................................... 43
All This in the V-Ray Physical Camera .................................................................................. 44
Framing in Tight Spaces ........................................................................................................... 45
The Clipping Plane Option ............................................................................................... 45

CHAPTER 05 Light Balance...........................................................47


Types of Lighting ........................................................................................................................ 48
What Are Bank Lights? ........................................................................................................ 48
Light Sources that Can Be Simulated Using V-Ray .........................................................49
V-Ray Light Parameters ............................................................................................................ 50
The Store with lrradiance Map Option ......................................................................... 51
The Size-Intensity Ratio ..................................................................................................... 53
Basic Lighting Scheme ............................................................................................................ 54
Simulating Part of an Interior like an Object .............................................................. 55
Classic Three-Point Lighting ............................................................................................. 56
Chromatic Contrast ............................................................................................................ 57
How to Ba lance Using Three-Point Lighting ~ ....................................................... 57

IV
CONTENTS

Balancing an Interior........................................................................................................... 58
How to Balance an Interior 51 ........................................................................................ 59

CHAPTER 06 Simulating Materials .............................................61


Introduction to Using Materials ............................................................................................ 62
Reflections on Surfaces with Varying Degrees of Glossiness ............................... 64
Refraction ................................................................................................................................ 66
Index of Refraction (IOR) ................................................................................................... 67
General Guidelines for Analyzing Materials...................................................................... 67
The Material Editor..................................................................................................................... 68
How to Implement the Seven Questions in VRayMtl .............................................. 69
Setting Up a Material and Optim izing .............................................................................. 72
How to Interpret the Material Tables .................................................................................. 73
Table: Glossy Red Plastic .......................................................................................................... 74
Table: Varnished Wood I Polished Marble ......................................................................... 75
A Trick for Obtaining Good Chromed Metal ..................................................................... 76
Improving you r Chromed Metal ..................................................................................... 76
Table: Chromed and Brushed Metal .................................................................................... 77
Table: Opaque Blue Plastic ...................................................................................................... 78
Table: Natural Wood .................................................................................................................. 79
Suggestions for Good Glass .................................................................................................... 80
Table: Glass I Frosted Glass ..................................................................................................... 81
Table: Colored Glass .................................................................................................................. 82
Table: Gold .................................................................................................................................... 83
Optimizing Material Rendering Time .................................................................................. 84
The 'Use Light Cache for Glossy Rays' Option ............................................................. 85
The 'Use Interpolation' Option ......................................................................................... 85
The Max Depth Option ...................................................................................................... 87
A Word about Glass and Reflective Objects ............................................................... 87
Color Bleeding ............................................................................................................................. 88
How to Create a Materials Library ~ ................................................................................ 89
Creating Materials for a Scene ............................................................................................... 90
Exercise: How to Create Materials and Launch a Render ...................... 90

CHAPTER 07 Exposure ..................................................................95


The Reality Button .................................................................................................................... 96
Research, Visualization and Rendering .............................................................................. 96
The Eye vs. the Camera ............................................................................................................. 97

v
PHOTOGRAPHY & RENDERING using V- RAY

The Three Types of Exposure .................................................................................................. 98


Technical Aspects of Exposure .............................................................................................. 99
Tone Compression or Color Mapping ........................................................................... 99
Color Mapping: Reinhard .................................................................................................. 101
Color Mapping Without V-Ray (Aft er Rendering) ..................................................... 102
Greater Compression, Less Contrast ............................................................................. 102
Exercise: How to Manage the Exposure in a Render 6' ........................ 106

CHAPTER OB Exterior Rendering .................,. ................................ 111


The Characteristics of Exterior Rendering ......................................................................... 112
Framing ......................................................................................................................................... 113
How to Eliminate Distortion in V-Ray ............................................................................ 114
Ba lancing Lig ht/Shadow ......................................................................................................... 115
Elongat ed Shadows ............................................................................................................. 116
Realistic Sky/Background ........................................................................................................ 117
Absence of the Horizon ......................................................................................................... 118
Vegetation .................................................................................................................................... 119
Considerations about Night Renders .................................................................................. 120

CHAPTER 09 VRav Sun System ..................,................................. 121


Lighting in Exterior Simulation ............................................................................................. 122
Exercise: How to Place the V-Ray Sun in a Scene ................................... 123
V-Ray Sun ............................................................................................................................... 124
How to Set a Specific Place, Date and Time ................................................................ 126
V-Ray Sky ................................................................................................................................. 127
How to Control the V-Ray Sky .......................................................................................... 128
Exercise: How to Replace the VRaySky in Posjf-Production ................... 129
Exercise: How to Simulate a Night Render 6' ....................................... 131

CHAPTER 10 Simulating Vegetation & Textiles ................ 135


Introduction to Bump and Displacement ......................................................................... 136
Displacement as a Channel or Modifier ....................................................................... 137
Considerations about the VRayDisplacementMocl Modifier ............................... 138
Simulating Grass and Carpets (Short Strands) E.;f .................................................. 140
The Displacement of 3D Objects .................................................................................... 142
How to Create a Displacement Texture ........................................................................ 144
How to Use the VRayFur Function EJ ~ ................................................................... 145

VI
CONTENTS

Simulating Ivy ~ ............................................................................................................... 147


Memory Problems? V-Ray Proxy ........................................................................................... 148
How to Create and Import a Proxy Object EJ ~ ................................................... 148
Exercise: How to Create the Curtain Effect 5' ...................................... 150

CHAPTER 11 The 5SRW Method in Interior Rendering ............... 153


Introduction to the 5SRW Method ....................................................................................... 154
Step-1: Analysis of the 30 Model .................................................................................. 155
Step-2: Light Balance .......................................................................................................... 1SS
Environment Shadows ....................................................................................................... 158
Creating Soft Lighting in an Interior ............................................................................. 160
Shadowed Areas ................................................................................................................... 163
V-Ray Light Lister .................................................................................................................. 167
Step-3: Assigning Materials .............................................................................................. 168
Parquet Material ................................................................................................................... 169
Carpet Material ..................................................................................................................... 170
The Light Fixture ................................................................................................................... 171
Step-4: Cleaning the lmage .............................................................................................. 172
Anti-aliasing ..........._ .............................................................................................................. 173
lrradiance Map ...................................................................................................................... 174
Light Cache ............................................................................................................................. 17S
Noise Threshold .................................................................................................................... 176
Various Subdivisions ........................................................................................................... 176
Other Sky Models ................................................................................................................. 177

CHAPTER 12 Other Lights and HORI .................................. 179


Other Kinds of V-Raylights .................................................................................................... 180
Sphere Mode ......................................................................................................................... 180
How to Create a V-Ray Light Mesh ~ ......................................................................... 181
Dome Mode .......................................................................................................................... 181
V-Ray Light Material for Self-illuminated Objects ........................................................... 182
V-Ray IES and IES files ~ ....................................................................................................... 183
How Is a HOR Image Created? ............................................................................................... 184
Characteristics of HORI Maps in V-Ray ......................................................................... 18S
Exercise: How to Illuminate an Exterior Using a HDR Image ~ ........... 186
Exercise: How to Simulate a Night Scene Using a HDR Image .......... 188
Exercise: How to Create an Alpha Channel Using /BL ~ ...................... 190

VII
PHOTOGRAPHY & RENDERING using V-RAY

CHAPTER 13 While Balance and Contrast ........................ 193


The Perfect Image ...................................................................................................................... 194
Color Correction and Color Grading ............................................................................. 194
White Ba lance .............................................................................................................................. 195
White Balance using Lightroom EJ ............................................................................. 195
Exercise: How to Achieve White Balance Using Photoshop ~ ........... 197
The Histogram ............................................................................................................................. 199
Exercise: Controlling the Contrast Using Curves and Unsharp Mask ~ .... 200

CHAPTER 14 Optimizing Rendering Time ......................... 205


Dedicating Time to Research .................................................................................................. 206
Settings for Drafl Rer1deri ng ................................................................................................... 207
Store with lrradiance Map ........................................................................................................ 208
Using the Render Region and Buckets ............................................................................... 208
V-Ray Scene Converter ~ ..................................................................................................... 209
DisablingTrace Reflections ..................................................................................................... 210
Global Switches .......................................................................................................................... 211
Sizing and lrrad iance Map for Large !Renders .................................................................. 212
Light Cache as a Preview ......................................................................................................... 213
Render Previews Using V-Ray RT........................................................................................... 214
Comparing Images Usi ng the VFB History~ ................................................................. 214
Exercise: How to Compare Renders Using the VFB History ................... 214

CHAPTER 15 SOS: How not to Freak Out........................... 217


Introduction to Techn ical Problems ..................................................................................... 218
Splotched Walls ...................................................................................................................... 218
Spot ty Surfaces ..................................................................................................................... 219
Grainy Areas ............................................................................................................................ 220
Insufficient Memory for Huge Renders ........................................................................ 221
Framing in Tight Sp aces ~ .............................................................................................. 222
Highlights with Jagged Edges ........................................................................................ 223
Edges of Objects w ith Displacement Opening Up .................................................. 224
Blurred Final Render............................................................................................................ 224
Images Appearing Washed-Out after Saving ............................................................ 225
Mistakes when Saving! ....................................................................................................... 225
Light Leaks ..................................:........ ................................................................................... 226
White Pixels (t he Sun) ......................................................................................................... 227
Image Blurred when Saved as a JPEG ........................................................................... 227

VIII
CONTENTS

i;Clllll~ ............................................................................ 2211

llldlllC .............................................~................................ 23~


Ack11o"'rl11dg11m1111ts ....................................................... 232

~ TH IS SYMBOL INDICATES THE PRESENCE OF A VID:OO RELATING TO THE PARAGRAPH IN WHICH IT'S FOUND

IX