SaperPL

Batch conversion of Ldraw library to FBX or OBJ

Recommended Posts

I'm posting this here as I've found few similar threads about file format conversion in this section, but I haven't found a tool that would fit my requirements.

I'm looking for a way to batch convert whole library of parts into FBX or OBJ so the parts can be imported into the Unreal Engine 4 project. I don't want to import whole models, I want to import whole library of parts.

I have implemented parser that can interpret the ldr file format, build the model structure of parts with transforms and partially draw those parts, but there are some issues with rotation in the transform (and I'm not a graphics/engine programmer), but more importantly this approach is a bit heavy on the performance.

From the legal side of things, I need a way to distribute my projects without the parts, but there needs to be a way for the user to put the ldraw files there on his own.

The closest thing that could be useful is this: https://github.com/Pomax/WebGLdraw but that's from 2012 and I've seen some basic shapes defined in 2016 so It might not be the best choice to invest into making a batch converter based on this.

Any thoughts on how would you approach such issue?

Share this post


Link to post
Share on other sites

LEGOs own Unity Microgame comes with a parts Library which is already in FBX format. Might be quicker then to batch convert from scratch.

Share this post


Link to post
Share on other sites
1 hour ago, M2m said:

LEGOs own Unity Microgame comes with a parts Library which is already in FBX format. Might be quicker then to batch convert from scratch.

I've checked the library of pieces that is for microgame and it has Technics, but I don't know unity and I don't really want to use it. I know my Unreal and also ray tracing support may be useful for my project.

I'll see if I can rip out those FBX files, but this is not a long term solution.

Share this post


Link to post
Share on other sites

I've been curious about this same problem but I want to convert to Pixar USD since OBJ and FBX are basically 20-30 year old formats and not actually that efficient.

I've been investigating using Blender to batch import LDD files and batch export to USD. This project is being updated and is based on an older GPL Blender LDD import script/plugin.


https://github.com/cuddlyogre/ExportLdraw

Unsure if I want to bevel or convert the geometry to Sub-Ds.

Edited by voxelized

Share this post


Link to post
Share on other sites
18 hours ago, voxelized said:

I've been curious about this same problem but I want to convert to Pixar USD since OBJ and FBX are basically 20-30 year old formats and not actually that efficient.

I've been investigating using Blender to batch import LDD files and batch export to USD. This project is being updated and is based on an older GPL Blender LDD import script/plugin.


https://github.com/cuddlyogre/ExportLdraw

Unsure if I want to bevel or convert the geometry to Sub-Ds.

OBJ is more then 30 years old, but FBX is younger then 30 years ;)

Anyway I wrote a tool that converts LDD LXF files into USD GitHub - sttng/LegoToR: A LEGO Digital Designer to RenderMan and USD converter.

If you have a thorough understanding of LDraws file format this might help you as a starting point. I think also maybe the Blender LDraw importer might help. 

Does Blender already support USD import ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.