POV-Ray : Newsgroups : povray.general : environment mapping Server Time
6 Nov 2024 10:26:02 EST (-0500)
  environment mapping (Message 1 to 10 of 21)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Rafal 'Raf256' Maj
Subject: environment mapping
Date: 6 Sep 2002 19:26:30
Message: <Xns9282DFAC8B21raf256com@204.213.191.226>
Hellow,
can I add standart environment mapping to be usend in reflectio of object ? 

ofcourse this is much more primitive then standart reflection, but
- it saves time
- can be used in some artistics effects
- allow to have POV scene acting same as in some other renderers

btw, about pigment as function - how about allow defining functions basing 
not only on x,y,z but alsow on u,v (uv-mapping) and nx,ny,nz (normal 
vector) ? 

-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: environment mapping
Date: 7 Sep 2002 05:57:08
Message: <Xns928278E68625Craf256com@204.213.191.226>
"Rafal 'Raf256' Maj" <raf### [at] raf256com> wrote in
news:Xns### [at] 204213191226 

> Hellow,
> can I add standart environment mapping to be usend in reflection of
> object ? 

from number of responses, I quess that environment mapping is NOT 
implemented :P 
So this is in fact a future request.

-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

From: Andrew Cocker
Subject: Re: environment mapping
Date: 7 Sep 2002 06:37:57
Message: <3d79d705$1@news.povray.org>
"Rafal 'Raf256' Maj" <raf### [at] raf256com> wrote in message
news:Xns### [at] 204213191226...
> from number of responses, I quess that environment mapping is NOT
> implemented :P
> So this is in fact a future request.

Yes, I thought it was a 'future request'. I was planning on answering you a week on
Friday

;-)

Andy Cocker


Post a reply to this message

From: Mike Williams
Subject: Re: environment mapping
Date: 7 Sep 2002 06:58:47
Message: <gv8z2CAOsde9EwrX@econym.demon.co.uk>
Wasn't it Rafal 'Raf256' Maj who wrote:
>"Rafal 'Raf256' Maj" <raf### [at] raf256com> wrote in
>news:Xns### [at] 204213191226 
>
>> Hellow,
>> can I add standart environment mapping to be usend in reflection of
>> object ? 
>
>from number of responses, I quess that environment mapping is NOT 
>implemented :P 
>So this is in fact a future request.

Whatever it is that you want to achieve with this environment mapping
can almost certainly be achieved with the existing features.

One method would be to paint your environment picture onto a sphere
which surrounds your scene. Set no_image on the environment sphere and
no_reflection on the objects in your scene that you don't want to be
reflected.

Another method would be to use a layered texture on your object. One of
the layers would a mirror image image_map of the environment.

But to produce the best result, and using the simplest code, I'd suggest
actually putting your environment into the scene and allowing it to be
truly reflected. Environment mapping is an ugly kluge for systems that
can't manage real reflections.

By the way, the spell checker on your news client seems to be severely
broken.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: environment mapping
Date: 7 Sep 2002 07:15:27
Message: <Xns9282862D56F53raf256com@204.213.191.226>
Mike Williams <mik### [at] econymdemoncouk> wrote in 
news:gv8### [at] econymdemoncouk

> Another method would be to use a layered texture on your object. One of
> the layers would a mirror image image_map of the environment.

how would example code look ?
 
> But to produce the best result, and using the simplest code, I'd suggest
> actually putting your environment into the scene and allowing it to be
> truly reflected. Environment mapping is an ugly kluge for systems that
> can't manage real reflections.

I know, but env_mapping can be _much_ faster even 300% or more faster in 
scenes with strong reflections. And it can be used to generate un-realistic 
but artistic images.

> By the way, the spell checker on your news client seems to be severely
> broken.

well if it is a problem You can always fix it using Yours news-reader KF ;)

-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

From: Christoph Hormann
Subject: Re: environment mapping
Date: 7 Sep 2002 08:03:47
Message: <3D79EB22.B5958C53@gmx.de>
Rafal 'Raf256' Maj wrote:
> 
> [...]
> 
> > But to produce the best result, and using the simplest code, I'd suggest
> > actually putting your environment into the scene and allowing it to be
> > truly reflected. Environment mapping is an ugly kluge for systems that
> > can't manage real reflections.
> 
> I know, but env_mapping can be _much_ faster even 300% or more faster in
> scenes with strong reflections. And it can be used to generate un-realistic
> but artistic images.

That's nonsense, you should not try to compare apples and pears.  True
environment mapping is only possible in a scanline renderer and
programming something similar in a raytracer will not be significantly
faster than using the no_image/no_reflection trick with an image mapped
object Mike mentioned.

I don't think there is anything useful that's possible with enviroment
mapping that won't work with true raytraced reflections and tricks like
no_image/no_reflection.

> > By the way, the spell checker on your news client seems to be severely
> > broken.
> 
> well if it is a problem You can always fix it using Yours news-reader KF ;)
> 

You just should notice that refusing to take some care about correct
typing clearly shows disrespect towards the readers of the posting.

Christoph

-- 
POV-Ray tutorials, IsoWood include,                 
TransSkin and more: http://www.tu-bs.de/~y0013390/  
Last updated 13 Aug. 2002 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Gilles Tran
Subject: Re: environment mapping
Date: 7 Sep 2002 08:05:38
Message: <3d79eb92@news.povray.org>

Xns### [at] 204213191226...
> Hellow,
> can I add standart environment mapping to be usend in reflectio of object
?

-> 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

G.


--
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: environment mapping
Date: 7 Sep 2002 08:53:37
Message: <Xns928296D2175E0raf256com@204.213.191.226>
"Gilles Tran" <git### [at] wanadoofr> wrote in news:3d79eb92@news.povray.org

> image_map{sys
> "envmap" map_type 1}

are You shure that this will act as reflection for non-spherical shapes ? 



-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

From: Gilles Tran
Subject: Re: environment mapping
Date: 7 Sep 2002 09:46:22
Message: <3d7a032e@news.povray.org>

Xns### [at] 204213191226...
> "Gilles Tran" <git### [at] wanadoofr> wrote in news:3d79eb92@news.povray.org
>
> > image_map{sys
> > "envmap" map_type 1}
>
> are You shure that this will act as reflection for non-spherical shapes ?

I tested it on the default blob of the insert menu (using a
Terragen-generated environment). Depends on whether you want it to be
accurate or just look good...Just try it and see if you like it (and if it's
worth it).

G.


--
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

From: Warp
Subject: Re: environment mapping
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

Goto Latest 10 Messages Next 10 Messages >>>

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