POV-Ray : Newsgroups : povray.newusers : halo to media Server Time
18 Aug 2024 22:21:53 EDT (-0400)
  halo to media (Message 3 to 12 of 12)  
<<< Previous 2 Messages Goto Initial 10 Messages
From: Reactor
Subject: Re: halo to media
Date: 26 Aug 2009 17:45:00
Message: <web.4a95acbd938269c9d60db48b0@news.povray.org>
"Reactor" <rea### [at] hotmailcom> wrote:

....

> Better smoke would probably have a scattering media component
> (which replaced the older dust halo), but would also see an
> increase in rendering times.
>
>
> -Reactor

I forgot to add that if you use scattering, remove the no_shadow keyword from
the sphere, otherwise the scattering media will not shade correctly.  With the
current code that uses no_shadow, the smoke will not cast a shadow (which may
not be a problem, depending on how it is used).  Absorption and scattering
medias are capable of casting shadows, but there is a speed penalty when you
allow them to do so.


-Reactor


Post a reply to this message

From: tiocfaidh
Subject: Re: halo to media
Date: 27 Aug 2009 00:30:00
Message: <web.4a960b53938269c9c3fc43200@news.povray.org>
Cheers for that, it got it working, except now it doesnt really look like smoke
coming from a small fire, kind of like fog.

This is where I got that code:
http://csi.chemie.tu-darmstadt.de/ak/immel/script/redirect.cgi?filename=http://csi.chemie.tu-darmstadt.de/ak/immel/grap
hics/povray31/smoke.html

Trying to create smoke just like that. How would i make it more like that?


Post a reply to this message

From: tiocfaidh
Subject: Re: halo to media
Date: 27 Aug 2009 13:00:00
Message: <web.4a96babb938269c9ff4a12e20@news.povray.org>
How can I create very simple smoke coming out of a chimney?


Post a reply to this message

From: Reactor
Subject: Re: halo to media
Date: 27 Aug 2009 15:50:00
Message: <web.4a96e2eb938269c99bda1ef30@news.povray.org>
"tiocfaidh" <nomail@nomail> wrote:
> Cheers for that, it got it working, except now it doesnt really look like smoke
> coming from a small fire, kind of like fog.
>
> This is where I got that code:
>
http://csi.chemie.tu-darmstadt.de/ak/immel/script/redirect.cgi?filename=http://csi.chemie.tu-darmstadt.de/ak/immel/gr
ap
> hics/povray31/smoke.html
>
> Trying to create smoke just like that. How would i make it more like that?

That image is pretty small, but assuming it is simple cigarette smoke, I'd
change
absorption color rgb 0.15
to
emission color rgb 0.05 or 0.10 or so.

Absorption media will appear dark because, as the name implies, it absorbs
light.  Emission media is bright because it appears as though it were emitting
light (this effect is constrained to the media and does not affect surrounding
objects).  Those two forms can be used alone or together for fast rendering,
simple smoke, but neither is particularly realistic.

Realistic smoke requires scattering media, which has an appearance dependent on
light sources.  Scattering media is bright where light shines on it, but is
dark in the shadows.  It also absorbs light, shadowing itself or other objects,
but renders much more slowly.  To use scattering media, make sure the shape
modifier no_shadow is removed, and replace
absorption color rgb 0.15
with
scattering{
  1, color rgb 0.375 // thicker than before, probably between 0.25 - 0.50
  extinction 1.0 // default, but may need adjustment
}


I think you'll immediately notice how much more slowly scattering media renders.
 The code you provided can be improved by making the container shape more
closely fit the media.  If you change the pigment statement from
pigment { colour Clear }
to
pigment{ color rgb <1,0,0> transmit 0.95 }

This will make the container shape a faint red, allowing you to see just how
little of the container shape is being used.  For vertically rising smoke, I
would probably use a cylinder instead of a sphere.

If I were to slightly modify the previous code, I'd make the container object
fit more closely.  Here is an example:

#version 3.6;


#declare Smoke =
cylinder { <0,0,0>, <0,6,0>, 1.0
    hollow
    pigment { colour rgb <1,00,0> transmit 1 } // change to 0.95 to see
container shape
interior{
    media{
        scattering
        {
         1, color rgb 2.00
         extinction 1.0
        }

        density
        {
            cylindrical
            warp{
             turbulence 0.75
             octaves 6
             omega (1/1.618)
             lambda 1.618
            }

            colour_map {
                 [0.0 color rgb <0.0, 0.0, 0.0> * 0.00 ]
                 [0.5 color rgb <1.0, 1.0, 1.0> * 0.65 ]
                 [1.0 color rgb <1.0, 1.0, 1.0> * 1.00 ]
            }
            scale 0.65
        }
        samples 10
        method 3
        aa_level 4
        aa_threshold 0.1
     } // media
} // interior
    scale 1.5
    translate <0, 0, 0>
}











plane // ground
{
    y, 0
    pigment{ color rgb 1 }
}


difference // simple chimney
{
 box
 {
  <-1.5,0,-1.5>, <1.5,2,1.5>
 }

 box
 {
  <-1.0,0,-1.0>, <1.0,2.1,1.0>
 }

    pigment{ color rgb <1,0,0> }
}





object{
    Smoke
    translate <0,1,0>
}



sky_sphere
{
    pigment
    {
    planar
    color_map{
    [0.00 color rgb < 50,100,200>/255 ]
    [1.00 color rgb <200,225,255>/255 ]
        }
    }
}



light_source
{
 <1000,1000,-100>
 color rgb 1
}


camera
{
    location <0, 4,-10>
    look_at  <0, 4, 0>

}


Note that the smoke is considerably thicker in this example -  when scaling
smoke objects, the thickness must be adjusted.

-Reactor


Post a reply to this message

From: tiocfaidh
Subject: Re: halo to media
Date: 28 Aug 2009 01:00:05
Message: <web.4a976359938269c9ff4a12e20@news.povray.org>
is there any include files for container shape

I get an error when i try run the code about }


Post a reply to this message

From: Reactor
Subject: Re: halo to media
Date: 28 Aug 2009 01:45:02
Message: <web.4a976e2f938269c9a4c94d980@news.povray.org>
"tiocfaidh" <nomail@nomail> wrote:
> is there any include files for container shape
>
> I get an error when i try run the code about }

Sorry about that, the problem eems to be caused by line-wrapping in the news
reader.  Around these lines:
pigment { colour rgb <1,00,0> transmit 1 }  // change to 0.95 to see
container shape

The words container shape should have been part of the comment on the preceding
line.  Delete them or comment them out, and it should work.


-Reactor


Post a reply to this message

From: tiocfaidh
Subject: Re: halo to media
Date: 28 Aug 2009 05:00:00
Message: <web.4a979c65938269c9ff4a12e20@news.povray.org>
is there any way to make it sort of fade out a bit more towards the top pf the
cylinder?


Post a reply to this message

From: clipka
Subject: Re: halo to media
Date: 28 Aug 2009 05:12:38
Message: <4a979f86$1@news.povray.org>
tiocfaidh schrieb:
> is there any way to make it sort of fade out a bit more towards the top pf the
> cylinder?

You can combine multiple "density {...}" statements in a single "media" 
statement, in which case the densities will be multiplied.

Thus, adding a density statement with a "gradient" or "planar" pattern 
scaled accordingly, and possibly with a color_map, should to the job I'd 
guess.


Post a reply to this message

From: tiocfaidh
Subject: Re: halo to media
Date: 28 Aug 2009 09:05:01
Message: <web.4a97d5bb938269c91caeb2520@news.povray.org>
Also how can I get rid of the cylinder outline a bit more, I can see a feint
outline, iv been trying to play around with the values but cant seem to pin
point it?


Post a reply to this message

From: Reactor
Subject: Re: halo to media
Date: 28 Aug 2009 13:50:00
Message: <web.4a981875938269c91a8bda520@news.povray.org>
"tiocfaidh" <nomail@nomail> wrote:
> Also how can I get rid of the cylinder outline a bit more, I can see a feint
> outline, iv been trying to play around with the values but cant seem to pin
> point it?

In the pigment statement, the transmit value is 0.95.  That means 95% of the
light passes through it unchanged, and 5% of the object's color shows up.
Change the transmit value to 1.0 to make it totally invisible.


-Reactor


Post a reply to this message

<<< Previous 2 Messages Goto Initial 10 Messages

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