Message Boards Message Boards

GROUPS:

Import .dae 3D format files without ignoring nodes?

Posted 2 months ago
388 Views
|
5 Replies
|
1 Total Likes
|

Collada .dae 3D format is in fact xml document which contains <library_geometries> section with some "meshes", where the coordinates and normals of surface meshes points are provided.

But that coordinates are not refereed to basic coordinate system. DAE file contains an other, <library_visual_scenes> section, which holds a tree of nested lists of "nodes" - transformation matrices describing coordinate transformation of the nested node from the parent one. And only the last, leaf node contains reference to some mesh name, so the mesh coordinate system is given by set of coordinate transformation. A lot of 3D modelling soft exports a set of model "parts" in very such way.

Looks like Mathematica Import[] function do not take into account nodes section, so imported complex models have details teared apart and grouped near the center of coordinates. Import[SomeModel, "CoordinateTransform"] provides a single and unit transformation matrix not changes at all on change of "nodes" matrices

  1. Have tried to import some .dae models. Import[SomeModel, "MeshRegion"] and Import[SomeModel, "GraphicsComplex"] both give the same teared apart result.

  2. Coded some handmade parser, which extracts meshes from <library_geometries> and provides the resulting set of 3D surfaces without additional transformations - completely the same "teared" result as in stage 1.

  3. Coded additional parser, which extracts a set of transformation matrices for every mesh, and applied a result to it - valid 3D model with the parts on proper places.

ps: it would be very convenient if Import[] did not "melts" all meshes in a single one, but provides them as a set of objects together with their transformation martices, or have a option for this.

5 Replies

Please do not use "bug" in subject headers. That requires confirmation.

Posted 2 months ago

What exact confirmation you need from me if Import[] imports dae models like http://www.cadnav.com/3d-models/model-45969.html in such way (see below)?

T-90 model from CadNav.com

Posted 2 months ago

As a workaroud is first import .3ds file and then export to .dae file.

Where file: "T-90.3ds", You copy to: "C:\Users\Name of user\Documents" on Windows operating system.

 model = Import["T-90.3ds"]
 model2 = Export["NewT-90.dae", model]
 model3 = Import["NewT-90.dae"]

enter image description here

Regards Mariusz I.

Posted 2 months ago

Mariusz Iwaniuk: that's clear, .obj files are imported without errors too. But there is a pair of problems:

  1. That was only an examples with a lot of different formats inside. In fact I have a pair of models in .dae without any other formats

  2. It's highly preferable for me to import some model meshes apart, if possible (they needs some additional rotation)

Btw, .dae of this model simply fails to import, besides it have no "nodes" sections at all. Import[...,"Summary"] wrongly shows only 1 vertex and 8 faces.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract