POV-Ray : Newsgroups : povray.binaries.animations : Going Through The Wormhole Portal ( link ) : Re: Going Through The Wormhole Portal ( link ) Server Time
18 Jul 2024 16:19:02 EDT (-0400)
  Re: Going Through The Wormhole Portal ( link )  
From: Rune
Date: 2 Aug 2004 19:48:40
Message: <410ed2d8$1@news.povray.org>
Slime wrote:
> Pretty crazy. If I had to guess how you did it, I'd say you made one
> of the environments no_image and the other no_reflection, and then
> made the portal object reflective, switching the
> no_image/no_reflection at the moment that the camera goes through the
> portal.

In theory this works in some cases, but in reality too many problems arise.
Either the two landscapes will have coincident surfaces, or else one will
cast shadows on the other, unless you give them no_shadow, but then you
loose the shadows. Some complex light_group system might work in some cases,
but I doubt it...

> The portal itself seems to start off as a sphere, but definitely
> changes shape (you can see this especially in the shadow). I think
> part of it flattens out just before the ship goes "through" it, so
> that you were able to merge the no_image ship with the no_reflection
> ship perfectly.

That's true. I had to use an isosurface for the shape. Torus+cylinder
doesn't work, as it gives curvature discontinuity, which is very visible on
reflective surfaces.

> As for the visual warping of the background before the portal
> appears, I have to assume you used nested objects with increasing
> ior, or maybe managed to use a disc with some sort of interpolated
> ior. Or maybe you used an object with a constant ior but a changing
> shape to control which camera rays bent and how much.

1) An object has to have some ior to bend rays.
2) Variable ior is not possible in POV-Ray.

How do you get a smooth transition between the distorted area and the
non-distorted area then?

Well, the only case where an object with ior can avoid bending a ray, is if
the ray is perpendicular to the surface. So I used a sphere centered at the
camera location and applied a normal to that. The radius of the sphere
equals the distance from the camera to the portal. I then intersected it
with a cone with its tip at the camera location, as well as another slightly
larger sphere. Viola! You have an object which has ior and yet does not bend
rays, except for the normal you specify. I then used a normal which is
strong in the center and fades out at the rim.

> Neat =)

Thank you! :)

Rune
-- 
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

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