Jump to content

Script to generate zdepth for displacement


yp
 Share

Recommended Posts

Hi,

 

anybody knows a script to generate a zdepth pass (along with other selected render elements, vray) from a selection of objects to use it as as displaced texture for quicker rendertimes and better scene handling?

 

Kind of a one click solution for the common task:

 

eg. set up a plane with scattered elements (eg. gravel), position a camera orthogonal to this plan, render out a zdepth pass with closest boundary to fit the objects. Then applied to a plane with vraydisplacement mod gives quite close results (except from looking to close and low angle)

 

Setting this scene up manually is a little time consuming, may not be perfectly 90°, needs to be adjusted and is more or less limited to a vertical projection.

 

A script could ease this process by maybe just selecting the objects and the script takes care of setting up camera and parameters - and could even simply place the camera orthogonal to the objects even if they are not horizontal only...

 

I hope this explanation wasnt too confusing and even more I hope there IS some script like this out there and that someone can point me to it.

 

Thanks in advance

Link to comment
Share on other sites

Hi Dean,

 

thanks for your response.

Yes, your're definitely right, don't know why I didn't think of this myself.

Actually you need to set up the whole scene properly to have a correct diffuse lighting to get a correct and evenly lit diffuse texture along with the displacement!

 

So even if it would be nice to just select a bunch of objects and run a script which generates a z-depth map and maybe even applies it properly after (corresponding displacement hight and so on..) this would / could be a problem.

 

Anyway, to create some "displacement-texture" your advise works fine.

 

;)

 

Niko

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...