Home Technical Talk

how to handle ambient occlusion with animation

polycounter lvl 8
Offline / Send Message
Klo Works polycounter lvl 8
hi,
I model a door and the selected part will have animation:



so if I bake the AO there will be shadow showing in the door which means if the selected part removed it will show dark shadow in the door. 

so how usually handle the AO with the animation part ? do I move the animation part away from the door and let the static mesh only bake?

...

Another question I notice in unreal4 the ao doesn't show anything?
which now I'm confused :X


Replies

  • AtticusMars
    Options
    Offline / Send Message
    AtticusMars greentooth
    In UE4 ao maps are only visible in shadowed portions of your mesh.

    For movable objects you need to use a realtime AO solution such as DFAO or SSAO
  • Klo Works
    Options
    Offline / Send Message
    Klo Works polycounter lvl 8
    In UE4 ao maps are only visible in shadowed portions of your mesh.

    For movable objects you need to use a realtime AO solution such as DFAO or SSAO
    so you mean the cube object will act if I move near to the other cube?
    is that mean it should be ok if I bake everything including the animation part "the red objects"?
    or I don't bake the red part and I use realtime ao?

    now I am done with hi-poly and low poly.
     planning to bake in substance painter.
    my map will include albedo metal rough and AO 
    so since I bake everything together will be a problem during the animation 
    so to solve it ,
    I will bake in substance painter but the red part I will "explode it " which mean I move it away from the door.
    is that the correct way to handle AO with the animation part? 





  • AtticusMars
    Options
    Offline / Send Message
    AtticusMars greentooth
    Klo Works said:
    In UE4 ao maps are only visible in shadowed portions of your mesh.

    For movable objects you need to use a realtime AO solution such as DFAO or SSAO
    so you mean the cube object will act if I move near to the other cube?


    AO from an AO map will only appear in areas that are not directly lit. The intensity of the AO will depend on the position/angle/intensity of the lightsource vs the surface.

    Main issue with realtime AO (namely SSAO) is that it only generates AO according to the geometry in the lowpoly mesh. Meaning it cannot account for details in your texture. For example say you have a flat plane with a screw hole in it but the screw hole is a normal map detail, SSAO doesn't know the hole is there and so it generates the AO as if it were a flat plane with no hole in it.

    Using an AO map solves this problem, but as you have discovered it works best with static meshes. With anything that needs to move you need to break the pieces apart so that they will not create issues when animating.

    In your case I would separate both the sliding pieces, the lock (and any individual piece of the lock that needs to animate) the framing, and the doors themselves all into individual objects and bake them with name pairing. Exploding is not necessary in Substance, use the name pairing feature.


  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    "Meaning it cannot account for details in your texture. For example say you have a flat plane with a screw hole in it but the screw hole is a normal map detail, SSAO doesn't know the hole is there and so it generates the AO as if it were a flat plane with no hole in it."

     This is not true. It does take normalmaps into account!

    To answer the original question, you could bake ao only for the parts that doesn't move, and let SSAO doing it on the moving parts.
  • AtticusMars
    Options
    Offline / Send Message
    AtticusMars greentooth
    My mistake, guess I should have doubled checked. Either way, solution is the same.
Sign In or Register to comment.