Home Technical Talk

what's wrong with my render? shadows problem

I was trying to follow this tutorial for working on my lighted scenes

http://area.autodesk.com/tutorials/rendering_a_quick_realistic_scene_with_mental_rays_final_gather

But mine doesn't look quite like that. I have some strange shadows and artifacts if I'm using that term right. I could use some help fixing them.

empireswatchtowercon3.png

Replies

  • warby
    Options
    Offline / Send Message
    warby polycounter lvl 18
    looks like your shadow map resolution is way too low ! sure oyu dont want to use ray trace shadows or something instead ? since its prerendered you might aswell go for the expansive stuff right ?
  • rebb
    Options
    Offline / Send Message
    rebb polycounter lvl 17
    Are you using Shadowmap Shadows ?

    Try enabling Raytraced Shadows instead, and fiddle with the settings.

    Edit : Gah ! :)
  • Mark Dygert
    Options
    Offline / Send Message
    Did you create your lights before switching to Mental Ray? Because standard lights created before the switch are known to cause issues like that after switching especially if you switch back and forth a few times. I'm pretty certain bumping the shadow map resolution up won't fix it... but its worth a try.

    To fix it I just recreate the lights. I think there are some settings added to the lights you can turn on. There might be some scripts available to convert them over also.
  • n88tr
    Options
    Offline / Send Message
    Well I upped the shadow resolution and now it looks like my render has gaussian blur all over it.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Do as Warby said and use ray-traced shadows instead. It looks a lot nicer, and well worth doing if you're using Mental Ray anyway.

    Just turn off shadow casting for the light, make it an area light and make sure final gather is on. You can then tweak the "samples" setting in the Light attributes to get more detail out of the area shadows.
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    Get a HDR in the environment slot, no point using final gather otherwise.
    Once your happy with your lighting go lookup information on mia_material.

    If your interested in learning more about mental ray also check out http://mentalraytips.blogspot.com/
  • n88tr
    Options
    Offline / Send Message
    I can't believe all the render settings, it's nuts in there
  • n88tr
    Options
    Offline / Send Message
    well here's what I got right before maya froze

    empireswatchtowercon7.png

    I just wish I could follow that tutorial and get that clean look
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    It used to much worse. maya seems to have been clean up recently.
  • Ark
    Options
    Offline / Send Message
    Ark polycounter lvl 11
    Using depth map shadows with a directional light is really bad practice. You have to crank the resolution WAY up to get anything looking decent.

    Use a spot light instead and keep your cone focused tightly on the model, this will better suit your needs and you won't need as many samples to get good smooth shadows.

    Either that, or use retraced shadows as been mentioned above.
  • Mark Dygert
    Options
    Offline / Send Message
    n88tr wrote: »
    well here's what I got right before maya froze

    empireswatchtowercon7.png

    I just wish I could follow that tutorial and get that clean look
    Its possible that it froze but it was probably just taking a long time to fill one of the buckets, probably an area with a few shadows. Just wait till you start using Vray...
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    Ark wrote: »
    Using depth map shadows with a directional light is really bad practice. You have to crank the resolution WAY up to get anything looking decent.

    Use a spot light instead and keep your cone focused tightly on the model, this will better suit your needs and you won't need as many samples to get good smooth shadows.

    Either that, or use retraced shadows as been mentioned above.

    To explain this point: Imagine a shadow map is an image of the shadows in your scene (not the case but easy to visualise) When you use a distant light with shadow maps the light effects the whole scene so to do the shadows it must draw the whole scene in its shadow map. so that massive plane is enlarging the scene and wasting resolution. using a spotlight means the map only has to be drawn for the area within the cone meaning you map covers a much smaller area and will appear much sharper.

    TBH though I never use shadow maps unless im doing hair.
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    Gasp that tutorial is talking about depth map shadows, I think someone from the 90's wrote it. Here are some easy steps to get that look you're after.

    1. Create a directional light.

    2. Turn on raytrace shadows for your directional light.

    3. Open render globals and turn on mental ray.

    4. Go to the quality tab and select "Production."

    5. Go to the indirect lighting tab and click the tick box for final gathering.

    6. In the indirect lighting tab under environment click on "Image Based Lighting> Create"

    7. A new window appears for the sky dome, set the type to texture instead of image and then click on the colour swatch and make that whatever colour you want, in that tutorial it's a light blue colour.

    8. Render your scene it should be exactly what you want. From there you can tweak the colour of your sky dome, the colour and intensity of your light, and the colour of your light's shadows. I'd avoid shadow colour though and use your sky dome to tint the shadow to the desired colour just like it works in real life.

    lightrig_01.jpg
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    4. Go to the quality tab and select "Production."
    This will slow down your render considerably, get your scene looking right first and then do this. You better off sticking with draft and upping the 'max sample level' a little under raytrace/scanline quality. that way you get a little bit of extra sharpness but dont enable things like Gauss filtering which is much slower than box.

    Also if your looking for good results its a good idea to use a HDR rather than just a colour swatch. your loosing so much potential if you just use 1 colour. IBL was invented to simulate the lighting of a specific place using photos of it.

    you can get some HDRs here:
    http://www.yboo.net/hdri/
    http://www.hdrmill.com/Freebies.htm
    http://www.crazy8studio.com/hdr.php [the best of the lot]


    Another thing to do is to go into your directional lights 'raytrace shadow attributes' and set the light angle to something like 2 or 3 and the shadow rays to something like 32.

    Without this your shadow is hard. adding to the light angle with soften the shadows more. softening the shadows needs more samples because of the noise softening introduces. so get the softness to a value you like and then increase the samples till you get it looking clean.
  • malcolm
    Options
    Offline / Send Message
    malcolm polycount sponsor
    I don't agree with the box thing, I use production with triangle filter set to 1 and 1 and min/max samples set to 0 and 1, this will give you no antialiasing while you are tuning your render. Using box looks blurry and will make you misjudge the quality of your render while you are working on it, especially when it comes to final gather and global illumination since they are dependent on how blurry the render is, ie the final gather works by gauss blurring the result and when you use box filter it will blur your render and hide speckles so you'll have to retune the settings so what's the point. Using HDR cube maps or probes are great if you're trying to light your scene to look exactly like that place the probe was shot, saying that a probe is better than a solid colour or a ramp is misleading, I wouldn't use a probe to light my environments it's too specific and takes much longer to tune. If your environment's empty or there is no background I find probs extremely helpful as a reflection. They're also great for product shot type renders, but as a first choice while building a light rig for an environment I'd avoid them.
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    My comment about box was too broad indeed. what im trying to stress is fast results while doing your lighting are essential to making it a timely process. turning on 16X samples and the Gauss filter from the get go is overkill.

    so far as the environment goes a ramp is fine. you get some variation in that. a flat colour is pointless though. your loosing a massive amount of potential for no reason what so ever. I dont disagrees about environments if you have surrounding geometry and local colour information your sorted. If your rendering something on its own on a plane you gain a massive amount by using a probe.
Sign In or Register to comment.