POV-Ray : Newsgroups : povray.binaries.images : Chromadepth scaling to model : Re: Chromadepth scaling to model Server Time
12 May 2024 13:06:52 EDT (-0400)
  Re: Chromadepth scaling to model  
From: Kenneth
Date: 20 Feb 2018 10:50:00
Message: <web.5a8c4297b61f5657a47873e10@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

>
> finding the nearest part of the bounding box ought to be as simple as min (a, b,
> c, d, e, f, g, h) where a-h are distances from the camera to the bb corners.

Nice idea. I did it another way-- making a semi-transparent box object using the
min_extent/max_extent coordinates, with the box superimposed on my disc object.
I'm running some visual tests at the moment-- and those corner coordinates ARE
part of the problem, especially if the object happens to be pre-rotated. I'm
sifting through the results, and will report back.

What it looks like so far is that, if I (pre-)rotate the object before being
translated, the ''near' and 'far' bounding_box corners are actually rotating
along with the object-- i.e., their 'near' and 'far' relationship appears to be
reversing! (Or vlength is choosing the wrong corner?) My L_1/L_2 equation and
its #debug message bear this out. If that is expected behavior, it's a surprise
to me. Very mysterious.

Meanwhile, I did another test with my code to make sure the idea itself-- with
the various scalings and transformations-- is sound. (I made some visible sphere
objects that 'mimic' the location of camera and object, and the distance between
them.) It looks like the code itself is working exactly the way I intended.


Post a reply to this message

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