Author Topic: Zdepth for height map creation -script?  (Read 544 times)

2023-12-17, 22:31:42

lupaz

  • Active Users
  • **
  • Posts: 954
    • View Profile
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
« Last Edit: 2023-12-18, 14:39:55 by lupaz »

2024-01-03, 10:00:01
Reply #1

Avi

  • Corona Team
  • Active Users
  • ****
  • Posts: 507
    • View Profile
Have you used "Use Camera Envrionment Range" ? If yes, then what is the issue?
Arpit Pandey | chaos-corona.com
3D Support Specialist - Corona | contact us

2024-01-03, 15:30:16
Reply #2

lupaz

  • Active Users
  • **
  • Posts: 954
    • View Profile
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.

2024-01-03, 15:49:02
Reply #3

Aram Avetisyan

  • Corona Team
  • Active Users
  • ****
  • Posts: 561
    • View Profile
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.
Aram Avetisyan | chaos-corona.com
Chaos Corona Support Representative | contact us

2024-01-03, 17:31:49
Reply #4

lupaz

  • Active Users
  • **
  • Posts: 954
    • View Profile

2024-01-03, 19:37:44
Reply #5

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8856
  • Let's move this topic, shall we?
    • View Profile
    • My Models
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.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2024-01-03, 20:17:15
Reply #6

lupaz

  • Active Users
  • **
  • Posts: 954
    • View Profile
Thank you Romullus.

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

Please, feel free to archive/delete this suggestion.

Sorry about that.