POV-Ray : Newsgroups : povray.newusers : Sky external Image? : Re: Sky external Image? Server Time
5 May 2024 06:41:53 EDT (-0400)
  Re: Sky external Image?  
From: clipka
Date: 15 Jul 2009 13:55:00
Message: <web.4a5e176841a4106ca95afc190@news.povray.org>
"Chrisir" <nomail@nomail> wrote:
> Do you have any code for a big box with image on
> *one* side?

Well, it doesn't seem to matter much how the other sides look, right? So I'd use
the following approach:

- Create a unit box (from <0,0,0> to <1,1,1>)
- Map the texture onto it using the default map_type (parallel projection)
- Translate the box by <-0.5,-0.5,-0.5> to be centered at <0,0,0>
- Scale the box non-uniformly by, say, 10000 and 10000*image_heigh/image_width
units, respectively
- Rotate the box to match the actual camera orientation (*)
- Translate the box to be centered at the actual camera location

(*) Ideally you use some suitable formulae here; if however you decide to tweak
the rotation manually, do the fine-tuning of the rotation parameters when you
have already implemented the final translation.


Post a reply to this message

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