POV-Ray : Newsgroups : povray.binaries.images : Fun with media Server Time
19 Nov 2024 04:27:43 EST (-0500)
  Fun with media (Message 1 to 2 of 2)  
From: Mienai
Subject: Fun with media
Date: 13 Apr 2005 02:40:01
Message: <web.425cbda557505d07cb2f795b0@news.povray.org>
Teaching myself how to use media effectively (hopefully).  Anyone know how
to get rid of those striations without bumping the media interval up
rediculous amounts?  I also tried to get the light to reflect off the floor
with photons (is there a way other than photons?) but couldn't, is this
because it's atmospheric media?  Is there something I'm missing or how can
I get it to work?  Source code:

//+w800 +h800 Antialias=On Antialias_Threshold=0.3
// --------------------- Includes --------------------------- //
#include "finish.inc"     // Some basic finishes
#include "colors.inc"     // Standard Color definitions

// --------------------- Control Center --------------------- //
global_settings{
 ambient_light 0

 radiosity {
  pretrace_start 0.08
  pretrace_end   0.005
  count 400
  error_bound 0.1
  recursion_limit 1
 }
}

#default {
 texture {
  pigment {color rgb <0,1,0>}
   finish {ambient 0 diffuse 0.6}    //ambient 0.55
  }
}

// --------------------- Camera ----------------------------- //
#declare cl=<12,10,6>;
#declare la=<0,-1.6395/2,0>;
camera {
 up <0,1,0>
 right x*image_width/image_height
 location cl
 look_at la
}

// --------------------- Lights ----------------------------- //
light_source {
 0
 color White*2
 fade_distance 3
 fade_power 3
}

media{
 scattering { 4, .2 } //type 4
 density{spherical scale 10}
 intervals 30
}

sphere{0,50 pigment{Black} hollow}
/**************************************************************
 *                       Scene                                *
 **************************************************************/
#declare cylrad=1;
#declare cylstr=-.3;
#declare cylrot=48.5;
#declare cyllgn=7;

#declare cyltex=
 texture{
  pigment{Green}
 }
#declare sphtex=
 texture{
  pigment{Red}
 }

blob {
 threshold 0.6
 sphere { <0, 0, 0>, 4, 1 texture{sphtex}}

 cylinder { <0, -cyllgn, 0>,<0, cyllgn, 0> cylrad, cylstr texture{cyltex}}
 cylinder { <0, 0, -cyllgn>,<0, 0, cyllgn> cylrad, cylstr
  rotate <-26.56505117708,    0, 0> texture{cyltex}
 }
 cylinder { <0, 0, -cyllgn>,<0, 0, cyllgn> cylrad, cylstr
  rotate <-26.56505117708,  -72, 0> texture{cyltex}
 }
 cylinder { <0, 0, -cyllgn>,<0, 0, cyllgn> cylrad, cylstr
  rotate <-26.56505117708, -144, 0> texture{cyltex}
 }
 cylinder { <0, 0, -cyllgn>,<0, 0, cyllgn> cylrad, cylstr
  rotate <-26.56505117708, -216, 0> texture{cyltex}
 }
 cylinder { <0, 0, -cyllgn>,<0, 0, cyllgn> cylrad, cylstr
  rotate <-26.56505117708, -288, 0> texture{cyltex}
 }
 sturm
}

plane{y,-1.6395
 pigment{
  hexagon
  pigment{color rgb .000001}
  pigment{color rgb 1}
  pigment{color rgb .5}

  scale 1.5
 }
 finish{
  reflection {.5
   falloff 2
   metallic .2
  }
 }
}


As always, suggestions/criticisms are appreciated.


Post a reply to this message


Attachments:
Download 'planeshere1.png' (190 KB)

Preview of image 'planeshere1.png'
planeshere1.png


 

From: Slime
Subject: Re: Fun with media
Date: 13 Apr 2005 17:20:01
Message: <425d8d01$1@news.povray.org>
> Teaching myself how to use media effectively (hopefully).  Anyone know how
> to get rid of those striations without bumping the media interval up
> rediculous amounts?

Don't increase intervals, use the default number. Instead, use samples. When
you set a number of intervals, it always increases the render speed. But
when you use a small number of intervals and rely on the *sampling* of each
interval, it uses the number you set as the starting number of samples, but
takes more if and only if it's necessary, as set by the aa_threshold and
aa_level parameters. I used these settings and got a pretty good render:

 samples 30
 aa_threshold 0.0001
 aa_level 5

But the edges of the cones of light were a little messy since the adaptive
sampling wasn't doing such a good job there, so I kicked up samples to 50
and got good results, still at a faster speed than with just "intervals 30".
You could probably experiment more and get fine results at better speeds.

You can also speed things up if you simplify the shadow-casting object;
blobs are sort of slow and every time a sample is taken, shadows have to be
calculated. Try a sphere with a pattern - maybe even a pattern based off of
the "object" pattern with the blob you have.

I don't think you need radiosity in this scene; there are hardly any
non-black surfaces that would benefit from it. Turn off radiosity for a much
faster render.

> I also tried to get the light to reflect off the floor
> with photons (is there a way other than photons?) but couldn't, is this
> because it's atmospheric media?

Did you specify "media on" in the photons block? You need to do that to get
the photons to "stick" to the media as they go through.

However, since your mirror is a simple plane, I have a better idea, which
should run much faster. Duplicate your scene (minus the media) below the
plane, upside down (scale <1,-1,1>), and set the plane to have no_shadow.
Then the light will pass up through it at exactly the places it's hitting it
from above, causing a reflective effect. You can turn the new light source's
intensity down to create the effect of incomplete reflection.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

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