Tuesday, 17 December 2013

Free LW scripts - Just in time for Christmas!

While cleaning up one of my hard drives, I found a collection of some of my LScripts I developed over many years.  By all means, these are not everything I've developed and I will upload more as I find them, but I figured that there is bound to be pieces of code or ideas that others can use or learn from...

Note that I'm releasing these as a free learning resource.  I'd like to think that anybody who downloads them will share updates or modifications back to the community.  All I ask is that you don't abuse this gesture by releasing 'similiar' tools based on things you picked up from the scripts here without credit or community sharing...

Its also important to note that quite a few of these scripts are old (pre-LW9 era stuff) and some may not work - some may be partially functional in newer versions of LightWave (or work - you'll just have to test).

You can download the scripts right here (1.4mb ZIP file)

So, what do I get for the bandwidth I spend?

In case you're curious just what is in the Zipped scripts collection, then here's a quick summary.

Layout Scripts:

LCSM (Lean Clean Scene Machine)
TD tool for managing scene files. Was developed for LW8, no idea (ie. not tested) with anything above 8.5 (may not work).
Generic Quick Project
Creates a basic content folder, and an images/objects/scenes 3 folder structure.
Swap Parent
Allow a hierarchy to be reparented to another item
Selection Set loader
Allows importing of scene editor selection sets and mapping back on an item that was loaded in.
A couple of scripts to insert a control bone (ie. insert a bone between two others) and transplant a partial hierarchy to a null parent.
Terragen Exporter
Exports LW animated scenes back to Terragen for rendering nice realistic terrains/environments.
Reference Pivot
Attempts to force an objects pivot point to a null location. Means that the pivot point can be dynamically changed (via the null) so changes rotation axis, etc…
Fall away
A quick tool to make geometry "fall down" when it intersects a spherical area around a "collision" object. Used as a way of simulating fake "dynamics" with a guide geometry that controls items that are FX_Hardlinked to it. Used this one for an ocean of jigsaw puzzle pieces being sucked into a vortex for a music video many years ago.
Quick Logo scripts
A collection of scripts designed to make basic flying text logo's super simple when in a rush. For instance, single words that fly in from behind the camera. Very basic, and more that whole 90's style basic stuff…
A bleach-bypass image filter effect, with a collection of options for various effects.
A complete "old film" effect image filter - frame jittering, vignette, scratches, dirt and hairs… Fun stuff.
Grassy Pixels
A quick way to do fur/grass on a single image without a hair system. Designed to quickly create furs for static backdrop renders, etc (ie. its not really for animation)
Letter Boxer
Quick way to set up letterbox effects for standard cinematic style aspects on whatever render resolution you are using.
Rods and Cones
Simulating the effect of colour saturation based on the amount of light shading.
Two channel modifiers to drive the camera's Focal distance and FStop to allow more control over the depth of field (in particular, taking care of that less-obvious F-stop value). Define an "area" that you want everything within to be in focus.
Simple scripts to quickly save a backup copy of a scene before they trigger the rendering. A "safe" way to make sure that you don't lose work if you render and crash (but forgot to save the scene beforehand)
Unshadow nulls
Just removes the shadowing options from nulls. In the past these options would add a fraction of time to the render (minimal, but for complex scenes with hundreds it can help (we are talking older LW mind you, not the latest and greatest)
Removes the AA/Mipmapping options from images in the surface editor. The reason being that often these options will soften up textures which may need to be sharp. It also consumes RAM to store mip maps, and when there's loads of images, that could be a lot of RAM…
Shader - Occlusion
An example Ambient Occlusion script, developed for the PDF file (in the same folder) that explains AO 101's
Rename all surfaces
Adds a prefix to all surfaces on the selected object.
Rescale textures
Applies a scale change across all the texture layers within a surface. For instance, if you have a lot of procedurals and images in a preset that don't look right on an object modeled out of scale, you can quickly tweak the scales in one go.
Experimental shader that paints on a surface where particles impact.

Modeler LScripts:

Cloth Autosew
A quick hack to set up the sewing options for cloth - often a time consuming and frustrating manual process.
Inc saver
A quick modeler "incremental save" that corrected a bug in the original one that shipped with modeler way back. Since around 10 (I think) this bug has been fixed, but this one doesn't force the _v### default format.
A collection of layer tools - for moving, deleting and cleaning. I do have an updated version of clear gaps (I'll upload it in another batch with any other scripts I find) as LScript updates changed the way in which selection arrays are stored that make the clear gaps script screw up.
A tool to allow multiple pairs of points to be selected for splitting geometry. The split tool only works normally with one set of points at a time which can be quite slow.
A collection of scripts that adjust and tweak symmetry issues on models.
UV Snapper
A tool to snap points in a UV map to their closest (or use selection order). I have a tutorial on using this tool on Youtube here: http://youtu.be/Nvnyba9paDY
VMap scripts
A collection of vertex map tools. Mask Morph Copy was developed to allow morphs to be split by a weight map (for instance, splitting facial morphs to a left/right version by having a weightmap on one half of the head). The VTC scripts will duplicate Vmaps (in these scripts, colour) from a background object to the Foreground object. Easy to modify these to work with other map types (weightmaps, UV's, etc) so have fun! Combine maps is all about mixing multiple weightmaps together in different ways.
2 Scripts to weld points based on multiple selections (in pairs or as two sets based on selection order). Developed to speed up re-attaching geometry quickly where selecting pairs of points and welding bit by bit just slowed down production.

So, plenty to play with.  I hope that this comes in useful...  I'll upload more when I get time, as well as the source for some of my LW5.x  C  plugins...


  1. hello guy
    so cool you share your nice scripts
    but i have a question about "Reference Pivot"
    look some bugs for LW 11.6.1 64bit
    i have this error message
    line 12 script type 'motion' differs from architecture

    can you help me or tell me if i do something wrong?

    thans a lot

  2. Thanks for the comment! :)

    An "architecture" error usually refers to the type of script - ie. are you using the script as a motion modifier plugin? You'll need to add it, then select your object and open the motion options panel to use it under the modifiers list.

    As I mentioned in the blog post here, these scripts are very old (written way back in LightWave 7.5 or 8) so its likely not all of them work in the latest LightWave. I haven't used (or looked at) this one in many, many years...

  3. Someone sent me an email about bleacher. Its missing an image banner that is displayed at the top of the GUI. Its unnecessary for the tool to operate. To remove that error, simply delete these lines from the .ls file (I think its line 233/234) and it should work fine...

    c0 = ctlimage("D:/LW2004_projects/Production_Pack/BleachBypass/bleacher2.TGA",0,0,,256,44);

    Of course, you can also create your own custom title graphic and use it instead if you want to generate something visually interesting.

  4. How do you 'actually' any of these?

  5. I'm guessing you mean "actually use" - some of these have instructional readme's and PDF's included with them, but obviously not all of them...

    As many of these are getting old, there are some that probably won't be needed in newer versions of LW, and are really there as a source of material that may be of interest to other people wanting to develop their own tools.

    However I understand where you are coming from, and I will see if I can find some time to write up some more info (as well as the other set of scripts here :

    I did produce a video tutorial for a couple of scripts - the one on this page called 'Fallaway' and one on the other page for the Incselectionset script.


  6. Still thanks for these scripts. Always useful.