Z-depth explained..and can it be done in hitfilm

Hi, 

I done a quick search for z-depth and only found lack luster queries and responses,

I'm sure it can be done it HItfilm , I'm just wondering if anyone has solved it before I re-create the wheel.

Imagine a single image with an alpha channel.)lets say its a bunch of boxes in a room (box 1m*1m*1m*) Scene is 40 meters deep, now imagine the same alpha channel with gradients of grey and white at 1m,2m,3m, 4,5,6 as far as 10 meters

Then a second alpha channel gradient at 20 meters,24 meters 28,3236,40

If you keyframe the blur contribution on an alpha you can "refocus the camera"  check out ,the third and the seventh by Alex Roman ..its after effects, not hitfilm but its the premise around the query...

If you can apply these to a still image (with adjustment of blur, you create a depth of field), in 3d this is z-depth..ie how far you want to apply a blur  from the camera (the z of the lens) and when you want definition of subject, followed by background blurring but applied in post not direct rendering.

Applying z depth to a 3D render is bad practice, as sometimes you need to refocus the camera to another area, z-passes do this with a fast render time, if it is in the initial render it means another run of rendering..

I'm sure when of the video gurus here have figured it out and if someone can point me in the direction of the requests page, I'll place a request.

For me its one of the most important things in a video package, I hope I missed the tutorial on how to do this. 

K

I'm going to give a go at creating this, but would love if someone has figured this out already without making several masks and composites...

Comments

  • Triem23Triem23 Moderator
    edited July 2016

    In general, Hitfilm doesn't require Z-Depth renders for 3D composites set up inside Hitfilm itself. Hitfilm's cameras support DoF, and Hitfilm's "3D Unified" compositing space allows particles and 3D models to share a single 3D space with proper occlusion inside a Composite Shot (unlike AE where z-depth and occlusion maps are required). So the Hitflm workflow, yes, has you rendering DoF on output.

    Hitfilm itself doesn't have tools for rendering z-passes.

    If you're rendering in another 3D program, you can import z-depth passes rendered from that software for use in Hitfilm.  Things like Color Curves, Levels Histogram, Color Cycle, and/or Color Phase can be used to shift around the grey values of the the Depth Map for use as a matte layer.

    Wishlist thread is here: http://hitfilm.com/forum/discussion/38770/the-hitfilm-wishlist-what-features-do-you-want#latest

  • edited July 2016

    Thanks Triem23, I'll do some further testing based on your info..

    Getting slightly caught out on different import options and usage with Hitfilm.

    I work with 3ds Max.

    So I can output the z-depth pass and mess with it (changing levels etc to refocus the camera)(hopefully) (https://vimeo.com/41287940)

    I'm awful with the correct terminology to be used in video.You mentioned that it can be done, just wondering if you can point me to a how it can be done.:)(workflow)

    For the sake of argument, pick a still image  lets say a room with a table and chairs and then just have the camera refocusing on that image,

    With a bunch of different z depths, I can do this and swop and change them as I please..

    Lets say I want to focus on each chair one after the other, to me its keyframing the blur, I just dont know the correct approach with hitfilm, where do I "plug in" this pass

    If I knew the right phrases to look for I'd probably find It in the tuts, any chance you can tell me what to look for?

    Thanks

    K

  • Triem23Triem23 Moderator

    Ok, for doing Lens Blur in post. 

    In a Composite Shot, add your z-pass layer. In a second Composite Shot, add your base render. 

    From the media panel, drag in the  Z-depth Composite Shot. In Hitfilm we call a Composite Shot added as a layer to another Composite Shot "Embedded." In After Effects it's called a "Precomp." Go ahead and hide it. 

    Add the Lens Blur effect to the render layer. In the Lens Blur Controls set the source layer to the Z-depth Composite and use the Focal Distance to rack. I'm not in Hitfilm right now, so I'm not certain, but I think you can assign a scale distance. 

    The reason the Z-depth is Embedded is in case you want to add effects to it. When a Hitfilm plug-in uses a Source Layer it sees that layer "raw." This means it's not seeing transformations, movement, masks, scaling, or effects. By Embedding the Z-depth in a Composite Shot means any effects added in the Z-depth Composite  will carry to the Render Composite. The effected Composite Shot "bakes in" the changes so they carry over. 

  • Sweet!!...Thanks Triem...I'll give it a go and see how much I can tweak:)

    Many thanks..I'll try and post my efforts for the next newbie..

    K

  • Hi Triem,

    That worked a treat..I'm amazed at what a bit of Testing  can do :) and keyframing :)Slightly different to my normal work flow but it does the trick.

    Huge thanks....

    I sense a new workflow happening :)

    I have two more Q's, 

    1.Is zoom to specific area? (I have an overall shot around 2km out and then have to zoom to a building 100 meters out)The zoom area is top leftish..:).

    Imagine zooming in on the planet to a specific location..

    I presume the tuts are there but I can't find them as I dont know the name:)

    I have my 720 hd shot (1280x720)(2km out) and I also have a zoomed in shot (5120x2880) which I will scale to fit ( need the detail)

    The zoom effect seems to work from a center pivot, I want to expand a specific area, if that makes sense...do I have to scale and keyframe? Or is there a better way? .

    2.Arrows from a point.(curving arrows-gleam-direct line fireworks, starting @0,0 and moving to different city's ( DHL like)

    I need to make arrows shooting from one location, to several points across Europe/world with a curve, ie the go up and then accross.Is there a fast way to do this?

    I can do the initial render in 3dsmax and composite, just wondering if there is some trick with fireworks or the like to make this faster?

    Any tuts you know of would be great..

    Also if you get what I'm saying, can you give me the correct terminology if possible..Little dictionary of terms would help me make queries easier too.

    Many Thanks

    K

     

     

Sign in to comment