Media just for fun.

Media just for fun.

Post by Amalthea » Wed, 08 Jul 1998 04:00:00

I just thought I'd drop a scene in here that some folks can try that illustrate
what media can do now.  This is something I had been working on starting with
the first beta.

The scattering media type is cabable of casting shadow onto the environment
now.  This seems to be something few people were aware of (even the POV team).
Shadows will only be cast if there is filtering added to the container object.

This part is covered in the docs.  My problem was that the shadows are always
the compliment of the color used in the media.  I think it was Nathan Kopp that
pointed out that this was accurate, since, for example, a blue media would only
allow red light to pass through.  Right after installing the latest beta, I set
to work on interior again.   It soon occured to me to try using a filtering for
the object that is the same color as the object.  While this is not perfect
(and doesn't make any sense to me..yet), it does create the effect I was
looking for.  Try it out, make it better, start rendering and take a vaction.
If it comes out good, by all means post it here.  Oh yes, the scene:

//scene file demonstrating media

#include ""

camera {location  <0, 0, -100>}

light_source {
  <500, 600, -500>
  color White


sphere {<0, 0, 0>, 5
  pigment { color rgbf <0, 1, 1, 1> }
  finish { ambient 0 diffuse 0 phong 0 phong_size 70 }
  //normal {bumps 1}
  interior {
    //refraction 1 ior 1.33
    media {

      scattering {
      10, 1 //eccentricity 1
      // 0.05
      intervals 5
      samples 2, 30
      confidence 0.9999
      variance 1/1000
      density {
      checker //color rgbt <0, 0, 0, 0>, color White
      color_map {
      [0 color rgbt <0, 0, 0, 0>]
      [1 color White]
        phase 1
        turbulence 0
        color_map {
          [0 color rgbt <0, 1, 1, .99>]
          [0.4 color rgbt <0, .5, 1, .99>]
          [0.45 color rgbt <0, 0, 0, 0>]
          [1 color rgbt <0, 0, 0, 0>]

  scale 4


plane {y, -20
pigment {color White}


/* Note that there is a lot of new things to learn here.  One of the most
curious things is the checker pattern that is commented out.  It generates a
warning, but it works.  There's a number of quirky things like that in 3.1.  
Experiment and find some more.  I did.  ;-)



Media just for fun.

Post by John M. Dlugo » Wed, 08 Jul 1998 04:00:00

Thanks for posting that.  I popped it into the program and it's
rendering now.

Quote:>I just thought I'd drop a scene in here that some folks can try that illustrate
>what media can do now.  This is something I had been working on starting with
>the first beta.


Media just for fun.

Post by Amalthea » Thu, 09 Jul 1998 04:00:00

Oh yes, just thought I'd mention that the scattering type "10" in the scene I
posted is something leftover from when I didn't have any docs and was guessing
what the media syntax was.  There's no scattering type with that number (which
is why I think it generates an error), but I suspect that it just uses the
default of 1.


P.S.  You simply must try it with mandel ;-)


1. Box Filter FUN FUN FUN...

Hey Guys,

I'm trying to implement a box filter line drawing algorithm and i'm
having some difficulties. basically my problem is with finding the
area under a 1-pixel wide line. usually in the worst case it cover 3
adjacent pixels at given x coordinate that is on the line segment.

i'm wondering if there is a general formula based on the angle the
line intersects the pixels giving the area.

maybe i'm way off track here.. can anyone help?

another thought i had was to draw line segments between all the
intersection points of the 1-pixel wide line and a given x value..
this would split up the area into triangles.. and then using the cross
product to calculate the areas and add them up,, but this seems to me
a wasteful way of doing it..

any input would be greatly appreciated..


2. POVFAST: watcom386 faster executable for POV 2.2

3. Fun, oh fun: Menger sponges

4. Printing a scene graph under windows-Resource Problems

5. problem *.MPG (Ulead media studio 6.0 and Ulead media studio 6.5 incompatible)


7. WTD : real media plug-in for media studio pro 5.2

8. System Palette

9. Gloodle: Fun new drawing program

10. The fun is back...

11. Very fun and interesting experiment for the geek in you :)