C4D-AWD2-Bridge

Software: Away3D 4.x

Avatar
80prozent, Sr. Member
Posted: 17 February 2013 04:47 AM   Total Posts: 430

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 (7.4.2013):
!!!!!!!!!!!!!!!!!!!!!!!!!!!
I found the bug, causing the incorrect SkeletonAnimations for some riggs.
There are some restrictions for SkeletonAnimations:

- Make shure all your bounded Joints have a scale of (1,1,1).
- Make shure the mesh thats skinned has a global Matri thats the same as the C4d-Scene-matrix.

The Plugin should inform you if any of this Restrictions is not matched, and will prompt you with a option to autocorrect or to ignore.

 

 Signature 

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

   

Avatar
Ringo Blanken, Administrator
Posted: 24 February 2013 11:17 PM   Total Posts: 120   [ # 1 ]

Great ! Will give this a try soon.

 

 Signature 

Freelancer: http://www.ringo.nl/en/
http://www.jiglibflash.com
http://www.awayphysics.com
http://www.away3d.com

   

glasses, Newbie
Posted: 27 February 2013 07:49 AM   Total Posts: 28   [ # 2 ]

Hi, 80prozent!
Thanks for sharing this great plugin for C4D.
You must spend lots of time on it. I really appreciate your efforts.

Several questions here:
1. What does the export option that “Create Materials for Object-Colors” mean?
2. There is a Debug option in the exporter. How can I use it? Should I open it by binary tool like Bz and debug it by checking the structure of ADW file through the binary code?
3. I cannot export the mesh without making parametric objects editable. Is that right?

Besides, I found that the exporter for 3dsmax allows users to choose which part of AWD should be exported. For example, users can choose whether they would like to export the data for UVs or vertex normals to the geometry block of AWD file or not. Do you have plan to update such functions in the future?

So far, I just played around with the exporter. I personally think it is powerful enough! And I will continuously give you my feedback as long as I try other functions in this pack.

Thanks again!!!

 

   

Avatar
80prozent, Sr. Member
Posted: 27 February 2013 09:04 AM   Total Posts: 430   [ # 3 ]

Hi


Thanks for feedback.


In C4D you can color Objects without using Materials (using a Object-Color).
The “Create Materials for Object-Colors” makes shure that Color-Materials will be created for this Object-Colors, so the Objects are still colored in away3d.
When a Object has no Object-Color, and no Material assigned, a ColorMaterial for the C4D-Default-Object-Color will be created and assigned.

If the option is not enabled, the objects that have no materials assigned, should be exported without materials, and in away3d displayyed using the away3d-default-material

I havnt tested this function a lot and it might not work right (is on my to do list)

Away3d does not support importing Primitives via awd2 yet. so all primitives exported to awd2 are lost…I could convert them automaticlly to polygon Objects on export, but i hope away3d will support primitives soon, so i dont need to do that…


I had some kind of Export Filter implemented at some time, but since code-structure changed a lot, i got rid of it, to clean up…
I will bring back this Filter-functionallity inside of the mainPlugin and inside of the “Objects-settings-tag”, so you can define a DefaultFilter for all Objects, and even can apply different Filter settings to individual Objects.

Right now, basically your object should be exported “as is”, e.g. if there is no uv-tag = no uvs, if there is no phong-tag = no normals.

The “Debug”-CheckBox is only a fake-debug function. If activated, the plugin will print messages to the c4d-Console.

Did you tested the Skeleton-export?

I didnt have much time for testing, so any feedback is welcome.

 

 

 

 Signature 

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

   

glasses, Newbie
Posted: 27 February 2013 09:26 AM   Total Posts: 28   [ # 4 ]

Hey, thx for your quick reply.

But in my case, the primitives cannot be converted automatically to polygons… in other words, everytime when I export sth, I need to make all primitives in that C4D file editable firstly, and then export them… Is that normal, or a bug???

And… it seems that the texture of my C4D file cannot be exported together with the model. Why?

BTW, my Cinema 4D is R14.034 and prefab3d is v2.141
For your reference, I attached the scene file to this post.
Any idea? Thanks in advanced!

 

File Attachments
exTest.zip  (File Size: 929KB - Downloads: 448)
   

Avatar
80prozent, Sr. Member
Posted: 27 February 2013 09:36 AM   Total Posts: 430   [ # 5 ]

Hi again

the texture is embed in the awd2 file correctly. There is a bug in the prefab import-parser, thats prevents the file from being imported into prefab correctly.
Fabrice has allready fixed this, and with the next update from prefab it should work.

I didnt implement the automatic primitives to polygon conversion.
if you cannot use the cubes when exporting, whats the point in keeping them as cubes in c4d ? just selected them all, press “c” and they are all polygons.
but this way all your cubes would be exported as individual meshes, resulting in big file-size.
If all cubes have the same size, you could use a reference-object in c4d.
This way the plugin will export only one Cube-Geometry-Block, but multiple Mesh-Instance-Blocks, resulting in much smaler file-size.
To have a lot of different sized Cubes in a small awd2-file we will have to wait for the Primitives to work.

 

 Signature 

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

   

glasses, Newbie
Posted: 27 February 2013 09:44 AM   Total Posts: 28   [ # 6 ]

OK, I got your point. Thanks again.
But in your exporter, if I choose External files as the texture export way, what will happen? The texture will still be embedded in AWD???

And if I just want to export a AWD file containing the pure model info and external textures, what should I do?

 

   

Avatar
80prozent, Sr. Member
Posted: 27 February 2013 10:18 AM   Total Posts: 430   [ # 7 ]

if you choose external textures, the awd-importer expects your textures to be in the same folder as the awd-file.

the best thing to to is to “save scene with assets” in c4d.
this way all the textures will be gathered in an folder “tex” at the same location as the c4d-file you just saved. just copy those textures besides the awd-file, and it should load fine in prefab.

If you have any textures loadet into c4d, without copying them into the c4d-project-folder, the plugin might not be able to find the texture-file. if you do the “save projects with assets” the plugin will 100% find all textures.

only JPG and PNG are supported.
Your textures should all be of size “power of two” (512 / 1024 / 2048).
the plugin doesnt care about the texture size, but away3d does (another thing on my to-do-list)

if you do not want to have uv-mapping, delete the “uv-tags” on the objects.
if you do not want to have any normals exported, delete the “phong tags” too.

if you do not see your scene in away3d or prefab at once, be aware that you might have to adjust the scale of your objects (you can do that by using the exporter-scale-option, but i would advise to scale the c4d-scene, so you have the same scale in c4d as in away3d.

 

 

 Signature 

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

   

glasses, Newbie
Posted: 27 February 2013 10:50 AM   Total Posts: 28   [ # 8 ]

Hi, guy!

I forgot the restriction of image size in away3d.
Thank you for reminding me and also for your several patient replies.
Now, it is working great!

I will try to test the skeleton part ASAP. smile

 

   

Avatar
80prozent, Sr. Member
Posted: 27 February 2013 10:54 AM   Total Posts: 430   [ # 9 ]

No prob

I really need to put together a little tutorial and a FAQ.

There are some infos regarding skeleton-animation-export in the “readme”

 

 Signature 

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

   

Avatar
80prozent, Sr. Member
Posted: 07 March 2013 06:36 PM   Total Posts: 430   [ # 10 ]

The user “koffertje” found a bug in the Skelton-Animation-Export.
I edited the my first post of this thread.

 

 Signature 

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

   

Sean72, Newbie
Posted: 07 March 2013 06:54 PM   Total Posts: 28   [ # 11 ]

Hey there,

As an Cinema 4D Studio user, I’d be happy to help test your plug-in and give feedback, etc.  I have used it briefly and while I found that getting results that load in PreFab3D don’t happen every time, I have succeeded in getting a few good exports across.  I use PreFab3D to test the exports as I assume that if it can read them, then my sample Away3D code should be able to as well.

I’m new to Away3D so am always looking for more info on how to better understand and use it in a project.

Regards,

Sean72

 

   

Avatar
80prozent, Sr. Member
Posted: 07 March 2013 07:02 PM   Total Posts: 430   [ # 12 ]

Hi sean

great!
i love to get more testing results.

There is a known bug on the prefab importer side, so prefab does not load embed textures correctly. This bug will be gone with the next update of prefab.

Could you check again if you do not get a model exported correctly to prefab, that does not use embed textures?

 

 

 

 Signature 

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

   

Sean72, Newbie
Posted: 07 March 2013 07:11 PM   Total Posts: 28   [ # 13 ]

That’s great to know, I was pulling my hair out a bit at PreFab3D’s refusal to load any of my embedded textures.  I’ll do some further tests before long.

I think my biggest concern was that the ‘vase.awd’ in the Adobe site tutorial refuses to load in the current version of Away3D (at least in all my attempts) so I wanted to find some way to see the exports in PreFab3D first so I didn’t keep doubting my AS3 display code.  But it doesn’t load in PreFab3D either.

Sean72

 

   

Avatar
80prozent, Sr. Member
Posted: 07 March 2013 07:20 PM   Total Posts: 430   [ # 14 ]

For some more information about the plugin, you can look into the issue-list on github.

Also make shure to use the last updated version of the plugin (i made some fixes yesterday).

 

 Signature 

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

   

koffertje, Newbie
Posted: 07 March 2013 09:24 PM   Total Posts: 19   [ # 15 ]

hello,

well i did another bind on my final project. where the first animation was simple with only 8 joints animated, it worked fine. (i used the joints from polar bear and did some adjustments.)

know i’m animating more joints and get deformation in prefab.
i looks like, the more joints i animate, how crazy-er deformations I get.

 

   
   
‹‹ KART WITH AI

X

Away3D Forum

Member Login

Username

Password

Remember_me



X