POV-Ray : Newsgroups : povray.newusers : Varying Media Server Time
5 Sep 2024 16:21:31 EDT (-0400)
  Varying Media (Message 1 to 10 of 14)  
Goto Latest 10 Messages Next 4 Messages >>>
From: Luke Church
Subject: Varying Media
Date: 20 Jul 2000 09:23:23
Message: <3976fd4b@news.povray.org>
Hi all,

I think this question belongs here, but I am unsure. I suspect it is a
newbee question, apologies if it has already been answered somewhere else:

I have a cylindrical shape that contains an emission media, however I wanted
to vary the density, so that it decayed exponentially (preferably but linear
would do) as it approached the edge of the shape, after several hours trying
to play around with it I though I would ask for help.

A second question I have is as to the interaction between media, radiosity
and animations. Will either media or radiosity produce a 'gitter' effect
that is caused by random sampling, e.g. jitter and/or crand keywords?

The code is below:

#include "colors.inc"
#include "metals.inc"
camera {
        location <0, 20, -10>
        look_at <0,0,0>
}
light_source {
        <0, 10, -15>
        color rgb <1, 1, 1>
}
light_source {
        <0, 2.25, 5>
        color rgb <1, 1, 1>
}




difference {

        cylinder {      file://Main Cylinder
                <0, 10, 0>,
                <0, 0, 0>,
                2.5
                pigment { rgbf <0.5, 0.5, 0.5, 1>}
                finish { ambient rgb <0.5, 0.11, 0.1> }
                interior {
                        media {
                                intervals 10
                                samples 1, 1
                                emission rgb <0.75, 0.75, 0.75>
                                scattering { 1, 0.5}
                                confidence 0.9
                                variance 1/128
                                density {cylindrical
                                        color_map {
                                                [0.0 rgb <1, 0, 0>]
                                                [0.5 rgb <0.5, 0, 0.5>]
                                                [1.0 rgb <0,0,1>]
                                        }



                                }

                        }
                }


                hollow on

        }

        cylinder {        file://Cut-away
                <0, -1, 0>
                <0, 11, 0>
                2
                pigment { rgb <1, 0, 0> }

        }

}

Many thanks to everyone,
Luke Church

PS - Damned Outlook Express has converted my comments into ftp links -
please ignore them!


Post a reply to this message

From: Warp
Subject: Re: Varying Media
Date: 20 Jul 2000 09:58:52
Message: <3977059c@news.povray.org>
Luke Church <Luk### [at] churchkaroocouk> wrote:
: I have a cylindrical shape that contains an emission media, however I wanted
: to vary the density, so that it decayed exponentially (preferably but linear
: would do) as it approached the edge of the shape

  Sorry, you will have to be more concise about this. Your shape is right
now a tube (a cylinder with another smaller cylinder cutting a hole in it).
Which edge? The outer edge? The inner edge? Both? Or should the media cover
the entire volume of the main cylinder?

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Chris Huff
Subject: Re: Varying Media
Date: 20 Jul 2000 10:04:56
Message: <chrishuff-C182AA.09052920072000@news.povray.org>
In article <3976fd4b@news.povray.org>, "Luke Church" 
<Luk### [at] churchkaroocouk> wrote:

> I have a cylindrical shape that contains an emission media, however I 
> wanted to vary the density, so that it decayed exponentially 
> (preferably but linear would do) as it approached the edge of the 
> shape, after several hours trying to play around with it I though I 
> would ask for help.

Try the poly_wave waveform:

density {cylindrical poly_wave 2
    color_map {
        [0.0 rgb <1, 0, 0>]
        [0.5 rgb <0.5, 0, 0.5>]
        [1.0 rgb <0,0,1>]
    }
}

You could also adjust the color_map to get close to the same effect, but 
it would be more difficult.


> A second question I have is as to the interaction between media, 
> radiosity and animations. Will either media or radiosity produce a 
> 'gitter' effect that is caused by random sampling, e.g. jitter and/or 
> crand keywords?

In the official version, radiosity currently doesn't work well with 
media. Specifically, the radiosiy samples never enter the container 
object, and media isn't calculated for the radiosity samples. MegaPOV 
fixes this, and these changes will probably make it into the next 
official release.
As for the "gitter" effect...were you trying to type "glitter" or 
"jitter"? Oh, well...both media and radiosity can produce random 
effects, though these can be minimized with certain settings. This is 
easier to do with MegaPOV radiosity and media method 3...with the 
official version, you basically have to increase your samples and adjust 
variance and confidence until the "grainyness" isn't visible enough to 
be a problem. This can be very slow...though emitting media is probably 
the fastest.
I don't have any experience with radiosity, so I can't help you there.


> PS - Damned Outlook Express has converted my comments into ftp links -
> please ignore them!

You can get around this by using "// comment" instead of "//comment". 
The extra space after the slashes keeps it from happening.

-- 
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/


Post a reply to this message

From: Bob Hughes
Subject: Re: Varying Media
Date: 20 Jul 2000 11:12:58
Message: <397716fa@news.povray.org>
Basically you can't with that emission plus non-zero density.  You need to
have the 0.0 index of your density map drop to nothing (rgb 0) to have it
fade at the edge.
Adding some 'absorption' might be okay too.
Good luck animating within a reasonable time-frame with good enough settings
to keep the "jitter" effect in check.

Bob


Post a reply to this message

From: Luke Church
Subject: Re: Varying Media
Date: 20 Jul 2000 11:53:17
Message: <3977206d@news.povray.org>
"Warp" <war### [at] tagpovrayorg> wrote in message
news:3977059c@news.povray.org...
> Luke Church <Luk### [at] churchkaroocouk> wrote:
> : I have a cylindrical shape that contains an emission media, however I
wanted
> : to vary the density, so that it decayed exponentially (preferably but
linear
> : would do) as it approached the edge of the shape
>
>   Sorry, you will have to be more concise about this. Your shape is right
> now a tube (a cylinder with another smaller cylinder cutting a hole in
it).
> Which edge? The outer edge? The inner edge? Both? Or should the media
cover
> the entire volume of the main cylinder?


Terribly sorry, I meant that you have a tube and the media should be the
densest at the inner edge of the tube and should be ~0 at the outer edge of
the tube.

Thanks for the very swift reply,

Luke


Post a reply to this message

From: Tom Melly
Subject: Re: Varying Media
Date: 20 Jul 2000 11:55:09
Message: <397720dd$1@news.povray.org>
"Chris Huff" <chr### [at] maccom> wrote in message
news:chrishuff-C182AA.09052920072000@news.povray.org...

> You can get around this by using "// comment" instead of "file://comment.

... But he didn't write file://comment, he wrote file://comment - it was
outlook that added the file: to file://comment making it file://comment when
originally it just said file://comment ;)


Post a reply to this message

From: Chris Huff
Subject: Re: Varying Media
Date: 20 Jul 2000 12:01:05
Message: <chrishuff-BE8EC9.11013920072000@news.povray.org>
In article <397720dd$1@news.povray.org>, "Tom Melly" 
<tom### [at] tomandluf9couk> wrote:

> ... But he didn't write file://comment, he wrote file://comment - it 
> was outlook that added the file: to file://comment making it 
> file://comment when originally it just said file://comment ;)

BTW, Outlook isn't the only program with this problem. MT-NewsWatcher 
also has this "feature".

-- 
Christopher James Huff - Personal e-mail: chr### [at] maccom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://homepage.mac.com/chrishuff/
TAG Web page: http://tag.povray.org/


Post a reply to this message

From: Ken
Subject: Re: Varying Media
Date: 20 Jul 2000 12:01:32
Message: <397720F0.2688AF6A@pacbell.net>
Tom Melly wrote:
> 
> "Chris Huff" <chr### [at] maccom> wrote in message
> news:chrishuff-C182AA.09052920072000@news.povray.org...
> 
> > You can get around this by using "// comment" instead of "file://comment.
> 
> ... But he didn't write file://comment, he wrote file://comment - it was
> outlook that added the file: to file://comment making it file://comment when
> originally it just said file://comment ;)

I'm sorry but I can't comment on that.

-- 
Ken Tyler - 1400+ POV-Ray, 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: Ron Parker
Subject: Re: Varying Media
Date: 20 Jul 2000 12:04:39
Message: <slrn8ne9h1.gin.ron.parker@linux.parkerr.fwi.com>
On Thu, 20 Jul 2000 16:55:05 +0100, Tom Melly wrote:
>"Chris Huff" <chr### [at] maccom> wrote in message
>news:chrishuff-C182AA.09052920072000@news.povray.org...
>
>> You can get around this by using "// comment" instead of "file://comment.
>
>... But he didn't write file://comment, he wrote file://comment - it was
>outlook that added the file: to file://comment making it file://comment when
>originally it just said file://comment ;)

Those of us not using the big wide-open security hole from Microsoft know
you faked that.

-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

From: Tom Melly
Subject: Re: Varying Media
Date: 20 Jul 2000 12:13:30
Message: <3977252a$1@news.povray.org>
"Ron Parker" <ron### [at] povrayorg> wrote in message
news:slr### [at] linuxparkerrfwicom...
>
> Those of us not using the big wide-open security hole from Microsoft know
> you faked that.
>

Did not! (did I? - I thought I didn't but now I've got no way of knowing -
damn you MS, from the cold heart of hell I stab at thee).


Post a reply to this message

Goto Latest 10 Messages Next 4 Messages >>>

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