Cinema4D to BABYLON.JS Python Plugin

So I got sick of making editors in browser for all my projects and decided this weekend to put up the framework finally for a C4D exporter and the methods to import into the DOM.

Got some of the basic stuff done but I am not the best Python programer and the references for C4D plugin development are very convoluted so any input would be amazing.

Gotta figure out the why the rotations are off, but other then that things are looking good.

Here is a little video of it in action:

Check out the github for plans and what has been done so far.

9 Likes

Awesome!

I remember needed exactly that and thinking - I wish someone had the time and need :slight_smile:

1 Like

It’s not going to have all the features, but at least the basic stuff for now.

The major thing that I am aiming for is the ability to build a level or something in c4d and then set specific tags to automatically split out assets and build the imposters etc.

Its nearly impossible to do level design without visual tools to adjust UVs and other things on assets in real time.

@RaananW aren’t you a python god? Can you take a quick peek at my script and tear them apart please? I need someone to be like ohhhh why are you enumerating this or why aren’t you zigging when you should be zagging or that its Leevveeoooossaaaa

Oh, if I am a god, lord we are in trouble :pray:

My last python script was written more than a year ago… But if I find the time and find something to help with, I will make sure to submit a pull request. I usually prefer zagging, you are right :wink:

1 Like

I wish I knew how to set it up as a C# environment but alas compilers are my worst enemy. The two perks to python though are everyone can run it and anyone can work on it.

UPDATE
Rotations and Parenting system fixed.
Custom Geometry (Positions, Indices, UV1) done.

I’m working on the StandardMaterial tag now. Then Texture handling stuff.

After then its gonna start getting kinda tech.

UPDATE
Basic stuff for StandardMaterial is done now.

Now to start making everything port over to .Babylon file conventions instead of the proprietary stuff i was doing.

UPDATE
Got the correct method established to follow .babylon file convention now

I’ll be uploading it to github today hopefully, and people can start exporting their first levels made in c4d to .babylon and start ripping my work apart.

Not bad progress for only a couple of days and only working off code references. The c4d API is like learning a new language and is the main hold back. If I could access all the things that I wanted when I wanted this would have been done a long time ago.

image
I’ll work on the order of the UI once everything works.

Ohh and I came up with nifty different colored logos for icons to represent different tags.

We should push it here: GitHub - BabylonJS/Exporters: Exporters for Babylon.js and gltf file formats

I will as soon as I wrap up the stuff that I have done as .babylon conventions now.

Also can I start exposing some more options on the .babylon file type to accommodate some things here? (Script tags, observer tags, automatically attach camera controls etc)

How it is going?

I got it to the point where it was exporting whole scenes, then realized how much of a waste of time it was because of gltf… Learned a lot, cried a lot, laughed a lot then I got wise and stopped working on this.

5 Likes

The thing about wasting time is that it is just of cost of living. If you never had any, then you would also be very likely to never get anywhere. Unfortunately, you cannot really pick your spots to have it, as it is not known till after the fact.

3 Likes