Jump to content

Chani

Limited Member
  • Posts

    16
  • Joined

  • Last visited

Profile Information

  • First Name
    Chani
  • Last Name
    Tough
  • Location
    Aberdeen, Scotland

Recent Profile Visitors

1,261 profile views

Chani's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. For anyone interested, I sent a bug report to MAXON and this is the reply. MAXON UK (MAXON Computer Ltd) Jan 23, 11:28 CET Hi Chani, I can confirm that it is a known bug. Thank you for reporting to us.
  2. Thanks, I have submitted a report to MAXON.
  3. I have run into a strange problem that I am hoping someone can help with. I posted this to the rendering forum without success. Maybe some Xpresso guru can shed some light on this. I have a scene setup that has multiple cameras that I want to Team Render and use the Token system (variable file names) to save the camera name as the file name using the token: $camera I have configured a stage object that is driven with a simple expresso tag to change the camera based on the frame and a link list. When I render this locally, it works perfectly. Each rendered frame saves with the camera name as expected. When I try and Team Render this same file (even without other computers), the name of each outputted frame locks onto whatever frame the scene is on when I send it the picture viewer. Does anyone have any idea what is causing this to happen? Maybe it is a limitation of the Token system? I'm using R18 Studio version. I have attached a small example scene to look at. Stage_TR_camera_test.c4d
  4. Thanks for looking at this again but switching the values did not give the correct results. The only way that appears to work correctly is changing to rotation order to be XYZ at the matrix level by adding the little extra code at the end of: rotation_rad rotation_rad = c4d.utils.MatrixToHPB(obj_matrix,c4d.ROTATIONORDER_XYZGLOBAL) It appears to be working perfectly now though so again, many many thanks for putting this together for me. It will be a massive help.
  5. Wow, that is (almost) exactly what I am after! Amazing. The only thing is the rotation does not seem to export correctly. My cam has a value of R X: 90.277 R Y: 0.366 R Z: -116.01 Your script returns 90.3086 1-26.0081 270.5014 Not sure how to troubleshoot this to make it work but I will look it over. EDIT: Looking at the code and result, it appears to be saving the HPB order rather than XYZ. I managed to get it to work (I think) by adding some code to the rotation_rad rotation_rad = c4d.utils.MatrixToHPB(obj_matrix,c4d.ROTATIONORDER_XYZGLOBAL) Massive thanks for even bothering to take a look! import c4d #Welcome to the world of Python def Walker(obj): if not obj: return elif obj.GetDown(): return obj.GetDown() while obj.GetUp() and not obj.GetNext(): obj = obj.GetUp() return obj.GetNext() def main(): file = c4d.storage.SaveDialog(c4d.FILESELECTTYPE_ANYTHING, title='Save csv file as', force_suffix='csv') csv_file = open(file, 'w') obj = doc.GetFirstObject() while obj: if obj.GetType() == 5103: name = obj.GetName() obj_matrix = obj.GetMg() position = obj_matrix.off rotation_rad = c4d.utils.MatrixToHPB(obj_matrix,c4d.ROTATIONORDER_XYZGLOBAL) rotation_deg = c4d.Vector(c4d.utils.Deg(rotation_rad.x), c4d.utils.Deg(rotation_rad.y), c4d.utils.Deg(rotation_rad.z)) line = '%s, %s, %s, %s, %s, %s, %s'%(name, position.x, position.y, position.z, rotation_deg.x, rotation_deg.y, rotation_deg.z) csv_file.write(line + '\n') obj = Walker(obj) csv_file.close() if __name__=='__main__': main()
  6. The system I need to match has the cameras taken in by photogrammetry software. The spreadsheet columns I need to format it into are as follows: n5 is obviously the camera name with x7, y8, z9 being the absolute camera position coordinates and then x10 y11 z12 are the xyz rotation axis coordinates. n5 x7 y8 z9 x10 y11 z12 IU1L - 001_b 288.0453281 614.0887056 35.85327133 90.27735873 0.366070578 116.0101527 See the image below for the camera selected in C4D. I need to be able to export every camera into one text file (if that is possible?) Hope this makes it more clear what I am after? Many thanks for taking the time to look into this for me.
  7. Hi, I am hoping someone on here can help or point me in the right direction. I am not a programmer. I have searched extensively but cannot find anything that helps. I am looking for a way to export multiple (static) camera positions & orientations to a single text file that includes the name of each camera then the position followed by the orientation. I will be taking this info into a spreadsheet for importing into a photogrammetry system for camera matching, hence why it needs to be a text (or CSV or similar). Any ideas folks? I currently have C4D R18/19 Studio version.
×
×
  • Create New...

Copyright Core 4D © 2024 Powered by Invision Community