Jump to content

LDraw vs Mecabricks vs LDD for game models


lol username
 Share

Recommended Posts

lol username

Let's say you're working on a model for a new Rock Raiders vehicle, or making a fan game, whatever. Often times people just use exports of LDraw models or similar things, without thinking about it too much. They'll also probably be told this isn't a very good idea, because the results will be highly inefficient. But just how inefficient? Let's find out.

 

For those who may be new to all this: When you create a model with LDraw-based software, LDD, or Mecabricks, the saved model doesn't contain the actual geometry of the pieces. Rather, it's a list of what pieces to put where, in what colors, etc. The three systems mentioned above actually have their own libraries of 3D LEGO pieces. So, while these systems have some level of cross-compatibility (LDD can import and export LDraw models, and Mecabricks can import LDD models), this has no bearing on the brick geometry used. For example, if you build a model in LDD, then export to OBJ with an LDraw-based program, the geometry in the OBJ will be of LDraw's pieces, as if you had built it in LDraw to begin with.

 

For these tests, I built a simple test model in LDD, which I was then able to also work with in LDraw-based programs (in this case, LeoCAD) and in Mecabricks, thanks to the cross-compatibility mentioned earlier (though Mecabricks lacked the specific window pieces I'd used, so I had to swap them out with a very similar part it did have).

 

Option 1: LDraw

LDraw is a (mostly) fan-created library of 3D LEGO pieces and software for doing things with them. Its origins go back to 1995, and the accuracy of the brick models is often hit or miss (there's an especially notable problem where all the holes in Technic bricks are at the wrong height). The brick models also aren't built with realtime rendering in mind; they favor sharing as much geometry between multiple parts as possible, but this leads to a lot of inefficiencies on exported models. It's also worth noting that studs, tubes, etc are 16 sided, and studs are 4.8 mm wide.

 

There's a few ways of exporting LDraw models to other formats, but they generally give similar results. For this, I exported the test house to 3DS with LeoCAD. There are some issues with faces being flipped the wrong way and smoothing/normals being messy, but in the end, that's the least of your concerns: the triangle count for this simple model is 50350. Most of these tris come from the studs and tubes inside the walls and such; a complete waste.

Model - Wireframe

 

Option 2: Mecabricks

Mecabricks is relatively new, web-based, and has its own unique brick library made in Blender (with occasional brick geometry borrowed from LDD, though not much, and those cases are gradually being replaced with custom geometry - more on that later). As you can read in that topic, the basic part dimensions are similar to LDraw, but additionally, the outside dimensions of the bricks are reduced slightly to leave gaps between them, like on real LEGO pieces.

 

I exported the house to OBJ with Mecabricks, and the resulting model was 42927 tris - better than LDraw, but still not well suited to a game. Still lots of waste on hidden studs and tubes.

Model - Wireframe

 

Option 3: LDD, LXF to OBJ

This method uses an old tool by bartvbl that is no longer available, however, I still have a copy and thought I'd include it in these tests. It assembles LDD's bricks together into your model and saves it as an OBJ (though it doesn't support things like flexible elements and decals). LDD's studs are 4.9 mm wide (the official LEGO measurement), but more importantly they're 12 sided rather than 16, and the bricks are generally far more optimized for realtime rendering: the resulting model is 30586 tris. There's still the major issue of hidden studs and tubes, though.

Model - Wireframe

 

Option 4: LDD, 3DVIA Printscreen capturing

This method works differently than the others: It captures directly from LDD as it's running. Why does this matter? LDD has a system that automatically removes studs, tubes, etc that cannot be seen. It doesn't remove everything, but it does a lot - in fact, LEGO patented it. Capturing with 3DVIA Printscreen, then converting the resulting 3DXML to OBJ with my tool, results in the test house model only having 13548 tris, while looking identical to the previous method! (It also supports flexible elements and decals, if your model has them.)

Model - Wireframe

 

Option 5: LDD, 3DVIA Printscreen capturing, with "cap" bricks

This is a strategy Hollis/cdmpants came up with. I'll write a topic with specifics later, but in short, you place bricks in your LDD model that serve no purpose but to trigger geometry removal. The bottom of the roof has many tubes that aren't covered, so LDD doesn't remove them - but, if this were in a game, the player would likely never see or care about them. So we put caps there (and on the bottom) to get rid of them. Then, once the model is converted, we delete them, leaving the more optimized bricks they were covering behind. Doing this reduces the model to 2586 tris.

Model - Wireframe

 

Option 6: Remodel it yourself

The inevitable conclusion. Any model can be optimized further with some manual work; I decided to use the LDD 3DVIA Printscreen rip as a base and work from there. I was easily able to get it down to 884 tris.

Model - Wireframe

 


 

There's another difference between brick libraries: LDraw and Mecabricks are fan-created (well, mostly - we'll get to that in a moment), and LDD's brick geometry is owned by LEGO. So, can you use LDD geometry in game mods, fan games, or other unofficial software?

 

Up until recently, I was under the impression that LEGO was strongly against it. The only major fan-created software (that I knew of) to contain LDD geometry - or rather, enhanced versions of it - was the LDD to POV-Ray Converter:

 

Quote

Brick geometry data are the property of the LEGO Group of companies and are subject to copyright. POV-Ray™ include files contain enhanced versions of brick geometries used by LDD. Since include files are plain text files LDD to POV-Ray™ Converter uses Callback File System, virtual file system SDK for Windows provided by the EldoS Corporation to enable POV-Ray™ access binary includes without disclosing the brick geometry content.

 

More information was given in this Eurobricks post:

 

Quote

Also, I'd like to take the opportunity to clearify some things about the Call-back virtual filesystem. Some of you may be wondering - why is it needed? Why not let PovRay read the geometrise directly? Well, it was decided quite early to run this project completely by the book, since LDD2PovRay would use the LDD geometries and it would violate the EULA to use them without permission. So I was asked to mediate some contacts with TLG which I gladly did. TLG said that as a first step, the geometries need to be fully protected. And the call-back system does just that - it allows only PovRay to access the geometries.

Read more  

 

In May, I contacted LEGO Customer Service to ask if there were any way for other fan-created projects (such as my own) to use LDD geometry with the official blessing of LEGO, as the LDD to POV-Ray Converter had. Here's their reply:

 

Quote

I reached out and was able to confirm the article written by Martin Hronsky and Johan Sahlstrom was a one time sponsorship about LEGO Digital Designer (LDD).The feedback I was given is he was allowed this one time rights to the inner workings of LDD in an effort to advance it.

 

Since this all began back in 2011, there have been changes to policy and also to the level of support that's provided for LDD. I'm sorry to say that I don't really have information that would help you gain approval to use the LDD geometry.

Read more  

 

So, using LDD geometry with direct, official approval from LEGO is unlikely to happen these days. The only exception seemed to be a collection of LDD parts that the LEGO Universe developers had shared with LDraw, to "ease up the conversion between LDraw and LEGO Digital Designer". The LU team sent part geometry to LDraw in several batches, the first in 2007, and the last in 2010.

 

But then I found out something unexpected: From 2011 to the present day, LDraw has been adding LDD bricks to their library even beyond the ones officially given by the LU team:

https://forums.ldraw.org/thread-800.html

https://forums.ldraw.org/thread-1145.html

https://forums.ldraw.org/thread-5310.html

 

LDraw's files are plain text, and part files contain information on their history/authors. LDD-derived LDraw parts credit "LEGO Digital Designer" as the author, and searching for that through all files in the current LDraw parts library reveals 542 files which are sourced from LDD.

 

Up until I found this out, I had been basing models in my game project off of LDraw geometry, to avoid using LDD geometry without approval from LEGO. But it turned out that many of the LDraw parts I'd been using were just slightly modified LDD parts, ripped by LDraw parts authors!

 

I then checked Mecabricks, and what do you know, they also have some parts that come from LDD (the ones I specifically checked were some minifig hair pieces). It's a low amount and they're gradually being replaced with custom geometry, but it goes to show LDD ripping isn't a dark forbidden practice or anything.

 

So both LDraw and Mecabricks (and thus their users) have been using LDD geometry, and LEGO doesn't seem to care. And LDraw has been doing this for six years as of when I write this, for hundreds and hundreds of parts.

 

Thus, I think it's safe to say LEGO probably won't care if you were to do something similar in a mod or fan game. Just don't go running around screaming "THESE ARE LDD MODELS, I AM DISTRIBUTING OFFICIAL LDD GEOMETRY EN MASSE, HERE, DOWNLOAD THEM", and chances are you'll be fine.

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

  • lol username featured this topic
  • 1 month later...

Hello, Just to clarify something,

Mecabricks geometry is not LDD geometry. There may be a couple of parts from the very old times but that's all. I modeled myself every single one using a range of technics like 3D scanning among others. This is the reason why you find new parts not in LDD or LDraw already in Mecabricks including complicated organic ones like new hair pieces. Decorations are also completely custom and manually vectorised  generally from photos by the community. They include bump maps and metal maps as well when required.

So no, Mecabricks users do not use LDD geometry. They use Mecabricks geometry carefully crafted to fit real parts as much as possible. What is true though is that it is not optimised for gaming but more for rendering.

Thanks

Link to comment
Share on other sites

9 hours ago, scrubs said:

Hello, Just to clarify something,

Mecabricks geometry is not LDD geometry. There may be a couple of parts from the very old times but that's all. I modeled myself every single one using a range of technics like 3D scanning among others. This is the reason why you find new parts not in LDD or LDraw already in Mecabricks including complicated organic ones like new hair pieces. Decorations are also completely custom and manually vectorised  generally from photos by the community. They include bump maps and metal maps as well when required.

So no, Mecabricks users do not use LDD geometry. They use Mecabricks geometry carefully crafted to fit real parts as much as possible. What is true though is that it is not optimised for gaming but more for rendering.

Thanks

Thanks for the info. When I was looking into all this stuff/drafting this topic in late August, I'd downloaded two hair pieces from Mecabricks (64798 and 87995), both of which were modifications of LDD geometry. I then looked at the wireframes of other hair pieces within Mecabricks itself, which also seemed to match similarly (didn't bother downloading them since it seemed my question - "does Mecabricks have any LDD geometry, like LDraw does?" - had already been answered).

 

Out of curiosity I redownloaded those two hair pieces today, and compared them with the LDD geometry, and the Mecabricks downloads from four months ago. The first piece has been reworked since August, the second hasn't:

 

dJlbLpT.png

 

pdSbKuT.png

 

I was still curious, so I took a closer look at 87995 from Mecabricks and noticed that while the vertex positions were mostly the same as LDD, the triangulation was different. In the spirit of completely overanalyzing 3D models of plastic toys, I did a comparison of the LDD/LDraw/Mecabricks versions (shown here with completely flat shading to make differences in triangulation more obvious):

 

UEj4X38.gif

 

bT2sdDD.gif

 

Aside from the triangulation changes on the Mecabricks version, the only major differences between them are changes to the interior (unsurprising since the original LDD model keeps it pretty basic - which is common for hair/headgear in LDD).

 

Also, here's the history section of the LDraw file:

 

0 !HISTORY 2014-01-10 {LEGO Digital Designer} Original part shape
0 !HISTORY 2014-01-10 [angmarec] File preparation for LDraw Parts Tracker
0 !HISTORY 2014-06-21 [PTadmin] Official Update 2014-01
0 !HISTORY 2014-06-22 [cwdee] Add missing CATEGORY
0 !HISTORY 2014-12-23 [PTadmin] Official Update 2014-02

 

I'm kind of tempted to look at differences/similarities in other parts between libraries, but it'd probably be more interesting with parts that were modeled completely separately from each other, which would have more notable differences. Could compare with models from official video games too, ones that don't just use LDD bricks anyway...

 

 

9 hours ago, Brickoum said:

https://mecabricks.com/en/forum/topic/62/2

Please explain the textures stolen from LEGO My City

I can't speak for Scrubs, but my two cents: Both those textures and real, physical minifig prints are just different uses of the same source images by LEGO. Practically speaking there's not much difference between basing a vector for Mecabricks off of one or the other: Either way, you're gonna end up with custom vector versions of LEGO's original designs, in Mecabricks's color palette and all that. These textures were just more convenient than pictures of physical minifigs. Saying they "stole" them sounds odd and accusatory.

Link to comment
Share on other sites

@Brickoum This is not because someone posted something in the forum that it has been used. I can tell you for sure that they were not. UV maps in Mecabricks are all custom made and decorations way higher resolution than this. Check these files as an example - albedo and metal maps that you can find under reference 76382a890:

3814d890.png

 

3814d890_metal.png

 

@Terrev Yep, these ones are from the old time and simply cleaned up recently. This is going to be mainly true for classic hair pieces.

If we stay in mini wigs, have a look at 21788, 21789, 20688 or 21787  from Scooby Doo, 25405 and 28430 from The Lego Batman Movie just to name a few.

For animal most recent ones are 29111, 27152 or 26076 on the top of my head.

For weapons: 33760, 27257 or 22407

For wheels: 18978p1, 18978p2, 24308p1, 24308p2, 29117p1, 29117p2

etc. the list would be long :-p

 

Here is a post I wrote on eurobricks when I got my 3D scanner a few years ago.

 

In the part library you can see if a part is also available in LDD and you will notice that Mecabricks includes a good amount of new parts not available anywhere else. Just for the little story, it happens sometimes that LDraw admins/users ask if they can convert Mecabricks pieces. The most recent example being 24312 - Wheelchair.

 

I have more than 3000 blender files which represents thousands of hours of work - Actually they are mainly quads. Triangulation is made when they are imported by the 3D engine used by Mecabricks. For decorations, it is more than 10K files (albedo, metal and bump maps included). For these ones, a good amount has been made by the Mecabricks community though.

 

Anyway, the point of my first post wasn't to argue or start a debate but just to show that not all systems are 100% based on the same base library that would be LDD. I am not denying that like in your example you will find similarities for some of them but with LDD not being updated anymore, the difference will become way more noticeable in the future as new parts will be added.

Link to comment
Share on other sites

22 hours ago, Brickoum said:

https://mecabricks.com/en/forum/topic/62/2

Please explain the textures stolen from LEGO My City

 

I posted those decorations on the mecabricks forum as reference.  They are not used in the mecabricks library. :)

I used to create  decorations for mecabricks starting from these images but they can't provide the quality of decorations that newer decorations have. Just to be complete, every piece / decoration is built up from zero but references make it easier to achieve a good quality.

 

 

Link to comment
Share on other sites

Yeah, my point wasn't that LDraw or Mecabricks were mostly based on LDD (they aren't, though looking back at my first post my wording wasn't always clear on the amount), just that both use/have used LDD geometry and LEGO doesn't seem to mind.

 

One notable difference is the minifigures themselves (Note: The two variations of the LDD minifig are old/single color and new/dual color).

 

4oNhVFJ.gif

 

And if anybody thinks there's a lot of differences between those, just wait until you see the models from some video games...

 

4aXbQ3I.png

 

ywR7sHm.png

 

2kpqtbx.png

 

Upper row: LDraw, LDD (old), LDD (new), Mecabricks.

 

Lower row: Rock Raiders, LEGO Island 2, LEGO Racers 2, LEGO Universe.

Link to comment
Share on other sites

Your pictures are really good to visualize the differences. This minifigure is a pain to model. I remember when I remade all of its pieces a couple of years ago. It took me about a month to get something I was happy with. Measuring it was a complicated task especially for the arms as it is hard to get a reference surface. Besides, the moulds have slightly evolved other the years and tiny differences can be observed.

 

The best I could do for a  version that can be subdivided is this. The version on Mecabricks is slightly simplified.

I think it still looks ok when rendered with correct shaders:

33613685403_f3645692a6_z.jpg

Link to comment
Share on other sites

  • 5 months later...

Hey, I just wanted to note that you don't have to go through the process of "capping" the models.

When you run LDD in developer mode, there are shortcuts to hide the complex geometry of the bricks.

 

caps + k ... removes the knobs/tubes on the inside of the bricks.

caps + q ... remove the inner walls of the bricks

k removes the knobs of the bricks

I think removing the geometry via these shortcuts has the same effect as capping the bricks, but is much faster.

 

 

LDD has very good information about how a brick is modeled. It knows which parts can be removed to simplify the geometry. That means it would be possible to write a converter that exports the model with simple geometry.

Link to comment
Share on other sites

lol username
17 minutes ago, MightyMoe said:

Hey, I just wanted to note that you don't have to go through the process of "capping" the models.

When you run LDD in developer mode, there are shortcuts to hide the complex geometry of the bricks.

 

caps + k ... removes the knobs/tubes on the inside of the bricks.

caps + q ... remove the inner walls of the bricks

k removes the knobs of the bricks

I think removing the geometry via these shortcuts has the same effect as capping the bricks, but is much faster.

That's also a useful technique (which I mentioned in the main 3DXML to OBJ post but not here), but it's not quite the same result as capping bricks. Capping bricks allows you to have the bottoms replaced with quads instead of vanishing entirely, and also be selective about what bricks or individual studs you want it applied to. The dev mode options are indeed super useful though and worth mentioning here too. (Also, there's another key combo: shift + q toggles the bottom/insides of bricks.)

 

17 minutes ago, MightyMoe said:

LDD has very good information about how a brick is modeled. It knows which parts can be removed to simplify the geometry. That means it would be possible to write a converter that exports the model with simple geometry.

Indeed, I'd love to see something like this tackled some day. The .g format is fairly well understood now (I believe @lcdr may have some documentation somewhere?) but it hasn't been used to its full potential yet...

Link to comment
Share on other sites

  • 1 year later...
14 hours ago, Dilvish said:

Question: can bones/skeletal animations be exported from games too?

No. Only models so far. It can technically be done, but it has not been looked into.  

 

However, here are animations for a minifigure created from scratch: https://mega.nz/#!T84U3I5T!mXfSZoFCgV6Q66vRyervsv9tQF3tjV0ftR38hxIJ57Q

 

I have some models if you are interested. :)

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.