Jump to content

Convert .babylon to .dae?


ozRocker
 Share

Recommended Posts

Hi @ozRocker 

Everything is possible i suppose..
.DAE uses a XML file "setup", so that would be the easiest, no encoding or anything needed.

Next step is to write a conversion tool, which isn't a fast task, but it is however rather simple and strait forward.
Basic functionality; read the babylon file data, write to a string in the correct schema, then download the string as a .DAE file and it should work.. there might be some differences in how the data is stored.

You can read the full 1.4.1 schema here; https://www.khronos.org/files/collada_schema_1_4_1.xsd
Or 1.5 here; https://www.khronos.org/files/collada_schema_1_5
Depending on which file version you prefer/need, it's also very helpful to look at an existing & working .DAE file in a text editor.

I made an example here; (no actual data is passed from the babylon file, just a static DAE asset header as 'proof of concept', includes .babylon file loader & download code.)
// Uncomment line 20 & re-run to download the sample, skull.babylon.DAE
// See lines 66+ for an idea of how the DAE file is built.
http://playground.babylonjs.com/#9X6AKD#2 

// If you prefer a clean file (non-minified) add '\n' at the end of each 'new' string
e.g. http://playground.babylonjs.com/#9X6AKD#4 

Link to comment
Share on other sites

One thing to keep in mind, especially using the Blender exporter, is it is performance orientated not transfer orientated.  Going back will not completely reversible.  This shows up more in the animation & multi-material areas, but I seem to recall that your scanning avoid multi-materials.  Beats re-scanning for sure though.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...