POV-Ray : Newsgroups : povray.newusers : A trivial example of media ? : A trivial example of media ? Server Time
29 Jul 2024 06:19:05 EDT (-0400)
  A trivial example of media ?  
From: Dennis Clarke
Date: 3 Jun 2006 21:40:00
Message: <web.4482391d16b5ba2cfd8466960@news.povray.org>
I am trying to put together a trivial example of media in which a beam of
light would be scattered in much the same way that a flashlight beam would
be in a dark night with heavy fog or smoke.

I have been reading through the manual in the section on media [ section
3.6.2 Media in "POV-Ray 3.6 for UNIX documentation" ] and I get the rather
distinct feeling that "trivial" is tough to achieve.

RE: http://www.blastware.org/docs/html/s_129.html#s03_06_02

Please pardon me for being redundant here :

 The complete syntax for a media statement is as follows:

MEDIA:
    media { [MEDIA_IDENTIFIER] [MEDIA_ITEMS...] }
MEDIA_ITEMS:
    method Number | intervals Number | samples Min, Max |
    confidence Value  | variance Value | ratio Value |
    absorption COLOR | emission COLOR | aa_threshold Value |
    aa_level Value |
    scattering {
       Type, COLOR [ eccentricity Value ] [ extinction Value ]
    }  |
    density {
       [DENSITY_IDENTIFIER] [PATTERN_TYPE] [DENSITY_MODIFIER...]
    }   |
    TRANSFORMATIONS
DENSITY_MODIFIER:
    PATTERN_MODIFIER | DENSITY_LIST | COLOR_LIST |
    color_map { COLOR_MAP_BODY } | colour_map { COLOR_MAP_BODY } |
    density_map { DENSITY_MAP_BODY }

I see the all of that spec and wonder how much of it is optional parameters
or are they all needed ?  The vertical bar between parameters seems to
indicate "OR" but I am not sure.  It seems as if _everything_ is optional.

Regardless I am thinking of smoke.  I think that cigarette smoke of the
smoke from burning wood is in actual fact very fine particles that absorb
light, casts a shadow like a cloud does and must scatter light somewhat.  I
doubt that it will emit light unless there are hot embers in the smoke.

   http://www.blastware.org/docs/images/WarOfTheWorlds2.png

The "search light" there on the martian robots shoulder casts a focused beam
that appears to be made of two light sources; one is hot white and it
attenuates to nothing very quickly and then there is a blue beam that seems
to appear out of nowhere ( as if there were a lens effect and the beam has
passed through a focal point ) and it projects into smoke.

I am thinking of isolating that one picture element, the beam which consists
of a two cones as well as the smoke.  The cones are on the same axis and
their points are at the focal point of the light beam.  One leaves to the
left and it bright white while the other leaves to the left and is blueish.

The first question is not the cones or the light sources but is in fact the
media itself.  The smoke.

I would think that starting with a simple smoke that is everywhere
consistent and linear in thickness would be a fine start.

The definition of this smoke eludes me.

The documentation seems very unclear or at least not very "spoon feed me
step by step" to allow me to translate the desite into a media definition.

I am thinking that I need absorption but how much and what color ?
No one can know but I think I will simply guess :

    absorption rgb < 0.25, 0.15, 0.10 >

So then more Red light is absorbed than Blue or Green.

I hope for a blueish tint to things on the other end of the media.

    emission rgb < 0.0, 0.0, 0.0 >

But I do not really know what effect this will have.  Perhaps the smoke will
now be invisible and only seen when light passes through it?

    SCATTERING:
    scattering {
        Type, COLOR [ eccentricity Value ] [ extinction Value ]
    }

This is a bit of a monster.  This scattering thing.  I am going to guess
that "Type 4 Rayleigh scattering" makes sense for microscopic particles
like smoke.

Section "3.6.2.2 Sampling Parameters & Methods" makes no bloody sense to me
at all.  It seems to be a lot of talk about the Monte Carlo Integration
approach.  I am certainly okay with statistical methods but "this" section
makes little sense to me.

The examples that follow in that chapter make no reference to any of these
parameters and I fail to see where media type is set let alone esoteric
issues such as "samples Min,  Max keyword" etc etc.

Perhaps I am missing something obvious and I hope that someone can shed some
illumination on this topic.  Sorry for the pun.

How shall I define a nice fine smoke hanging in the air?

Dennis


Post a reply to this message

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