Search Unity

Ghost effect using post-processing(like Motion Blur) way

Discussion in 'Image Effects' started by Ok_Computer, Apr 25, 2017.

  1. Ok_Computer

    Ok_Computer

    Joined:
    Sep 22, 2016
    Posts:
    10
    I already use cloning SkinnedMeshRenderer way to achieve the ghost effect.Now I just want use another way to do it.I just want blur my character in the scene.And I have two cameras.
    My first cam's Clear Flags is skybox, Culling mask is everything except my character and depth is 0.
    My second cam is a child of my first cam.It's Clear Flags is Don't clear,Culling mask is only my character, and depth is 1 .
    My problems:
    • I put the MotionBlur.cs(which provides by unity) on my second camera, but when my camera move, everything will blur, not just my character.
    • I read the code in MotionBlur.cs: Graphics.Blit (source, accumTexture, material); Graphics.Blit (accumTexture, destination); I notice accumTexture is a accumulation buffer, which stores the screen tex from the beginning. If accumTexture never clear, why my character's ghost is just a few amount. It should be a lot from the beginning to the end of moving.
     
    Last edited: Apr 25, 2017
  2. Ok_Computer

    Ok_Computer

    Joined:
    Sep 22, 2016
    Posts:
    10
    I really need some help. My deadline is coming.
     
  3. Ok_Computer

    Ok_Computer

    Joined:
    Sep 22, 2016
    Posts:
    10
    Ok.I tried very hard.And I don't think I can use two camera to do this.
    I make the first camera's Clear Flags is skybox, Culling mask is my character and depth is -1.
    And another camera's Clear Flags is Don't clear, Culling mask is everything except my character and depth is 0.
    And put the MotionBlur.cs to my first camera, just exchaged.
    the background is not blur anymore, but the player have a odd effect.I don't know why.It like a white mask on my character.
    I'm thinking about using RenderTexture to do it.But it's difficult to me.Who can give me some hints?
     

    Attached Files: