Replay Mod Forums

Render a Z Depth Map as a multi-pass file
    • User
    • 46 forum posts
    User23429
    #1

    Jan 07 16, 01:46 AM

    So whatever the type of render you are into (default, equirectangular, VR, ect...) you can check in the advanced options to render the Z Depth Map of the scene as a separate file

    A Z Depth Map is a grayscale image where the closets object is white and the furthest object is black, this allows for some cool cinematic tricks in post production (tilt-shift, desaturate far away objecs, ect...)
    See Wikipedia:https://en.wikipedia.org/wiki/Depth_map


    • User
    • 47 forum posts
    User12470
    #2

    Jan 07 16, 05:24 PM

    This would be really cool. I can think of a million things you could accomplish with this. It shouldn't be too hard to implement either.


    • Developer
    • 818 forum posts
    User1
    #3

    Jan 07 16, 07:16 PM

    Huh, I like the idea, but have no idea how that would be implemented.


    • User
    • 47 forum posts
    User12470

    in response to User1

    #4

    Jan 07 16, 07:23 PM | Last edited: Jan 07 16, 07:23 PM


    Huh, I like the idea, but have no idea how that would be implemented.

    Your welcome:
    http://stackoverflow.com/questions/16352530/jogl-2-0-render-depth-buffer-to-texture
    Should give you a general idea


    • Developer
    • 818 forum posts



    Huh, I like the idea, but have no idea how that would be implemented.

    Your welcome:
    http://stackoverflow.com/questions/16352530/jogl-2-0-render-depth-buffer-to-texture
    Should give you a general idea

    Thanks, I was thinking about using a GLSL Shader, but this looks even simpler.



    • Developer
    • 818 forum posts
    User1
    #6

    Jan 07 16, 07:58 PM

    Just leaving this here for future reference: http://forum.lwjgl.org/index.php?topic=1542.0


    • Developer
    • 818 forum posts
    User1
    #7

    Jan 07 16, 08:25 PM

    Would you like your Depth Map linearized?


    • User
    • 46 forum posts


    Would you like your Depth Map linearized?

    Hum, i don't know what you mean by that sorry
    I usually use this feature in Cinema 4D as a MultiPass and it just works right away


    • Developer
    • 818 forum posts



    Would you like your Depth Map linearized?

    Hum, i don't know what you mean by that sorry
    I usually use this feature in Cinema 4D as a MultiPass and it just works right away

    Can you please provide some comparison screenshots of the original render and a depth map of something you created in C4D?


    • User
    • 46 forum posts
    User23429
    #10

    Jan 08 16, 06:50 PM

    I'm currently running on Linux, i'll reboot to Windows and send you some examples



    • User
    • 46 forum posts
    User23429
    #11

    Jan 08 16, 07:47 PM

    Here's the album: http://imgur.com/a/3c9I7

    It's been a while since the last time i did this, and i forgot that C4D needs you to manually specify the distance at which the scene ends from the camera

    Also you can see that the depth map has a white background, ideally that would be trasparent
    So i don't really know how this works on video animation (i primarily do still renders) as the farthest (pure white) object moves constantly in the scene


    • Developer
    • 818 forum posts
    User1
    #12

    Oct 30 16, 06:33 PM

    Look at this video for a solution:




    • User
    • 46 forum posts


    Look at this video for a solution:



    Awesome work!