POV-Ray : Newsgroups : povray.binaries.images : Re: Cloud Surface : Re: Cloud Surface Server Time
15 May 2024 09:28:29 EDT (-0400)
  Re: Cloud Surface  
From: omniverse
Date: 28 Nov 2017 21:35:00
Message: <web.5a1e1bf29a2a53c19c5d6c810@news.povray.org>
Alain <kua### [at] videotronca> wrote:

> > I'm thinking media won't be able to do what's wanted anyway. Sure, emitting
> > media will illuminate surrounding objects, but cast shadows like a light on
> > distant things? No, don't believe it can.
>
> Emissive media CAN cast shadows.
> For that to happen, you need to use radiosity with "media on" in the
> radiosity block.
> That way, the media can act like a fuzzy area_light whose brightness can
> vary across it's visible surface.
>
> radiosity{count 20000 media on}
> default{radiosity{importance 75/20000}}
> sphere{100*x 2 hollow pigment{rgbt 1}
>   interior{media{emission rgb<100, 50, 20>*25 samples 20}
>   radiosity{importance 1}}
>
> Will use an average of 75 radiosity samples for most of the scene's
> objects, but a very high count density for that relatively small and
> bright object.

Well, seeing is believing... and unfortunately I wasn't able to do that. Test
scene below, comparing actual light with emitting media. I don't want to doubt
your idea but here's what I tried.

Curiously, after getting nowhere at first, I found radiosity 'brightness' needed
to be increased. Rather drastically, from what I've done with it before.

Still very different thing for these two illumination methods, like I expected,
no well-defined shadows. Probably because of how radiosity acts on both light
and shadow regions... or do I recall someone saying unlit portions are
ignored...?

Anyway... for your perusal, a test scene:

//--------------------------------------------------------------------------
#version 3.7;
//--------------------------------------------------------------------------
#default{ finish{ ambient 0 diffuse 1 }}
//------------------------------------------

#local NoLight=yes;  // yes = emitting media sphere, else light


global_settings{
 assumed_gamma 1
  ambient_light 0
    radiosity{
    pretrace_start 0.04
    pretrace_end 0.01

    count 20000 //1601

    recursion_limit 3

    nearest_count 10 //12

    always_sample off
    max_sample 0.9

    error_bound 1.33 //1.2 //0.4
    low_error_factor 0.4 //0.8

    maximum_reuse 0.16*2 //0.2
    minimum_reuse 0.028*2 //0.015

    adc_bailout 1/127 //0.01

    gray_threshold 0.0 //0
    brightness #if (NoLight) 20 #else 1 #end

    normal on
    media on
  }
 }// end global_settings
// ----------------------------------------

#default{radiosity{importance 75/20000}}

//sky_sphere{ pigment { color rgb <1,1,1>} }

camera{ location <0, 22, -33>
        right x*image_width/image_height
        rotate 12*y
        look_at <-1.25,2.8,0>
        angle 50
      }

plane{ <0,1,0>,0 // floor
  texture{
    pigment { color rgb 1 }
    finish {
      ambient 0.0
      diffuse 1
      specular 0.4
      roughness 0.01
    }
  }
//  radiosity {importance 1}
}
// -----------------------------------------

union {
#for (Cnt,1,3)
  difference {
     box { <-1,-1,-1>,<1,1,1> }
     sphere {0,1.40 inverse  texture{ pigment{ color rgb <1,1,1>*0.5}}  }
     sphere {0,1.25}
     texture{ pigment{ color rgb <1,1,1>}
              finish{ phong 1 diffuse 1-Cnt/10 }
            }
     translate <0,0,0>
     scale 1+Cnt*0.65
     translate <0,1+Cnt*0.30,0>
     rotate Cnt*<0,-22,0>
   }//----------
#end
scale <1,1,1>
translate <0,1,0>
hollow on
//radiosity {importance 1}
}
// -----------------------------------------

#if (NoLight)

sphere {
 0, 1
 hollow on
 pigment {color rgbt 1}
 interior {
  media {
   emission <100, 50, 20>*25
   //scattering {1, 1}
   samples 20
   density {
    spherical
    density_map {
     [0 rgb 0]
     [1 rgb 1]
    }
   }
  }
 }
 scale 2
 translate <-5,5,-5>*2 // near comment out *2, or far
 radiosity {importance 1}
}

#else

light_source {
 <-5,5,-5>*2,
 color <100, 50, 20>/100
 looks_like {sphere {0,2
  pigment {color rgb <100, 50, 20>/20}
 finish {emission 1}}}
 area_light x*2,y*2,10,10 jitter circular orient adaptive 2
}

#end


Post a reply to this message

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