POV-Ray : Newsgroups : povray.general : Re: Big whopping sparks : Re: Big whopping sparks Server Time
3 Aug 2024 04:17:52 EDT (-0400)
  Re: Big whopping sparks  
From: Daniel Nilsson
Date: 17 May 2004 12:30:53
Message: <40a8e8bd$1@news.povray.org>
In news:40a76fce$1@news.povray.org,
Dave VanHorn <dva### [at] cedarnet> typed:
> Ok, #1 sounds good, but how do you actually generate something that
> looks spark-like?
>
> I found an include file for Megapov, but I'd rather stick with
> Pov-ray.

I did a spark as a test once. I think it looks rather nice and it
renders quite fast too.
Furtunatly I still have the code around.

/ Daniel Nilsson

Cut here...

#include "colors.inc"
#include "metals.inc"

camera {
  location <5, 4, -10>
  look_at <0, -4, 0>
}

light_source { <0, 0, 0> rgb <0.1, 0.4, 1.0>
  area_light x*5.9, z*0.3, 5, 3
  adaptive 1
  fade_distance 4
  fade_power 2
}

sphere { <-4, 0, 0>, 1 texture { T_Chrome_2E } }
sphere { <4, 0, 0>, 1 texture { T_Chrome_2E } }
cylinder { <-4, 0, 0>, <-4, -10, 0>, 0.1 texture { T_Chrome_2E } }
cylinder { <4, 0, 0>, <4, -10, 0>, 0.1 texture { T_Chrome_2E } }

plane { y, -10 pigment { White } }

cylinder { <-4, 0, 0>, <4, 0, 0>, 1.1
  hollow
  pigment { Clear }
  interior {
    media {
      method 3            // 3
      aa_level 3          // 4
      aa_threshold 0.05   // 0.1
      samples 16, 100     // Min 1, Max 1
      intervals 1         // 10
      ratio 0.9           // 0.9
      confidence 0.9      // 0.9
      variance 1/128      // 1/128
      jitter 0

      emission 1
      density {
        cylindrical
        rotate z*90

        color_map {
          [ 0.00 Black ]
          [ 0.40 rgb <0.1, 0.4, 1.0>*0.1 ]
          [ 0.80 rgb <0.1, 0.4, 1.0>*0.5 ]
          [ 0.90 rgb <0.1, 0.4, 1.0>*1.0 ]
          [ 1.00 rgb <0.1, 0.4, 1.0>*10 ]
        }
        warp {
          turbulence 0.5     // amount of turbulence
          octaves 4          // optional turbulence modifiers
          lambda 2
          omega 0.5
        }
      }
    }
  }
}


Post a reply to this message

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