Archive for the ‘lighting’ Category

Have you ever spent hours texturing and lighting a scene, just to find out you need to change the textures on an object, and want to test the materials with the default lights after you’ve lit the entire scene? Before you add any lights in a scene, 3DS Max will render with its default lights. But once you add a light to your scene, the default lights are completely ignored. Even if you turn off your scene lights and hide them, you scene will not render with the default lights. Here’s a trick to test render with the default lights after you’ve added lights in your scene.

Lit scene

Render with default lights, after lighting

Start a new scene. First go to Views->Viewport Configuration. In the Rendering Method tab be sure under Rendering Options that Default Lighting is checked, and 2 Lights is selected, Otherwise, this will not work! Then hit OK.

Then in the menu go to Create->Lights->Standard Lights->Add Default Lights to Scene

Be sure that both Add Default Key Light, and Add Default Fill Light are checked. Also set the Distance Scaling to 1000.0 (this will allow the lights to work for a scene that is in any location with respect to the lights). Then hit OK.

Now your scene has the default lights in the scene. Save this file as your default lighting scene. Now you can merge these lights into any scene you want. After you have merged these lights into your complexly lit scene here is a checklist to be sure that when you render you are just getting the default lights:

•Turn off all of your Indirect Illumination (mental ray)
•Turn off any exposure settings you have (don’t worry, your settings won’t disappear)
•Open the Light Lister, and turn off all of your lights, except for the DefaultKeyLight and DefaultFillLight

Now when you render, your scene will be lit just as it was before you added any lights (even though you have all of your scene lights still there)! Of course when you want to render your scene with lights, then turn everything in the list back on, and turn off the Default lights.

If you haven’t played with Max 2009’s new lighting analysis tool, it’s definitely worth checking out. For this blog I will briefly explain how to use it.

Before I jump into lighting analysis, I have a disclaimer for lighting studies/software. When it comes to lighting analysis, the results are just estimates on how much lighting a space is receiving. There are too many physical factors to be accurate. Materials have to act exactly as they do in reality to bounce light properly. This includes physical characteristics as index of refraction/reflection, caustics etc. Max does a pretty darn good job at simulating these though, so good infact that it is recognized by LEED as program for obtaining lighting analysis credits.

With that said, here is a quick look at how we set a scene up. Firstly, be sure the space you are modeling, is as accurate as possible. The windows need to be the right size, and there cannot be any openings in the space other than the windows. Secondly be sure that the materials you are using are either all ProMaterials or A&D materials, and they act as the material would in real life (tile being reflective, gyp being non-reflective, etc). One of the most important materials is the glass, because it will determine how and how much light will enter the space. The way the glass is modeled is important as well. Be sure your glass has a thickness. Usually the A&D material or ProMaterial Glazing will attenuate light properly for each polygon that is traversed, without refracting it. Thirdly, the lighting must be accurate and represent true-life physical amounts. Creating a Daylight system is the best way to achieve physical properties for your sun, just don’t mess with the multiplier amounts. If you also want to include light fixtures the best type of light for this are photometric lights. Typically only FG should be used, and can be used in conjunction with the light portals. For accurate fc or lux amounts it is important to increase the number of FG bounces. 4-8 bounces is acceptable.

Once you have your scene set up, in the menu under”Lighting Analysis” use the “Lighting Analysis Assistant.” Basically this box checks your scene to make sure that you don’t have any un-natural materials or lights. If you do, it will tell you how many materials and lights need to be tweaked. The “Analysis Output” tab is where you can create a light meter. The Light Meter is just a plane that record light data in the scene and spits out numbers of light intensities (measured in foot candles fc or lux). In the US everyting is measured in foot candles, so I use fc. The modifier settings for the light meter controls the amount of segments, orientation arrows, type of illuminance, and it can export the numbers to an excel csv file.

For the lighting analysis, you will only get figures for where the planes are. So if you need all four walls of room, you will need 4 light meters, one for each wall. Note: the lighting analysis is no gauge on how the scene will render. Much like a camera, you can make a very dark room appear light with the right exposure settings. The exposure settings also don’t have any effect on the lighting analysis since these numbers are fixed amounts of energy.

For much more detailed information you can check out the Autodesk whitepapers posted by Pierre-Felix Breton.

It seems like alot of folks on the forums are asking this question. Often when using low GI and Final Gather settings, an animation will flicker because the solution is not refined enough. To have a smooth animation you have to crank up your settings high enough to have similar results for each frame. Problem is you will have extremely long render times. This is my attempt at explaining how to create smooth animations with low indirect illumination settings in Max 2008.

common problem with low GI and Final Gather settings

Here’s a quick step-by-step, but if you read further I have exhausted each of these steps in detail.

•Turn on Photon Map, use Read/Write File, then render
•Turn on Final Gather, use Read/Write File
•Lower samples to 1/64 – 1/64
•Render active time segment at every 10 frames
•Turn on final gather Read Only (FG Freeze)
•Increase samples to 1 – 16
•Turn on Save File for Render Output
•Render active time segment at every 1 frame

First we calculate the photon map (PM). When calculating the PM it’s a good practice to have final gather (FG) off to see the pure PM results. To save your PM click on the […] button, and if you are rendering on a renderfarm, be sure to save your PM in a location that the farm has access to (your network). Also be sure “Read/Write File” is checked.

Now go ahead and render a single frame. Mental ray will calculate the PM first, save it to the location you specified, then renders your scene. Very important to note: now the second time you render, mental ray will not re-calculate the PM, but rather read the already calculated PM from the file location you specified because you have “Read/Write File” checked. The PM is scene based rather than view/camera based. This means that when the PM is calculated it is calculating the entire scene (much like radiosity). The great thing about the PM, is that once it is calculated, a rendering can be done from any view using that same PM…wonderful for animations!

Now that we have our PM calculated, we’re now going to move onto FG. Unlike the PM, FG is view/camera based. This means that when a FG map is calculated the information in the map is only of that viewing angle. So if you wanted to see both sides of an object, you would need at least 2 FG maps. This is very bad news for animations. Because every frame in an animation is different, you would need a new FG map for that frame. But we have a work around for this that I will get to.

For now:
•under FG check “Enable Final Gather”
•for the Preset choose Draft
•under Final Gather Map click on the […] button, and choose a location to save the FG map.

Be sure “Read/Write File” is checked and “Read Only” is not checked.

Now to get back to our problem of needing different FG maps for every frame. Instead of creating a FG map for every frame, I create a FG map for a range of frames. For example, if my animation is 100 frames long, I will render every 10 frames creating a FG map for only those 10 frames. Then with that combined FG map, will go back and render every frame. Here’s how to do this:

Make sure FG Map is checked on. Then in the Renderer tab, lower your samples to 1/64 – 1/64. We are doing this, because we are not concerned with the actual rendering, but just the calculation of the FG map. In the Common tab, change your Time Output to Active Time Segment, and under Every Nth Frame change it to 10.

Now click Render. You will get a warning that pops up telling you that you are rendering a sequence without saving the images to a location. That’s ok, because we are just interested in FG at this point. So click Yes. Now the animation will render every 10th frame. Because we have “Read/Write File” checked and do not have “Read Only” checked, every time FG for a frame is calculated it is added to the previous FG map. After all 10 frames render, you now have a single FG map for your animation sequence.

Now go back to Indirect Illumination tab, and under Final Gather Map check “Read Only”. Now when you render, it will not add to your already created FG map, but just read the one that it’s locating to. Also increase your samples back up to something reasonable (1-16), and change your “Every Nth Frame” back to 1. Also be sure to set your Render Output to save to a file location.

That’s it. Click render and enjoy!

Animation using PM and FG from file

Now it will start the rendering right away without calculating any indirect illumination. Even though the solution for PM and FG are low, it’s not that noticeable. The noise will be even less noticeable when texture are added. Note: this technique doesn’t work well for secondary animation (animation with moving objects or characters).


Kategoriler