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
   
 
Unity Game Development with Cinema 4D, Part 08: Export/Import the Farmer
Posted: 18 January 2015 12:28 PM   [ Ignore ]  
Total Posts:  3
Joined  2015-01-16

Hi

I have 2 problems with importing the fbx-animation of the farmer correctly.

1.The animation take in unity has a framerate of 25fps wich should be 30fps. I checked everything in C4D but there it is all set to 30fps. Is there something like a special import preference to tell unity to import the fbx with a specific framerate? Is that the point where the problem comes from?

2. And the second problem i have is that some parts of the farmer-rig like the right arm are jumping wildly arround in unity (in C4D the animation is played normal).

thanks for help eloho

Profile
 
 
Posted: 20 January 2015 09:34 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

bump

Edit: I deleted my text here. I need to get UNITY first. :o)

FBX “in and out” from C4D works fine.

The image below is FBX as text from C4D, perhaps someone knows a “hack” for the FPS. I can see that keys are given, and that the FBX is imported based on duration, with a fixed number of keys independent of the fps setting of a project

 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: 24 January 2015 09:23 AM   [ Ignore ]   [ # 2 ]  
Total Posts:  3
Joined  2015-01-16

Hallo Dr Sassi,

thanks for your reply. It helped me in some way. I also tryed exporting fbx from Cinema with diferent fps-values set in the project-setting or/and in the render-settings. Via CV-smart-export and the normal Cinema-FBX-Exporter. But it is always imported with 25 fps. Interesting is that you always get 30fps and I 25fps what semes kind of related to NTSC and PAL framerates (USA/Germany).
I will ask the Maxon -Support if they have any Idea. And if there is possibly a not editable general frameratebase…

To work with the other parts of the tutorial I downloaded the files from part 16. smile

Which kind of editor did you use to see the fbx-code?

thanks eloho

Profile
 
 
Posted: 24 January 2015 03:46 PM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hey eleho,

Thanks for checking it out. I deleted my initial answer, based on a inappropriate reply to another “Game” question. Yes, I have to learn the basics of the Unity engine, to answer properly. I love to do it, even it will be only for Cineversity use. (I love to learn new apps, to keep my “beginner experience” fresh, which I think each instructor should do on a monthly basis ;o)

The Unity Manual states the following:
Unity can read .FBX, .dae (Collada), .3DS, .dxf and .obj files
Perhaps worth a test run ;o)

To see the FBX code clearly, the setting inside of C4D must be “text” for FBX. From there any text editor will do. I used the standard text editor that comes with ever Mac. But I guess there are better editors available, better means here that they keep the text clean in terms of formatting “codes/signs”—in the old days I used BBedit for it.
http://www.barebones.com/products/bbedit/
But most coder have other options these days, going with what I saw in several Python training classes.

However, to just open the file, anything will do. If you like to “hack” into it, it should be always in “plain text mode”.

Yes, please check with the support, to my knowledge some people over there have a good idea about game development and its parts. But perhaps the Unity support might be the one to ask first? Just a thought. :o)

Thanks for the kind reply :o)

Have a great weekend

Yes the PAL/NTSC difference seems to be a good suspicion. (I grew up in PAL land, a decade ago I entered NTSC land…)

 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: 24 January 2015 05:13 PM   [ Ignore ]   [ # 4 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Just browsing through the Unity Manual. Perhaps it helps. My impression so far, Unity is more concerned about the “curve” data than the keyframes or FPS. Just a wild guess, so check that for yourself.
As the FPS of the game, so the manual in the legacy part of the manual (replaced by the Macanim Animation System), is pretty variable. Again, I just started exploring it.

CV- Smart export, as shown in Rick’s tutorial works fine with the 30fps.

 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 January 2015 05:30 PM   [ Ignore ]   [ # 5 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Please import these assets into Unity. (Of course after un-zipping) They were set up as 24 and 60 fps in the Cinema 4D project settings. I have imported them into Unity, as in Rick’s tutorial, and they just show their native fps. As you can see they arrived (images) as they should, independent frame rates in the same Unity scene.

If that works fine for you, you need to explore your project settings perhaps in C4D, or share your file (C4D scene file, stripped to the single object you animate)

My best wishes

File Attachments
CV2_r16_drs_15_UNfx_01.zip  (File Size: 11KB - Downloads: 311)
 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 January 2015 01:08 PM   [ Ignore ]   [ # 6 ]  
Total Posts:  3
Joined  2015-01-16

Hallo Dr Sassi,

sorry, I m realy late to reply on your posts - lots of work….

But I asked the Maxon-support about the fbx-framerate export.
The maxon-support told me that fbx automaticaly works with common framerates like 23.976, 24, 25, 29.97002617, 30, 48, 50, 60, 100, 120, 1000. And that cinema only writes an extra framerate into the fbx-file when it is not one of these.
I did several tests with exorting and re-importing fbx from cinema and there is a difference using the smart-cv plugin or the normal export. When using the normal export the framerate is correct but when using the plugIn the information gets lost.

Seems that there ist a bug in the plugin.

I also tryed your two fbx-files. They come into unity correctly. Did you use the plugin or the normal exort?

I talked again to the maxon support but the plugin is develloped by cineversity so I will contact the cineversity-support.
Thank you for all your help.

have a nice weekend smile)
Olaf Hoffmann

Profile
 
 
Posted: 30 January 2015 02:54 PM   [ Ignore ]   [ # 7 ]  
Administrator
Avatar
Total Posts:  406
Joined  2006-01-24

Sorry I’ve missed this thread ‘til now.

I think I found the culprit. It appears that when Export Mode is set to Top-level Objects or Top-level Layers, the fps is lost in the process of splitting the scene. I’ll work on a fix.

Profile
 
 
Posted: 30 January 2015 03:32 PM   [ Ignore ]   [ # 8 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Thanks, Rick, your findings make a lot of sense. :o)

So, setting the top object to a no movement animation (e.g., P.Y=zero for the first and last frame), just to get keyframes, might be a way (workaround for the time being)? Do I got this correctly?

Have a great weekend

Scene-file …01 has no top object animation, …11 has.

File Attachments
CV2_r16_drs_15_UNfr_01.zip  (File Size: 260KB - Downloads: 291)
 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: 18 February 2021 02:56 AM   [ Ignore ]   [ # 9 ]  
Total Posts:  1
Joined  2012-07-22

Hello, Im working on CInema4d r23, and the tool SMart CV export doesn’t exist, and when I try to upload the plugin to my program, doesn’t appear anywhere. Can you help me? Thanks!

Profile
 
 
Posted: 18 February 2021 06:57 AM   [ Ignore ]   [ # 10 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi asantoni,

This would be a question for the CV-ToolBox support. I assume it is a Python 2 v. Python 3 problem. It works nicely in R21, tested in any usable way this evening. The default option and the plug-in.

Besides the Split option, for this tutorial, you can use the default FBX export. I have tested all of that with R23 as well. The plug-in doesn’t show up, and the default FBX extent the wrist joints. (Edit #1, except for the Farmer’s Spine, no Position keyframes are needed, and when these position keyframes are excluded, all is fine./edit).

I tried to send you a c4d and FBX version that works safely with R23, but my Private Message bounced. Did you get it anyway? Perhaps send me a PM with an option where to send the file if you like to have it.

Sorry for all the inconvenience.

I hope you can enjoy the series anyway.

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