ldr_tools_blender addon import LDraw into Blender


ldr_tools_blender addon import LDraw into Blender
#1
The first release of the ldr_tools_blender addon is available on github. The goal of this project is to provided a reliable and performant way to import digital LEGO models into modern versions of Blender for rendering. Both .ldr and .mpd files are supported. You can even import and render very large scenes with hundreds of thousands of pieces using a special instancing option on import.

I've attached a render made of the UCS Millennium Falcon using the addon. The addon creates PBR materials for use with Blender Cycles. You'll need to create your own lights, however. This render is using an HDRI for the environment and a sun lamp with a softer lighting angle to create the shadows. Working directly in Blender has a bit of a learning curve compared to something like Studio's renders. The advantage is better control and being able to take full advantage of your hardware for rendering. I plan on updating the github WIKI with a tutorial for rendering at some point.

The basic installation process and usage is the same as previous importer addons like https://github.com/TobyLobster/ImportLDraw or https://github.com/cuddlyogre/ExportLDraw. Supporting older Blender versions is not a goal of this project, so these are still your best options for Blender versions prior to 3.3. Some releases of ldr_tools_blender will have to break compatibility with previous Blender versions if Blender updates its Python version. This doesn't happen often, so it shouldn't be a big issue. Previous addon releases will still be available to download when this happens.

[Image: 225458929-e1870792-6125-443b-af49-fc047b6c8167.jpg]

This is the first release, so there will be bugs. Please let me know if you have any questions, comments, or concerns. Making an issue on github is the best way to notify me and others of of feature requests or bug reports. This is also how I track if something has already been reported or fixed. I'll still check this thread, but I won't always be as quick to respond as github notifications.

While most of the core LDraw spec is implemented like MPD, I'm hoping to get feedback on what additional extensions or features need to be added. The last time I did digital lego modeling, LDD was still getting updates. The LDraw tools are still very new to me. I do most of my testing with OMR models or exports from Studio. Please let me know if any of your models don't import or don't import in the way you would expect.

The addon is a thin Python wrapper over some LDraw processing code written in Rust. The components are all open source. Check the github link for information on how to develop and contribute or figure out how it works. Most of the code is written in Rust for performance reasons and to take advantage of existing libraries. Splitting up the code like this means the actual addon itself has very little code and also allows components to be reused in other projects. Sadly, some implementation quirks in Blender prevent the importer from being as fast as it could be. The code is still substantially faster than any of the existing Blender importers and can even outperform the Mecabricks importer. Differences are most noticeable on large scenes.

Some quick benchmarks using a stopwatch. I've done my best to use comparable quality options for all importers. I'm not including memory usage, but memory usage was also substantially lower in ldr_tools_blender. You can get comparable memory usage in the other two addons by disabling any options that create modifiers, since this doesn't play nicely with sharing meshes in Blender.

10179-1 - Millennium Falcon - UCS, Logo4
ExportLDraw - 68s
ImportLDraw - 100s
ldr_tools_blender - 7s
ldr_tools_blender (instance on faces) - 5s

31203-1 - World Map, Logo4
ExportLDraw - 24s
ImportLDraw - 58s
ldr_tools_blender - 6s
ldr_tools_blender (instance on faces) - 2s

Repository
https://github.com/ScanMountGoat/ldr_tools_blender

Download:
https://github.com/ScanMountGoat/ldr_too...r/releases

Report bugs or request new features:
https://github.com/ScanMountGoat/ldr_too...der/issues
Reply
« Next Oldest | Next Newest »



Messages In This Thread
ldr_tools_blender addon import LDraw into Blender - by Jonathan N - 2023-03-16, 3:31

Forum Jump:


Users browsing this thread: 2 Guest(s)