Yo traction fans - arcing sparking

sniper297

Coconut God
Still trying to figure out the script for dual powered L/subway cars to get the 3rd rail pickup shoes working correctly in combination with dual poles, got struck with an unrelated muse - the spark color (or "colour" if you're not from the rebel colonies).

48298262.jpg


With all the testing I've been looking at these a lot, James Moody's original - is that too white? So I did a reskin;

63011565.jpg


I can't decide if that's too blue or just right, so I need opinions from sparky fans. :cool:
 
Still trying to figure out the script for dual powered L/subway cars to get the 3rd rail pickup shoes working correctly in combination with dual poles, got struck with an unrelated muse - the spark color (or "colour" if you're not from the rebel colonies).



With all the testing I've been looking at these a lot, James Moody's original - is that too white? So I did a reskin;



I can't decide if that's too blue or just right, so I need opinions from sparky fans. :cool:
I would say split the difference and you will be bang on.
Mick Berg.
 
Hmmm, tried cloning that and changing saturation -20, lightness +20, that looks too white now. Video would probably be better than screenshots, since the screenshot only captures a moment of what it looks like in game.

http://www.youtube.com/watch?v=JjBZHiHNvwE

Front car has the original spark, middle the dark blue spark, last car is the latest test which I think is too white.
 
Which gasses?

Some references say an electric spark (like lightning) should be cyan, i.e. equal parts blue and green (0,255,255 in RGB). But since what it really is, is a momentary discharge in air (mostly nitrogen, some oxygen and less than 1% everything else) it seems to me the sparks should be closer to the color of nitrogen in a discharge tube, which is pretty close to magenta (255,0,255). So, just a suggestion - try shading the original white toward magenta and see how you like it.
 
Oh, you're full of gas

Consensus seems to be blue is no good here, but that's the light color I remember most from arc welders, motor contactors, and L trains. Maybe it's because the spark itself was white but the light it gave off was blue? That's what's really needed here, bright white center that gives off a big blue glow. :cool: AFAIK there's no way to do that with a spark, only a headlight will actually project lighting? Anyway I'll try to split the difference between the second car and third, -10 on saturation and +10 on light, see what that looks like.
 
Dumb question, but will a real spark 'color' look different in day time versus night time or in a subway?

Just wondering.

Thanks,
 
All cats are black after midnight in the coal mine

Dunno if the color would be different, but obviously a low intensity spark would be less visible in bright sunlight.

Other thing might be dependent on voltage - a spark is essentially a short lived flame, and the color of flame depends on how hot it is and how efficient the burn is - for a gas furnace, for example, if the flame is yellow you're wasting gas, need to tune it up so the flame is blue. I suspect 25,000 volt AC wires like the NorthEast Corridor would produce a hotter whiter spark than the CTA, which is plain vanilla 600 volts DC. Some lighting effects;

http://www.youtube.com/watch?v=4oMsAoSQ-pI

Can't really see the sparks too well, but look at the color of the glow on the building to the left.

This was a common sight in Chicago in the winter when ice built up on the 3rd rail;

http://www.youtube.com/watch?v=C3rKLT-CnHg

Center is white, but as you get toward the outside it changes to blue. The embers are a different thing altogether, orange red yellow showers falling to the street and occasionally setting the wood crossties on fire.
 
Other thing might be dependent on voltage - a spark is essentially a short lived flame, and the color of flame depends on how hot it is and how efficient the burn is - for a gas furnace, for example, if the flame is yellow you're wasting gas, need to tune it up so the flame is blue. I suspect 25,000 volt AC wires like the NorthEast Corridor would produce a hotter whiter spark than the CTA, which is plain vanilla 600 volts DC.

Different colour sparks for different electrification technologies may well be valid - it could also depend on what the conductor wire/rail and the collector shoe/pantograph/wheel are made from. I spent some time playing with the colours - It isn't a plain white, it has a blue tinge to it. While I made my original one for 25kV AC and sliding pantograph collection, most of my first hand experience is with 750V DC...

If you want to recolour it, please go ahead. (I wonder if having a couple of slightly different shades used at random would help with the effect?)

(I do like Tom-sa's modified version of the script though, which has small sparks during the day, and much much larger ones at night...)
 
"different shades used at random", yeah, I thought about that but don't wanna make a career out of this. Forget which one, but there's a sparky freight loco that has half a zillion sparks (or maybe a quarter zillion, I didn't count that carefully) defined in the config file, presumably to move the spark around and change the size. At some point that would be cool, but at the moment I still have the problem of one forward upper spark when the front pole is up, one back upper spark when the aft pole is up, both upper sparks when both poles are up, and two different lower sparks for the third rail pickup when both poles are down. Further complicated by having to make a different set for the AI which will spark the aft pole with pantz 1 and the lower sparks with pantz2 (forward pole on the AI is invisible with a fake front pole attached as a mesh since an AI train with a panto defined won't run without at least one pole up) with a different script. :'( So random locations and colors, love it, some time in the far far far distant future.

Looking at some videos on youtube, that blue-green you used is actually just about dead on for modern pantograph and HST, which I assume is all 25kV AC these days. After some fiddling with the colors and the alpha this is what I got now;

60001218.jpg


Day and night shots.
 
Now someone will ask you why doesn't the night spark light up the ground at the point of the spark.

Note: I am not asking, just thinking ahead.:o

Regards,
Ron
 
Okay Jim, I'm going to be the bugger here. The light cyan looks the best! :D

Remember there are multiple parts to an arc. There are the to and from leaders first running between either end like lightning, and then the fall-over once the air has been heated enough to conduct the electricity. Once this happens, we see our big arc, which is going to super-heat the air and produce the brightest section.

The color components now are going to be the molecular color such as blue and orange and one is going to be bright white. The brightest part is the plasma, which would be the brightest portion of the spark. This is also the part that probably makes the zapping/cracking sound too when the air is heated up.

The overall color now will be lighter, like the light cyan, because this is has now been washed out by the bright white from the super-heated air around the center of the spark.

So keep it simple. The light cyan with the white saturation I think is probably a good compromise on this. We don't want you from going all sparky on us!

John
 
Yeah, as the anteater says it should cast light and it don't. Plain white spark that casts a blue light on everything is what we're really looking for, and ideally you should see peripheral blue flashes from the cabview, especially at night and in subway tunnels. :cool: Next mad science experiment, increase the texture size to 512x512, make a little white spark in the center with a big circle around that with white gradually shading to blue at the outer edge. Set the corona size to something bizarre like 3 meters and see if something catches fire. :hehe:
 
FIRE IN THE HOLE!

Next crazy experiment, increase the texture size to 512x512 with a small spark and big corona;

82811061.jpg


Increase the corona size in the config.txt from 0.15 or 0.2 to 1.0, see what that looks like.

http://youtu.be/rLKR4oI1zPA

Still needs some tweaking, but I like the effect. :cool:
 
<snip>

Still needs some tweaking, but I like the effect. :cool:

Yes, looks great.

I am sure that all the 'sparkerators' will be overjoyed with the effect.

Note: aardvarks to NOT eat ants, they prefer 'filet o' termite' for fine dining.:wave:

Thanks for all your great content.

Regards,
Ron
 
Cool, man

Hey Jim --

That last video is cool; ultra cool.

A suggestion - perhaps consider adding some variety to the flashes? Size (intensity) and colour.

It can be done. In one of my sparkers (Loco MAV V41 #522 TS12) I used 8 attachment points per pantograph. It would be quite easy to change the spark characteristics for each attachment.

Phil
 
Egad Watson, the criminal returns to the scene of the crime!

I knew there was one sparkyscript with more than one spark per attachment, didn't know you were the culprit. :wave: Well, love to, but main problem now is just trying to get four locations, the fore and aft pole and the right side of both bogies, to work and play well together with just a single spark. I think I know which data in the script does what;

make_spark(0, 0);
make_spark(1, 0);

Spark corona labeled 0 and 1, obvious;

switch (pantos_up)
{
case 1 :
// attachment points for front panto
make_spark(0, Math.Rand(0.01,0.1));
break;
case 2 :
// attachment points for rear panto
make_spark(1, Math.Rand(0.01,0.1));
break;
case 3 :
// attachment points for both pantos
make_spark(Math.Rand(0,2), Math.Rand(0.01,0.1));
break;
default :
// no pantos up, do nothing
break;
}

That's where it breaks down, I've tried copying the data for case 3 and changing to spark2 and spark3 to get the 3rd rail pickup shoes sparking when both poles are down, but I either get a constant on with no spark or one bogey sparking and the other one not doing anything. Again it's even more complicated since I have six types to deal with, 4000 player and 4000 AI and the A and C versions of player and AI for the 6000s, the C has to reverse everything on the A. The three different AI versions would actually be simpler since I only need two states with 1 upper spark for pantz 1 and two lower sparks for pantz2, main trouble there is figuring out how to script it so the two bogies will spark with the same IF THEN ELSE condition. Should be simple because the original script has two sparks when the "both poles up" pantz3 condition is met, I just can't figure out what that code means.

Get past all that and get four single sparks working when they should be, then I'd be delighted to complicate it further with different sized and colored sparks.
 
Eureka!

Finally figured out the magic formula after 10 zillion script errors, turned out to be simple - "if (pantos_up)" is the conditional flag for the main datablocks, so if both pantos are down it skips all the fun parts that make it all work. Adding the // in front of that statement makes it always load the data, so I got the 3rd rail sparks working correctly. :wave: Heady with success I decided to give Phil's idea a try, several script errors later I have all three kinds of player car prototypes working and tested, one AI working and tested and two to go before I start cloning. Gonna clone new versions rather than doing KUID2s for the existing ones, as I was laying in bed trying to fall asleep and seeing flashing lights with my eyes closed it occurred to me some people might not like it that flashy. :hehe: Also decided to go with left side 3rd rail sparks since many of the elevated sections have buildings close alongside, with right handed running the left sparks are on the inside where they're more visible. Haven't tested with AI traffic yet but an oncoming train seen from the cabview would have the sparks hidden by the train if they were on the outside, so left is better.

Anyway enough chatter, here's the latest video with four different spark sizes for each attachment;

http://youtu.be/7eckNfZItBI
 
I'm impressed - and blinded

Very impressive, Jim.

But did they/do they actually spark that much in real life?

Phil
 
Back
Top