Capturing camera data and exporting to text file

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 01 January 2013   #1
Capturing camera data and exporting to text file

Hey there people,

I have 2 problems that I am trying to overcome with zero knowedge of scripting within Maya.

Problem 1:
I have a scene that has multiple cameras and I need to export just the camera data (XYZ, rotation, lense information, etc) to a seperate text file for sharing information between studios.
Problem 2:
I need a way to overlay the XYZ information of the camera that is in use in the output render.

If anyone can help me with this or point me in the right direction it would be greatly appreciated.
 
Old 02 February 2013   #2
Originally Posted by DanJHale: Problem 1:
I have a scene that has multiple cameras and I need to export just the camera data (XYZ, rotation, lense information, etc) to a seperate text file for sharing information between studios.


Well you basically just need to bake all the channels on the camera into world space and then cycle through the channels getting the attributes and creating a spread sheet or sorts and then writing it to disc.

psuedo code..

in_frame=10
out_frame=90
current_frame=in_frame
while current_frame <= out_frame
      spread_sheet_index=0;
      for channel in channels
                 spread_sheet[current_frame,spread_sheet_index]= getAttr -t current_frame camera.channel 
                 spread_sheet_index++

current_frame++
 

save_spread_to_disk(spread_sheet,'/myfile.txt')


Originally Posted by DanJHale: Problem 2:
I need a way to overlay the XYZ information of the camera that is in use in the output render.


http://download.autodesk.com/us/may...sUpDisplay.html



http://forums.cgsociety.org/archive...p/t-136112.html
__________________
blah blah blah

Last edited by gmask : 02 February 2013 at 04:12 PM.
 
Old 02 February 2013   #3
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



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 04:36 PM.


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