How to make a rectangular light in mental ray?


#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:


#21

Wow, well that pushes me more towards the opinion that MR is indeed incorrect, and that Vray and Iray are more accurate.


#22

for me look the mr portal light, the same as iRay rectangle light. But all the lights generate not a harmonic light emitting.


#23

Hi thorsten, thanks for putting the files and images up but unfortunately I can’t download the .zip file and can only see half of the images. The place where you are hosting the files is really slow and keeps cutting out mid download.


#24

hi mike,

i can download the file without problems, it comes directly from my website.


#25

Ah yes, it’s working now, many thanks for the setup, I’ll get studying it!


#26

Hi Thorsten, I couldn’t get the mia_portal_light Shader to work. If i enable it in the kight shader dialog, the light emits dark [no light] do you do any setup on the portal light shader map. Also where did you get the architectural environment portal you have in the sample files. {Is it some other hidden string]

Thanks


#27

Quote from Master Zap:

'Basically, the distribution of light from a flat plane can be calculated properly by taking samples and taking the traditional distance-squared for each sample. While this works, it yeilds a totally horriblke amount of noise that you need to turn up the samples to high heaven to get rid of.

The portal is designed to be smooth, and approximates the “sum of an infinite set of distance squared to every point of the light” with an approximation, such that it should have no noise created by sampling (outside of the inevitable noise caused by the cosine of the angle to each sample).

This algorithm is a bit of thumb-and-forefinger and is not totally accurate, and especially on a long-thin light it apparently breaks down a little bit. Note that this algorithm is only actually applied to light close to the lightsource itself, anything further smoothly interpolates towards a traditional distance-square based calculation (since the noise problem goes away at any significant distance).

So the light may be a little bit off in the extreme nearground, but it is specificaly designed for smoothness. At any distance (e.g. at a distance of about the longest axis of the light), it is accurate.

That’s the idea anyway

/Z’


#28

Well vray seems to have no trouble doing it correcly without the mentioned horrible amount of noise, so… :shrug: