PDA

View Full Version : mia_physicalSun, photons


matt
05-15-2007, 08:52 AM
i can't seem to get this to work, can someone double-check my working out?

-added physical sun/sky
-select physical sun node, enable 'automatic photon energy'
-create a cube, connect its bounding box min/max to corresponding attributes to physical sun
-scale cube to encompass scene, hide
-enable gi
-render
-no photons... :(

i thought to enable photons on the sunDirection light, but that doesn't make sense, and it didn't seem to cast photons correctly anyway. i'm using mia_material on all my objects, and i've made sure its connected to the photon shader slot of the shading group.

any help appreciated!

-matt

matt
05-15-2007, 09:49 AM
ah, isn't that always the way? setup a simple test case, works fine.

all as above, but you DO enable photons on the sunDirection light; look closer and you can see the light's photon shader is mapped to physicalsun, so thats clearly how it makes the connection.

the bounding box and actual position of the sunDirection light influence the photons in slightly odd ways; move the light outside of your bounding box and you'll get a substantially different photon map. More or less valid, but different.

Similarly, I thought the bounding box would act as a magical photon blocker. Not so; it seems to function as an overall scaler, determining how accurate the solution is. Move your bounding box cube gradually away from where you light and geo is, the photons get sparser, then it seems once the midpoint of your geo is outside the bounding box, its suddenly ignored from photons.

Anyways, now to apply this to my production scene... *deep breath*

matt
05-15-2007, 04:52 PM
further development...

worked out its due to my scene being arranged away from the origin. using the transform bbox min/max doesn't work. i then tried constraining locators to the bottom-left and top-right corners, and using their translate values, also doesn't work.

anyone know the correct way to calculate the bounding box values for the photons?

iduna79
05-17-2007, 05:35 AM
mia_physicalsun --> Photon Emission --> Photon Emission Settings --> Get BBox from selection

Doesn't that work?

matt
05-17-2007, 06:41 AM
no, i think that might be with the physicalSun setup that was ported from max; the builtin one in 8.5 doesn't have that button.

thanks though. :)

anyone else? *cough zap cough*

if all else fails I'll install that AE template, but I'd assume/hope the native version would be capable of this.

Aenarion
06-04-2007, 02:04 AM
I always turn on the photon visualizer on from Render Settings and Physical sun emits photons.

But according to DT it's always better to use another source of light with 0 intensity and use it only as an emitter.

Also the directional lights dont provide proper GI, I read this on some forum and on MR manual i think it has some problem with Maya. I know the recomend only spot lights and area lights.

Another thing is i never use GI with the 8.5 physical sun. I always use FG and the result is pretty good. I think the photons etc wont look properly due to the gamma 2.2 anyway.

MaNdRaK
06-04-2007, 08:24 AM
Photon 'Bounding Box' should encompass area where You shoot Your photons; they are not casted outside of it (at least they shouldn't be).
If You have problem determining good BBox visually, create simple poly cube wrap it over area You consider to be important (Your scene geometry, more precise), and then read it's BBox values, somewhere in it's Transform node.

matt
06-04-2007, 09:59 AM
this is what i'm saying; i've tried several methods to drive the bounding box values (connecting a cube bbox values, locators parent constrained to the corners, connecting their transforms), none work.

the specific problem i had was with the scene being away from the origin. if its all at the center of the world, its fine.

fabergambis
06-05-2007, 01:50 PM
I agree with Aenarion, you don't need to use photons with physical_sun&sky, just FG multibounces.
I made many tests with photons and physical_sun&sky, and soon I understood I was wasting time.

matt
06-05-2007, 05:03 PM
normally i'd rely on fg only, but i was rendering a complex multi level architectural space lit by a large skylight, fg multi wouldn't cut it.

besides, according to zap's notes over at cgtalk, fg multibounce isn't the most efficient way to go. from my tests it definitely seemed the case, fg+gi = faster, better than fg+multi:

http://forums.cgsociety.org/showpost.php?p=4010238&postcount=1525

elesar
06-22-2007, 02:17 PM
I test your situation
I had no prob
my scene was a simple room with a hole as window a hiden cube as photon Bbox and other things
it had no problem and photon tracing was good but when i turn auto photon energy on , my image become too dark
imho this shader has a basic problem or it has a rule that did not discussed:mad:

matt
06-25-2007, 04:26 AM
did you translate your room substiantially away from the origin? thats where i had problems.

elesar
06-25-2007, 02:18 PM
not at all
i didnt move any obj of my scene
I just parented Bbox under sunLightShape ad then locat the light in front of the window and fixed the Bbox on window
without auto energy evry thing was as usual and acceptable
but when I turned it on result was not good
evry thing become great:mad: when i increase number of photons to 1000000 my viewport was exploding becuse of map visulizer but my image become ONLY BLACK PIXLES WITH JUST DIRECT LIGHT:mad: :mad:
photons was storeing but with very low energy.
THIS IS WHY I think it must has a problem.

kobayashy
10-19-2007, 02:19 PM
So to use a bounding box in the physical sun you do the following:

1) Create a cube
2) Connect the bbox min and bbox max of the cube "transform" to the physical sun bbox min and bbox max attributes
3) Parent the cube to the sun (The sunDirection node)
This is extremely important, the physical sun need the Bbox information relative to it's positiong. Not parenting the cube to the light will give bbox onformation relative to the world origin!
4) hide the box
5) Enable the automatic photon energy checkbox of the physicalSun shader (so that the photon intensity and color are taken from the physical sun and not from the directional light)
6) Enable photon in the light (sunDirection node)
7) Set a dcent number of photon in the light 800 000 is good.
8) Enable GI in the global :)
9) Render
10) Enjoy cake!

yashu
10-19-2007, 11:46 PM
in 2008 using the Portal to 'catch the environment' is even
better. Much better actualy:)

kobayashy
10-22-2007, 08:53 AM
You still need photons to create a great rendering in my opinion!

Physical + photon and portal lights with photon will give you the fastest and best looking renders.

Just multi-bounce FG is too long to render and you won't get the same quality.

Setting up photons for physical light is pretty simple.. just follow the 10 easy step i mentioned and you'll be rendring great images in no time. And the render times will be insanely low.

http://mymentalray.com/forum/attachment.php?attachmentid=433&stc=1&d=1193068238

This image took about 12 minutes to render at 720x405 on a dual core laptop computer.

There is still a tiny bit of shadow noise from the portal light, but the result is pretty good in my opinion.

I used photons from both portal and physical sun (about 1.5 million photons) and very low FG setting (64 accuracy, 0.8 density and 30 interpolation)

dire1
10-25-2007, 03:37 AM
nice one kobayashy but i think its fairly to dark. u got there a really strong light and the shaded part of the room is just too dark.
btw. whats a portal light? where can i find it?

HamburgerTrain
10-25-2007, 04:33 AM
nice one kobayashy but i think its fairly to dark. u got there a really strong light and the shaded part of the room is just too dark.
btw. whats a portal light? where can i find it?

I think it looks pretty natural. Anyway, I'm sure it's as easy as tweaking the tonemapper if it's too dark.

The portal light is a new feature in mental ray that ships with Max 2008 / Maya 2008.

dire1
10-25-2007, 04:42 AM
oh. can i plug those portal lights from 2008 to 8.5?

peengoh
11-24-2007, 05:39 PM
nice one kobayashy but i think its fairly to dark. u got there a really strong light and the shaded part of the room is just too dark.
btw. whats a portal light? where can i find it?

i don't agree i think it looks good, i like the contrast.

HamburgerTrain
03-03-2008, 04:07 PM
2) Connect the bbox min and bbox max of the cube "transform" to the physical sun bbox min and bbox max attributes



No cake for me!

I follow these steps yet my render always dies on me at around 90%. Mental Ray quits after a encountering a fatal error (Maya 8.5)

How do you exactly do this step? I've tried connecting, copying and pasting the values yet my render always crashes.

Turn GI off and leave FG on and it renders great.

Thanks.

HamburgerTrain
03-04-2008, 05:48 PM
No matter, if this happens to anyone else - check the scale on your sunDirection node and keep it at one. Problem solved.