LDraw.org Discussion Forums

Full Version: LDD2LDraw - a working LDD mesh converter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
based on this brick viewer, I have written a converter, that creates LDraw files from LDD mesh files (*.g).
I've solved the problem of the files with the g1, g2, etc. extensions. These are subparts for a model, that are colored differently or textured. My converter can merge these into a single file.
I've attached an example of a part, that was originally split into two.

If there's enogh interest, I'm willing to upload the sources to Github and create a somewhat user friendly version (currently it's a command line tool.)


Looks great. More tools equals better parts so I, for one, would like to see you open the source.
Bring it on! Heer is someone who want's to have a look at a very, very user friendly version.

Here is a sample of the parts I converted so far.
Have you looked at the possibility to generate edge lines? 3dxml2dat is able to to that, and generating them only from facet angle difference (as does Edger2) is far from optimal...
I've already discovered Edger2 on my own. The really interesting parts have very high face counts. Creating the lines manually would be prohibitive.
I'm looking into porting the edge creating algorithm to Java for inclusion into my own program. Do you know of a better way to create the lines than Edger does?
As explained by Rolf, on each triangle LDD has information about normal at each vertex. If the normals are the same on matching vertices of two triangles, then a condline should be set. If the normals are different, then it's considered a sharp edge (independantly of facet angle) and a normal edge line should be set.
Quote:Creating the lines manually would be prohibitive.
Even using Edger2 automatic generation, there's still a LOT of manual work to do to sort out things between lines and condlines.
Philippe Hurbain Wrote:Even using Edger2 automatic generation, there's still a LOT of manual work to do to sort out things between lines and condlines.
But that's work someone else will have to do. I plan to use these parts in Blender. So I don't need the lines.
With the rather sparse interest in my converter, I have decided to forgo a release for the time being. (It's quite some work to create a release.)
Instead I'm going to convert all the LDD parts, that LDraw is missing. As a first step I have created a list of all LDD parts and (if applicable) their corresponding LDraw name. I have attached the file to this post.
Please note that the list contains some duplicates, since LDD has combined some parts into assemblies. There's an alias column that lists the original part number.
With over 1000 LDD parts to convert, there's no way to manually edit and correct every part. I will convert the files and create the edges with Edger2. I think that's still better than no parts.

PS: If someone wants just the source code, I will zip it and provide a download.
Pardon me if I'm being blunt, but the low interest in your converter might come from the fact that what you are doing has allready been done.

Please have a look at Rolf Osterthuns site, digital-bricks.de

What we need is more part authors that are willing to adapt the meshes to Ldraw standards.
Please read this thread

But if you want to convert them all again, as an exercise or learning experience, go ahead.
Pages: 1 2 3