Background Image

mental ray FAQ

questionThought I'd try to save some time by providing answers to some of the most commonly asked questions.

1. I'm getting an error message "no photons stored after emitting 10000 photons":
Quick answer: This error is mainly created whenever photons do not hit an object or materials are not configured to handle photons.
Related threads:

4/3/09: In newer versions of 3ds Max it's common to get this "no photons stored" error code if you're using the mrSun with photons but without properly configuring the "Use Photon Target" option on the mrSun.

Keep in mind that currently the number of photons generated is weighted by the strength of your light sources. So for daylight renders more than likely the mrSun is the brightest light source in your scene and would emit the most photons. If the targeting option isn't configured to focus all those photons on your scene then a lot if not most of the photons won't hit anything and create the no photons stored error.

(12/18/2005 post, not much of an issue in newer versions of 3ds max)
2. My render has colored splotches/artifacts:
Quick answer: Some believe it to be related to a conflict in normals, architectural materials, or possibly the use of RPC's.
Related threads:

(12/18/2005 post, not much of an issue in newer versions of 3ds max)
3. My render has black splotches/artifacts:
Answer: There are several variations on this problem. Some times solutions are simple (like making sure you're rendering from a perspective view or camera view)...or merging the problem scene into a new clean scene.
Related threads:

(12/18/2005 post, there may be other solutions now)
4. How can I get the skin shaders to work with multi-subobject materials?
One method is to use lightmaps. But if you're using Max8, I'm not sure if this solution works.
Related thread:
EDIT: YAY, this has been fixed in Max9, fastSSS now works as multi-subobject materials.

5. Mental Ray crashes with "cannot free memory" error:
Quick answer: I don't think a firm solution for this exists. Some have said the Windows 3gb switch has helped. You can also try rendering in strips instead of the whole image at once. Or even using Backburner/command line rendering.
Related thread:

6/22/09:Memory handling has been improved a lot over the years. In newer versions of 3dsmax make sure to use the BSP2 method on poly heavy scenes and also try disabling the scanline mode to free up a tad more memory. Also using backburner and/or command line rendering & using smaller bucket sizes can be helpful in getting memory hungry scenes to render. If you still must use a 32bit Operating System then I'd highly recommend upgrading to 3dsmax 2010 as it's updates allow larger renderings in 32-bit OS's.

(12/18/2005 post, not much of an issue in newer versions of 3ds max)
6. My HDRI render is splotchy:
Quick answer: Adjust your FG radius and/or samples.
Related thread:

7. How do I make glowing objects in Mental Ray?
Quick answer: Use the Self-Illumination options on the A&D material and enable the glare camera shader. If you want it to illuminate the scene, enable FG & the Illuminates scene with FG option on the A&D material.
Related threads:

8. My glass turns black at a distance:
Quick answer: You probably need to increase the raytrace trace depth setting. It's located in the renderer tab, under the rendering algorithim rollout. You may also need to increase the FG trace depth settings if using FG.
Related threads:

9. The visibility key doesn't work properly, there's no smooth transition:
Quick answer: As stated in the help file, currently the visibility key will only provide a on/off solution with mental ray. If you want to have an object that smoothly turns invisible, you'll need to use materials instead of the visibility key.
Part II: Using a material is a pain in the butt, especially when I have multi sub-object materials, etc.
Solution: As long as you don't need to animate individual materials in the multi sub-object material, you can simply add the entire multi sub-object material to a blend map and control the opacity that way.

4/3/09:Visibility Track seems to work with mental ray in 3dsMax 2010.

10. My background/environment map isn't there/renders black:
Most of the time this is an energy/exposure issue. Think of it like this, if you went outside and took a photo of the sky and then printed it out onto paper & held that printed sky up to the real sky which would be brighter? The real sun & sky of course would be brighter than a print out of the sun/sky.

That's what is happening when you put a LDR (low dynamic range) image into your background and have the exposure configured for a daylight scenario. The LDR (.jpg, .png, etc.) photo of the clouds or sky doesn't have enough energy to be visible with an exposure setup that's configured for daylight.

So how do you make it work? Well there are a couple of ways:
A. You could modify your mr Photographic exposure's Physical Scale setting. For example, on the photographic exposure control you can use the "unitless" physical scale with a value of something like 80,000 or so.
B. You could increase the "Output Amount" on your environment map until it's visible. You may also have to increase the "RGB Level"..depends on your exposure settings & the bitmap.
C. You could wrap your environment map inside the "Utility Gamma & Gain (mi)" shader and adjust the "Gain (multiplier)" to make the image brighter.
D. In 3ds Max 2010 you can disable the "Process Background and Environment Maps" exposure option.

For more detailed info, see this:

Note: In 3ds Max 2010 the "Process Background and Environment Maps" exposure option now works with the photographic exposure control.

10b. My background has this odd gradient that is bright at the horizon and fades away towards the top/sky?
Answer: Disable the Aerial Perspective option on your mrSky.

11. How do I control color bleed in 3ds Max with mental ray when using final gather?
Also see the "Managing Color Bleed" video here:

12. When I use displacement the edges of my mesh split apart?
Answer: Perhaps your Max. Displace value is too large for your mesh or maybe you have some vertexes that aren't welded.

13. Why is my rendered image lighter or darker than what I see in the frame buffer inside 3ds Max?
Answer: You probably have different gamma settings for what you see in 3ds Max (display gamma) and what it saves images as (output gamma). Check your gamma configuration by going to Customize>Preferences>Gamma and LUT tab.
Display Gamma is what you see in 3ds Max.
Input Gamma is the gamma for how it loads things like texture maps or environment maps, etc.,
Output Gamma is the setting it uses when you save a rendered image.

In addition to the 3ds Max gamma settings you may manually set the gamma when saving an image. If so, then obviously you'll want to make sure it's correct for what you need. If you're not familiar with gamma then in addition to the Gamma info in the 3ds Max help file, here a link to a good article on gamma:

14. Why are my renders washed out looking?
Answer: It's probably your gamma settings (see #13 above). Or maybe you just need more contrast in your exposure settings, like this:

15. When I use network rendering / Distributed rendering the images look different from the other machines and/or it crashes
Answer: in older versions of 3dsmax there was a glitch in the mr MAP manager when using DBR. Basically it would ignore any gamma settings outside of what is configured in your 3dsmax preferences.

Typically an HDR image is a linear image (gamma 1.0) and you probably have an adjusted gamma setting of something like 2.2 for your 3dsmax preferences. Therefore logically you would manually override the gamma when loading the .hdr image to properly load as gamma 1.0 and that would work fine until you enabled DBR.

When you enable DBR (in pre-2010 versions of 3dsmax) the mental ray MAP manager enabled itself by default whether you enable it in the settings or not...AND it ignores that gamma 1.0 override on the HDR you loaded so there is a gamma conflict now and you'll get some strange colored results and/or even crashes.

So what's the solution besides upgrading to 2010? Make sure the gamma settings are the same on all your machines (preferences). Then use the utility gamma/gain shader to set the gamma on your maps. That "overrides" the problem with the MAP manager.

Just be forewarned, I've found that the utility gamma/gain shader doesn't play well when used in the bump slot of a material. So, that's mainly why I keep my gamma settings like this for 3dsmax 2009 & 2008:

Display gamma: 2.2
Bitmap Input Gamma: 1.0
Bitmap Output Gamma: 2.2

With the Bitmap Input Gamma setting of 1.0 I avoid the problem of using the gamma/gain shader on my bump/displacement/HDR* maps since I want those to be linear (gamma 1.0) anyway.

* Not all HDR's are correctly saved as linear, some have a sRGB gamma curve (2.2) baked in instead of being linear/gamma 1.0.

16. How do I illuminate a scene with an .HDR image when using 3ds Max & mental ray?
Answer: There are several ways some are:
A. Create a skylight. Assign your .hdr map to the skylight. Enable Final Gather & render.
B. Create a skylight & configure it to look at the scene environment. Assign your .hdr map to the scene environment. Enable Final Gather & render.
C. Use the HDR map as a self-illuminated material & enable FG.

Now, of course you'll have to pay attention to things like using the proper mapping coordinates & exposure settings when setting up your .hdr map. You may also want to use a small, blurred version of your HDR for illumination as it will require less FG samples to produce a clean render. You should be able to find plenty of data on HDR's with a thread search.

17. I'm new to mental ray, what's the best way to learn how to use it?
A. Start with the info you have at hand right now, the help file & the tutorials that ship with 3ds Max. Don't overlook the A&D material & Production Shader documentation as it's extremely helpful.
TIP: Instead of searching through the help file for the A&D & Production Shader info there are complete PDF's located in the 3dsmax/help sub-folder.
B. There are some good (free) intro tutorials for 3dsmax & mental ray here as well:
C. In addition to the Vizdepot mr forum here are some additional mental ray resources (in no particular order):

18. I've enabled the volumetric effect on a light but it doesn't show up or it's black, why?
Answer: You're probably also using the mrSun/mrSky/mr Physical sky and the mr photographic exposure control. Simply put, the answer is the same as item # 10 above. The volume/fog effect has a LDR range of 0.0 to 1.0 which is simply not bright enough to be seen when using the mr photographic exposure control configured for use with the daylight system.

I'd recommend using the unitless physical scale as described in item #10 above. Or you could disable your lights (except the volume light of course), exposure control, and the physical sky and render out a volume pass & composite it.

Urban Myth: The 3ds Max standard volumetric effects (fog, volume light, fire, etc.) are not compatible with mental ray This is of course false. 3ds Max's built in volumetric effects do work with mental ray. Example:

19. I'm using one of the FastSSS skin materials, but it's rendering black...why?
Answer: You're probably using it in a scene with the mrSun/mrSky or other photometric lights & the photographic exposure control. In that case make sure the scatter indirect illumination option is enabled and the "Screen (Soft) Compositing of Layers" option is disabled. (This particular info is outlined in the help file.)

20. Do I use Global Illumination, Global Illumination and final gather, or just final gather for my indirect illumination calculation or when do I use a particular method?
Answer: Probably the first helpful thing to know is the basic differences between Global Illumination (GI) and Final Gather (FG).

When using Global Illumination in addition to the direct light your light sources emit they also emit light energy in the form of GI photons and Caustic photons when caustics are enabled. Therefore it's important to properly target your light sources so the photons are fired at your objects and not off into empty space. Since these photons are fired from your light sources GI is not view dependent, which means indirect illumination will occur even out of the view of the scene camera.

Final Gather does not emit photons. Instead Final Gather emits rays from points on surfaces in your scene that are only visible to the camera. Therefore Final Gather is view dependent, meaning the indirect illumination calculation will only occur in the area visible to the camera.

GI & FG work well together. You can use GI to provide the basic secondary illumination in your scene and then use FG to smooth out the GI solution. You may also want to use ambient occlusion to bring out the small/fine details in your scene. Generally the combination of GI + FG is geared towards users that are somewhat familiar with 3ds Max / mental ray just because there's more tweaking/tuning involved. If you're just starting out with 3ds Max and/or mental ray then you'll probably want to stick with using FG only for the indirect illumination of your scenes. I say this not because FG is a basic or entry level option but because FG only is quick to configure these days & can provide great results on it's own.

So when should you use GI + FG or just FG?
It seems that a lot of more seasoned users tend to use FG only for exterior type scenes and the combination of GI + FG for interior scenes...However, ultimately it boils down to user preference because you can use either FG only or GI + FG in most situations.

21. I'm rendering a daylight exterior architectural scene with the photographic exposure control and the lights on the interior of my building aren't visible/working?
Answer: You can't expect typical interior lights to compete with the power of the sun! You're exposure control is probably properly balanced for an exterior daylight scene...but you're wanting to see the interior of your building brightly illuminated as well? If you were to try and capture something like that in real life with a camera it would be nearly impossible to do.

With a camera you'd have to adjust the exposure on your camera for the interior lights. However, when you do that the exterior objects/sky will be over exposed. That's why I say it's tough to do in the real world. Fortunately we bend reality with 3d programs like 3ds Max so it's possible to make this unrealistic result happen.

So what can you do? Well, one option is to boost the energy of your interior lights until they are visible at the level you like. Another option would be to use the unitless physical scale on the mr photographic exposure control and adjust it to something like 80000. OR there about...the value you use may be different based on your exposure settings.

Blog entry with similar discussion (January 01, 2008 entry at bottom of page):

22. What lights work best with mental ray in 3ds Max
Answer: They all just depends on what you're trying to do. Example, for architectural scenes with the mr photographic exposure control you'll probably want to use photometric lights, even assigning IES profiles for the most accuracy. However, if you're working on a cartoon character and not using the photographic exposure control or any other more 'artsy' type scenes you may find the non-photometric lights like the mrAreaOmni or mrAreaSpot work well.

Now I'm not saying that you can't or shouldn't use photometric lights on 'artsy' scenes...or that you can't use non-photometric lights for realistic architectural scenes. I'm just mentioning some typical scenarios. Ultimately you should use whatever light type gives you the result you're after.

23. I'm using mental ray proxy objects and I can only use a few before running out of memory...why?
Answer: Make certain that you've optimized your scene by:
a. Disabling the Scanline option in the mental ray render settings.
b. Instance copy your proxy items as much as possible instead of making regular copies.
c. Use the BSP2 mode if your scene is heavy (over 1 million triangles).

If you're not sure where one (or all) of these options are, you'll find more info on them in the help file (F1).

Related link:

Of course if you're still using a 32-bit operating system that's limited to 3-4gb of RAM (or less) there's only so much you can do before you hit that memory cap. That being said, I have been able to render thousands of complex INSTANCED proxy objects with my old 32-bit machine...but ideally you should strongly consider switching to a 64-bit operating system with at least 6-8 gigs of RAM...more is even better. That will allow you to work much more efficiently with far fewer 'out of memory errors'.

24. The presets on the Arch&Design material are no longer working!?
Answer: If you write to that file (mrArch.DesignTemplates.mat) it will 'break' the presets. To fix this, you need to replace that file with the original one. To simplify things, here's a copy of the file:

Place this file in your materiallibraries subfolder (ex. C:\Program Files\Autodesk\3ds Max 2009\materiallibraries)

TIP: You can mark this file as "read only" to prevent this from happening in the future. To do so, in Windows right click on the mrArch.DesignTemplates.mat file and enable the "read only" option & save. 

Comments (0)

There are no comments posted here yet

Leave your comments

  1. Posting comment as a guest. Sign up or login to your account.
Attachments (0 / 3)
Share Your Location

Print Email

Real Time Analytics