Planetside Software Forums

General => Terragen Discussion => Topic started by: cyphyr on December 14, 2008, 06:48:30 PM

Title: Lightwave Camera Motion Export Solution (with LW plugin)
Post by: cyphyr on December 14, 2008, 06:48:30 PM
Well its a little rough and ready but it works, doesn't take too much fiddling (certainly dose take some) and the numbers work our correct. :)

Bellow is a Lightwave plugin developed for Terragen 9.x by Mark Brown now of Luxology/Modo. I asked him if, since he was no longer supporting or developing the TG2LW plugin, he would not mind my posting the plugin here together with a solution (well hack really lol) for using it with TG2.

He replied "yes" as long as it is made clear that he is no longer developing or supporting it and that his contact details were not made available.

The instructions laid out below assume your using Microsoft Excel (tested using Excel 2002) but I'm sure the basics will work with other databases. Also since I am in no way expert at Excel I'm sure quite a few of the steps could be automated within the Visual Basic Module. If anyone can work this please do and post your solution here.

Here is how to get Camera motions out of Ligtwave and into Terragen 2.


Ok now that was easy, now for the fiddly bit (eek!!)



Sub Re_format()

Dim r As Long

Sheet1.Activate
Sheet2.UsedRange.Clear
r = 1
Do
    With Sheet2.Cells(Rows.Count, 1).End(xlUp)(2)
        .Value = Cells(r, 2)
        .Offset(, 1).Resize(, 3) = Cells(r + 1, 2).Resize(, 3).Value
        Cells(r + 2, 2).Resize(3).Copy
            .Offset(, 4).PasteSpecial Transpose:=True
    End With
    r = r + 9
Loop While Not IsEmpty(Cells(r + 1, 1))

End Sub




There are two caveats I have found so far, firstly that the FOV seems to import into both Vertical and Horizontal cells with the radio button checked for "Use vertical FOV", you'll need to change this to Use horizontal FOV in most cases. Secondly the rotation values for heading as exported in the tgs file go from 0 upto 179.999? to -179.999? down to 0 again. Although this will place your camera in the right place it places havoc with motion blur. To fix this select the offending cells in Excel and Paste Special firstly -180 and then 180 in "add" mode.

Thats it, hope its useful to someone. Like I said this is NOT a pollished solution but it dose work and I'm sure some one here can make a much better job of it than I. Let me know if anything is not clear or you can see a better way of doing anything. The VB code is from a StephenR over at the Excel Forum, thanks :)

Happy animating

Richard
Title: Re: Lightwave Camera Motion Export Solution (with LW plugin)
Post by: cyphyr on December 14, 2008, 06:49:29 PM
Forgot the LW2TG docs
:)
richard
Title: Re: Lightwave Camera Motion Export Solution (with LW plugin)
Post by: Thejazzshadow on January 18, 2009, 03:27:10 PM
how do I save as a .chan file? I don't see it as an option.
Title: Re: Lightwave Camera Motion Export Solution (with LW plugin)
Post by: cyphyr on January 18, 2009, 03:56:43 PM
You have to type in the .chan where it would usualy be .txt when you save the file in your text editor.
I look forward to seeing your anim.
Richard
Title: Re: Lightwave Camera Motion Export Solution (with LW plugin)
Post by: Thejazzshadow on January 18, 2009, 10:25:41 PM
you said to fill column G with fov 60. I am a litlle confused on what you mean and also, I have zeros in column G