POV-Ray : Newsgroups : povray.general : billboarding and vector functions Server Time
19 Nov 2024 03:48:45 EST (-0500)
  billboarding and vector functions (Message 1 to 3 of 3)  
From: Jeff Nighbert
Subject: billboarding and vector functions
Date: 28 May 2002 12:32:47
Message: <3CF3B129.138D14C2@or.blm.gov>
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


Post a reply to this message

From: Christoph Hormann
Subject: Re: billboarding and vector functions
Date: 28 May 2002 12:48:30
Message: <3CF3B4DE.9F133A0E@gmx.de>
Jeff Nighbert 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?

In POV-Ray 3.5 try 'Reorient_Trans()' from 'transforms.inc',
'camera_location - object_position' as Axis2 and the direction on the
object you want to face to the camera as Axis1.

You might also have a look at 'screen.inc' maybe that's just what you are
looking for.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 05 May. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: nospam
Subject: Re: billboarding and vector functions
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.