A new version of Cineversity has been launched. This legacy site and its tutorials will remain accessible for a limited transition period

Visit the New Cineversity
   
 
From excel to Cinema 4D motion file
Posted: 26 March 2020 09:55 PM   [ Ignore ]  
Total Posts:  6
Joined  2020-03-26

I have hundreds of lines of data that include time and x,y,z of an object.  The data is in excel but I need to be able to import it into Cinema 4D as the motion of an object.  Any ideas?

Thanks,
Sam

Profile
 
 
Posted: 26 March 2020 10:15 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Sam,

There is an ASCII option inside of the Structure Manager> File> Import ASCIIā€¦

A polygon object can store the data, in other words, one must be selected.

Could you share a demo Excel sheet?

Cheers

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 26 March 2020 10:36 PM   [ Ignore ]   [ # 2 ]  
Total Posts:  6
Joined  2020-03-26

Great! Thanks!  I’ll look into that.  I can’t share a sample because it is classified.  We get data from different sources and manipulate it in excel to create motion files for Lightwave.  We have used it for over 20 years but the software is getting less stable lately and there isn’t much support.  I’m evaluating Cinema 4D as a replacement.  I like it so far but didn’t want to spend to much time with the software if I wasn’t able to import the data.

Thanks again,
Sam

Profile
 
 
Posted: 27 March 2020 12:02 AM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Thanks, Sam, for the reply.

You can take just a Plane, make it editable (press the c key for that) and then each point of the mesh is an option to store the X, Y and z data.

Please note that you can export this as ASCII code as well, so you instantly get an example of what is expected as input.

===

There is another option to use the import ASCII option, perhaps more what you need to begin with.
Go to the Main Menu> Window> Timeline. In the Timeline Menu>Function>ASCII Animation Import.
https://help.maxon.net/us/index.html#5689

===

With example file, I meant any excel sheet that you have or just made one up. But I wanted to be sure that I give you the right information and any tips to make it work.
The more I know from your side, the more I can hopefully supply tips.
I like to use what is given, not what I imagine wink

Cheers

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 27 March 2020 01:55 AM   [ Ignore ]   [ # 4 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

P.S.:

I thought it might be helpful to showcase this in a one minute clip (no audio).
Screen-capture and scene file, including two ASCII files
https://www.amazon.com/clouddrive/share/lU1m7WSx1KydvwE7hsGzyLegUMO26V0MZpJYBeIW0Bz

You mentioned that you manipulate it in Excel. After 20 years, I believe you are fluent in this. However: You could load the data and manage it in C4D with a Spline Curve interface inside of Xpresso. This can also take care of any other math-based adjustments. In other words, you load the data as it comes, apply it to an object (which is not shown later on), and manipulate the data interactively in Cinema 4D for the final purpose.

Let me know if there is any question, I’m happy to look into it.

ENJOY

Cheers

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 27 March 2020 02:58 PM   [ Ignore ]   [ # 5 ]  
Total Posts:  6
Joined  2020-03-26

Thanks for all this help!  I’ll look this over and try to get back to you with some sample data later today.  On some things we also use roll, pitch and yaw.  We import the data at anywhere from 30 to over 1,000 fps and render out parts of the animation at up to 10,000 fps.  All that data really bogs down Lightwave.  Especially when we add voxels.

Thanks again!
Sam

Profile
 
 
Posted: 27 March 2020 03:20 PM   [ Ignore ]   [ # 6 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You’re very welcome, Sam, thanks for the feedback.

I look forward to an example. I hope to find a proper pipeline for you.

As mentioned, any information given could result in an idea to improve the workflow.

My best wishes

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 27 March 2020 07:26 PM   [ Ignore ]   [ # 7 ]  
Total Posts:  6
Joined  2020-03-26

The attachment below contains some dummy data that I made.  X, Y, and Z are in meters and Head, Pitch, and Bank are in degrees.  We typically attach a camera to the object and point the camera so that the parent object as well as other objects are in the field of view.  Typically we use less than 3 minutes of data in one scene. 

Thanks again!
Sam

File Attachments
Dummy Data.xls  (File Size: 43KB - Downloads: 160)
Profile
 
 
Posted: 27 March 2020 08:59 PM   [ Ignore ]   [ # 8 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Thanks for the file, Sam.

The ASCII import requires a RAD entry for rotation. So I translated that, of course, but the rounding error seems to be not acceptable.

Which means, I went with the data I got (DEG) and imported it as is. Then I used a tiny little Xpress set up to convert the data. Let me know if that works.
Such Xpresso set up can be stored as presets, and only the two object needs to be dragged over their “new” nodes.

Here is your example file.
https://www.amazon.com/clouddrive/share/xqUnLQaHokcz5gRVFkFb2x23UQFzktjtT7VmD8bZYgE

I hope I got the camera set up correctly. Let me know if that wasn’t how you would like to have it.

Have a great weekend

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 27 March 2020 09:41 PM   [ Ignore ]   [ # 9 ]  
Total Posts:  6
Joined  2020-03-26

I tried importing the .xls file and it started the data at 0.  The time starts out negative.  How Do I handle negative times in c4d?

Profile
 
 
Posted: 28 March 2020 01:12 AM   [ Ignore ]   [ # 10 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Sam,

Negative time is not really anything I would suggest. There are a few cases to have things before zero, but this should be limited to the preparation of data, not for anything rendering. In fact, you can set the project time to negative, but the rendering is limited (Render Settings) to positive numbers, starting with zero.

Hence why I created the txt files with the frame numbers.  I can open the -1 to 2.966 example as text, but it will use only frame -1 to frame +3. Which means a few frames and 119 keys. Not ideal.  When I set then (not before!) the Project to 900fps, it spreads, but it has gaps. I would not recommend this. I switched any snapping off, which sometimes deletes keys that want to snap to the same frame.

As you undoubtedly know, to add a column and fill it with 1-n for the frames is no problem. However, even if that works then with negative numbers, you can’t really use it in Cinema 4D.

I hope that clears it, and I assume you would like to have what you had in LW also in Cinema 4D.

You might check with the support. I stopped using LW in the mid-‘90s after a half year of testing it, so I can’t really remember how negative numbers have worked in LW6. However, I understand your wishes.

What comp app do you use? In After Effects, you can set any comp to negative numbers, and move the results of a positive only clip/sequence to that negative start. I haven’t used it at all in the past three decades in any production, so I can’t tell you what will happen. Which means I tested it, of course. An image sequence rendered with Media Encoder started with frame zero. No idea how to get it to show negative frames. I have to test others, but you might share what app you use, so I can check this.

Here is my negative test kit.
https://www.amazon.com/clouddrive/share/BGfykPfR88GXT4kxrAqnDHQFUr4Bbh6g6FuRsCaZQKC

All the best


P.S.: a partial workaround, again, not recommended to work in negative numbers.
https://www.cineversity.com/forums/viewthread/3940/#15590

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 30 March 2020 04:15 PM   [ Ignore ]   [ # 11 ]  
Total Posts:  6
Joined  2020-03-26

I’m looking over your files now. 

With Lightwave we import the data with respect to time and not keyframes.  It creates a keyframe for each line of data and will use negative numbers for keyframes.  For us, 0.00 seconds, is launch of first missile.  A lot happens before and after launch.  For our initial renders we have it render a time stamp to 2 decimal places on each image so we can align everything in After Effects.  After Effects doesn’t recognize the negative sign so we just have to select invert the sequence to get it to play correctly.  We put our own “time stamp” in After Effects by using a counter. For our final render in Lightwave we just turn off the time stamp.

Thanks again!
Sam

Profile
 
 
Posted: 30 March 2020 04:31 PM   [ Ignore ]   [ # 12 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Sam,

Thanks for the update. Pasting a column with frame-numbers into an excel sheet is certainly not a huge time investment. To have a time-code in the rendering, one could create an XPresso and have it “burned” into the rendering. Perhaps even two-time codes, one that represents the practical time and one that just counts from zero. I’m happy to set one up. It is, in a nutshell, what I did in post #11 located in the P.S.

The native time-code can be rendered directly Render Settings> Effects> Watermark.

If you have someone in your team who is savvy with Python, you could write a script that takes in the data as you need. There are options to turn it into the keyframes needed. Maxon has a forum for developers, so eventual questions can be (hopefully) answered.

Let me know how it goes.

Cheers

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile