POV-Ray : Newsgroups : povray.general : Layered textures vs. sky_sphere Server Time
5 Aug 2024 18:21:29 EDT (-0400)
  Layered textures vs. sky_sphere (Message 1 to 9 of 9)  
From: Tom York
Subject: Layered textures vs. sky_sphere
Date: 20 Aug 2002 04:55:05
Message: <web.3d6202799e8fd800541c87100@news.povray.org>
I have three pigments applied to a sky_sphere in conventional fashion. Now,
I'd like to replace the sky_sphere with a sphere (suitably scaled), and
apply the three pigments to that. I've done this, converting the three
pigments to textures with

#declare Layer1P = pigment { ... }
#declare Layer2P = pigment { ... }
#declare Layer3P = pigment { ... }

#declare Layer1T = texture {
  pigment { Layer1P }
  finish { ambient 1 diffuse 0 }
 }

#declare Layer2T = texture {
  pigment { Layer2P }
  finish { ambient 1 diffuse 0 }
 }

#declare Layer3T = texture {
  pigment { Layer3P }
  finish { ambient 1 diffuse 0 }
 }

and then applying Layer1T...Layer3T to the sphere using

sphere {
    <0, 0, 0>,
    1

    hollow

    texture { Layer1T }
    texture { Layer2T }
    texture { Layer3T }

    scale 100000
   }

The problem is that this does not produce a background that looks like the
sky_sphere with its three pigments (Layer1P...Layer3P). I can see all three
layers in both cases, but the image contrast in the sky_sphere version is
far better than for the layered texture sphere version - the sphere version
looks very "flat" by comparison. Some layers use filter, transmit or both
in the pigment. How can I make the sphere version look like the sky_sphere
version?

Thanks,

Tom


Post a reply to this message

From: Christopher James Huff
Subject: Re: Layered textures vs. sky_sphere
Date: 20 Aug 2002 11:16:30
Message: <chrishuff-A673ED.10033120082002@netplex.aussie.org>
In article <web.3d6202799e8fd800541c87100@news.povray.org>,
 "Tom York" <tom### [at] compsocmanacuk> wrote:

> The problem is that this does not produce a background that looks like the
> sky_sphere with its three pigments (Layer1P...Layer3P). I can see all three
> layers in both cases, but the image contrast in the sky_sphere version is
> far better than for the layered texture sphere version - the sphere version
> looks very "flat" by comparison. Some layers use filter, transmit or both
> in the pigment. How can I make the sphere version look like the sky_sphere
> version?

Hmm, I didn't even know sky_spheres supported layered pigments until I 
looked at the source...
You are taking a bit of a roundabout way of creating the textured 
sphere, but that shouldn't affect the results. Are all three pigment 
layers partially transparent? Maybe you have a background color that is 
visible through the sphere texture.
Most likely it is some difference between the sky_sphere layering of 
pigments and the shape layering of textures, a bug or just a design 
decision. You might be able to get better results by playing around with 
the filter and transmit values.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: jfmiller
Subject: Re: Layered textures vs. sky_sphere
Date: 20 Aug 2002 17:04:20
Message: <3d62aed4@news.povray.org>
Shooting form the hip here but,

The Sky sphere is calculated for any ray the doesn't intersect anything
else.  and while Im not sure of this I think it is a camera effect (i.e. the
sky will be the same regardless of camera location)

A "real" Sphere has a surface which calculus will tell appears flat at a
suitably large scale.   in otherwords what you have done is to make the sky
a very high flat plain.  try shrinking the sky and see if it doesn't look
better.

JFMILLER

"Tom York" <tom### [at] compsocmanacuk> wrote in message
news:web.3d6202799e8fd800541c87100@news.povray.org...
> I have three pigments applied to a sky_sphere in conventional fashion.
Now,
> I'd like to replace the sky_sphere with a sphere (suitably scaled), and
> apply the three pigments to that. I've done this, converting the three
> pigments to textures with
>
> #declare Layer1P = pigment { ... }
> #declare Layer2P = pigment { ... }
> #declare Layer3P = pigment { ... }
>
> #declare Layer1T = texture {
>   pigment { Layer1P }
>   finish { ambient 1 diffuse 0 }
>  }
>
> #declare Layer2T = texture {
>   pigment { Layer2P }
>   finish { ambient 1 diffuse 0 }
>  }
>
> #declare Layer3T = texture {
>   pigment { Layer3P }
>   finish { ambient 1 diffuse 0 }
>  }
>
> and then applying Layer1T...Layer3T to the sphere using
>
> sphere {
>     <0, 0, 0>,
>     1
>
>     hollow
>
>     texture { Layer1T }
>     texture { Layer2T }
>     texture { Layer3T }
>
>     scale 100000
>    }
>
> The problem is that this does not produce a background that looks like the
> sky_sphere with its three pigments (Layer1P...Layer3P). I can see all
three
> layers in both cases, but the image contrast in the sky_sphere version is
> far better than for the layered texture sphere version - the sphere
version
> looks very "flat" by comparison. Some layers use filter, transmit or both
> in the pigment. How can I make the sphere version look like the sky_sphere
> version?
>
> Thanks,
>
> Tom
>
>


Post a reply to this message

From: Christopher James Huff
Subject: Re: Layered textures vs. sky_sphere
Date: 20 Aug 2002 18:27:54
Message: <chrishuff-1B8766.17132820082002@netplex.aussie.org>
In article <3d62aed4@news.povray.org>,
 "jfmiller" <jfm### [at] hotmailcom> wrote:

> The Sky sphere is calculated for any ray the doesn't intersect anything
> else.  and while Im not sure of this I think it is a camera effect (i.e. the
> sky will be the same regardless of camera location)

It is the same regardless of ray origin. It only uses the direction of 
the ray. The color is taken from the point on a unit sphere where the 
ray would point if its origin were < 0, 0, 0>, in other words the 
direction is the evaluation point.


> A "real" Sphere has a surface which calculus will tell appears flat at a
> suitably large scale.   in otherwords what you have done is to make the sky
> a very high flat plain.  try shrinking the sky and see if it doesn't look
> better.

It appears flatter when you are on the surface of the sphere. We are 
inside the sphere, very near the center. The bigger the sphere is, the 
closer it will be to an "infinite sphere" with the ray origin at the 
center, just like the sky_sphere background effect.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Mike
Subject: Re: Layered textures vs. sky_sphere
Date: 20 Aug 2002 19:35:05
Message: <web.3d62d138f0f0662e8b0b6f760@news.povray.org>
I tested this using your syntax and two pigment/texture layers. I get
identical results for both the skysphere and the scaled sphere.

Could you post the exact pigments you are using?


Post a reply to this message

From: Tom York
Subject: Re: Layered textures vs. sky_sphere
Date: 21 Aug 2002 16:05:06
Message: <web.3d63f1d5f0f0662e541c87100@news.povray.org>
Mike wrote:
>I tested this using your syntax and two pigment/texture layers. I get
>identical results for both the skysphere and the scaled sphere.
>
>Could you post the exact pigments you are using?
>

See

http://www.compsoc.man.ac.uk/~tomy/temp/skysphere.html

where there is a link to the problem code and four images (JPEGS totalling
~80KB) illustrating the problem.

The two images on the left of that page appear nearly identical; they use
layered textures (pigments) on the sphere (sky_sphere) that do not contain
any filtered transparency.

The two images on the right are identical to the first two except that they
use filtered transparency in the layered textures/pigments. There is an
obvious contrast difference.


Post a reply to this message

From: Mike
Subject: Re: Layered textures vs. sky_sphere
Date: 21 Aug 2002 22:10:03
Message: <web.3d64474bf0f0662e8b0b6f760@news.povray.org>
I found the answer:  The problem isn't with the sphere, it is with the
sky_sphere.

The sky_sphere does not handle filtered transparency. It acts as if you
specified rgbt even if you use rgbf. If you specify both (rgbft) then the
sky_sphere adds the two values together and treats the sum as rgbt.
  So your textures were working correctly on the sphere, they were NOT
working correctly on the sky_sphere!

Examples of how sky_sphere apparently reads colors:
rgbt<0, 0, 0, 1>                   = rgbt<0, 0, 0, 1>
rgbf<0, 0, 0, 1>                   = rgbt<0, 0, 0, 1>
rgbft<0, 0, 0, 0.4, 0.6>           = rgbt<0, 0, 0, 1>
rgbft<0, 0, 0, 0.1, 0.5>           = rgbt<0, 0, 0, 0.6>

!!!


Post a reply to this message

From: Tom York
Subject: Re: Layered textures vs. sky_sphere
Date: 23 Aug 2002 09:55:30
Message: <web.3d663ce5f0f0662ecd15d6aa0@news.povray.org>
Mike wrote:
>I found the answer:  The problem isn't with the sphere, it is with the
>sky_sphere.
>
>The sky_sphere does not handle filtered transparency. It acts as if you
>specified rgbt even if you use rgbf. If you specify both (rgbft) then the
>sky_sphere adds the two values together and treats the sum as rgbt.
>  So your textures were working correctly on the sphere, they were NOT
>working correctly on the sky_sphere!

I tried converting the textures applied to the sky_sphere by adding the
filter/transmit channel values for the pigments I was using. I fail to
duplicate the results, possibly because one of the pigment entries has 1 in
both filter and transmit; adding them together as a transmit value seems to
make the pigment brighter.

This behaviour does seem a little bizarre; reviewing the POVRay 3.5
documentation, I found no mention of this problem. Could it be connected
with the changes that were made to correct the behaviour of filter and
transmit in layered textures? Maybe the fixes were applied to ordinary
layered textures but not to the layered pigments of sky_sphere?


Post a reply to this message

From: Christopher James Huff
Subject: Re: Layered textures vs. sky_sphere
Date: 25 Aug 2002 19:23:58
Message: <chrishuff-7D38D8.19240325082002@netplex.aussie.org>
In article <web.3d663ce5f0f0662ecd15d6aa0@news.povray.org>,
 "Tom York" <tom### [at] compsocmanacuk> wrote:

> This behaviour does seem a little bizarre; reviewing the POVRay 3.5
> documentation, I found no mention of this problem. Could it be connected
> with the changes that were made to correct the behaviour of filter and
> transmit in layered textures? Maybe the fixes were applied to ordinary
> layered textures but not to the layered pigments of sky_sphere?

I think this is what happened, the sky_sphere code is completely 
separate from the layered texture code, and I don't think the 
possibility of layering sky_sphere pigments is well known...at least, I 
didn't know about it. It probably just got overlooked.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
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.