POV-Ray : Newsgroups : povray.newusers : I don't understand how media scales Server Time
27 Nov 2024 08:02:06 EST (-0500)
  I don't understand how media scales (Message 1 to 8 of 8)  
From: Greg M  Johnson
Subject: I don't understand how media scales
Date: 4 Apr 2003 21:34:37
Message: <3e8e40bd$1@news.povray.org>
//--- povray 3.5 SD file-------------
// the variable casey switches the scene between two scenarios:
// casey=0:  a unit radius sphere seen through tiny camera angle;
// casey=1;  a "big" sphere seen through a normal camera angle;

#declare casey=0;
//declare casey=1;

#declare sun_radius=array[2]{1,15000};
#declare camera_angle=array[2]{.0009,45};
#declare sun_position= <-0.25, 0.10, 0.83>*150000;

background{rgb 0}
sphere{0, sun_radius[casey]
pigment{rgbft 1}
hollow
interior{
        media{
                emission 0.75
                scattering {1, 0.5}
                density { spherical
                        color_map {
                                [0.0 rgb <0,0,0.5>]
                                [0.5 rgb <0.8, 0.8, 0.4>]
                                [1.0 rgb <1,1,1>]
                        }
                //scale 0.5*sun_radius[casey]
                }
        }
}
translate sun_position}

camera {
   location  <0, 10,-50>
   look_at   sun_position
   angle    camera_angle[casey]
}


Post a reply to this message

From: ingo
Subject: Re: I don't understand how media scales
Date: 5 Apr 2003 02:43:15
Message: <Xns9354634F4A788seed7@povray.org>
in news:3e8e40bd$1@news.povray.org Greg M. Johnson wrote:

> 
> 

Does this help? "6.6.3  Scaling objects with an interior."

Ingo


Post a reply to this message

From: Greg M  Johnson
Subject: Re: I don't understand how media scales
Date: 5 Apr 2003 16:12:08
Message: <3e8f46a8$1@news.povray.org>
Yes it does.

Now say I want to make it look like "flames" on the surface of a sun, but
still have a basically round surface.  When I do turbulence, it squashes it
completely.  What feature ought I try?


Post a reply to this message

From: Hughes, B 
Subject: Re: I don't understand how media scales
Date: 5 Apr 2003 17:39:21
Message: <3e8f5b19@news.povray.org>
"Greg M. Johnson" <gregj;-)565### [at] aolcom> wrote in message
news:3e8f46a8$1@news.povray.org...
>
> Now say I want to make it look like "flames" on the surface of a sun, but
> still have a basically round surface.  When I do turbulence, it squashes
it
> completely.  What feature ought I try?

density_map

You pretty much have to create different density patterns and combine them
in the final density used for the media. That way you have at least one
pattern for the flaming surface and another for the sphere, still using that
spherical pattern overall which you already had, of course. Just replace the
rgb's with predeclared densities having patterns too. Hopefully you get the
idea.


Post a reply to this message

From: Simon Adameit
Subject: Re: I don't understand how media scales
Date: 6 Apr 2003 06:44:46
Message: <3e90051e@news.povray.org>
Greg M. Johnson wrote:
> Yes it does.
> 
> Now say I want to make it look like "flames" on the surface of a sun, but
> still have a basically round surface.  When I do turbulence, it squashes it
> completely.  What feature ought I try?
> 
> 

Try warps:


sphere{0, 1
pigment{rgbft 1}
hollow
interior{
         media{
                 emission 0.75/5
                 density { spherical
             warp{black_hole 0,1 strength 1.3 falloff 2 inverse}
             scale 10 warp{turbulence 0.2} scale 1/10
             scale 20 warp{turbulence 0.3} scale 1/20
             scale 50 warp{turbulence 0.5} scale 1/50
             scale 100 warp{turbulence 0.9} scale 1/100
             warp{black_hole 0,1 strength 1.3 falloff 2}
                         color_map {
                                 [0.0 rgb <0,0,0>]
                 [0.1 rgb <0,0,0.3>]
                                 [0.5 rgb <0.8, 0.8, 0.4>]
                                 [1.0 rgb <1,1,1>]
                         }
             scale 0.5
                 }
         }
}
scale 10}

camera {
    location  <0, 10,-50>/3
    look_at   <0,0,0>
    angle    45
}


Post a reply to this message

From: Hughes, B 
Subject: Re: I don't understand how media scales
Date: 6 Apr 2003 09:36:12
Message: <3e902d4c$1@news.povray.org>
That's a great effect, Simon. Something I hadn't seen done before. I ought
to try warps more often.


Post a reply to this message

From: Greg M  Johnson
Subject: Re: I don't understand how media scales
Date: 7 Apr 2003 08:33:24
Message: <3e917014$1@news.povray.org>
That is amazing. But why did you write, for example,

scale 10 warp{turbulence 0.2} scale 1/10
scale 20 warp{turbulence 0.3} scale 1/20
?

Isn't this really

warp{turbulence 0.2} scale 1/10     scale 20   // or scale 2 ?
warp{turbulence 0.3} scale 1/20    scale 50   // or scale 2.5?



instead of
"Simon Adameit" <sim### [at] gaussschule-bsde> wrote in message
news:3e90051e@news.povray.org...
> Greg M. Johnson wrote:
> > Yes it does.
> >
> > Now say I want to make it look like "flames" on the surface of a sun,
but
> > still have a basically round surface.  When I do turbulence, it squashes
it
> > completely.  What feature ought I try?
> >
> >
>
> Try warps:
>
>
> sphere{0, 1
> pigment{rgbft 1}
> hollow
> interior{
>          media{
>                  emission 0.75/5
>                  density { spherical
>              warp{black_hole 0,1 strength 1.3 falloff 2 inverse}
>              scale 10 warp{turbulence 0.2} scale 1/10
>              scale 20 warp{turbulence 0.3} scale 1/20
>              scale 50 warp{turbulence 0.5} scale 1/50
>              scale 100 warp{turbulence 0.9} scale 1/100
>              warp{black_hole 0,1 strength 1.3 falloff 2}
>                          color_map {
>                                  [0.0 rgb <0,0,0>]
>                  [0.1 rgb <0,0,0.3>]
>                                  [0.5 rgb <0.8, 0.8, 0.4>]
>                                  [1.0 rgb <1,1,1>]
>                          }
>              scale 0.5
>                  }
>          }
> }
> scale 10}
>
> camera {
>     location  <0, 10,-50>/3
>     look_at   <0,0,0>
>     angle    45
> }
>


Post a reply to this message

From: Simon Adameit
Subject: Re: I don't understand how media scales
Date: 7 Apr 2003 12:02:13
Message: <3e91a105$1@news.povray.org>
Greg M. Johnson wrote:
> That is amazing. But why did you write, for example,
> 
> scale 10 warp{turbulence 0.2} scale 1/10
> scale 20 warp{turbulence 0.3} scale 1/20
> ?

I scale the object before applying turbulence and then rescale it to its 
original size. This has the effect of scaling the turbulence and could 
also be archieved with octaves but this way I am also able to scale non 
linearly and to apply other transformations like rotating before 
scaling. The black_hole warp is used stretch the turbulence spherical.

> Isn't this really
> 
> warp{turbulence 0.2} scale 1/10     scale 20   // or scale 2 ?
> warp{turbulence 0.3} scale 1/20    scale 50   // or scale 2.5?
> 

This would have an effect on the size of the object, while
scale x ... do something ... scale 1/x   has not and it would not scale 
the turbulence.


Post a reply to this message

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