Archive for the ‘Lightwave’ Category

Lightwave : Anaglyph Stereo previewing in OpenGL

Tuesday, January 26th, 2010

Been busy on a video to illustrate a nice work around to a missing option to view anaglyph stereo in the OpenGL viewport in LW. Parts of it have been gathering dust on my hard disk since before last Christmas and i was never satisfied with it, so i scrapped the lot and started over last night in a bout of insomnia, it’s a pretty rough edit, it doesn’t always flow too well, but it does get the message across.

The ‘US Military Base’ model i used in the video is a model by Jon Fletcher and was downloaded from TurboSquid, i tweaked it a bit for my stereo work flow videos (mostly repositioning of items and the addition of some large scale terrain.)

My Layout preferences are pretty much out of the box settings, with the exception of the Shading Method that has been set to GLSL Shaders and my DOF/MBlur Preview Passes is set to 2 for this video.

And on a last note, i apologize before hand for the crappy audio quality (I’m still using a 20 euro Logitech headset for this, for now) and for the lots of ‘uhms’ and ‘ahs’ as i struggle to not stick my foot too far up my mouth (hey, it was late and English isn’t my native language)

Part 1

Part 2

Lightwave : hos_incrementalSaveModeler.ls

Tuesday, June 9th, 2009

fancy_worm_blackback_120Here’s a Lightwave Modeler version of the incremental save system we use (finally got some time to clean up the code for release), again, it mimics the way Autodesk Maya does incremental saving.

Just download or copy paste into a text editor and save as an .ls file in your Lightwave Plug-in / Lscript folder, bind to a key of your liking.

Again, if you find anything, let me know.

download : hos_incrementalSaveModeler

.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@script modeler
@version 2.2
@warnings
@name "hos_incrementalSave"
 
mySeperator = getsep();
 
main
{
    incrementalSave(Mesh(0));
}
 
incrementalSave:myObject
{
    myFile = myObject.filename;
 
    if(myFile) // start creating an incrementalSave
    {
        myFileinfo = split(myFile);
 
        checkDir(myFileinfo[1] + myFileinfo[2], myFileinfo[3]+myFileinfo[4]);
        incVersion = checkIncrements(myFileinfo[1] + myFileinfo[2] + "incrementalSave" + mySeperator + myFileinfo[3] + myFileinfo[4], myFileinfo[3], myFileinfo[4]);
        incFile = myFileinfo[1] + myFileinfo[2] + "incrementalSave" + mySeperator + myFileinfo[3] + myFileinfo[4] + mySeperator + myFileinfo[3] + "." + strright("000" + incVersion.asStr(), 4) + myFileinfo[4];
        filerename(myFile, incFile); // Using filerename() as move function;
        save(myFile);
    }
    else // The object has never been save before, don't screw this up or people might go Jay and Silent Bob on my ass.
    {
        myDir=getdir(OBJECTSDIR) + mySeperator;
        myFile = getfile("Save Object As", "*.lwo", myDir, 0);
        if(myFile)
        {
            myFileinfo = split(myFile);
            myFile = myFileinfo[1] + myFileinfo[2] + myFileinfo[3] + ".lwo"; // Basically makes sure there's ALWAYS an extension called .lwo
            save(myFile);
        }
    }
}
 
checkDir:myDir, myFile
{
    dirArray = matchdirs(myDir,"incrementalSave");
    if(!dirArray)
    {
        mkdir(myDir+"incrementalSave");
    }
 
    dirArray = matchdirs(myDir+"incrementalSave"+mySeperator, myFile);
    if(!dirArray)
    {
        mkdir(myDir+"incrementalSave"+mySeperator+myFile);
    }
}
 
checkIncrements:myDir, myFile, myExt
{
    incCount = 0;
    incArray = matchfiles(myDir, myFile + "*" + myExt);
    if(incArray != nil)
    {
        foreach(incFile, incArray)
        {
            // wanted to do this part with a more reliable regular expression, but LScript regex is bollocks.
            // So now we just do some string size math and pray that nothing weird is done with the filenames.
            incVersioning = strleft(incFile, size(incFile) - size(myExt));
            incVersioning = strright(incVersioning, 4);
            incCount = max(incCount, incVersioning.asNum());
        }
    }
    else
    {
        return 1;
    }
    return ++incCount;
}