.chan help

Started by cyphyr, November 30, 2008, 08:29:34 AM

Previous topic - Next topic

cyphyr

Well I've looked everywhere, here, cgtalk, Newtek's LW forums but to no avail. All I want to do is create a .chan file from my Lightwave camera motion and nowhere can I find even the beginnings of a solution. Maya can output a .chan file as so of course can Nuke, but both of these apps are way beyond my budget!
The info that goes into a .chan file is very simple, just x y z h p b scalex scaley scalez FoV but how on earth can I get this info out of LW. Its there on the screen on a frame by frame basis but it dose not seem to be included in any of LW's file formats :( I could just copy and paste the data from the info box in LW on a frame by frame basis but that's going to be over 3000 "copies and pastes" and other than the RSI there's way too much scope for errors!
Why did PS choose such an obscure motion format?? ???
Any help gratefully received.
richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

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

bigben

It's not entirely obscure...

I use Terranim to create my camera paths. It requires a bit of creative editing and manipulation although most of it can be automated with text manipulating macros and spreadsheets. 

I convert the TGS to a tabulated text file and then import that into a database to do the rest.  Haven't added the math for compensating for the curvature of the earth yet, but it's close enough for most animations I've done.

cyphyr

Thanks BB, I've looked at Terranim and CamPathEditor and use a target rather than a rotational value, how did you get around that?

Terranin Code:
Quote
....
;framenum,9
campos,224.787116089259,226.786493510996,-0.482968531926
tarpos,224.758151048058,226.757482754443,-0.469948133358
camb,-0.007342208032
frend
;framenum,10
campos,224.652443118514,226.651589040456,-0.422426789481
tarpos,224.623486177311,226.622575791596,-0.409408132226
camb,-0.008159772019
frend
....

CamPathEditor Code:
Quote
....
; Frame #3
CamPos 902.295139,952.223013,40.125142
TarPos 902.39311,951.297353,39.978862
CamB 0.0
Zoom 1.414
FRend
; Frame #4
CamPos 902.39311,951.297353,39.978862
TarPos 902.490732,950.371695,39.832561
CamB 0.0
Zoom 1.414
FRend
....

I've had the best results from TGS_exporter
Quote
....
; Frame 4
CamPos 0,4.00013,0
CamOri 36.0012,0,0
Zoom 2.4
FRend

; Frame 5
CamPos 0,5.00047,0
CamOri 45.0043,0,0
Zoom 2.4
FRend
....
Will still need a massage but its one heck of a way closer than I was before.
richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

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

PG

Ouch. Hopefully the animation module that'll be released after TG2 comes out will have some function to create these properly.
Figured out how to do clicky signatures

rcallicotte

@PG - No foolin'.  I agree.
So this is Disney World.  Can we live here?

PG

Anyone know if Matt's started work on the animation module yet or can we still ask for some features to be included? The features that are available at the minute make animation of populations, clouds and water near enough impossible. So I'd really like something similar to TG 0.9 but obviously with the flexibility that the TG2 node network offers.
I reckon an animation node that can take clouds, objects, light sources, etc. as input and then allow functions and the like to be attached to it for more manipulation.
For example. You add an animation function and plug the atmosphere into it, then you can select things like wind direction and speed, yadda, yadda. Then you can create another one and plug the lake object (or a planetary water body if planetside are doing one) and select the wind direction etc. for that as well. It'd be good to be able to do them seperately so that we can have different climates in different areas just like in the real world.
Figured out how to do clicky signatures

bigben

Quote from: cyphyr on December 01, 2008, 06:39:13 AM
Thanks BB, I've looked at Terranim and CamPathEditor and use a target rather than a rotational value, how did you get around that?

Terranin Code:
Quote
....
;framenum,9
campos,224.787116089259,226.786493510996,-0.482968531926
tarpos,224.758151048058,226.757482754443,-0.469948133358
camb,-0.007342208032
frend...


1: Delete all:
";framenum,"

2: Replace with tabs:
"campos,"  "tarpos,"  "camb," [line break]  ","

3: Replace with line breaks:
"frend"

4: Import into spreadsheet/ database and calculate differences between tarpos and campos (dx, dy, dz)

From there it's basic trigonometry to calculate heading and pitch, although it requires some conditional statements to eliminate divide by 0 errors. But once you've set one up you can reuse it for other conversions.

cyphyr

QuoteFrom there it's basic trigonometry to calculate heading and pitch
I feared as much  :o
lol
richard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

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

bigben

A little rough but you could try http://forums.planetside.co.uk/index.php?topic=1841.0

I'm going to be redeveloping this over the summer and will release a Mac version as well, although some of the functionality is Windows specific.  Here are the field definitions in my database showing the different conditions and calculations for each.  dx,, dy and dz are the differences between the tarpos values and the campos values.

TGS Pitch
===========
Case(
dz = 0;0;
Degrees(Atan(dz / Sqrt( dx^2 + dy^2 )))
)

TGS Heading
===========
Case(
(dx) > 0 and (dy) > 0;90 - Degrees(Atan(dy / dx));
(dx) > 0 and (dy) < 0;180 + Degrees(Atan(dx/dy));
(dx) < 0 and (dy) < 0;180 + Degrees(Atan(dx / dy));
(dx) < 0 and (dy) > 0;360 + Degrees(Atan(dx / dy));
(dx) = 0 and (dy) > 0;0;
(dx) = 0 and (dy) < 0;180;
(dx) > 0 and (dy) = 0;90;
(dx) < 0 and (dy) = 0;270
;-999) /* previous conditions should cover all combinations, set to weird value for error checking */

neon22

Quote from: cyphyr on November 30, 2008, 08:29:34 AM
The info that goes into a .chan file is very simple, just x y z h p b scalex scaley scalez FoV but how on earth can I get this info out of LW. Its there on the screen on a frame by frame basis but it dose not seem to be included in any of LW's file formats :(
Hi Cyphyr,
How about using something like DeepExploration which can read in your LW file and save out the camera in another format. Not Chan unfortunately :( but maybe another one is simpler to convert.
Can you send me a LWS/LWO file with a simple cam anim in and I will see what i can do.

Cheers...

pixelmonk

#10
Quote from: neon22 on December 02, 2008, 11:56:52 PM
Quote from: cyphyr on November 30, 2008, 08:29:34 AM
The info that goes into a .chan file is very simple, just x y z h p b scalex scaley scalez FoV but how on earth can I get this info out of LW. Its there on the screen on a frame by frame basis but it dose not seem to be included in any of LW's file formats :(
Hi Cyphyr,
How about using something like DeepExploration which can read in your LW file and save out the camera in another format. Not Chan unfortunately :( but maybe another one is simpler to convert.
Can you send me a LWS/LWO file with a simple cam anim in and I will see what i can do.

Cheers...

it should be in the LWS which should still be ASCII based.   Hopefully one day T2 will include FBX support so multiple apps could be supported in one shot.  ;)   With that, one option if you have a friend w/Maya or download a 30 day trial, export out from LW to FBX format and import into Maya.  Then from Maya use one of the .chan import/export mel scripts found on Highend3D.com

Oshyan

#11
Quote from: PG on December 01, 2008, 12:30:21 PM
Anyone know if Matt's started work on the animation module yet or can we still ask for some features to be included? The features that are available at the minute make animation of populations, clouds and water near enough impossible. So I'd really like something similar to TG 0.9 but obviously with the flexibility that the TG2 node network offers.
I reckon an animation node that can take clouds, objects, light sources, etc. as input and then allow functions and the like to be attached to it for more manipulation.
For example. You add an animation function and plug the atmosphere into it, then you can select things like wind direction and speed, yadda, yadda. Then you can create another one and plug the lake object (or a planetary water body if planetside are doing one) and select the wind direction etc. for that as well. It'd be good to be able to do them seperately so that we can have different climates in different areas just like in the real world.

Significant additional work on the Animation Module will not be possible until after the final release of TG2 itself. We do have a good idea of what we want to do with it and you can be sure it will be a significant improvement over what is available now in TG2, as well as what was available in TG 0.9, and generally speaking in Terranim and Campath as well (at least in the sense that it will be native functionality rather than an external application).

However I think it's important to make clear that, just as is true of the current TG2 UI and functionality, it is unlikely that with the animation functions we will have anything like "wind direction", etc. any time soon. TG2 is not a direct simulator of natural phonemona, and most procedural elements are not "translated" into their real-world analogues. This is great for shader writers who understand the terminology, and not so much for other people of course, but we hope to bridge that gap mostly with documentation. Perhaps in the future more simulative or accessible functionality could be added as an additional UI type or plugin, but for now again the focus is on proceduralism, flexibility, and power. That precludes more simplistic functions like "wind". That is not to say you won't be able to accomplish the same effect, but you would have to do so using TG2's existing functionality - the animation module will only provide tools to more effectively utilize the animation abilities already present (tools like a timeline editor with keyframes, different interpolation schemes, more import/export formats for motion data, etc.).

I hope that makes it a bit more clear where we're headed.

- Oshyan