CGTalk > Software > Maxon Cinema 4D > Cinema 4D Resources
Login register
Thread Closed share thread « Previous Thread | Next Thread »
 
Thread Tools Search this Thread Display Modes
Old 06-26-2005, 05:19 AM   #1
Simon Wicker
Expert
Simon Wicker
Digital Matte Painter
United Kingdom
 
Join Date: Nov 2003
Posts: 1,186
How to import a Maya camera!

hi everyone,

sorry this has taken so long to sort out but my wife gave birth last week to our new son and our priorities have been re-arranged somewhat!

anyway for people who are interested here is a small explanation of how to get exact camera data out of maya and into cinema 4d. this is pretty much one of those last resort kind of things (because it requires you to have maya anyway). my explanation kind of assumes that you already know how to use maya and cinema and just need a nudge in the right direction.

start out in maya and select the camera you need to export. at the top right of the screen click on the toggle to show the channel box/layer editor. choose file/export selection and show the export dialog. change to the export format to the .move format (this will create a basic tab delimited text file upon export). swipe over the channels you wish to include in your export, depending on the situation this would be the channels for translation, rotation and scale as well as the horizontal aperture width and focal length (as this defines the fov in cinema) and then click the 'add from channels' button in the export dialog to add these to your move file. aperture width and focal length have to be added manually to the list in the export dialog using the format of camerax.fl or camerax.hfa (you can see the correct extension to use if you click on the 'channels' menu in the channel box and choose channels/channel names/short). once you have finished adding the channels you wish to use you can click on export selection and save the move file. i tend to make sure i use a .txt extension for the file as most macs and pc's will get mighty confused by the default .mov extension which generally belongs to quicktime).

the next step is to open the move file in a text editor (such as notepad on the pc or text wrangler on the mac) and then at the top of the file add in the names of the channels as tab delimited text. this isn't entirely necessary but i like to do that so i can keep track of what the channels actually represent, so i will add in tx (tab) ty (tab) tz (tab) , etc. as the first line. save this altered text file.

now open up a copy of my cinecam template (i've attached this to this post) and select the null Raw camera data. from the plugins menu choose cinema 4d/ascii animation import and locate your move file. in the dialog that appears you will need to set headline to be checked (so the names you gave the channels are used as the names of the sequences created), separator is set to tab, track is set to real, and time is set to frame. press okay and cinema should tell you that it has succesfully imported the data. open the timeline and you should see that you now have tracks representing your camera data. you now need to drag them to the correct places (tx ty and tz should be dragged and dropped onto the X Y Z sequences of the null Camera_trans, rx ry and rz should be dragged to Camera_rot). should you have included it there is also a null for other camera data, position X being for focal length and position Y being for the horizontal aperture width. there is an xpresso expression that takes all this data and pipes it into the camera called shot_layout_v1. the xpresso expression compensates for the different orientation of the axes in maya and the fact that maya measures the aperture width in inches.

you should now have a camera that matches the camera in maya! you can now bake the shot shot_layout_v1camera so it becomes independant of the expresso set-up. finally you just have to remember to adjust your render settings to match the maya cameras aspect ratio.

cheers, simon w.
Attached Files
File Type: zip CineCam_template_new.c4d.zip (6.4 KB, 491 views)

Last edited by Simon Wicker : 06-26-2005 at 05:23 AM.
 
Old 06-26-2005, 07:17 AM   #2
CosmicBear
I'm just a CosmicBear
 
CosmicBear's Avatar
portfolio
Stephan
creative director
London, United Kingdom
 
Join Date: Aug 2002
Posts: 711
Send a message via AIM to CosmicBear Send a message via Yahoo to CosmicBear
Congratulations on your new baby!!

And thank you for the explaination! That's fantastic!!
__________________
I'm just a CosmicBear from another galaxy... gosh, i'm so homesick
 
Old 06-26-2005, 08:31 AM   #3
ThirdEye
PinealGlandOptics
 
ThirdEye's Avatar
CGSociety Member
Alberto Blasi
Architect & Graphic Designer
Milan, Italy
 
Join Date: Jun 2002
Posts: 10,241

Congratulations to you, your wife and your new son Simon
__________________
www.albertoblasi.com | architect & graphic designer
 
Old 06-26-2005, 08:39 AM   #4
Srek
Some guy
 
Srek's Avatar
CGSociety Member
portfolio
Björn Dirk Marl
Technical Design
Maxon Computer GmbH
Friedrichsdorf, Germany
 
Join Date: Sep 2002
Posts: 11,331
Great news
Best wishes to you and your family from me and my wife Yvonne.
How come we never saw a wip?

Cheers
Björn
__________________
- www.bonkers.de -
The views expressed on this post are my personal opinions and do not represent the views of my employer.
 
Old 06-26-2005, 11:22 AM   #5
lllab
VRAYforC4D
 
lllab's Avatar
stefan Laub
VRAYforC4D_architect
vrayforc4d.com
Vienna, Austria
 
Join Date: Sep 2002
Posts: 3,798
congratulations for your son!

and thanks for the tipp.
cheers
stefan
 
Old 06-26-2005, 02:49 PM   #6
Simon Wicker
Expert
Simon Wicker
Digital Matte Painter
United Kingdom
 
Join Date: Nov 2003
Posts: 1,186
thanks everyone. calvin is doing well and his sisters are very happy to have a baby brother to look after.

cheers, simon w.
 
Old 06-26-2005, 06:27 PM   #7
chris_b
looking for patterns
 
chris_b's Avatar
Christopher Bahry
Director
Tendril
Toronto, Canada
 
Join Date: Jan 2002
Posts: 389
Send a message via AIM to chris_b
Simon... that is wonderful news. Congratulations to you and your family

Also, many many thanks for sharing this. It is something that I will be using very often. Absolutely fantastic explanation. Maybe at some point we'll get a .ma importer? After all,
if After Effects can read an .ma, then it is probably a fairly simple thing.

Thanks again.
 
Old 06-26-2005, 06:30 PM   #8
Rev9
Registered User
 
Rev9's Avatar
portfolio
Randy Blain
Flash Guru, Concept and 3D artist
Atlanta, USA
 
Join Date: May 2002
Posts: 306
Send a message via AIM to Rev9
Can ypu post the wireframe mesh??

Congrats Daddy-O!

Best
BT
 
Old 06-26-2005, 07:04 PM   #9
bonsak
Frequenter
 
bonsak's Avatar
 
Join Date: Jul 2004
Posts: 119
Congratulations Simon, have one myself so i get the idea about priorities being different :-)

Your template could probably work for anim data coming from AE as well.
We have projects all the time that we start of in AE (because its our main tool)
just to realize we need some 3d elements added or we realize we have to finish every thing of i C4d.
We never figured out how to do this so this might be the solution.
I dont have AE at home but ill try it tomorrow.
Anybody know how this expresso rig needs to be reconfigured for this to work?

AE anim data look like this:

Adobe After Effects 5.0 Keyframe Data Units Per Second 30
Source Width 720
Source Height 576
Source Pixel Aspect Ratio 1.06667
Comp Pixel Aspect Ratio 1.06667


Position Transform Effect Parameter #2
Frame X pixels Y pixels
z pixels
40 379.676 274.557 0.000
41 379.705 274.878 0.000
42 379.616 275.353 0.000


Regards
Bonsak
 
Old 06-26-2005, 07:31 PM   #10
govinda
Ugly Avatars R Us
 
govinda's Avatar
Richard
Los Angeles, USA
 
Join Date: Jan 2003
Posts: 1,205
Send a message via AIM to govinda
Congratulations!

And thanks for this! I was stuck in mismatched mayacam world awhile back and know the pain.
 
Old 06-26-2005, 07:31 PM   #11
JoelDubin
Lard of the pots
portfolio
Joel Dubin
Creative Director
MadMicrobe
United%2BStates
 
Join Date: Aug 2002
Posts: 6,646
Wow--this is defiitely one to copy into my scrap file--thanks for sharing.

Also--I believe you've really got your priorities mixed up.
Congratulations! Guess its old hat at this point.
__________________
_____________________________

MadMicrobe
MadMograph (blog)
Behance
 
Old 06-26-2005, 10:30 PM   #12
Simon Wicker
Expert
Simon Wicker
Digital Matte Painter
United Kingdom
 
Join Date: Nov 2003
Posts: 1,186
Quote:
Originally Posted by bonsak
Your template could probably work for anim data coming from AE as well. We have projects all the time that we start of in AE (because its our main tool) just to realize we need some 3d elements added or we realize we have to finish every thing of i C4d. We never figured out how to do this so this might be the solution. I dont have AE at home but ill try it tomorrow. Anybody know how this expresso rig needs to be reconfigured for this to work?

AE anim data look like this:

Adobe After Effects 5.0 Keyframe Data Units Per Second 30
Source Width 720
Source Height 576
Source Pixel Aspect Ratio 1.06667
Comp Pixel Aspect Ratio 1.06667


Position Transform Effect Parameter #2
Frame X pixels Y pixels
z pixels
40 379.676 274.557 0.000
41 379.705 274.878 0.000
42 379.616 275.353 0.000



Hi Bonsak,

depending on the 'handedness of after effects (i.e. how it arranges the axes) you may or may not need the 'maya' style axis flipping that i have included in my xpresso setup. looking at the way AE is organising the text file it exports you will need to strip out anything above the headline (the Frame X pixels Y pixels Z pixels line) and in the ascii animation import dialog tell cinema that the first set of numbers represents the frame number.

you may also have to split the file into sections as it seems that AE may be placing the rotation data after the translation data rather than alongside it.

if AE has the same axis set-up as cinema you would just need to import this to a null and then drag the tracks to your camera. most of the tricky stuff i implemented was just to deal with the flipped z axis in maya.

cheers, simon w.
 
Old 06-27-2005, 08:28 AM   #13
bonsak
Frequenter
 
bonsak's Avatar
 
Join Date: Jul 2004
Posts: 119
Hi Simon
Thanks for the info on AE.
When i try to import this file (AE keyframes) as comma delimited text, i get one track for each value. :-)
Ive tried other formats but this is the only one that generates tracks so far.
I checked "header" and "comma"

Frame,X position,Y position,Z position
0,109,288,0
1,114.055,288.095,0.0950346
2,118.036,287.116,-0.88406
3,123.914,288.034,0.0336009
4,128.986,288.145,0.144902
5,134.233,288.432,0.431867
6,138.289,287.528,-0.471938
7,144.059,288.336,0.336467
8,149.076,288.393,0.393323
9,152.877,287.233,-0.76693
10,...........

Do you have an example of the Maya export so i can compare?

Regards
Bonsak
 
Old 06-27-2005, 02:13 PM   #14
Simon Wicker
Expert
Simon Wicker
Digital Matte Painter
United Kingdom
 
Join Date: Nov 2003
Posts: 1,186
hi bonsak,

i've attached a maya move file. can you attach your sample AE file so i can test it out here? it may be that you need to do a find and replace on the commas and make them tabs. if it turns out to be a bug i can let maxon know.

cheers, simon w.
Attached Files
File Type: zip chs040_layout_cam.txt.zip (1.3 KB, 90 views)
 
Old 07-23-2005, 10:01 PM   #15
joss3D
give me some teeth
 
joss3D's Avatar
portfolio
ice valley
maya SFX artist
icevalleycorp
Paris, France
 
Join Date: Mar 2004
Posts: 110
hi, I'm trying to importe a camera from maya to C4D.

all the translate and rotation channels tranfert weel with simon's thechnics.
it's ok for the focal lenght but i have problem with the film aperture.

in maya there is 2 attributs: horizontal and vertical film aperture
but in c4d I don't find something equal.
there is the field of view but with the simon's technic, when i render in c4d, it's doesn't match with the maya render.

moreover, i have to connect manualy in the xpresso the relation between the camera data and shoot_layout_V1, as you can see in the attached picture

can you explain how you can transfert good Aperture info from maya to C4D?
why you only use the horizontal apertur and not the vertical one?

help or advice will be very apreciate
Attached Images
File Type: jpg Image 1.jpg (50.3 KB, 121 views)
__________________
escuse my bad english
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 05:50 AM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.