POV-Ray : Newsgroups : povray.advanced-users : Override textures/materials? : Re: Override textures/materials? Server Time
26 Apr 2024 00:05:50 EDT (-0400)
  Re: Override textures/materials?  
From: Bald Eagle
Date: 25 Jun 2021 16:55:00
Message: <web.60d64235eaa343741f9dae3025979125@news.povray.org>
I have essentially accomplished the end goal 4+ years ago, when I needed a depth
map for laser-engraving "2D" images in 3D relief.

I simply use the orthographic camera, union everything in the scene, find the
min and max z, normalize that to a 0-1 range, and then trace over every pixel
position of the image in the direction of the "direction" vector.
Then I create a 1 pixel-wide box with an rgb value directly proportional to the
normalized distance to the ray intersection point.
It's maybe 30 lines of code including the #debug statements.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.