PDA

View Full Version : Lighting & MR Advice Exchange


nebille
04-05-2004, 03:25 PM
Hello All

As folical9 has done such a good job initiating a thread on mental ray shaders I thought i would follow in his footsteps and try and get everyone to input all there knowledge and problems in mental ray within one thread ( here ) This would save people ages searching through the forum for specific theads relating to lighting problems etc..

I hope this thread becomes a success because we could all learn a great deal from each other and hopefully form a huge network of people exchanging thoughts related to lighting and problems with lightng while using the MR renderer.

nebille
04-05-2004, 03:42 PM
I have been searching through the forum and found some interesting advice on lighting interior scenes.

Assoma started a thread like this a while back but it seems to have gone silent , I think its because its in the main part of the max forum .

http://www.cgtalk.com/showthread.ph...threadid=120241

The main keypoints that kept popping up are below

Always use to scale models

Always start lighting a scene using one material for all. This way you can determine if its the lighting thats the problem or the materials .. This advice helped me out so much . infact after doing a bit of research MR has a material overide facility so that you can assign one material to your scene i.e standard diffuse grey but still have your old materials there as well..

Render scene > Processing > Material overide

Always enable final gather while using the sunlight and daylight systems or the results will turn out black when rendering

The decay settings can be helpfull if your scene is overlit

It is possible to generate quick renders while testing lighting by turning on Preview (noprecalculations) while using Final Gather
The Max trace depth seems to make the scene brighter the more you increase the settings . Standard being 5 for all

folical9 created an experiment some where in the forum which displays this..

You can also increase the light intensity in the scene using an exposure control... This allows you to play about with contrast etc.. it also allows you to test this on your model in real time

Rendering > Environment >Exposure Control

If you want to increase color bleeding then you need to increase the amount of energy in your scene that your lights emit.

If you find that you get strange blobs while rendering you can either up the Final Gathering or the number of GI photons


Hope these tips that i have found usefull help you guys

Please add to these tips as and when you learn something new and interesting.

Kind regards

Nebille

nebille
04-05-2004, 03:43 PM
I have a problem.. does anyone know of any rules / guide lines to creating an exterior / night time scene...

Any help would be appreciated

Nebille

FFASHION2399
04-06-2004, 05:59 AM
I have a problem too.. does anyone know of any rules / guide lines to use"use file"setting in finalgather
Any help would be appreciated

another problem:the exp control seems not support mentalray,how do you do that

nebille
04-06-2004, 05:02 PM
Im not to sure about the file problem but as for the exposure control.. You should always use a logarathmic exposure control .. That should work ..

Hope that helps

nebille

Just bought a Lighting book by darren brooker..will post some stuff up after i have finished the job i am working on

c ay

BigRanS123
04-06-2004, 07:54 PM
Something good that may help people, would be posting some simple setups with lighting different scene and situations. This may help bring some problems into view and also answer some questions that many people have.

nebille
04-06-2004, 10:55 PM
Yeah thats a great idea.. Im gonna be reading this new lighting book that i have just bought and hope to put some stuff up on this thread after next week... What i read today is that the inverse square toggle on your lights is a valuable tool.. I will discuss this futher when i have finished work... Will put an example scene that i will have worked on which will implement all the new tricks etc that i have gained from research elsewhere

kind regards

nebille

SimonReeves
04-07-2004, 06:46 PM
ok I have a very annoying problem and this seems a good place to post it

I want area shadows with a target light, doesnt sound too much to ask does it?

but mr wont let me, area shadows are turned on and all, but just dont work unless the light is an omni or spot

which is no good for things like sunlight

any ideas?

BigRanS123
04-07-2004, 06:54 PM
go to the middle of the page (http://www.cgtalk.com/showthread.php?s=&threadid=104578&perpage=15&highlight=sss&pagenumber=11)

If you go down to where you see the three statues, Folical 9 shows how he set up a good sun light set up.

SimonReeves
04-07-2004, 07:00 PM
oh
I've seen that I didnt think to use it, but I dont want to use the IES thing,

if possible I want to use a direct light as I have done before

edit
using an IES seems to have the same effect of a spot light anyway, light coming from a single point instead of the same direction [proper direct light style]

matlock
04-07-2004, 07:11 PM
Simon.Reeves:
Is your light a "mr Light"?
If not, go to the utilities tab and click on MAXScript while your light is selected. Click the "Convert to mr Area Light". It should work, although that may not be your problem.

SimonReeves
04-07-2004, 07:14 PM
nah that doesnt work, just converts it to a spotlight

I was just using a mr area spot and changing it too direct before

matlock
04-07-2004, 07:19 PM
Maybe since it is a direct light you wont get any spread on the shadows?

SimonReeves
04-07-2004, 07:23 PM
nope there should be - just look at shadows from the sun


its just the same as a spot light, really really really really really really really really really far away :)

Iain McFadzen
04-07-2004, 07:29 PM
Surely if you make the area light's diameter large enough (ie as big as your scene) you'll get exactly the same effect as a direct light?

Dunno if I'd fancy rendering it though :D

SimonReeves
04-07-2004, 07:38 PM
hmm no

these are from scanline render with area lights [the the close postion of the light just exadurates it some more]

http://www.simonreeves.co.uk/stuff/viewport.jpg
spot light
http://www.simonreeves.co.uk/stuff/spot.jpg
directional light
http://www.simonreeves.co.uk/stuff/direct.jpg


seeeee?:shrug:

BigRanS123
04-07-2004, 07:44 PM
I would just take 5 target direction lights and move them over a small bit to the sides of the middle light and decreas the intensity of them till they fall off.

:shrug: That is my best guess.

You may just have to use final gather and hope that that covers up any noticiable differences.

sireel
04-07-2004, 08:12 PM
hey Simon, I ran into a similar issue with the way Mental ray treats shadow mapped shadows. The only way I found in geting around it was to select MR shadow map from the selection drop down of the shadows and play with the Map size, sample range and samples in the Mental Ray Shadow Map parameters rollout.
Not sure if this is info that you are looking for.

joske
04-07-2004, 08:35 PM
Originally posted by Simon.Reeves

I want area shadows with a target light, doesnt sound too much to ask does it?

but mr wont let me, area shadows are turned on and all, but just dont work unless the light is an omni or spot


if i am not mistaken mray only renders with raytraced shadows
so : no shadow maps or area shadows with any kind of light in mray... :hmm:

for sun i allways use a mr spotlight that is very far away from the objects in the scene, doing that and turning on a small (mray) area does work almost similar as a direct spot with area

hope this can help:shrug:

JeffPatton
04-07-2004, 08:40 PM
so : no shadow maps or area shadows with any kind of light in mray...

What about the MR shadow maps? Just as Sir Eel mentioned you can use that with some tweaking.

SimonReeves
04-07-2004, 08:41 PM
I was just using raytrayced + mr areas
not scanline area shadows


moving a spot really really really far away seems the only option really afaik

not too promising

JeffPatton
04-07-2004, 08:51 PM
Just tested a small scene and the MR shadow maps work pretty well. Just increase the hell outta the map size (I had to use 12000) due to the scale of my test I suppose. I set the sample range to 1 and samples to 128. Gave me a nice slightly blurred edge shadow while using a target directional light.

You can increase the sample range to make the shadow edges blurrier (is that a word?.....only in the CG world maybe)

Give it a try.

SimonReeves
04-07-2004, 08:55 PM
I appreciate your work, but I dont just want a slightly blurry shadow, I want proper area shadows.....

JeffPatton
04-07-2004, 08:58 PM
Roger that...sorry for the misunderstanding.

bio2000
04-08-2004, 10:56 AM
There goes another question:

Thanks to folical i could find out how to have an IES sunlight working with MR, but it seems i can do what i want, i cannot change the intensity of the light. I tried to increase the lux value, also the Energy values in both the light parameters and the Indirect Illumination settings in the render dialog but nothing does work!! Do i have to use GI ?? im only using FG now with one Skylight and one IES sunlight! Any ideas??

JeffPatton
04-08-2004, 08:02 PM
Two things come to mind on that bio.

1) Exposure control could help control the amount.

Or

2) Place an output map in the color slot of the light infinite shader. That will allow you to adjust the color & brightness of the light through the shader.

bio2000
04-09-2004, 04:37 PM
:D exposure control! that's the thing that makes it work! Thanks folical!

I have another question for ya all:
I'm trying to use the glow shader (i took the neon from the CGTalk .mat file) but it doesnt seem to react much with the objects surrounding it? Am i missing something? Im just using FG!

joske
04-09-2004, 05:29 PM
just jank up the brightness setting from 1 to 10 - 20... until the glow shows...

also check your units and system units to be real (don't have a room that is 280 m, km, mm ... high (keep it 280 cm or someting like that, this is because all the radius and energy settings from mental ray will be set in that scale, and if your units are bananas you will not have any control )

on the same topic :
glow only seems to work with fgather
i would love to have a glow that uses photons... that way you can control the bounces with the "photon map shader setup" folical has mentioned...

i did a test with only one glowing sphere in a room (only one extra omni turned on/off to kill the default lightning from max)
couldn't get any glow around the corner, so there is no bounce.
have a look at my test renders attached

mabey a shader can be made to selfilluminate an object using photons?? (i did some wild tests but had not succes sofar...)
anyone has any idea about this?

JeffPatton
04-10-2004, 12:59 AM
Just a thought, you can always fake object emitting photons by placing an omni light inside the object and using the photon shader to allow the photons to pass through like this:
http://frodo.hiof.no/~deetee/mrupload/store/Photon-lights.jpg

Here's the scene incase anyone wants to have a look (it's animated, but I didn't have time to render the animation).

Scene:
Download photon lights (http://frodo.hiof.no/~deetee/mrupload/index.php?act=dl&file=UGhvdG9uLWxpZ2h0cy56aXA=)

nebille
04-10-2004, 12:58 PM
i have been doing some reading on lighting in max and have found a really usefull trick to create fake shadows..

As you all probably know, most of the computation in a render is processing shadows

To cut down rendering times you can fake shadows by setting a light to a -1 multiplier and turning off cast shadows.. This can be used to darken corners of rooms etc..

ie if you were to place an omni light with the above settings in a well lit room in the corner .. the corner will then become darker as if something is casting a shadow....

This can work well for photorealism but a good grasp of where shadows will be is needed..

hope someone finds this information usefull

kind regards

nebille

Rich Joyce
04-10-2004, 04:07 PM
for the direct light problem -

couldntyou merely create a spot a long way away but cut down on rendertime by using attenuation controls? then you should get the best of both worlds.

Damm
04-10-2004, 04:15 PM
Folical9, what do the splines do?? i couldn't find anywere were they were used so i had to ask :)

thnx

JeffPatton
04-10-2004, 04:42 PM
Abbegon, the splines are paths the glowing spheres will follow in the animation. I have the omni's linked to the spheres and the spheres follow the path. It just took too long to render on my PC but I have motion blur setup as well if you enable it in the render rollout.

Damm
04-12-2004, 01:46 PM
ah ok.. :) thnx

herbert west
04-16-2004, 08:40 PM
Hello. New Max 6 user here. Thought I'd post my first attempts with GI and FG. Just a simple room with default materials. I was going for smooth lighting, no artifacts, and a fast render. This scene renders (on a P4 2.66GHz system) at 2 min 22 sec, with about another minute or less for photon generation and FG processing. Add a few more minutes if turning up AA sampling for a final render (which I didn't do).

http://www.mediasprout.com/misc/room_gi_fg.jpg

The scene contains 1 MR Area Omni (10x10 area sampling), with inverse-squared falloff.

As stated previously, exposure control is key to getting good lighting, as well as paying attention to scale. Mental Ray is pretty sweet. Definitely worth taking the time to learn and tweak for the best results. Here's the scene if anyone's interested:

GI/FG testing scene for Max 6 (http://www.mediasprout.com/misc/room3.zip)

47Gut
04-29-2004, 10:45 PM
As far as night time lighting with mr, i got great results with the lume night lens effect. This scene is set up with two standard (kind of dark purpleish) omni lights, one is set up as a the main light, the other is just to fill in the shadows a bit. The shadows are raytraced. All the trees and bushes are from the aec follige.
http://images.andale.com/f2/115/106/3798135/1084266589675_forest.jpg

Weider
06-22-2004, 05:41 PM
47Gut: Could you post your scene? Or another simple scene like that?.

arona
06-27-2004, 06:24 PM
another topic with MR. its only an idea from me. i dont like mentalray at all. i used some other third party renderers and when im comparing... . the main problem i see in MR is its speed. only an idea:shrug:.

eks
06-30-2004, 11:25 PM
anyone have something about this subject?

as i see there are 3 lights:

- standard
- mental ray
- photometric

i did a simple test and did not noticed any change between standard and mental ray lights. unfortunately, i still do not have a good place to post the images, altought there aint much thing.

all tree lights, with final gathering, took 5 minutes and a half. visually the difference is only between photometric and the other two, altought an "area shadow effect" i could only get with mental ray light with ray traced shadows. :shrug:

anyone have any experience with different light types with mental ray?



eks

arona
07-01-2004, 10:40 AM
maby another problem. mentalray in some cases like this is limited :D. lighting in mentalray seems too weak to me.

eks
07-02-2004, 09:59 PM
i strongly disagree with arona in one point, but agree in another.

i do think lighting and shadows makes mental ray stand out. but it definitly is slow.

so, any one have tips about mental ray optimization? to reduce itīs render time without too much loss of quality?




eks

joske
07-03-2004, 08:11 AM
mental ray can be as fast as other solutions
only the room for error is a lot smaller...
once you know the 'tricks' it is possible to have acceptable rendertimes
there is no golden solution, just try untill you find your workflow that suits you
and look around and search in forums like this how other people do it...

and if you still don't like... pls stop complaining and don't use it ;)

Sir_Vuclan
07-20-2004, 08:12 PM
Even though the direct lighting problem was posted a while ago, maybe other can benifit from this info.
First of let me clear the issue that the sun does NOT casts soft shadows. It cast hard defined shadows, that being because all the light rays from the sun are parallel, which is what a direct light is. If you have a pole and follow the shadow during the day it does apper to fall off or become lighter the further you get away from the pole. But the fall off is do to the light scattering in the sky and reflecting back down to the ground and lighting the surface. So to make the soft shadows in MR you would have to enable GI and or FG and then the shadows will look more realistic and have soft shadows like the picture Herbert West posted.

I am currently experimenting alot with mental ray to accuritly light a House that I am modeling and one of my biggest challenges is to get the interior lit correctly with only the daylight system. The interior is always to dark, not enough light is bounced. If anyone has any tips, please post them.

I think this is a very useful thread if as many people posted as in the Photon shading thread by Jeff Patton, and I hope to help as I figure out more settings and tweaks

AdrianWilliams
07-21-2004, 02:04 AM
hay jeff i rendered that scene that you posted it work great but theres a small prob with the light in the courners of the room they seem the give off funny shadows like patches that move strange when the balls move around?

JeffPatton
07-21-2004, 02:24 AM
You'll have to increase the final gather and/or GI settings to get rid of those artifacts. Naturally, that will increase the render times too though.

AdrianWilliams
07-21-2004, 02:27 AM
ah ok lol i wont try it, that animation took long as it is thx for the info!!

joske
07-21-2004, 09:58 AM
Even though the direct lighting problem was posted a while ago, maybe other can benifit from this info.
First of let me clear the issue that the sun does NOT casts soft shadows. It cast hard defined shadows, that being because all the light rays from the sun are parallel, which is what a direct light is. If you have a pole and follow the shadow during the day it does apper to fall off or become lighter the further you get away from the pole. But the fall off is do to the light scattering in the sky and reflecting back down to the ground and lighting the surface. So to make the soft shadows in MR you would have to enable GI and or FG and then the shadows will look more realistic and have soft shadows like the picture Herbert West posted.


Vulcan, have a look at the shadow/light the sun casts from your window onto the floor of a room : it will be very hard near the window, the further it falls, the less sharp it will be.
So there is allways a small 'area shadow' even from the sun. It might be very small, but it is there for sure :wise: really, just have a look yourself...
so even for sun you might not wanna use a direct light.

secondly using a daylight system for interiors might not be such a good idea : the skylight is almost useless for interiors, imhexp. it is better to use area omnis (the size of the window) outside just infront of each window instead
this way you will have less probs getting the light inside brighter...

Waple
07-26-2004, 02:44 PM
Vulcan, what about placing some bounce lights around the room (area lights that exclude the thing they're bouncing from, like a floor bounce light excludes the floor) with very low multipliers, and color of what they're bouncing off of (like a bounce light from a blue table casts a blue bounce light).

Or is that cheating for what you're trying?

Sean121
08-30-2004, 09:28 PM
This is a great thread :)

Can anyone tell me where the AA setting is?

SimonReeves
08-30-2004, 10:25 PM
render dialog > renderer > sampling quality

Sir_Vuclan
08-31-2004, 03:22 PM
hi, sorry I haven't been around for a while, but I have been working on the lighting with the daylight system and radiocity. which works very well as long as you use the advanced lighting material and tweek the settings. I have pictures but I dont have enough posts to upload them. On the other hand, the daylight system is useless with the mental ray renderer so I would use bounce lights like Waple said.

Apollo13c
09-01-2004, 07:24 AM
Surely if you make the area light's diameter large enough (ie as big as your scene) you'll get exactly the same effect as a direct light?

Dunno if I'd fancy rendering it though :D袒护液体台不共和国急口令环境 后果飞机搞活解放感

francescaluce
09-11-2004, 01:45 AM
I want area shadows with a target light.. but mr wont let me, area shadows are turned on.. but just dont work unless the light is an omni or spot..
but if possible I want to use a direct light as I have done before..
you can't, by definition.. until arealights work on an 'area'.. 'directional/infinite lights ignore any area specifications because the size of a light at infinite distance does not matter'.. or if you want until they are positionless there's nothing to 'move' to get blurred shadows and lightwrapping as the classic arealights do.. the buildin probably use a pseudoarea workaround... the best thing for outdoor sun like environments is an hibrid shadow that cover the great distances with fast shadowmaps and near the details call raytraced shadows.. they are called in mr 'detailed shadowmap'.. but they are available with the 3.3.. so with max7 probably.



ciao
francesca

SimonReeves
09-11-2004, 12:40 PM
sounds like fun, looking forward to 3.3 :)

CGTalk Moderation
01-18-2006, 12:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.