• Welcome to Valhalla Legends Archive.
 

VB6 CGI Lightning (1.5mb+ of images)

Started by Ringo, May 15, 2009, 04:34 AM

Previous topic - Next topic

Ringo

I saw a photo of a lightning bolt streeking acoss the nights sky and thought it looked cool!
So I thought what the hell, I would try to make some lightning bolts in vb6, useing nothing more than afew buffer's and make the math up as I go alone, on each pixel. Since I suck at math, it prooved pretty hard to pull off :(

Here's some images/animations/video files, showing where I started at, LoL bugs, and where i'm at now.
Tell me what ones you like best, what you think needs changing, etc etc.


Ok so I started with a "waypoint" consept, since any other way of doing it I was thinking up, involved added almost all known laws of phyisics to the project :P
Figured, might as well keep it simple.


Then I tryed adding *splits*, so a lightning bolt would split into multiple smaller bolts. This went tits up 1st attemp and split into a few to many.


Then I tryed to fix it, and it literly went super nova/blew up in my face :o


After I got that working abit better, I set up a block of floating point variables to be the "image data", so I could do small calculations on each R, G, B and A values, then round them off to a RGBA byte based buffer after each update, to be dumped to file along with a bitmap file/info header.
For 1st attempt at the graphic, I was pretty impressed, altho it was abit square shape.


So, I tryed to make the image abit better, by adding some back ground lighting effect, as the sky would light up as nitrogen reflects the white light, as blue light.
This had a halow effect, close to the bolt :(
MultiStrike.avi.zip 1 second video clip of this style, 1 frame per 5 updates, 50fps.

So I expanded on this halow effect to see if it would work as background lighting


Then I spent most of aday rewriteing it, trying all kinds of things, to stop multiple bolts *white* burning each other, and background lighting effects refuseing to blend with out a small noticeable seam.
I could get 1 or the other, but not both :/
So, I just started fucking around with it today, and reverted back, with some minor tweeks here and there;








And heres a high_def_annimation.mng of one, just this morning. Its 1 frame every 5 updates.


Persionaly, I like this one the best and the still image just above this.
(The only above has better background lighting/shadeing imo)

What about you?

MyndFyre

Interesting idea.  I like your first "real" rendering the best personally.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.


Ringo

#3
Quote from: MyndFyre on May 15, 2009, 11:16 AM
I like your first "real" rendering the best personally.
Cool. You're the 2nd persion to favor that one for some reason :p
I'm guessing it must be the shape? Because I thought persionaly the shadeing was to pixely/squarey (that was before I added rounded shadeing)


Quote from: Spht on May 15, 2009, 12:17 PM
Nice.  this is what lightning really looks like in slow motion
heh, Funny you should link to that vid, I orginaly watched the 1st half of it for about 20mins solid, before starting this :)
I decided the phyisics would be to much hastle, and hard to minipulate :P
I would need to make some kind of "web" structure, then as soon as 1 bolt hits the "earth", all the energy down all the bolts, get drawn back through the quickest route in the web, to that point.

I did abit more tinkering this morning (looks unreallistic, but it was just for fun :P)
I've added a soften-type function, that runs on the renderd bitmap data, to try blend the pixels better;

I removed background shadeing in this one, by drasticly lowering the radius of lighting around the bolt, and forgot what other variables I adjusted (ive got about 30 constants that define how it acts)


These 2 are pretty much were I left it yesterday, give or take a few adjustments.
Good example of what I mean by "white burning" :(



So I tryed somthing I tryed the other day, where the back light gets computerd onto a 2nd buffer/layer, then both layers get bind together (brightest color wins, etc) and changed a bunch of other things;

Only the 1st and 2nd generation bolts have background shadeing in this last image, hence the dark top corners. Also the radius of back lighting is fairly low, other wise it would have taken about 20mins to generate -- but mr white burn ur eyes out, is no more :) It also looks less "foggy" imo :o