Controlling Physical Sun's Photons via Bounding Box


I’ve looked and looked and read and read but I still can’t make this work:

How does one have a Physical Sun cast photons in a concentrated area around a model?

I have seen one set up ( that works for point and spot lights but I tried it with a directional light with a physical sun connected as both the light shader and the photon emiter but no photons were created. “Automatic Photon” is checked and 800,000 photons were set but nothing shows up on the map visualizer when its a directional light.

Other light types work normally and the photons were “trapped” inside a cube with a transmat and a photon_basic applied to it.

Is there a simple way to do this?

Thanks in advance


Did you create your Physical Sun&Sky setup via render settings (the automated mode)?
It works for me in most cases (I simply connect the mesh with the Sun BB slot) but sometimes I have to select the mesh in wich I want the photons to be casted in, then make the connections with the Sun via connection editor and in the end break the connections to make it work.
I know it sounds absurd but you have to belive me it works!
You’ll notice that the numbers still remains when you break the connection between the mesh and the sun, in fact this suggest another solution: you can create a box bigger than the area of interest for your photons, then copy the BB info into the sun parameters and then hide the box, or simply delete it.
Try this ways, or just create your own way to make photon driven works, you can play with it in many ways.
Hope it helps.


I didn’t create them using the automated mode, I’m using an IBL sphere and the physical sky would just get in the way. :slight_smile:

I create a directional node and in the Light shader and photon emmiter I connect the same instance of the physical sun. I then put the physical sun’s multiply at around .125 or a little higher so it’s not too strong.

I have copied the BB info from a cube and pasted it into the sun’s BB info but I can see the photon’s either getting trapped outside the box or still bouncing every where.

I’ll have to post some screen shots and maybe a scene with a sphere so you can see what I mean.



don’t bother casting photons from your sunlight

if you need them concentrated on a specific model, create a spot light that emits only photons, and focus it on just the area you need.


Or use a portal_light.


So it really doesn’t matter if the light generating the photons is a spot/portal/directional? A photon is a photon is a photon? There is nothing magical or inherently special about the Physical Sun shader?

I’ll try your suggestions, thanks guys


mental ray can draw the photon intensity from the physical sun if you need a more realistic intensity based on sunlight (use “automatic photon intensity” on the physical_sun node). you don’t really need it to come from the sun, though. it’s always best for things like caustics to cast the photons from a separate spot light that doesn’t do any real illumination (turn off emit specular and diffuse), but just cranks out photons. that way you can focus a large number of photons into a smaller place, and get better results faster.


I’ve read about this being used for caustics a couple of times. I was just interested in making a car sitting on an open road during the day look real. I’m under the impression that Physical Sun+plus IBL+GI+FG= the fastest and most realistic approach.

Other have said GI for exteriors/landscapes is pointless and to turn the FG bounces up to 4 or so and rely on that.

But then there’s this post by Master Zap, whom I’m inclined to believe…

So I’d like to get some GI involved from a physical sun but I’ll just use a portal light if there is no difference (other than the physical sun being a nightmare to set up correctly)


I think I would go for the the “Photon Only Spot” it’s fast and easy to control :slight_smile:



The portal light photon emission will only take into account the environment skylight color and intensity, and not the sunlight itself. Ive had some luck with the physical sun emitting photons, but as stated, it is a pain to set up correctly, so I would recommend the “spotlight casting photons only through the window” approach. It is faster and can look very pretty :buttrock:


OK, time for another round of tinkering with a spot light.

Thanks to everybody!


I disagree. Obviously GI is based on photons, this is where people forget it can produce much nicer results than just FG by itself…more natural colours when bouncing around the scene and some nice indirect shadowing are some of the advantages.

in my opinion a combination of FG + GI works best on both outdoor scenes and indoor scenes, maybe not true years ago - but now physical sun is a godsend.

It is also extremely fast to shoot photons compared to multiple FG bounces. so you get nicer results for much faster time.


When you are rendering exteriors, do you use GI from the physical sun? If so, how do you set it up so photons aren’t being shot into infinity?

I tried again to have a cube become a sort of bounding box but it still doesn’t work. Simply entering numbers into the physical suns bounding box parameters doesn’t work either, the photons are being shot far beyond the numbers I’ve entered. I’m including the tiny scene I’m trying to get this to work in…




I do use GI for exteriors but I don’t care if they are shot off to infinity.

Even with a scene that has millions of polys it only takes 30 seconds to shoot a million or so photons everywhere. Opening the map into map viz confirms that the photons are evenly spread and reach all the points so I’m not concerned about wasted photons.

I know the bounding box trick but I just tested and you’re right it doesn’t seem to work anymore (2009spa1).


After tinkering with the spot light for a bit I began to wonder if it would still be better to have the directional emit the photons because they seemed so concentrated with the spot. It sounds like you feel the same way. This is a wierd thing to say but I’m almost glad you couldn’t get the bounding box to work either (I’m on 2009 as well) I tried everything I could think of and read but I still never got it to contain the sun’s photons. Alas…

Thanks for the reply!


Have shot photons from physical sunlight and has mostly worked fine for me in 8.5 so is this a 2009 specific issue?



I just tested and this (containing photons generated via Phys Sun in a bounding box) appears to be FIXED in Maya 2010. Let’s hope it stays that way!


I don’t have any problems using a bounding box with MR Sun/Sky in 2009. The actual light’s location simply needs to be inside the box. If it’s outside, then it doesn’t work. But again, I wouldn’t go using photons from the sun/sky unless the recipe specifically called for this for some reason… a spotlight gives better results for caustics.

But others saying that their million photons firing off into nothing doesn’t affect rendertimes… I don’t believe we’re talking about the same issue. Even on my fastest workstation, “no photons stored after emitting 10,000” bogs down the GI calc tremendously, and by tremendously, I mean that no matter how fast your CPUs, “zero” is still a speed, and that’s how fast it’s going until it gets past these “errors”.

But I use a sphere (generally) instead of a cube. I’ll try to replicate the error you others are having using 2009 and a cube; perhaps the higher-poly sphere just works better?


Hmmmm…yep it seems to be working just fine in 2009 as well. Maybe I moved the light?

Another noob question: I use Mia materials for pretty much everything. It seems like the photons take a long time to calculate and don’t even show up once the rendering is completed. I crank up the photon’s intensity to 1,000,000 and it STILL doesn’t have an effect. Then I attach a mib_photon_basic into the SG of the Mia material and it behaves normally. I thought the mia mats had built-in photonic abilites, no additional shaders are needed…what’s up with this?


I don’t have any problems like that which I can directly attribute to the mia_material_x… Sure you’re hooking it up to your Shading Group properly? I’m pretty sure my method is improper, but it’s been working for me professionally for many years, and I am loathe to change it…

To be honest, it really depends on your scene and your lighting setup (in order for me to be helpful). If you can post an example, or perhaps start a new thread specifically about that topic even, then I think you’d get more help.