Author Topic: Lightning Animation?  (Read 2336 times)

Offline PabloMack

  • Member
  • *
  • Posts: 1155
  • Evil men will be fed to the dinosaurs.
    • An Adventure in Technology
Lightning Animation?
« on: August 13, 2014, 02:49:07 PM »
Has anyone done a lightning animation in TG?  I will need to be able to animate the luminosity of an imported object (i.e. a lightning bolt). I am wondering if the luminosity of a lightning bolt CG model can be sufficient to illuminate the ground and clouds that surround it. One could hide a light source in the clouds to illuminate the clouds but the light sources in Terragen that might distribute light adequately might be very limited for this application. A corollary to this is that I am going to want to export the luminosity animation (variation in brightness through time) into a .chan file. The plan is to import that sequence into a lighting controller that will cast synchronized light onto live actors to be composited with a TG background in post. I have designed and built a prototype for the controller and have a working board in-hand. I am now starting the grueling process of writing the firmware and the host software for the controller. I would appreciate feedback from anyone who can foresee pitfalls in this plan of action. Thanks.
« Last Edit: August 13, 2014, 02:53:57 PM by PabloMack »

Offline cyphyr

  • Member
  • *
  • Posts: 4049
    • richardfraser
Re: Lightning Animation?
« Reply #1 on: August 13, 2014, 04:29:53 PM »
The short answer is "no", or rather not easily. If you want it to cast shadows convincingly then the render times could well become insane.
Slightly longer answer is that it can but you need really high GI settings to make it work.  This is of course assuming that you're using the luminosity to do your illumination.  How about trying a string of points exported from your model (10-50 maybe) and turn these into lights. Lightwave has a way of converting points into lights. If I remember correctly I then exported the light data as an FBX and opened it up in a text editor and manually converted it to light points. Laborious work but not too bad really.
I was working on exactly this idea (without the lighting controller and actors) a while back.  Unfortunately I lost my copy of Trees n Bolts and have not found another good lightening modeller.

www.richardfraser.co.uk
https://www.facebook.com/RichardFraserVFX/
/|\

i7 5930K @3.5Ghz, 32Gb (TG4 benchmark 13.44)
i7 980 @3.75Ghz, 16Gb (TG4 benchmark 18:40)

Offline Upon Infinity

  • Member
  • *
  • Posts: 1152
  • Raster Master
    • Upon Infinity
Re: Lightning Animation?
« Reply #2 on: August 13, 2014, 04:41:04 PM »
The luminosity will be enough if it is set high enough.  Also keep in mind, you GI Strength On x, y will affect these outcomes as well.  And, as cyhphr said, to get realistic lighting and shadows, will send your render times into the ionosphere.  ;)  Good luck.
3D Models / Art Prints: www.uponinfinity.com | YouTube | Twitter | Support My Work

Offline TheBadger

  • Member
  • *
  • Posts: 7416
  • what's the difference?
Re: Lightning Animation?
« Reply #3 on: August 14, 2014, 01:23:20 AM »
there are several threads on this for a still. In one of those, the lightning was the primary light source. The thread was rather long, and it took a few pages for the people in it to get to a good solution. But it seemed to look pretty good and should be transferable to animation. Dont have a link you'll have to dig. And there were at least a few threads on topic.

I did a test of a night shot of clouds lit by the lightning. Ill try to find the file and post a test render. I thought it had good potential before I put it on the back burner... and then forgot about it... Stand by.
It has been eaten.

Offline TheBadger

  • Member
  • *
  • Posts: 7416
  • what's the difference?
Re: Lightning Animation?
« Reply #4 on: August 14, 2014, 02:32:51 AM »
It has been eaten.

Offline PabloMack

  • Member
  • *
  • Posts: 1155
  • Evil men will be fed to the dinosaurs.
    • An Adventure in Technology
Re: Lightning Animation?
« Reply #5 on: August 14, 2014, 01:07:02 PM »
Yes. I had seen that thread. I'll have to read it more thoroughly. I'll also need to look into animating the luminance of the object which I have never done in TG (something I have done many times in LW).
« Last Edit: August 14, 2014, 01:22:32 PM by PabloMack »

Offline bigben

  • Member
  • *
  • Posts: 2129
  • The Long Stranger rides again
    • Tinkering with Terragen
Re: Lightning Animation?
« Reply #6 on: August 14, 2014, 09:00:57 PM »
"There's a mask for that"

A greyscale texture map of the distance from the source (along the surface) of the lightning would be handy, but if that's too hard...
Place a camera at the origin point of the lightning and connect a distance shader. Near colour =1 at distance = 0, far colour =0 at  maximum distance of the lightning (or slightly further).
Add a colour adjust shader (can't have a mask without one).
   Initial values black =1.01, white=1.01 (no lightning)
   Final values black -0.01, white -0.01 (complete object)
Use this for the opacity function, and multiply it by a scalar (your luminosity value) for the luminosity function

You could also use this to pulse the luminosity of the lightning.

That will give the appearance of the lightning radiating from the source point, It's not as ideal as masking by length along the object but is very easy to set up..
« Last Edit: August 14, 2014, 09:04:43 PM by bigben »

Offline PabloMack

  • Member
  • *
  • Posts: 1155
  • Evil men will be fed to the dinosaurs.
    • An Adventure in Technology
Re: Lightning Animation?
« Reply #7 on: August 18, 2014, 12:33:09 AM »
I'll have to think about that one.

Offline bigben

  • Member
  • *
  • Posts: 2129
  • The Long Stranger rides again
    • Tinkering with Terragen
Re: Lightning Animation?
« Reply #8 on: August 18, 2014, 08:41:03 AM »
I had a quick play and it didn't quite work. I either had everything or nothing. Will have to play some more.

 

anything