POV-Ray : Newsgroups : povray.binaries.images : Sparky (for Dave VanHorn) Server Time
11 Aug 2024 09:20:40 EDT (-0400)
  Sparky (for Dave VanHorn) (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Ger
Subject: Sparky (for Dave VanHorn)
Date: 20 May 2004 07:35:13
Message: <40ac97e9@news.povray.org>
A quick and dirty try to get the spark to emit light.

I tightened the spark and added a bunch of lights to it.
The cylinders in the background are just to give an idea about the shadowing
on the back wall.

You may have to play with the "Spark_Light" settings to get the effects you
want.

#declare Discharge_Spark = 
object{
  cylinder { <-1,0,-10>, <1,0,10>, 4}
    hollow pigment { Clear }
    interior {media{method 3    // 3
    aa_level 4                  // 4
    aa_threshold 0.1            // 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 <10,10,12>         //High values obscure the core
    density {cylindrical
       rotate x*90
       color_map { [ 0.00 Black ]
                   [ 0.60 rgb <0.15, 0.4,1.0>*0.02]
                   [ 0.94 rgb <0.15, 0.4,1.0>*0.1]
                   [ 0.97 rgb <0.05, 1.0,0.05>*5] //Accent
                   [ 0.98 rgb <0.15, 0.4,1.0>*0.2]
                   [ 0.99 rgb <0.15, 0.4,1.0>*60]
                  }
     warp{turbulence<0.1,1,0.1>         // amount of turbulence
          octaves 8                                              // 10- too much 
       // optional turbulence modifiers
          lambda 5 // 10 is "grainy"
          omega 0.2 //0.1 sinuous 0.9 chaotic
         }
         }
        }
      scale<2,2,1>
      }
                
#macro Spark_Light(Start,End,NumOfLights,TotalBrightness,FP,FD) 
#local Distance = (End - Start) / NumOfLights+1;
#local Brightness = TotalBrightness / NumOfLights;
union {
        #local Count = Start+Distance;
        #while (Count <= End-Distance)
                light_source { 0 color rgb<0.15, 0.4, 1.0> * Brightness translate
<0,0,Count> fade_power FP fade_distance FD }
                #local Count = Count + Distance;
        #end
        }
#end

// Overhead lights
light_source { 0 color rgb 0.75 translate < -30 , 100 , 0 > }
light_source { 0 color rgb 0.75 translate < 30 , 150 , 0 > }

        
#declare Spark_Terminal =
union {
        sphere {<0,0,-20>,4}
        sphere {<0,0, 20>,4}
        cylinder {<0,0,-20>,<0,-40,-20>,1}
        cylinder {<0,0, 20>,<0,-40, 20>,1}
        cylinder {<0,0,-16>,<0,0,-12>,1}
        cylinder {<0,0, 16>,<0,0, 12>,1}
        difference {
                        sphere {<0,0,-14>,4}
                        cylinder {<0,0,-20>,<0,0,20>,2 inverse}
                        plane { z , 0 translate <0,0,-12> }
                        }
        difference {
                        sphere {<0,0, 14>,4}
                        cylinder {<0,0,-20>,<0,0,20>,2 inverse}
                        plane {-z , 0 translate <0,0, 12> }
                        }
//      cone {<0,0,-12>,2,<0,0,-10>,-0}
//      cone {<0,0, 12>,2,<0,0, 10>, 0}
        texture { T_Gold_3A }
        }
        
#declare Kaboom =
union {
        object { Spark_Terminal }
        object { Discharge_Spark }
        Spark_Light(-10, 10, 150, 500, 1.25, 2)
        translate < 0 , 10 , 0 >
        }
        
camera {
        location <40 , 14 , 20 >
        look_at < 0 , 8 , 0 >
        }


plane { x , -40 pigment { Gray70 } finish { Shiny}}
plane { y , 0 pigment { Gray50 } finish { Shiny }}
cylinder {<-25,0,5>,<-25,12,5>,5 texture { Polished_Chrome }}
cylinder {<-25,0,-15>,<-25,18,-15>,10 texture { Polished_Chrome }}

object { Kaboom }


-- 
Ger


Post a reply to this message


Attachments:
Download 'sparky.jpg' (37 KB)

Preview of image 'sparky.jpg'
sparky.jpg


 

From: Dave VanHorn
Subject: Re: Sparky (for Dave VanHorn)
Date: 20 May 2004 10:37:56
Message: <40acc2c4$1@news.povray.org>
"Ger" <ger### [at] hotmailcom> wrote in message
news:40ac97e9@news.povray.org...
> A quick and dirty try to get the spark to emit light.
>
> I tightened the spark and added a bunch of lights to it.
> The cylinders in the background are just to give an idea about the
shadowing
> on the back wall.
>
> You may have to play with the "Spark_Light" settings to get the effects
you
> want.

Very nice!  I had to scale it to inches, and I think then the translate
needs to be "Count * Inch" but it looks good. I've put it in a test scene
with the large discharge spark as you saw, plus 20 switching sparks, which I
limited to 5 lights since they are small, and not so detailed anyway.

It's going to be a while, I'll post the image when it's done baking.


Post a reply to this message

From: Timothy Cook
Subject: Re: Sparky (for Dave VanHorn)
Date: 20 May 2004 10:42:18
Message: <40acc3ca$1@news.povray.org>
Eh?  Why not use radiosity and v. high ambient?

-- 
Tim Cook
http://home.bellsouth.net/p/PWP-empyrean

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

From: Ger
Subject: Re: Sparky (for Dave VanHorn)
Date: 20 May 2004 10:55:21
Message: <40acc6d9@news.povray.org>
Timothy Cook wrote:

> Eh?  Why not use radiosity and v. high ambient?
> 
Mainly because I do a lot of animations and radiosity doesn't work well in
animations. Secondly because I think using lights it's more controllable
-- 
Ger


Post a reply to this message

From: Ger
Subject: Re: Sparky (for Dave VanHorn)
Date: 20 May 2004 10:59:52
Message: <40acc7e7@news.povray.org>
Dave VanHorn wrote:

> 
> Very nice!  I had to scale it to inches, and I think then the translate
> needs to be "Count * Inch" but it looks good. I've put it in a test scene
> with the large discharge spark as you saw, plus 20 switching sparks, which
> I limited to 5 lights since they are small, and not so detailed anyway.
> 
> It's going to be a while, I'll post the image when it's done baking.

Glad you like it. :)
Btw, there is an error in the Spark_Light macro

#local Distance = (End - Start) / NumberOfLights+1;
should be
#local Distance = (End - Start) / (NumberOfLights+1);

I forgot the second set of brackets

Sorry :(
-- 
Ger


Post a reply to this message

From: Apollo16
Subject: Re: Sparky (for Dave VanHorn)
Date: 20 May 2004 17:02:41
Message: <40AD1CA9.4020108@earthlink.net>
Ger,

I really liked your scene so I rendered it myself but the results were 
not as nice as yours. What were your render settings if you don't mind 
sharing?

Thanks!

Apollo16


Post a reply to this message

From: Dave VanHorn
Subject: Re: Sparky (for Dave VanHorn)
Date: 20 May 2004 17:19:50
Message: <40ad20f6$1@news.povray.org>
> #local Distance = (End - Start) / NumberOfLights+1;
> should be
> #local Distance = (End - Start) / (NumberOfLights+1);
>
> I forgot the second set of brackets

No problem, I see what you mean.

I've made two macros, one for the big spark, and another for the smaller
ones, since I want them to look different, just like real life.

I need to tweak my settings though, it's taking a LONG time to trace.


Post a reply to this message

From: Ger
Subject: Re: Sparky (for Dave VanHorn)
Date: 20 May 2004 17:26:21
Message: <40ad2269@news.povray.org>
Apollo16 wrote:

> Ger,
> 
> I really liked your scene so I rendered it myself but the results were
> not as nice as yours. What were your render settings if you don't mind
> sharing?
> 
> Thanks!
> 

Hi, I don't really know what I changed in that image because I tend to play
around a lot with different options, but the commandline options were:
+W800 +H600 +A0.2

The scene by itself should be the one that is described.
Or can you tell me what is different?

As a teaser here is one with 100 lights to create a very high powered
spark :)

-- 
Ger


Post a reply to this message


Attachments:
Download 'sparky-005 (100 lights).jpg' (60 KB)

Preview of image 'sparky-005 (100 lights).jpg'
sparky-005 (100 lights).jpg


 

From: Dan P
Subject: Re: Sparky (for Dave VanHorn)
Date: 20 May 2004 22:59:56
Message: <40ad70ac$1@news.povray.org>
Ger wrote:

> A quick and dirty try to get the spark to emit light.
> 
> I tightened the spark and added a bunch of lights to it.
> The cylinders in the background are just to give an idea about the shadowing
> on the back wall.
> 
> You may have to play with the "Spark_Light" settings to get the effects you
> want.

Nice job!!!

-- 
Respectfully,          "Leave it to the coward to make a religion
Dan P            of his cowardice by preaching humility."
                                    - George Bernard Shaw
http://<broken link>


Post a reply to this message

From: Dave VanHorn
Subject: Re: Sparky (for Dave VanHorn)
Date: 21 May 2004 00:28:54
Message: <40ad8586@news.povray.org>
It's definitely getting there.
I have to get the lighting amounts roughly right, they are a BIT overdone in
this image.

It does take a LONG time to trace now, even through I cut the main spark
down to 50 lights, and the minor ones to 3 lights.  (BTW: What happens if I
set it to 1 or 2 lights?)

I used to have an area light at 2 illuminating the scene, now it's cranked
down to 0.75 in this scene, and I'm working on minimizing that.

I need to work on the main spark, it's not as complicated as I'd like but I
still want the softer look that I have here. You get a sort of "burning"
look with the longer discharges, as the heated nitrogen rises and cools.

I got tired of the checkered floor.  Interestingly, I was going for a
fractally checkered floor, but this dosen't work:

#declare Floor = object { plane { y, // <X Y Z> unit surface normal, vector
points "away from surface"
                                  0 // distance from the origin in the
direction of the surface normal
                                  photons { target reflection on refraction
off }
                                }
                          texture { hexagon
                                    texture {White_Plastic}
                                    texture {Black_Plastic}
                                    texture {hexagon
                                             texture {Red_Plastic}
                                             texture {Green_Plastic}
                                             texture {Blue_Plastic}
                                            }
                                  }
                          scale <12 * Inch, 12 * Inch, 12 * Inch>
                          }


Post a reply to this message


Attachments:
Download 'marxlight1.JPG' (50 KB)

Preview of image 'marxlight1.JPG'
marxlight1.JPG


 

Goto Latest 10 Messages Next 2 Messages >>>

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