Mike Horvath <mik### [at] gmailcom> wrote:
> I forgot that in my version of "screen.inc" I added a macro called
> "Get_Screen_XY" that takes any 3D scene coordinate as input and outputs
> the 2D screen coordinate, normalized between 0 and 1. This makes things
> super simple!
Hmmm. I recall that Screen.inc uses a -0.5 to +0.5 range.
Might you want to edit "Get_Screen_XY" to output THAT range, so that it would be
easy to align things on the screen with objects in the image,
and then rename the "Get_Screen_XY" to "Get_Image_XY" - since that might
disambiguate things a bit?
I suppose if you're ambitious enough - you could flip those macros around and
given a distance from the camera-right-up plane, you could return x,y,z
coordinates to place an object into the scene, so that it would line up with a
place on the screen or in the image.
> I just list whatever points I want to project, and then
> write the 2D locations to a text file.
Since the SVG is just a text file, and you can clearly follow the syntax - why
not just write the SVG header, output an SVG line definition, and add some
triangles or whatnot, and get your usable SVG straight from POV-Ray?
It would cut out a lot from the workflow.
Just a suggestion.
> I've attached "screen.inc" to this post.
Thank you :)
One thing that might be useful is to include some reminders and usage info for
output to the debug stream.
#declare Verbose = true;
in my scene, and then any macros or parts of the scene where I want to get data
from check for that variable and then I get everything I want with just one
I do the same thing with any weird command syntax that I use - I just output or
include in the comments a working line of code using that command.
Post a reply to this message