Tommy Styrvoky

Rendering/Animating Lego Ldraw models with Blender

Recommended Posts

This may not be the best forum to post this into, but I think it is the most applicable, as most Technic builders utilize Ldraw to replicate their models for instructions. About half a year ago I began experimenting with importing Lego models into Blender, there are several ways to do it, but after some research and trial and error, I found one of the better and user friendly means of importing the models and creating renders. Some people use rendering softwares for importing LDD models into and rendering, but I have attempted that but have had little success with LDD renders. After seeing a few of Blakbird's renders , I wondered if I could recreate life like images or a cutaway of a model to show internal functions. I had some prior experience with Blender a couple years ago, with some failed attempts at modeling a few different tank models. In the past few months I have been using Blender more often with college, as I use it to present 3D models of projects for a design class (Bender isn't taught in the class). I have used this program to create animations for my latest moc and my youtube channel's icon. This video will cover the basic steps of first installing the Blender LDR importer, then the basics of modifying/correcting materials, basics of rendering, and finally some simple animation.

Tools/files used in the video

Blender https://www.blender.org/

LDR Import-export plugin for blender (version 1.2) https://github.com/l...rter-v1.2.0.zip

GIMP photo editing software https://www.gimp.org/

Differential model http://www.rebrickab...xl-differential

enjoy, I hope the tutorial is easy to follow, I tried to best explain the concepts without making the video too long.

Share this post


Link to post
Share on other sites

A great thanks to you.

For occasional use, I find that Blender is very complicated. This is software that requires a large time investment.

I watched the video in accelerate. My understanding of English is not very good, too bad you did not put subtitles.

If one day I was using this software, your video would certainly be very precious.

Share this post


Link to post
Share on other sites

Tommy-

Nice video!

As a Blender user, I think this is an excellent synopsis of using Blender with Lego. As the earlier response stated, I would caution potential Blender users that there is a steep learning curve and computer graphics and animation is a path you want to embark upon with the knowledge that it will take a while to gain expertise. The import tool is very nice, as it eliminates the learning portion of Blender that relates to creating the render-able object.

If you, the reader, want to use this tool, and have good looking results, there is a wealth of Blender tutorials, videos, books, etc., available on the 'net. It's a great PROFESSIONAL product, with the best price ($0.00). You can get hooked, so beware :classic:

Share this post


Link to post
Share on other sites

Tommy-

If you, the reader, want to use this tool, and have good looking results, there is a wealth of Blender tutorials, videos, books, etc., available on the 'net. It's a great PROFESSIONAL product, with the best price ($0.00). You can get hooked, so beware :classic:

yeah, there are tons of tutorials and tools available for use that are really helpful.

A great thanks to you.

For occasional use, I find that Blender is very complicated. This is software that requires a large time investment.

I watched the video in accelerate. My understanding of English is not very good, too bad you did not put subtitles.

If one day I was using this software, your video would certainly be very precious.

You could probably follow the steps in the video, through most of the video I have the keys displayed in the lower left corner of the screen.

Share this post


Link to post
Share on other sites

You could probably follow the steps in the video, through most of the video I have the keys displayed in the lower left corner of the screen.

Yes, I noticed the mouse, but at any time, I wondered what you said.

But as I said, "If one day I was using this software, your video would certainly be very precious."

Thank you again.

Share this post


Link to post
Share on other sites

Very nice. Blender is an incredibly powerful piece of kit that is attracting more and more users. I think it's brilliant.

Share this post


Link to post
Share on other sites

You should take a look at MECABRICKS: www.mecabricks.com. There's a BLENDER setup - I think the link is on the forums - for proper materials and a rounded edge shader adding bevels to you bricks and studs. I personally use MODO.

WIP and final result of my research 2014

http://www.eurobrick...topic=95004&hl=

Hardcore test with the Millennium Falcon UCE with over 5.197 bricks:

http://www.eurobrick...topic=95292&hl=

I also use BLENDER for importing LDRAW files and export them to FBX for MODO. You should set the scaling to 0.5 because 0.05 creates some strange issues. I modified my library for LEGO logos onto the studs what gives you ofc a very big scene. The Millennium Falcon MODO file is 1.7 GB and has 48 mil polygons. This could be optimized if the LDR-Importer would support instances what MECABRICKS does. The MECABRICKS Millennium Falcon model has "just" 16 mil polygons and the file size is 48 MB due to instancing of repeating bricks.

Take a look at my actual Artstation page:

https://www.artstati...virtualrepublic

*:-)

Edited by virtualrepublic

Share this post


Link to post
Share on other sites

I have been busy with using Blender for renndering my models myself (example here), and have been playing a lot with the code of the LDR importer. Your tutorial is really helpful to show people what the possibilities are. However, I can point out some things that could be improved.

- This will probably help you a lot: the reason your materials aren't optimal, is because the importer assigns them based on the rendering engine selected when importing. This is because the definition of the materials needs tobe done differently for the internal and for Cycles, a.o. because Cycles an do way more than internal. So right now, your rendering the internal materials with Cycles, which of course doesn't give the best results. So setting the rendering engine to Cycles before importing will already help.

- Then the materials will still look off, because they haven't been gamma corrected. If you go to GIMP with your render, a simple gamma adjustment will correc the colors. This isn't the ideal method, so I will say more on this in a minute.

- There is an easy way of positioning the camera. Just navigate to the view you want in the viewport, and press Ctrl + Alt + numpad 0. This is way more efficient.

Sadly I didn't have time to watch through your entire video.

I've said I've played a lot with the import script. I solved the color problem by putting a gamma cirrect node in front of the color input of each material, which drastically improves the color of the bricks. In fact, I've tweaked the materials a lot to make them more realistic. Among others, I also implemented the bevel shader, so that yourbricks look more realistic, just like the Mecabricks renders. I also implemented the option to have the LEGO logo on the studs (this will result in a lot more geometry though). And then there are some minor things, like setting the basic scale to something more reasonable etc. You can find my modified script together with instructions here. The code isn't really pretty (I'm just an amateur coder you know) and not fully tested, but you can give it a try.

As for instancing, it can be done in Blender. Different objects can share the same object data. I've done a couple of basic tests, and it should work. That combined with a more efficient way to read out the files should result in a way more efficient importer. It's on my to do list for coding.

Share this post


Link to post
Share on other sites

The LDR-Importer just needs two improvements:

- instancing support

- faster conversation if possible

And the scaling should be set to 0.5 instead 0.05 because in my tests in 2014 I recognized geometry issues when parts have small details or you use the LEGO logo meshes for the studs.

Share this post


Link to post
Share on other sites

I have been busy with using Blender for renndering my models myself (example here), and have been playing a lot with the code of the LDR importer. Your tutorial is really helpful to show people what the possibilities are. However, I can point out some things that could be improved.

- This will probably help you a lot: the reason your materials aren't optimal, is because the importer assigns them based on the rendering engine selected when importing. This is because the definition of the materials needs tobe done differently for the internal and for Cycles, a.o. because Cycles an do way more than internal. So right now, your rendering the internal materials with Cycles, which of course doesn't give the best results. So setting the rendering engine to Cycles before importing will already help.

- Then the materials will still look off, because they haven't been gamma corrected. If you go to GIMP with your render, a simple gamma adjustment will correc the colors. This isn't the ideal method, so I will say more on this in a minute.

- There is an easy way of positioning the camera. Just navigate to the view you want in the viewport, and press Ctrl + Alt + numpad 0. This is way more efficient.

Sadly I didn't have time to watch through your entire video.

I've said I've played a lot with the import script. I solved the color problem by putting a gamma cirrect node in front of the color input of each material, which drastically improves the color of the bricks. In fact, I've tweaked the materials a lot to make them more realistic. Among others, I also implemented the bevel shader, so that yourbricks look more realistic, just like the Mecabricks renders. I also implemented the option to have the LEGO logo on the studs (this will result in a lot more geometry though). And then there are some minor things, like setting the basic scale to something more reasonable etc. You can find my modified script together with instructions here. The code isn't really pretty (I'm just an amateur coder you know) and not fully tested, but you can give it a try.

As for instancing, it can be done in Blender. Different objects can share the same object data. I've done a couple of basic tests, and it should work. That combined with a more efficient way to read out the files should result in a way more efficient importer. It's on my to do list for coding.

Thanks, I'm still a novice to working with blender, I will try it out sometime.

Share this post


Link to post
Share on other sites

You should take a look at MECABRICKS: www.mecabricks.com. There's a BLENDER setup - I think the link is on the forums - for proper materials and a rounded edge shader adding bevels to you bricks and studs. I personally use MODO.

WIP and final result of my research 2014

http://www.eurobrick...topic=95004&hl=

Hardcore test with the Millennium Falcon UCE with over 5.197 bricks:

http://www.eurobrick...topic=95292&hl=

I also use BLENDER for importing LDRAW files and export them to FBX for MODO. You should set the scaling to 0.5 because 0.05 creates some strange issues. I modified my library for LEGO logos onto the studs what gives you ofc a very big scene. The Millennium Falcon MODO file is 1.7 GB and has 48 mil polygons. This could be optimized if the LDR-Importer would support instances what MECABRICKS does. The MECABRICKS Millennium Falcon model has "just" 16 mil polygons and the file size is 48 MB due to instancing of repeating bricks.

Take a look at my actual Artstation page:

https://www.artstati...virtualrepublic

*:-)

It would be cool to get the Mecabricks importer to work with Ldraw files, that would be really useful.

Share this post


Link to post
Share on other sites

It would be cool to get the Mecabricks importer to work with Ldraw files, that would be really useful.

Scrubs has this on his to-do-list.

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.