How to make a rectangular light in mental ray?


#1

I’m trying to make an area light that casts light from all over a rectangle shape. This is as far as I have got using a photometric light and, under the ‘Shape/Area Shadows’ changing the shape to rectangle:

For me, the problem with the above light is that light is being cast from the centre as opposed to evenly from the rectangular plane. How could this be done? In Vray it was so easy…


#2

If an option, you can use a self illuminated material on a rectangle mesh and turn on FG.


#3

Thanks for the speedy reply Swahn. I’ve tried doing the self illuminate trick but am I right in thinking that a self illuminated material does not actually cast light? From this tutorial it would seem that way…

Illum. plane tut

Therefore, illuminated material are for faking lights and reflections (?) and not what I’m after.


#4

No, it can cast lights thanks to FG. Even better would be to use a mr Sky Portal. These photometric lights are in serious need to a complete overhaul since max 2008 if my memory serves.


#5

Unfortunately all area light sources with mental ray in 3ds Max emit from a center point. This includes the skylight portal although the annoying effect on it isn’t nearly as visible as say a photometric area light…but it’s still there.

Sure, you can use FG on self-illuminated planes but it’s just not the same. It won’t emit photons, it won’t emit direct light (FG disabled), it won’t produce specular if you need that for fake highlights.

If you feel this issue warrants fixing then vote for it HERE


#6

It’s a shame mental ray cannot do that (I have cast my 3 votes!). I’ll have a go with the self illuminated material later on as it may be fine for my needs.

I actually asked the original question because I’m looking to make a fluorescent tube (which would be visible in the render) which would need to obviously cast light and make shadows from the entire tube. Would I do this with a self illuminated material? Thanks.

(I would try it out but I’m at work where the nearest thing to studio max is sketchup…)


#7

Hi

The Trick of Jeff´s PortalLight work here very good. I use the original mia_portal_light Shader, and have more options to optimize the outcoming light.

@Miked08: mental ray can Mesh-Light/Object-Light, but the Autodesk Coder can not, or want not programming the features. I think they can not, because we tell it for years. :deal:

mfg
hot chip


#8

Thanks for pointing that out Jeff. Didn’t notice the Skyportals also had this issue too. Is this true even if you use the blackbody shader?


#9

Did you try changing the Light Distribution to Uniform diffuse? I was able to get something pretty rectangular by doing that:


#10

Well, there is a clear difference between V-Ray and Mental Ray when it comes to direct area lights.

These are two area lights close to a surface facing it. You can see that Mental Ray is still projecting all samples from the centre of the node. Not very realistic if you want true area light.


#11

The best way is to use sky portals, just change de source to custom and it will behave like vraylight. :wink:


#12

Eh, not really. That’s just assigning a color (and or intensity) to the light. Best I can tell it doesn’t change the programming/math that goes on behind the scenes with how it’s emitting the light as it still seems to emit from the center


(used the kelvin shader on the portal light)


Placing a translucent material in front of the lights also illustrates the issue.

The problem mainly comes into play when using large area light sources. If you use smaller, square area lights, then it’s not a huge issue. However, if you ever want to do things like simulate a large photo shoot diffuser type thing, like this:


Then you’ll pull your hair out, or just switch to a different rendering application.


#13

Thanks for the great replies everyone and Jeff, your post really summed it up I think. Portal lights are pretty good and in small scale cases it’s possible to hide that the light is coming from the centre, like below:

Could I change the question :stuck_out_tongue: What if I’m wanting to make a fluorescent tube i.e. a light that casts even light? That probably cannot be done either… Here’s my experiment with a photometric light emitting from a ‘cylinder shape’ with the ‘light shape visible to renderer’. I tried adding a glow effect to the light but of course the glow comes from the centre and forms a sphere, doh!

Thorsten posted something about this but I didn’t understand really.


#14

That’s amazing to me that such an integrated renderer has this problem. Anyone know does it occur in Maya too? Is it a Max implementation problem or a MR bug in general??

Edit:

I am remembering now that I did a scifi ship and it had some areas of long strip lighting. I was pulling my hair out too about this problem. I thought it was just me at the time! :wink:


#15

As usual I agree with you jeff… :smiley: its really not the same, but its better than the rectangular photometric light and closer to the vraylight. :wink:


#16

There’s nothing like picture examples to really demonstrate the problem. Thanks guy for explaining this to me (and everyone). I’ll be sure to use the sky portal but also be aware that it won’t be that fantastic.

Jeff, in your car shoot example, would 20 sky portals abutting each other reduce the problem a little?

Would that also smash the render time?


#17

A large group of area lights would indeed take much longer to render than one. I have used some custom light shaders in the past but they all have some kind of drawback/limitations so it’s just something that needs to be addressed correctly.

I hesitate to call this an error since I believe the center point emission is by design. I think it has something to do with assuring IES accuracy (I think) and may be necessary for the lighting analysis accuracy too (again, I think).

Geometry lights may be the easiest solution for those of us that aren’t concerned with center point accuracy on area lights since mental ray supports geometry lights anyway. At any rate I sure hope we will see some kind of solution to this one soon.


#18

Hi Miked08,

my english is not good, but i hope that can help. The benefit of Portallight for me are two things.

  • cutoff treshold ( spread angle of Light emitting)
  • Shadow Ray extension ( as wich distance is Raytraceshadow active )

ceiling Light:
At the Scene i use two portal Light. One light for the Window and one light for the star ceiling, because i want only one light for all stars/spots. The ceiling light position is in the ceiling, and i use Shadow Ray extension to eliminate the Shadow from the ceiling, because my Light is in the ceiling. If my light outside, i become a Shadow on the ceiling, and that look not realistic.

Demofile 3dsmax2012: http://www.infinity-vision.de/uploads/mr_portallight_test.zip

have fun!

mfg
hot chip


#19

Just out of curiosity, is this the same for Iray or does the light actually show up as an even square?

It would be nice if setting the light to Uniform Diffuse would mimic the perfect square results in MR.


#20

Just mental ray. Same test scene rendered with iray below: