POV-Ray : Newsgroups : povray.general : Problems with media density patterns Server Time
10 Aug 2024 17:23:49 EDT (-0400)
  Problems with media density patterns (Message 1 to 6 of 6)  
From: Chris Huff
Subject: Problems with media density patterns
Date: 6 Nov 1999 13:20:29
Message: <3824720D.E00DEC03@compuserve.com>
While testing my new object pattern I ran into a problem where list
patterns don't seem to work in media. I tried it in the official
version(POV-Ray Mac version 3.1g.r1) with the same results.

When I use the colors after the checker keyword, I get:
    error: No matching } in density, color found instead.

If I remove the color statements, I get:
    error: Missing pigment

Here is the media code I was using:
        media {
            emission color rgb < 0.5, 0.1, 1>*0.5
            intervals 1 samples 10, 10
            variance 1/128 confidence 0.9
            density {checker color rgb <1,0,0> color rgb <0,0,0>}
        }

Am I just doing this wrong, or is there a bug in POV-Ray? I looked
through the source code, but so far have not succeeded in figuring out
what is going on.


Post a reply to this message

From: TonyB
Subject: Re: Problems with media density patterns
Date: 6 Nov 1999 13:33:04
Message: <38247460@news.povray.org>
>            density {checker color rgb <1,0,0> color rgb <0,0,0>}


I always thought you had to put a coma in between the colors. Haven't
tested, I hope this helps.


Post a reply to this message

From: Chris Huff
Subject: Re: Problems with media density patterns
Date: 6 Nov 1999 13:35:45
Message: <382475A3.E11F4C44@compuserve.com>
The comma is optional, but I get the error appears even with it.


Post a reply to this message

From: Ken
Subject: Re: Problems with media density patterns
Date: 6 Nov 1999 13:47:07
Message: <382477B0.B40D9280@pacbell.net>
Chris Huff wrote:
> 
> While testing my new object pattern I ran into a problem where list
> patterns don't seem to work in media. I tried it in the official
> version(POV-Ray Mac version 3.1g.r1) with the same results.
> 
> When I use the colors after the checker keyword, I get:
>     error: No matching } in density, color found instead.
> 
> If I remove the color statements, I get:
>     error: Missing pigment
> 
> Here is the media code I was using:
>         media {
>             emission color rgb < 0.5, 0.1, 1>*0.5
>             intervals 1 samples 10, 10
>             variance 1/128 confidence 0.9
>             density {checker color rgb <1,0,0> color rgb <0,0,0>}
>         }
> 
> Am I just doing this wrong, or is there a bug in POV-Ray? I looked
> through the source code, but so far have not succeeded in figuring out
> what is going on.

You are doing it wrong :)

I have an example pov file that illustrates how to use color list patterns
with media that I will post in the povray.binaries.scene-files group for you.
It illustrates how to use all four list patterns.

Thread name will be:  "Color List Patterns and Media Example"

-- 
Ken Tyler -  1200+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Chris Huff
Subject: Re: Problems with media density patterns
Date: 6 Nov 1999 14:01:24
Message: <38247BA4.7A462587@compuserve.com>
Thanks. The documentation needs to be updated. Here is a quote from the
section explaining media density(page 283):
"For block pattern types checker , hexagon , and brick  you may specify
a color list such as this:   density{checker rgb<1,0,0>, rgb<0,0,0>}"

On the next page, it explains the correct method, but says it is an
optional way of specifying whole densities for the pattern.
I had just read the first part, figured it was correct, and went on to
be blocked by that error message.
And isn't this a bit inconsistant? You can use color_maps with other
patterns, why not a color list with the list patterns? I would fix it to
allow the same syntax to be used, but I can't figure out what the code
is doing. :-(


Post a reply to this message

From: Ken
Subject: Re: Problems with media density patterns
Date: 6 Nov 1999 14:19:53
Message: <38247F5F.79052FB2@pacbell.net>
Chris Huff wrote:
> 
> Thanks. The documentation needs to be updated. Here is a quote from the
> section explaining media density(page 283):
> "For block pattern types checker , hexagon , and brick  you may specify
> a color list such as this:   density{checker rgb<1,0,0>, rgb<0,0,0>}"

I noted that inconsistancy when I first started playing with color list
patterns and also found the referece you did a couple of pages later and
quite a bit of searching. It is confusing and the docs should be corrected.


> And isn't this a bit inconsistant? You can use color_maps with other
> patterns, why not a color list with the list patterns? I would fix it to
> allow the same syntax to be used, but I can't figure out what the code
> is doing. :-(

You can only use color vectors or color maps with list patterns in pigment
statements. With the density statement however it is being treated the same
way that color list patterns are treated in a texture statement i.e.

texture { checker
           texture{pigment{DMFDarkOak }scale .2 finish{Shiny}}
           texture{pigment{DMFLightOak}scale .2 finish{Shiny}}
        }

or

texture { hexagon
           texture{T1}
           texture{T2}
           texture{T3}
        }

-- 
Ken Tyler -  1200+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

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