POV-Ray : Newsgroups : povray.unofficial.patches : Re: Ray teleportation and multiple spaces : Re: Ray teleportation and multiple spaces Server Time
15 May 2024 03:30:15 EDT (-0400)
  Re: Ray teleportation and multiple spaces  
From: Christopher James Huff
Date: 28 Feb 2006 10:46:51
Message: <cjameshuff-336BB8.10465828022006@news.povray.org>
In article <9um### [at] ddawsonfoo>,
 dda### [at] nospam-icehousenet (Daniel Dawson) wrote:

> You pick up and read article <43444e14$1@news.povray.org>, written by 
> Florian Brucker  <tor### [at] torfboldcom>. It says:
> >Would it be possible to have such a portal (A patch of Chris Huff called 
> >it like this IIRC) working in both directions? Following example:
> 
> Well, a google search revealed just one post on here, in which Mr. Huff posts
> an example image and a (now broken) link to a video. It looks exactly like 
> what
> I'm proposing. I see though he made it as a pigment. But to me, it acts more
> like reflection and refraction, so it makes more sense to make it a finish
> property.

Well, that was a long time ago...
This would really best be implemented as neither a pigment nor a texture 
attribute, but rather a type of scene-level object. What I did was 
transform the rays by a linear transformation, using the transformed 
intersection locations as the origins, effectively mapping the rays to a 
"phantom" copy of the portal object with those transformations applied.

Correct lighting and two-way portals could be done by testing shadow 
rays against those phantom objects and transformed versions of light 
sources. It should even be possible to do nonlinear mappings, though 
correct shadows and lighting would require photon mapping. It would 
probably be a good idea to use light groups to tell POV which lights can 
shine through the portal, to limit the number of lights duplicated and 
transformed. The full implementation would be a fairly complex and 
special-purpose patch, which is why I never pursued it. The partial 
implementation as a pigment is really quite simple, though.

-- 
Christopher James Huff <cja### [at] gmailcom>
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

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