POV-Ray : Newsgroups : povray.general : environment mapping : Re: environment mapping Server Time
5 Aug 2024 14:15:41 EDT (-0400)
  Re: environment mapping  
From: Warp
Date: 7 Sep 2002 15:56:32
Message: <3d7a59f0@news.povray.org>
Gilles Tran <git### [at] wanadoofr> wrote:
> -> Search the help for environment mapping
> -> Read 6.4.2.8  Spherical projection
> -> Create a scene and render it using spherical mapping (angle 360,180)
> (see the scene spherical.pov in the demo scenes)
> -> Use the resulting image as a map on your object :      image_map{sys
> "envmap" map_type 1}
> -> Should like nice enough in some situations

  This basically projects the scene onto the surface of the object (towards
the origin). Environment mapping does more than this (if well done).
  In (well-implemented) scanline rendering environment mapping works in the
same way is if you put the environment map as sky_sphere and make your object
reflective. That is, the rendering engine takes the value from a place in the
map that corresponds to the true reflection (ie. taking into account the
normal vector of the surface at the current point as well as the direction
of the camera). It involves some similar math that a raytracer does (even
though no rays are traced, of course).

  To get environment mapping, make a sky_sphere with your map (which could
be generated by rendering a scene with a spherical camera or whatever) as
as spherical map and simply make your object reflective. If there are no
other objects in the scene, you'll get exactly the same environment mapping
as in scanline renderers (if there are other objects, they will be reflected
as well, unless they have no_reflection defined).
  Of course the advantage of doing this is debatable.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

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