lightning and electricity

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

lightning and electricity // Archive: Tech Forum

1  |  

Post by Polyrhythmic // Aug 25, 2006, 11:50am

Polyrhythmic
Total Posts: 23
i'm working with 3 Ghz prescott processor, TS 6.6, 4 gigs ram(XP tells me 3.55 ), Nivida Ge 6800, and was wondering how i would go about creating lightning/electricity style effects within an animation. i've tinkered with the particle system but i don't think i'm getting what i'm looking for, i'd like to start with the typical "streak" thing.


any thoughts or comments welcome

Post by frootee // Aug 25, 2006, 1:49pm

frootee
Total Posts: 2667
pic
Alain Bellon created a plugin a long time ago. But it is no longer for sale (dang; just found out). I was working on a plugin for this at one point; are you a coder? You may have to roll your own. Here's his website:

http://mentemagica.com/products.htm

Any animation of a procedural type of growth (I say growth because lightning *grows* over time, procedurally, so to speak) may require some coding.

Or, perhaps use metaballs as the particle object or lots of shards, with glow turned on (post processing?)

HTH,

Frootee

Post by Polyrhythmic // Aug 25, 2006, 3:20pm

Polyrhythmic
Total Posts: 23
thanks for the link...unfortunately my coding skills are at the beginner level ,mostly simple scripts for moving and rotating in TS, still haven't figured out how to resize with a script yet

Post by trueBlue // Aug 25, 2006, 3:49pm

trueBlue
Total Posts: 1761
pic
I don't know if you have tried this, but the Macro Record Toolbar is a great learning tool.


function Execute(params)
{
sel = Node.Selection();
for (i = 0; i < Node.SelectionLength(sel); i++)
{Node.Select(Node.SelectionGetAt(sel, i)); ApplyMacro(Node.SelectionGetAt(sel, i))};
}
function ApplyMacro(selectedObj_)
{
Widgets.Scale(selectedObj_,1.780,1.780,1.780,0.000 ,0.000,0.000,0.000,0.000,0.000);
}

Post by frootee // Aug 25, 2006, 4:14pm

frootee
Total Posts: 2667
pic
Cool trueblue. Is this only for ts7? I'd like to give that a shot!


Polyrythmic: do you have ts 6.6 or 7?

If you have 6.6 I have a plugin I was working on, written in C. I got to the point where I had a single bolt, kind of randomly propagating. But I never got to the point of keyframing the visibility of each cylinder used to generate the bolt.

I was planning on adding other branches as well...

Post by trueBlue // Aug 25, 2006, 6:29pm

trueBlue
Total Posts: 1761
pic
These are for trueSpace7.

:icon_MacroRecord_VB Visual Basic Macro Recorder Toolbar

:icon_MacroRecord_JS Java Script Macro Recorder Toolbar

The script below was created with jScript with an object selected and scaling with it's widget using the right mouse button which scales in all three axis.

Post by LazeeGazzz // Aug 25, 2006, 6:41pm

LazeeGazzz
Total Posts: 55
pic
This just must be fate. I literally stumbled across THAT Alain Bellon plugin while trawling the net last weekend. You can get 'Energy', '3D Energy' and 'ThermoClay' from the link that time forgot @ http://www.virtualsoftware.com/ProdPage.cfm?ProdID=694&3D-Energy-for-trueSpace-software-download (the others are available at the very bottom of the page). They have obviously been there since before I was born and carry the original premium pricetag. '3D Energy' produces lightning as a .cob where 'Energy' creates them as graphic overlay. They look like fun and were written for tS so it sounds like what you need. However I haven't actually used this site so caveat emptor.

Ever since Primitive Itch blew up I have trawled the web collecting every free plugin I can find. Partly out of curiosity but also because some of this stuff may be really useful (hence the start of this thread). Does anyone else feel that PI should have had a closing down sale??

Post by splinters // Aug 25, 2006, 10:20pm

splinters
Total Posts: 4148
pic
I love the way 3D Energy is described as having a 'very graphical user interface'...:D

Post by hemulin // Aug 25, 2006, 10:57pm

hemulin
Total Posts: 1058
pic
Apparently Thor (http://www.zenstar.com/download.htm)is very good at creating lightening. You may want to try out the standalone demo of Thor which outputs to .cob

and in the gallery (http://www.zenstar.com/gallery.htm) you can see the type of lightening the program creates.

Post by splinters // Aug 26, 2006, 1:07am

splinters
Total Posts: 4148
pic
Can't see a windows version there Hemulin...:confused:

Post by b_scotty // Aug 26, 2006, 1:54am

b_scotty
Total Posts: 176
pic
Be aware that the Energy plugins may not work in trueSpace versions later than 4.x Several older plugins, especially ones dealing in geometry needed to be re-compiled for tS 5 and later, and I'm not sure that these ever were.
Just something to be aware of; your mileage may vary :)

Post by stan // Aug 26, 2006, 4:41am

stan
Total Posts: 1240
pic
the links seem to be dead at that site selling 3denergy..try adding to cart it doesn't find the file..
so here are some demos from way back..:D hope the authors don't mind..

there was a time when thor was going to become a tsx but it never happened http://www.caligari.com/tradecenter/tsx/tsx_plugins3_98.htm

Post by TomG // Aug 28, 2006, 1:16am

TomG
Total Posts: 3397
The first way that comes to my mind is to use a plane with an image painted on it, including transparency.


To animate the streak, then the texture would be animated too. The addition of lights would give the glow from the lightning.


Of course getting it to look right would depend on the angle of the camera and the angle of the plane. You could use multiple planes to give a more 3D look. These techniques can be used in real-time too (pretty much how most effects are done in games for instance).


Now making a good looking lightning texture would not be easy, though I believe there are programs and plugins (for stuff like Photoshop) that would most likely do that. Fractal type programs might do it for instance.



HTH!

Tom

Post by frootee // Aug 28, 2006, 3:22am

frootee
Total Posts: 2667
pic
But wouldn't it be really cool to create geometry for lightning? That's what I was working on (and still am; just put it on hold so I can learn ts7!). Currently, I have a single bolt, but I was trying to get it to move in a random sequence. I had it working pretty well, but then suddenly after I made an adjustment it started curling in a loop, in a single direction.


Basically, I have setup a for loop which repeatedly generates cylinders, with the top face rotated. Then, the next cylinder is placed at the location of the last cylinder's rotated face. I think I just have the rotation set in one direction only. I intend to fix that.


Then, I plan to keyframe the visibility of each cylinder over time, so it appears like the lightning 'grows' over time.


And, of course, I need to create other branches for the lightning.


It looks like that is how at least one of the old lightning plugins works. I studied the sample obj file (created with 3d energy I think) that came with Inside Truespace 4.3.


Frootee

Post by frank // Aug 28, 2006, 3:26am

frank
Total Posts: 709
pic
If you go the route Tom suggests, you can paint some pretty convincing lighting effects in Photoshop. Just lay down some varying-sized blueish lines using regular paint mode and then change to Color Dodge and a larger brush size, and paint over parts of them.


I've attached some quick examples. These took around 5 minutes. Certainly not the best-looking lightning bolts but you can get an idea of the bright/glowy effect that can be accomplished.


Another thing to do, if you go the 2D/mapped-plane route, is to use real footage of lightning and key the background out (filter the black color or something).

Post by Polyrhythmic // Sep 9, 2006, 8:46am

Polyrhythmic
Total Posts: 23
These are for trueSpace7.



:icon_MacroRecord_VB Visual Basic Macro Recorder Toolbar



:icon_MacroRecord_JS Java Script Macro Recorder Toolbar



The script below was created with jScript with an object selected and scaling with it's widget using the right mouse button which scales in all three axis.







is there anything like that for 6.6 ?

Post by trueBlue // Sep 9, 2006, 8:57am

trueBlue
Total Posts: 1761
pic
There is no Macro Recorder for tS6.6, but there is the Python script editor.

Post by Polyrhythmic // Oct 7, 2006, 9:34am

Polyrhythmic
Total Posts: 23
i've come up with this so far
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2021. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn