POV-Ray : Newsgroups : povray.general : billboarding and vector functions : Re: billboarding and vector functions Server Time
6 Aug 2024 04:20:14 EDT (-0400)
  Re: billboarding and vector functions  
From: nospam
Date: 3 Jun 2002 21:55:36
Message: <3cfc1baa.7382639@localhost>
On Tue, 28 May 2002 09:32:41 -0700, Jeff Nighbert
<jni### [at] orblmgov> wrote:

>Hi folks,
>I am a new-bee and I need to know how to cause my objects to always
>"face the camera"    (In other words I would like to have an image
>texture on a plane be perpendicular to the camera at all times.(such as
>trees, clouds, other texture images.)) I have tried several of the
>vector functions, but I haven't come across the right one.  Could
>someone help me or give me an example?
>Jeff
>

You mean like a heads up display?

While it is klunky, the following method works for me.  Have the
camera be at <0, 0, 0>, facing +Z-ward.  Before the camera,
make a macro called "camera_transforms()" which would be all of
the rotations and translations to aim and position your camera.

Now, for all objects that "overlay" the camera, translate them
one unit Z-wards and then put a call to "camera_transforms()"
as the last thing in the object before the closing bracket.

In v3.5, you can put the no_shadow and no_reflection keywords
on your overlay objects

A few weeks (months?) I posted code that does this.  If you
really want, I could most more code, but i strongly suspect
it would be easier for you to write it on your own than to
go through my pov-code.

Pete

-- 
My email has changed: no longer Pet### [at] nymalias .... now it
is ikd### [at] sneakemailcom


Post a reply to this message

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