Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Feature Requests => Topic started by: lupaz on 2023-12-17, 22:31:42

Title: Zdepth for height map creation -script?
Post by: lupaz on 2023-12-17, 22:31:42
It'd be nice to have a one button solution for creating grayscale zdepth based height maps.
With one click you get the render element ready with the selected object's bounding box as the limits for black and white
Title: Re: Zdepth for height map creation -script?
Post by: Avi on 2024-01-03, 10:00:01
Have you used "Use Camera Envrionment Range" ? If yes, then what is the issue?
Title: Re: Zdepth for height map creation -script?
Post by: lupaz on 2024-01-03, 15:30:16
Hi Avi.

Yes. I did use environment range, but when you have a very thin object such as roof tiles (to create a displacement map from the geometry using zdepth), it's very tricky to set the environment range. Maybe adding a "set environment range for selected object" would be a nice to have.
Title: Re: Zdepth for height map creation -script?
Post by: Aram Avetisyan on 2024-01-03, 15:49:02
Hi,

I am a bit confused. Maybe the wording is the culprit.
What you are saying - thing object for displacement, "height maps" and Z-Depth are different things and are to be set up differently.

What is the exact thing you want to do? Maybe describing that can help.

Maybe you are looking for Projection modifier (with texture baking probably), for getting a height map (and not only), projected from an object to a surface, in a given ranges?
For that, you can have a look at this e.g.:

For Z-Depth, I believe there are enough and plenty of options to properly have it baked.
Title: Re: Zdepth for height map creation -script?
Post by: lupaz on 2024-01-03, 17:31:49
Okay. Thank you.
Title: Re: Zdepth for height map creation -script?
Post by: romullus on 2024-01-03, 19:37:44
Sorry to say, but technique shown in the video makes little sense. You don't need all that hassle with projection mapping and texture baking if all you need is to bake geometric details from a flat object. You just simply render it with ortho camera from top view and save render elements that you need. And unlike projection mapping and render to texture, it actually works with Corona.

@lupaz, i'm not sure why you're struggling with setting up correct z-depth min/max distance, i think it shouldn't be problematic no matter object's thickness.
Title: Re: Zdepth for height map creation -script?
Post by: lupaz on 2024-01-03, 20:17:15
Thank you Romullus.

You're right. It's not a big deal.

Please, feel free to archive/delete this suggestion.

Sorry about that.