lightwave chan file export done!

Started by Thejazzshadow, January 08, 2010, 11:20:47 PM

Previous topic - Next topic

nixx

#15
Quote from: MarkTheShark on January 11, 2010, 04:14:14 PM
Think all I did was add an extra value at

"content = string(content, n, "\t", xPos[n], "\t", yPos[n], "\t", zPos[n], "\t", xRot[n], "\t", yRot[n], "\t", zRot[n], "\t", "\60", "\n");"

You don't need the backslash or the quotes - the whole thing is converted to a string. But the basic idea was right.

QuoteWhich just put the default 60 FOV in. It was the first time I had ever looked at an LScript so I was happy  :D

But that would not work for altered, or even worse, animated FOV (zooming in/out during the animation). Actually getting the camera FOV for each frame (what my version does) will always give accurate results.

QuoteOnly thing is, and I got it with my edited script, is that when importing into Terragen it comes up with an error which reads:

Camera: Import File: .chan files are expected to have 7, 8 or 10 columns: (Insert link to .chan file)

Ah yes, I see it too. Sorry it was a quick job and I didn't test it properly. This is a tab problem, I now set it to insert two tabs between values, and in a few quick tests it works fine. Try this one :

Edit : Nothing to see here people, move along... (a little further down for the final version :))
I 'm child, and man, then child again; the boy never gets older

cyphyr

Very cool, thanks :)
For some reason I'm only getting 60 frames worth of data, I'm expporting 100 frames from LW but TG is only getting 60. On opening the .chan file I see it stops at frame 60.
Thanks for putting the effort into this.
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

nixx

Quote from: cyphyr on January 11, 2010, 05:12:39 PM
Very cool, thanks :)
For some reason I'm only getting 60 frames worth of data, I'm expporting 100 frames from LW but TG is only getting 60. On opening the .chan file I see it stops at frame 60.
Thanks for putting the effort into this.
Richard

Richard, the script exports your render range, not your preview range. I bet your render range is 1-60 :)

Would it be useful to have the option which range to output ?
I 'm child, and man, then child again; the boy never gets older

cyphyr

That'll be it then lol, Never even thought to change that as it was just for a test  ::)
Thanks again
Richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

MarkTheShark

Thanks once again nixx, my plan to change FOV was to always go in and change it manually :'( of course this would never be feasible with animated FOV!!

And thanks for the tip with my "/60". going to have to try learn the basics of creating scripts.

Cheers for the quick fix aswell, not tryed it but sure it will work fine  ;)

Don't worry cyphyr, I did the same thing  :-[

nixx

#20
Glad to be of help guys.

Actually, there's still a bit of a problem that I 'm looking into right now. TG2 may still give you an error when you import the .chan file. I 've pinpointed it and I 'm fixing it now. When it's ready I 'll re-upload.


Update : This is the final, it should work flawlessly in all cases, for any LW item, supports negative frame numbers and has the option to export either the preview range or the render range ;). I hate to sound like a broken record, but... let me know :P
I 'm child, and man, then child again; the boy never gets older

Thejazzshadow

I for some reason am having trouble with this. I am not seeing anything in the 3D preview. Is there anything that I should be doing instead of just clicking export in Lightwave and clicking import in chan of camera?

Oshyan

This looks like a great tool. Don't let it get lost in this thread! Post it over on www.terragen.org perhaps?

- Oshyan

nixx

@ Thejazzshadow : After you hit "import", try refreshing your preview, or even rewind your scene and let it play back a few frames. I 've found that sometimes TG2 doesn't automatically update after you import a motion file. In my tests it worked right every time, but if there really is a problem with the script, I 'll take another look of course.

Oshyan, thanks ! :) As soon as we 're 100% sure it works as it should, sure, why not. Also, please feel free to copy/move it to whatever other thread you feel may be more suitable.
I 'm child, and man, then child again; the boy never gets older

Thejazzshadow

I'm not sure what is wrong. Here is the chan file I made. It was just basic movement (y,z) with no rotation.

MarkTheShark

Quote from: Thejazzshadow on January 12, 2010, 01:38:00 AM
I'm not sure what is wrong. Here is the chan file I made. It was just basic movement (y,z) with no rotation.

Works fine for me.

Looking at your past posts I'm guessing you have Terragen with animation ye? I'll admit I was stuck for a while before I realised the version I had wouldn't animate!

Can't think of anything else, all I did was open your .doc file, copy and pasted into notepad and saved as .chan file and then imported into Terragen. I still got the error about lines but im guessing you made it before the fix?

Thejazzshadow

#26
I do have Tg2+ animation. For some reason it is only importing the first keyframe but the .chan file looks fine. Any ideas?

Matt

Can you please attach the file you're trying to import?
Just because milk is white doesn't mean that clouds are made of milk.

Thejazzshadow


Matt

Thanks. There is something unusual about this file which Terragen doesn't understand, but if I open it in WordPad and copy the contents into a new text file called test.chan it imports OK. Perhaps it's the line endings, or the whitespace character. I'll find out what it is.
Just because milk is white doesn't mean that clouds are made of milk.