Integracion
-
Upload
guest29a3c4 -
Category
Documents
-
view
227 -
download
1
description
Transcript of Integracion
This issue’s solution is supplied by the UK-based author and VFX animator Pete Draper. More of Pete’s tutorials can be found at www.xenomorphic.co.uk, his personal website
This question relates to one of the fundamental
challenges of VFX lighting: integrating a CG object
directly within a real-world backplate. In this Q&A,
we will explore the process of collecting data on a
live shoot – in this case, of an underground car park – then using this
data to reconstruct the environment in 3D and to light a model of a
virtual object (a giant mech robot) so that it matches the real
location exactly. The walkthrough assumes that you are already
familiar with 3ds Max and basic visual effects concepts, so if you’re
a beginner, try the other tutorials in the magazine fi rst.
Not all of the considerations discussed here – such as whether
the environment is interior or exterior, or whether it’s day or night –
will apply to your own shoots. The basic rules, however, always hold
true: scout the location during daylight hours; take as many
measurements as you can; and call in as many people as possible to
help out. The key task during scouting is to note down the positions
of lights and objects in the environment in relation to one another,
and determine if there will be any problems later on. If this is the
fi rst time you have done this, don’t bite off more than you can chew.
Try to avoid having a lot of things in shot that you will only have to
mask out later on; and stick to open spaces, so you won’t have to
deal with a lot of objects receiving shadows from your CG model.
If you can, visit the location at the appropriate time of day
beforehand, so you can see if there are any contributing factors –
such as drunks or joyriders – that will make your life more diffi cult
when it comes to shooting. On the day, you really want to get in, do
the shoot right fi rst time within controlled conditions and get out.
The next step is to bring all of the information you’ve recorded
into 3ds Max. If you’ve taken down decent notes, you should be able
to recreate a basic to-scale replica of the real environment that your
CG object can interact with. You will then be able to position your
CG camera in exactly the right place, set up virtual lights to match
the real ones, and drop in your CG model at the correct location.
Easy, eh? Let’s give it a go …
070 | 3D WORLD3D WORLD November 2006
Q&A | Matching real-world lighting references
FOR3ds Max
DIFFICULTYAdvanced
TIME TAKEN1-2 days (including location recce and shoot)
ON THE CD• Full-sized screenshots• Reference photos• 3ds Max scenes• Mech model, courtesy
www.3D-Palace.com
ALSO REQUIREDHDR Shop (free from www.hdrshop.com), Photoshop
FACTFILE
Q&A SOLUTIONS / FIXES / ADVICE SOLUTIONS / FIXES / ADVICE
Submitted by John Spyder, via email
QUESTION OFTHE MONTH
3DS MAX 3DS MAX
“How can I light a CG model to match a real environment?”
TDW83.qa_lead 070TDW83.qa_lead 070 29/8/06 11:04:1029/8/06 11:04:10
▲
November 2006 3D WORLD3D WORLD | 071
First of all, you need to source a location for your shoot. When you do this, you need to consider its aesthetics at all times of the day, and see if you can
physically get the shot that you want well in advance. You really need controllable conditions, so the light and objects in shot do not change.
01Once you have found your location, take enough measurements to allow you to recreate it in CG later on. Think outside the box: in the car park, many of
the structures are mass-produced, so most of their measurements (for example, the pillar bases and the distances between them) are identical. Get as many measurements as you can during the day before the shoot.
02By the end of the recce, you should have enough information and taken enough notes to be able to faithfully reconstruct at least the basics of the
environment. Because you have done this during the day, you can always rough out the scene before the night shoot, which will fl ag up any measurements you may have missed.
03
STAGE ONE | The location shoot
Next, replace the white ball with a chrome one, and shoot it in exactly the same position, fi rst from a distance (so that you can match its position in the 3D
environment), and then in close up. This will allow you to set up refl ections on the surface of your CG object so that they match those of a refl ective object in the real environment.
07The close-up of the ball is the key to this process, since you will encase your 3D scene with an unwrapped version of the image, to give the CG
objects something to refl ect. If you can’t zoom in enough to fi ll the frame, tentatively move the camera forward and zoom in: you are trying to reduce your own refl ection in the image.
08Finally, measure the height of the pole each ball sits on, so this can be recreated in 3D. The balls themselves are quite easy to obtain – chrome ones
can be obtained from garden centres (normally called ‘gazing balls’), and come with a hole in the base for fi tting. The ‘white’ ball is a large Christmas ornament, spray-painted 20% grey.
For the shoot itself, try to rope in as many people as possible to help you out – with the promise of drinks afterwards. You need to get in and get out as fast as
you can. Take any fi nal measurements that you couldn’t collect earlier, while the location was busy. For best results, it’s advisable to use a digital SLR camera, so that you can shoot and review pictures as quickly as possible.
04Ensure that the position of the camera is noted and measured in-scene, and record the height of its CCD above the ground. When taking the photos, make
sure that all variable features (such as shutter speed, ISO and focus) are locked. If possible, take the pictures with a remote or use the camera’s timer so that you don’t nudge it when pressing the shutter. First, take your wide backplate shot.
05Next, take reference shots from exactly the same location, using the same camera settings. First, take a photo of a white ball (see Step 9) in the position
your CG object will eventually be located. You can set up a CG version of this ball in your 3D version of the environment to check that its lighting matches the photo exactly. (We won’t do so in this Q&A, but it’s good practice to collect the data.)
06
09
Matching real-world lighting references | Q&A
TDW83.qa_lead 071TDW83.qa_lead 071 29/8/06 11:04:1829/8/06 11:04:18
072 | 3D WORLD3D WORLD November 2006
Q&A | Matching real-world lighting references
Use your measurements to mock up a simple 3D version of the environment. We’ve done this for you, so open carpark_lighting_start.max from the CD.
We’ve assigned a Matte/Shadow material to the entire scene, and set each object (apart from the lights) to receive shadows, but not to cast them. The remaining steps also rely on our own data, but you can copy settings from the screenshots.
10The next task is to create the virtual camera. You may need to convert the lens values to 35mm equivalents to dial them into 3ds Max. Use Show
Safe Frame to ensure the render output is the same size as the viewport image. Use your measurements to position the virtual camera at the same point in the scene as the real one, and tweak it until the 3D scene aligns with the backplate.
11Bear in mind that you are mainly using the 3D versions of the background objects to receive shadows; masking out CG objects behind pillars will
take additional care and attention. Next, create a virtual representation of your chrome ball in situ according to your measurements: again, this should line up with the backplate as illustrated in the screenshot above.
12
To simulate accurate refl ections on the CG objects in the scene, bring the close up of the refl ective ball into Photoshop. Using the Elliptical Marquee tool,
drag out from the middle and select the entire ball. Select Edit > Copy, then go to File > New and accept the settings. Finally, on a black background, paste the cut-out ball into the new fi le. Save out a fl attened version of this new image.
13Open HDR Shop (free from www.hdrshop.com) or any other software that allows for spherical to panoramic distortion. Load in the cut-out of the ball
you just saved, and accept any settings. Next, select Image > Panorama > Panoramic Transformations. In the resulting panel, tell the software the source and destination types, namely Mirrored Ball and Latitude/Longitude respectively.
14Save the resulting panoramic image as a bitmap, ready to load back into 3ds Max. For now, you are only going to be rendering out the scene in a single
pass (you would use more than one pass in real visual effects work), so you need the background to render as well as the CG mech. Additionally, you need to refl ect adjacent CG objects in the scene that you will introduce later on …
15
Therefore, you need to add the Latitude/Longitude refl ection map into the Environment slot of a Raytrace map located within a material assigned to an object in
the scene. To make life easier later on, you can just instance this Raytrace map throughout your scene’s materials as required, in case you need to tweak settings such as brightness and blurriness later.
16One task you can complete now is to clamp off the colours of the map and boost its white value, by amending the map’s Output curve as shown above.
This is so any reduced-intensity refl ections (such as those using Falloff maps or created by reducing the value of the refl ection in the material’s root parameters) still have white highlights. These are, in fact, refl ected specular highlights.
17To test out the refl ections, add a basic refl ective object to the scene. Normally, this would be a CG version of the chrome ball. However, as the
white car is more prominent in the backplate, we have designed a basic material that mimics white spray paint and assigned it to a teapot primitive (used because it contains virtually every type of surface). Now for the lighting …
18
STAGE TWO | Creating the virtual environment
TDW83.qa_lead 072TDW83.qa_lead 072 29/8/06 11:04:2429/8/06 11:04:24
November 2006 3D WORLD3D WORLD | 073
Matching real-world lighting references | Q&A
The fi nal set of lights to establish are general attenuated fi ll lights, which we have positioned above the ceiling and beneath the fl oor so that
there is some ‘bounced’ light in darker areas. As these are subtle low-intensity lights, designed purely to bring out areas of illumination from secondary or tertiary bounced lighting, they need not cast any shadows.
22
To see all of the fi nal settings, load carpark_lighting_fi nished.max from the CD. The fi nal image has a few additional instances of the mech scattered
throughout it. These are positioned carefully with respect to the key lights for two reasons: illumination and refl ection. Because the refl ection image you shot earlier was designed to be used at a single position in the scene, it won’t work at
other locations – particularly if the objects present in the scene and the refl ections differ visibly. Ideally, you should shoot additional refl ection references for each CG object at the position it will appear in the scene, especially if you’re planning to tuck it behind background geometry. The pillars won’t be refl ected correctly in the shiny surfaces of a mech unless you have the corresponding refl ection image. ●
24
STAGE THREE | Lighting the scene
Cont
act u
s | S
end
your
Q&
A q
uest
ions
to 3
dw.q
anda
@fu
ture
net.c
o.uk
The fi rst set of lights to establish should be the key light or lights in the real environment. Here, these are the lights along the ceiling. As you are simulating
an area lit with standard lights, use several instances of a single light to create the impression of an area light shadow. First, position a single light, then instance it to create the remaining lights in the scene, as shown in the image above.
19With the lights in situ, tweak their settings. Because there are CG objects close to them, you need the illumination to behave realistically, so use Inverse
Square decay. Shadows should be diffused because of the light type, which will hide banding created by overlaid shadow maps: this is done by increasing the shadow’s Sample Range. The lights’ colour is derived by point-sampling the backplate.
20The next set of lights should supplement the key lights. If there aren’t any in the real environment, concentrate on setting up secondary lighting. In
the fi nal scene fi le on the CD, we’ve set up the next brightest objects in the scene: the pillars. There are several low-intensity lights with diffused shadows, attenuated and with no specular highlights. Each light’s colour is sampled from the backplate.
21
With the fi nal test render complete using your stand-in teapot, replace the object with the mech model (provided by www.3D-Palace.com). Merge
(or XRef) in Dummy_ATMT and its child objects from the 3dpalace_atmt_mech.max fi le on the CD. Using the Align tool, reposition the dummy object to the position of the teapot, and re-scale the dummy so that the mech fi ts in the car park.
23
TDW83.qa_lead 073TDW83.qa_lead 073 29/8/06 11:04:3129/8/06 11:04:31