C4D-AWD2-Bridge

Software: Away3D 4.x

Avatar
80prozent, Sr. Member
Posted: 07 March 2013 09:38 PM   Total Posts: 430   [ # 16 ]

hi

jeah the issue starts with more joints added…i am trying to figure this out right now….

 

 Signature 

sorry…i hope my actionscript is better than my english…

   

jayismyson, Newbie
Posted: 21 March 2013 05:25 AM   Total Posts: 2   [ # 17 ]

the mesh will show up in Prefab with unexpected deformations, and will not load into away3d correctly too. They can be imported back to c4d and will play correctly…


_________________
rs gold|wow gold|cheap rs gold|Runescape Gold

 

   

koffertje, Newbie
Posted: 21 March 2013 02:21 PM   Total Posts: 19   [ # 18 ]

jayismyson,

even your mesh and your joints needs the have the pivot on 0,0,0 axis.
the most problems came from that.

i don’t know of the axis of the skin needs to be on 0,0,0, axis. but if it not works maybe you can try that too.

greetings
koffertje

 

   

glasses, Newbie
Posted: 07 April 2013 06:31 AM   Total Posts: 28   [ # 19 ]

Hi, all!
I also tried the polar bear example.
However in my case, even the polar bear file cannot be exported correctly by AWD bridge (the newest update on Github).

Indeed the original code and awd file worked great, but when I tried to use the polar bear.awd, which was firstly imported and then re-exported by AWD Bridge, to replace the original one, the bear could do everything except move forward or backward. I check the export setting as well as the code several times, and unfortunately ended with nothing.

So anyone got some ideas about this issue? BTW, do you know how to preview the skeleton animation in prefab?

80prozent - 17 February 2013 04:47 AM

Hi
I have been working on a C4D-Away3D pipeline for a quite a while now.

In its current state, the plugin is far from being perfect, but i think its time to share.

download the C4D-AWD2-Bridge from github

justDownload the zip and put the folder named “AWDBridge” into your c4d-plugin folder.

Please look into the “Readme” found in the zip for some notes on how to use.

Thanks to Patrick Wood who helped me to put this on github.

this is work in progress and anyone who is able and willing to contribute is welcome to do so.

use and modify as you like

enjoy

edit: !!!!!!!!!!!!!!!!!!!!!!!!! Bug found in Skeleton-Animation

The user “koffertje” found a bug in the Skeleton-Animation-Export.
I always tested the Skeleton-Animation-Export using the PolarBear.awd found in the Away3d-Examples on GitHub. With this File, import and export of skeleton-animation works fine, and the exported file plays correctly in Prefab and Away3d.
When using a rigg made in c4d, in most cases the mesh will show up in Prefab with unexpected deformations, and will not load into away3d correctly too. They can be imported back to c4d and will play correctly…

Right now i dont know whats going on there, cause i cant find any reason why the PolarBear works great, but other riggs dont. But i hope i will figure it out soon.

 

   

Avatar
80prozent, Sr. Member
Posted: 07 April 2013 03:15 PM   Total Posts: 430   [ # 20 ]

Hi

I just tried importing the Polarbear.awd into c4d, and expoorting it to awd again.

When using r13 without the 13.058 update, the importer will crash during SkeletonAnimation-import due to a c4d bug.

When importing the PolarBear.awd make shure the Importer-Setting “use translation on Root” is enabled, otherwise, no root-Translation will be imported.

My exported polarbear.awd works fine in away3d, but in prefab the Root-Translation is not shown. Since the same issue occurs with the original Polarbear.awd i believe Prefab does not import any translation-anaimation on the root-joint.
I will report this to Fabrice.

To preview you skeletonanimation in Prefab, you have to click on your mesh, and a Transport-Window appears. In this Transport-window, you can start and stop the animation, and choose which Animation to play.

Hope that helps

 

 Signature 

sorry…i hope my actionscript is better than my english…

   

glasses, Newbie
Posted: 08 April 2013 12:58 AM   Total Posts: 28   [ # 21 ]

Hi! Thanks for you quick reply.
Actually, as what I have said, the animation works fine. The problem is when I run the polar bear example code from GitHub by using the re-exported awd file, the bear cannot move forward or backward. Namely, it just perform the animation at its original position. But the original awd does move and work great! I don’t know why… Maybe I made some mistakes.

80prozent - 07 April 2013 03:15 PM

Hi

I just tried importing the Polarbear.awd into c4d, and expoorting it to awd again.

When using r13 without the 13.058 update, the importer will crash during SkeletonAnimation-import due to a c4d bug.

When importing the PolarBear.awd make shure the Importer-Setting “use translation on Root” is enabled, otherwise, no root-Translation will be imported.

My exported polarbear.awd works fine in away3d, but in prefab the Root-Translation is not shown. Since the same issue occurs with the original Polarbear.awd i believe Prefab does not import any translation-anaimation on the root-joint.
I will report this to Fabrice.

To preview you skeletonanimation in Prefab, you have to click on your mesh, and a Transport-Window appears. In this Transport-window, you can start and stop the animation, and choose which Animation to play.

Hope that helps

 

   

glasses, Newbie
Posted: 08 April 2013 01:11 AM   Total Posts: 28   [ # 22 ]

Oh! I’m sorry. You’re right! The problem is the use translation on root!
But what does it mean??? And what’s the reason that the model perform only the skeleton animation without movement.

And by the way, have you found the re-exported breathe animation lookes wired? It looks like the bear shakes on the ground. I think the skeleton animation itself works good, but something happened to the mesh. Because the phong tag on the re-expoted mesh cound not work smoothly as the original awd. I checked the polygon in C4D, actually they are separated in isolate pieces instead of a whole one.

 

   

glasses, Newbie
Posted: 08 April 2013 04:12 AM   Total Posts: 28   [ # 23 ]

Hi, all! It’s me again!
I am wondering whether the “Pose Morgh Tag” is necessity for exporting skeleton animation.
In my case, I am using C4D Broadcast, which doesn’t offer Pose Morgh function. But actually, I just want to make ONE skeleton animation state within one file instead of translating between different animation states. So it should be OK without Pose Morgh Tag, right? But how to do that?

And every time when I tried to export the skeleton animation I made, a warning said “Joints are bound to a Skinning-Matrix tahts not the Global Matrix of the C4D-Scene” always appeared. I believe I made some mistakes during the process.

And lastly, I want to know how to convert the animation into the keyframe for each joint, especially the root joint. Because in C4D, certainly I will use IK/FK to animate the skeleton instead of adding keyframe for each joint. But in this case, the real keyframe holder should be the IK/FK controller, namely the null object in C4D. So is there a way to export these animation sequences to AWD file?


Regarding to all the questions above, if you have any ideas, please tell me.
Thank you in advanced! smile

 

   

Avatar
80prozent, Sr. Member
Posted: 08 April 2013 04:46 PM   Total Posts: 430   [ # 24 ]

Hi

You are right: The “Create PoseMorphTag” just provides a way to create a PoseMorph-Tag on the Skeleton. After you have created such a PoseMorphTag on the Skeleton, you can just drag and drop the skeletonAnimations into the PoseMorphTag (choose “add as abolute morphPose” in the popup).
This has nothing to do with the export at all, but provides a way to quickly test your animations inside in c4d.

When creating a SkeletonAnimation, there are two options to define wich frames should be exported:

Option 1: In the SkeletonAnimationTag choose “use all frames as keyframes”.
If this is enabled, the Exporter will playback the animation in c4d, and make a snapshot of all Joints-Matricies for every frame inside of the Animation-Range.

Option 2: If “use all frames as keyframes” is disabled, the exporter will playback the animation in c4d, but only make a snapshot of all Joint-Matricies for frames where the root-Joint of the animation has a keyframe applied.

No matter which option you choose, the exporter will never read the keyframes of the joints, but just makes snapshots of the joints-matricies. So you can use any kind of Xpresso, plugin or whatever to animate your joints.

[edit: just gather all objects you do not want to export, but need for controlling your scene in c4d (e.g. the controller for your ik-chains) in one Null-container, and apply a AWDObjectSettings-Tag to this Container.
In this Tag you can disable the “export” checkbox, and enable the “Apply to children” checkbox, so the whole Hirarchy want be exportet.]

Before exporting the Skeleton (the joints that are bound to the mesh), the exporter will automaticlly restore the Skeleton to stand in T-Pose. So you can add PoseMorphTag to the Skeleton to display/test your animations in c4d, and do not need to disable the PoseMorphTag (or other Xpression-Tags) manually before export.

The Error “skinning-matrix of you skeleton is not the same as the c4d-scene-matrix”, means that you must have accidently did something to the mesh, that would cause the skinning-matrix to get changed (maybe you pressed the “Set BindPose” inside of the weightTag ?). When i import the PolarBear.awd the skinning-Matrix is equal to the c4d-scene-matrix.

If you are prompted with this error and hit “Fix automaticcly” the exporter will first set the global Matrix of the mesh to be the same as the c4d-scene Matrix (position = 0,0,0 scale = 1,1,1 rotation = 0,0,0). than it will call the “Set Bind Pose”, and the error should disapear.
[edit: if it does not disappear, maybe your mesh-object has keyframes applied. Try removing all Matrix-keyframes of the mesh (translation/scale/rotation) and try again.]

Be aware, that Prefab will set all Root-Joints of your Animations to global-Matrix (0,0,0,1,1,1,0,0,0).

The SkeletonClipNode.as of Away3d has a option called “stitchFinalFrame”.
If this is False, The last Frame of the animation will be overwritten by the first Frame of the animation, to make shure it will loop. But if you Animation only consists of 2 Frames, there will be no animation shown.
Here is the Info found in the “AnimationClipNodeBase.as”:

* Defines if looping content blends the final frame of animation data with the first (true) or works on the assumption that both first and last frames are identical (false). Defaults to false.

Prefab loads all Animations with “stitchFinalFrame=False”, so if you want your SkeletonAnimations to appear in Prefab exactly as in c4d, you may need to copy your first Frame as an addional last Frame.


I really need to make some documentation…

 

 

 

 

 

 Signature 

sorry…i hope my actionscript is better than my english…

   

Sean72, Newbie
Posted: 08 April 2013 10:24 PM   Total Posts: 28   [ # 25 ]

Sounds great.  Your English is not bad, but I would be happy to help where possible with your documentation, i.e. I could take what you write and check that it communicates well in English and then expand upon it where needed.  My knowledge is more Cinema 4D, but I am avidly learning Away3D 4.x.

 

   

glasses, Newbie
Posted: 09 April 2013 02:12 AM   Total Posts: 28   [ # 26 ]

Hey, 80prozent!
Thank you for your super detailed reply.
Now all the problems are clear to me.

But as what you said, it’d better to make same documentation
or make some video tut which should be easier to understand.
And if you need any help, I’m glad to contribute something to
both the English and Chinese documentation.

Again, thank you for your kind answers, all the time! smile

 

   

Avatar
80prozent, Sr. Member
Posted: 09 April 2013 09:56 AM   Total Posts: 430   [ # 27 ]

Thank you both for offerning help with the documentation.  That would be great.
Atm i am still working on some c4d-Scenes to use for the documentation.
As soon as i have them ready, i will make a quick documentation,  and you could help me bring it in a good form.
I could also make some video-tuts and isf one of you like, he could help with redoing the audio..

 

 Signature 

sorry…i hope my actionscript is better than my english…

   

Sean72, Newbie
Posted: 09 April 2013 03:39 PM   Total Posts: 28   [ # 28 ]

Absolutely.  You can email me via the site or post here when you are ready.  I have a live project getting underway that could eventually make use of the exporter and the skeleton/animation handling so I see this as a way of helping you make the project better while learning at the same time.

 

   

Sean72, Newbie
Posted: 13 April 2013 10:19 PM   Total Posts: 28   [ # 29 ]

Hello 80prozent,

I’m not sure if this is a bug or something I’m doing wrong, but I have run into an issue with exporting a rather large detailed object with some textures.  I got the same error before I converted all the textures to 512x512, but I still get this error even when all are converted.  It refers to the texture ‘None’.  Also, C4D appears to be semi-crashed since the bottom bar keeps running green as if processing.  Please see the attached screen capture.

UPDATE:

I figured out through trial and error where the ‘None’ texture error is coming from.  The ‘Texture’ entry of the color channel in C4D (highlighted in second screen capture) can not be certain types, including ‘Fresnel’ and ‘Layer’ and ‘Noise’.  It can of course be a .jpg or .png.  This may be intended functionality, but if so, we should perhaps document it so we know what color texture types are supported.

Finally, as a workaround for the time being to those who need to keep moving despite this and don’t want to change all their materials right now, you can create a jpg (of anything) with power of 2 size and name it ‘None’ (no extension!) and the compiler will then show your model.

Thanks,

Sean72

 

   

glasses, Newbie
Posted: 14 April 2013 02:35 PM   Total Posts: 28   [ # 30 ]

Hello, 80prozent.

I am still keeping testing this plugin. This afternoon I encountered a wired problem. I made a skeleton animation in C4D and exported it by your plugin. The exported AWD file worked perfectly in Prefab, but it cannot be loaded by Away3D. Actually, every time I tried to do “Mesh.animator = animator”, Error #1009 would always popped out, and the debugger would stop at line 910 of source code “SubGeometry”.

Then I used the PolarBear for testing again. I found if I changed the jointsPerVertex in “animationSet = new SkeletonAnimationSet(3)” to the value greater than 4, the same error would appear. I also referred to another post from you (http://away3d.com/forum/viewthread/4193/), and worked out the jointsPerVertex value for my AWD file should be 6.

However, compilation failed again. Then I checked the source code “SkeletonAnimationSet.as”, and found a sentence in line 19 said the maximum allowed value for jointsPerVertex is 4. So, it is the real reason? If it was, How should I correct it?

And by the way, why Prefab can load and play the animation correctly??? Thank you for your reply in advanced!

 

   
   
‹‹ KART WITH AI

X

Away3D Forum

Member Login

Username

Password

Remember_me



X