Controlling Physical Sun's Photons via Bounding Box

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  07 July 2009
Smile 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
  07 July 2009
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.
  07 July 2009

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.

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.

  07 July 2009
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.
  07 July 2009
Or use a portal_light.
  07 July 2009
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
  07 July 2009
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.
  07 July 2009
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)

Last edited by Dangertaz : 07 July 2009 at 01:02 AM.
  07 July 2009
I think I would go for the the "Photon Only Spot" it's fast and easy to control

  07 July 2009
Originally Posted by Dangertaz: 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)

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
  07 July 2009

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

Thanks to everybody!
  07 July 2009
Originally Posted by Dangertaz:
Other have said GI for exteriors/landscapes is pointless and to turn the FG bounces up to 4 or so and rely on that.

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.

Last edited by Hamburger : 07 July 2009 at 02:54 AM.
  08 August 2009
Smile Hey Hamburger

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...


  08 August 2009
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).
  08 August 2009

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!
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 06:56 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.