Home Technical Talk

Maya, Mental ray : baking shadow map issue

polycounter lvl 16
Offline / Send Message
funshark polycounter lvl 16
hi,
I still have problem when i try to bake light & shadow with the mental ray baking window : I'm using some shadow maps and the baked result is non-antialiased at all, especially with the direct light.

I've encircled the direct light case... but other ones have "artifacts" too

SHmap_issue.jpg

I've tried many options and parameters.... not lucky
If someone has the same problem and know how to pass through :poly134:

Replies

  • katzeimsack
    Options
    Offline / Send Message
    katzeimsack polycounter lvl 18
    hmm looks like your directional light only has one shadow sample.. (full shadow or no shadow) use more shadow samples for a smoother shadow...
  • funshark
    Options
    Offline / Send Message
    funshark polycounter lvl 16
    :)
    I've tried "20" in sampling and nothing changes
    Maybe it is not computed with the bake
  • bugo
    Options
    Offline / Send Message
    bugo polycounter lvl 17
    heh, i really dont know, but If i was you I would use Turtle
  • katzeimsack
    Options
    Offline / Send Message
    katzeimsack polycounter lvl 18
    not the sampling of the batchbake, the sampling of the shadow (shadowrays)
    soft_light.jpg
  • funshark
    Options
    Offline / Send Message
    funshark polycounter lvl 16
    The samples just do a little smooth ( very little one ) but don't solve the problem.
    And i don't want to use ray trace shadows like you mention; i know i won't have issue with RT
  • katzeimsack
    Options
    Offline / Send Message
    katzeimsack polycounter lvl 18
    hmm, you shadows look like you do use ray trace shadows, with only one shadow ray...

    so you are using shadowmapped lights? The filter size adjusts the softness.

    There is btw no reason to not bake ray trace shadows, they won't take much longer and the results are better...
  • funshark
    Options
    Offline / Send Message
    funshark polycounter lvl 16
    raytrace shadow with only one ray makes a nice sharp shadow, not like here.
    The softness is on the other lights and they do the same result, but less visible because of the randomness and contrast ( but look below the chairs at the center ).

    And raytrace shadows do take much longer.. because i don't have only one and want soft shadows
  • katzeimsack
    Options
    Offline / Send Message
    katzeimsack polycounter lvl 18
    ray traced shadows only make a sharp shadow if your lightangle is zero..

    THIS is a raytraced shadow with a lightangle of 1.5 and only 1 shadow ray and it exactly looks like your bake....

    raytrace.jpg
  • funshark
    Options
    Offline / Send Message
    funshark polycounter lvl 16
    i know all that...
    ( but i want a sharp shadow in the case of the direct light.. but i can't with shadow map :] )
    and if you increase the rays, the point density will increase too... reducting the noise.. and the rendering time will increase too : i'm trying to avoid that.

    But it seems shadow maps don't go with bake... so i will surely reconsider the heavy solution :/
  • sama.van
    Options
    Offline / Send Message
    sama.van polycounter lvl 14
    I think we can add that one in "You know why Max is -fucking- awesome?" Topic :)

    "Because a 5yo child can create lightmap himself haha..."

    hm hm anyway, I'll take some minutes about your render today ^_^.
  • rebb
    Options
    Offline / Send Message
    rebb polycounter lvl 17
    Are you absolutely sure that ShadowMaps don't show up in the Batch-Bake ?

    I just did a quick test and they were baked just fine.
  • katzeimsack
    Options
    Offline / Send Message
    katzeimsack polycounter lvl 18
    They show up fine...
    as i said before you just have to tweak the filter size. filtersize 0 means there is onlt shadow or now shadow. The higher the szie the softer the shadow. (you want a hard shadow, therfore size 1 or 2 should be goodd. A higher map size also helps.


    The sampels in the baking options seem to be a bad version of aa. Baking it in double the resolution and then scaling it down to the original size is better.
  • sama.van
    Options
    Offline / Send Message
    sama.van polycounter lvl 14
    That's funny, all the parameters for the "mentalrayGlobals" attribut disappeared in maya 2008....

    ................... really funny ................... my old script doesn't work anymore >_<
Sign In or Register to comment.