|
|
"Kenneth" <kdw### [at] gmailcom> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
>
> >
> > I also have some formulas for scaling something so that it's always at least a
> > pixel wide. I may add that so the apparent size never drops below a pixel.
> >
>
> That sounds interesting; I've never tried anything like that. If it's not too
> complicated to explain, *I'm* all ears. ;-)
So, define a Location and a LookAt variable for use in your camera definition
(and an optional Angle), and then plug those into this:
// Check if user-defined camera angle is used, otherwise set to default
#ifndef (Angle)
#local Angle = 67.38;
#end
#local M = (0.5*Aspect)/tan(radians(Angle/2));
#local Dist1 = vlength (ObjectLocation-Location);
#local ZA1 = Dist1/M;
#local Rad1 = ((ZA1/image_width)*Aspect);
A cylinder with Rad1 ought to give you a visible object at any distance.
Post a reply to this message
|
|