POV-Ray : Newsgroups : povray.animations : animated credits, on-screen display... : Re: animated credits, on-screen display... Server Time
28 Jul 2024 20:35:14 EDT (-0400)
  Re: animated credits, on-screen display...  
From: Chris Colefax
Date: 23 Aug 1998 02:09:34
Message: <35DE91C3.45209BE1@geocities.com>
Peter Popov wrote:
> 
> If anyone's interested in making a credits screen or some on-screen display
> (like in Descent, Tie Fighter etc.), here's an idea I have used with
> success.
> 
> Get Chris Colefax's lens effects .inc . Find the line
> 
> #declare _LE_baseobj  = disc {0, z, .999 finish ... etc.
> 
> and comment it out (there is no problem according to the copyright info in
> lnsefcts.txt chapter 6.0). Save the modified file under a different name
> (say mylens.inc) Then in your .pov you #declare _LE_baseobj yourself, it
> being credits, ship info, whatever. See the enclosed zip for an example (it
> is a part of an anim I am doing, so please ask if you're to use it... the
> tilt indicator is buggy anyway, any ideas?). The text (or other objects)
> should be in the x-y plane, and as flat as possible. Experiment to see. As
> far as I remember a box { <-2.25,-1.55,-0.00001>, <2.25,1.55,0.0000001> }
> covers almost a full screen, but that's very easy to check out.

While it's true I have no problem with people using my include files in
this way, it is actually possible to do exactly what you describe
without having to modify the main LNSEFCTS.INC file at all.  Although I
would usually recommend using _LE_baseobj when creating custom lens
flares, glows and the like, there's no reason why you have to use this
object.  Instead, you can place your desired objects (text, CSG,
triangles, image_mapped polygons, etc.) directly into your custom
effects file.  Similarly, you don't have to use the suggested transmit
pow(x, _LE_intensity) when texturing your objects - all of these aspects
are entirely up to you.

The important thing when creating a custom effect is to scale the
object(s) by the _LE_scale value first (which will make sure it remains
at the correct size, regardless of the camera angle/direction).  Then,
you must translate it by _LE_translate if you want the custom effect to
move as you change the effect_location.  If you don't want to move the
effect using the effect_location (ie. you want to position the effect in
the same place, as the camera moves) you should translate it so it sits
at z = 1, eg. to place some text in the bottom-right corner of the
image:

   text {ttf "Arial", "Title", .1, 0
      texture {P_Silver1}
      scale .1 translate <.8, -.6, 0>

      scale _LE_scale translate z}

Finally, the scale _LE_lensscale #declare _LE_lensscale... is required
if you want the custom effect to work like the built-in effects, using
the effect_always_on_top option.  This will make sure that the custom
effect objects don't interfere with any other objects in the scene.  If,
on the other hand, you always want the custom effect a certain distance
from the camera, you can just scale by this distance instead, eg. scale
.5 at the end of the above object would mean that the text is always
half a unit in front of the camera.

As you show in the scene you attached, *.LFX files can be used for a
great many camera related effects, not just the traditional flares and
glows.  If you (or anyone else) want more information about how to
create custom effect files I'd be quite happy to help as best I can.


Post a reply to this message

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