msx80

[Software] Blueprint, a building instruction generator for LDD

Recommended Posts

Yes is planned and it's also something i'd like to do soon, but it's a little harder than it looked at first sight.

Awesome, good to know it's being worked on :classic: I'd also like to see full support for flex parts at some point, but that's not too important for me (I'm sure LDD Technic builders that work with flex pipes will want such support). And I second adding support for much larger models - some of mine get pretty big too. Does a part's size matter as well as part count when it comes to avalable memory? (i.e. does it handle models with 800 large parts like, for example, this one as well as it handles models with 800 small or average sized parts?)

I was actually surprised to find my computer didn't even have Java installed (well, until now). I always assumed that was one of the pre-installed programs that came with many new computers :laugh:

Share this post


Link to post
Share on other sites

Awesome, good to know it's being worked on :classic: I'd also like to see full support for flex parts at some point, but that's not too important for me (I'm sure LDD Technic builders that work with flex pipes will want such support). And I second adding support for much larger models - some of mine get pretty big too. Does a part's size matter as well as part count when it comes to avalable memory? (i.e. does it handle models with 800 large parts like, for example, this one as well as it handles models with 800 small or average sized parts?)

I was actually surprised to find my computer didn't even have Java installed (well, until now). I always assumed that was one of the pre-installed programs that came with many new computers :laugh:

Well there are many things influencing memory usage of a part, mainly the "image" associated (which of course is bigger for bigger parts), but also the 3d geometry, and there it's more complex becouse for example curved surfaces use more vertices than flat (studs are very wasteful of vertices), so maybe a dalek brick use more memory than a big tile, geometry wise.

In general i'd say that yes, the bigger the part, the more memory it uses.

I mostly build small models so i never considered this limitation an issue, but since many people are asking i'll surely look into it. Notice that there are other limitations in place, for example the background rendering surface is limited to 1024x1024, so huge models will probably overflow and get clipped.

One suggestion to reduce some memory usage is to use grouping: if you group your parts inside LDD, Blueprint will treat them as submodels which will result in smaller assembly renders (beside making it much simpler to design steps in blueprint!). LDD support a hierarchy of groups (groups, subgroups, subsubgroups,etc), which will all be mapped by blueprint.

If the model lends itself, you could also consider splitting it in different LXF files and treat each of them independently, perhaps using some photoshop trickery to adjust the produced pages.

One of the beta testers reported that he was able to open a file with 1800 parts without crashing, using a 64 bit architecture while i couldn't open the same file with 32 bit system, so having a 64 bit machine and software could help.

You can try forcing java to use more space following this simple steps:

  • Open the blueprint64.bat (or the blueprint86.bat depending on the system you use, but 32 bit java is very limited with the amout of memory it can give)
  • After the word "java" add
    -Xmx4G

    (4G is 4 giga, try replacing it with more or less memory)

  • Save and run the program.

If you ask for too much memory, it won't even start, so you can use some trial and error :) If you manage to open some big models this way, let me know!

Share this post


Link to post
Share on other sites

Interesting, just as I thought. I had the thought since while the MOC's I'd like to make instructions for have relatively low piece counts, but the parts they use have very complex geometry (like in this one for instance, which is wholly Technic and CCBS, and many of the parts are large). I have another project demanding my time at the moment, but I'll be sure to have a play around with the software at some point this week and report back. I have a 64-bit machine so I don't foresee too many problems until I try >1000 part MOC's like my Balrog :classic:

Share this post


Link to post
Share on other sites

You can try forcing java to use more space following this simple steps:

  • Open the blueprint64.bat (or the blueprint86.bat depending on the system you use, but 32 bit java is very limited with the amout of memory it can give)
  • After the word "java" add
    -Xmx4G

    (4G is 4 giga, try replacing it with more or less memory)

  • Save and run the program.

If you ask for too much memory, it won't even start, so you can use some trial and error :) If you manage to open some big models this way, let me know!

I wouldn't recommend just throwing more memory at the program, I think you should instead update the code and get clever with the memory management - do you really need to store hundreds of images in memory at the same time? A single A4 page of instructions could have at most, say, 20 images, so why bother with the rest?

I still haven't run the program yet, but if I understood the screenshots right then the user sees a single page of instructions at a time. So, you can either:

1) Whenever you click to go to a page, delete all images currently rendered, and render the images for the new page

or

2) When you click to go to a page, save the step images to a temp folder, then delete the images from memory. If you go back to that page, reload the images from the temp folder (or rerender if the instruction layout has changed). If no images are found in the temp folder, then rerender them.

This way you only ever have to keep the images for a single page in memory at any time. Option 2) will be more complex to implement, but will definitely be faster than rerendering a large 10,000 piece model. If you are leafing through the manual one page at a time then this will become rather slow and tedious (like LPub), but it would allow unlimited sizes of models to be processed.

Share this post


Link to post
Share on other sites

I wouldn't recommend just throwing more memory at the program, I think you should instead update the code and get clever with the memory management - do you really need to store hundreds of images in memory at the same time? A single A4 page of instructions could have at most, say, 20 images, so why bother with the rest?

I still haven't run the program yet, but if I understood the screenshots right then the user sees a single page of instructions at a time. So, you can either:

1) Whenever you click to go to a page, delete all images currently rendered, and render the images for the new page

or

2) When you click to go to a page, save the step images to a temp folder, then delete the images from memory. If you go back to that page, reload the images from the temp folder (or rerender if the instruction layout has changed). If no images are found in the temp folder, then rerender them.

This way you only ever have to keep the images for a single page in memory at any time. Option 2) will be more complex to implement, but will definitely be faster than rerendering a large 10,000 piece model. If you are leafing through the manual one page at a time then this will become rather slow and tedious (like LPub), but it would allow unlimited sizes of models to be processed.

You're perfectly right, i was suggesting it more like a temporary solution.. I hated when LPub took ages to turn a page and i wanted to avoid it, but probably with some of the things you suggested the problem can be mitigated. Blueprint is much faster then LPub to render, but rendering is still the slowest step in the program, so i try to avoid it as much as possible, caching a lot of stuff.

Anyway there are plenty of places where i waste memory, i'm pretty sure things can be improved a lot :)

Share this post


Link to post
Share on other sites

I read you have plans to maybe incorporate LDraw support too. I'd really like that. For a long time, LPub was the only piece of software that was able to create good instructions, but it isn't updated in a long time and it's starting to show its age. Lately though, it looks like there are more and more people starting their own version of an instructions creator for LDraw. In my opinion more is better, that way they can help each other, start making more features faster (competetion) or just more choice for users.

If you're going to incorporate LDraw support, I was wondering if you might to use LDview as renderer for LDraw models (like LPub does)?

I'm a LDraw user, I don't really use LDD, but I appreciate the fact that LDD users can now easily create instructions too. Amazing work :classic::thumbup:

Share this post


Link to post
Share on other sites

If you're going to incorporate LDraw support, I was wondering if you might to use LDview as renderer for LDraw models (like LPub does)?

I'm a LDraw user, I don't really use LDD, but I appreciate the fact that LDD users can now easily create instructions too. Amazing work :classic::thumbup:

No, if i'm incorporating LDraw support, i'll use my own renderer, the same that is currently used in blueprint. The appearance of generated instructions will be mostly identical and indistinguishable.

I was an LDraw user too, i even developed some software on the library (a web renderer called Brigl). But ultimately i found that i was much quicker digitalizing models in LDD than i was in LDraw. I just missed the building instruction generator :)

Share this post


Link to post
Share on other sites

To legolijntje and other Assuming you were addressing me. LICreator doing this work for LDraw users. Try this. Because LDD and LDraw is two different world.

But about LDraw stuff this is correct forum here http://forums.ldraw.org/list.php?22 .

I have this same opinion about LDD as msx80 have. Unusable BI is main reason why I start interest with LDraw and LeoCAD.

Share this post


Link to post
Share on other sites

Made some quick tests this morning, and it works well. Noticed small improvements that could be needed, I'll try to write a list. I imported my latest project, a 2400 parts one, and it goes pretty well. I'll get you more details later today or tomorrow. Great work! :thumbup::classic:

Share this post


Link to post
Share on other sites

great to hear it handled 2400 parts :) (that's probably the biggest file ever opened with Blueprint :P) It's clear that the max size of openable projects vary greatly with the system and probably with the project characteristics. Looking forward for improvements suggestions!

I'm currently working mainly on bringing the "undo" feature, which required refactoring of a LOT of code. Also added an interface to change page size and project level "zooming" for assemblies and parts in part list (currently only hackerable in the config file). I guess in a couple of week i could release a new version.

Share this post


Link to post
Share on other sites

great to hear it handled 2400 parts :) (that's probably the biggest file ever opened with Blueprint :P) It's clear that the max size of openable projects vary greatly with the system and probably with the project characteristics. Looking forward for improvements suggestions!

I'm currently working mainly on bringing the "undo" feature, which required refactoring of a LOT of code. Also added an interface to change page size and project level "zooming" for assemblies and parts in part list (currently only hackerable in the config file). I guess in a couple of week i could release a new version.

That'd be perfect! :thumbup:

I am always pleased to see so many programmers involving in LEGO on this forum cos it most of the time mean something new may be on the way for all of us...fingers crossed to see update of your sw ASAP :wink:

Edited by bublible

Share this post


Link to post
Share on other sites

ok, just tried it today, this is a cool program, if i do say so. it's pretty user friendly, and so far i haven't experience sudden quit from the program (and prefer not to) it's quite easy to use. undo button would be favorable, since you have to redo some step if you make a mistake. but for someone like me who works with small model most of the time, it's not too much of a hassle. overall, i like it. looking forward to the next update :)

Share this post


Link to post
Share on other sites

New version ready :)

Here's the new version of Blueprint. The main changes are:

  • unlimited undo/redo. This may still have a couple of little bugs but usually works perfectly. Feels much more like a professional program now!
  • better memory management. Turns out i was.. ehm.. wasting quite a lot of memory by keeping all the geometries in memory in different formats.. uh.. multiple times.. but hey enough details, the program should be faster and use much less memory now. There is probably more margin to save but that's enought for now.
  • flexible part support! Chain, tubes, hoses etc should render correctly in most cases now.
  • Page setup is now available in program (before it was only limitedly available from the settings file). You can specify page size and separate zoom value for assemblies and part lists.
  • better import of LXF files: no more empty submodels and now it supports subgroups
  • small bug fixing

I've also written a tutorial explaining basic use and workflow. You can currently find it here: http://bricksafe.com...eprint/Tutorial (it's basically a collection of commented screenshot)

Let me know if you find any bug or problem!

You can download the new version here.

Share this post


Link to post
Share on other sites

New version ready :)

Here's the new version of Blueprint. The main changes are:

  • unlimited undo/redo. This may still have a couple of little bugs but usually works perfectly. Feels much more like a professional program now!
  • better memory management. Turns out i was.. ehm.. wasting quite a lot of memory by keeping all the geometries in memory in different formats.. uh.. multiple times.. but hey enough details, the program should be faster and use much less memory now. There is probably more margin to save but that's enought for now.
  • flexible part support! Chain, tubes, hoses etc should render correctly in most cases now.
  • Page setup is now available in program (before it was only limitedly available from the settings file). You can specify page size and separate zoom value for assemblies and part lists.
  • better import of LXF files: no more empty submodels and now it supports subgroups
  • small bug fixing

I've also written a tutorial explaining basic use and workflow. You can currently find it here: http://bricksafe.com...eprint/Tutorial (it's basically a collection of commented screenshot)

Let me know if you find any bug or problem!

You can download the new version here.

cool! is the new version still have the 'explode without warning" problem?

Share this post


Link to post
Share on other sites

cool! is the new version still have the 'explode without warning" problem?

No, hopefully will not explode :)

Share this post


Link to post
Share on other sites

Is there a way to export to a PDF or something similar for the final instructions? It'd be nice to be able to keep the instructions I generate on a flash drive or something in case I ever needed to use them on a PC with limited access - say, school computers where you may not be allowed to install Java or other programs - or just to distribute them without the end user having to install a program just to view the instructions. I imagine that's a bit of a stretch goal though...

Share this post


Link to post
Share on other sites

you cannot actually export in PDF, but you can export in png, with the Export PNG command. The program will create a serie of images with the building pages, that you can copy around (or upload) and use without any support. It was never supposed to be necessary to have the program to use the instructions :)

Btw i was experimenting with PDF just the some days ago, it doesn't look hard, maybe i'll implement it, even if i don't really use it.

Share this post


Link to post
Share on other sites

you cannot actually export in PDF, but you can export in png, with the Export PNG command. The program will create a serie of images with the building pages, that you can copy around (or upload) and use without any support. It was never supposed to be necessary to have the program to use the instructions :)

Btw i was experimenting with PDF just the some days ago, it doesn't look hard, maybe i'll implement it, even if i don't really use it.

Oh yes, PDF would be good.

Share this post


Link to post
Share on other sites

Just as a tip for others who want pdf files before it's made available directly from the program, it's possible to convert images into pdf files, then combine those pdf files into one file, all through online converters and pdf editors, so you don't have to be stuck with a lot of separate images.

Share this post


Link to post
Share on other sites

Wow, this is a really great tool, thank you so much for creating and sharing it! I guess I should go read the instructions, but it's very intuitive to use out-of-the-box, so to speak.

There are many print-to-pdf utilities, like cute pdf and nitro pdf, I don't think this program needs that. I'm only mentioning that because I'd rather msx80 work on things like support of very large models. I have a dream that someone will create instructions for Jerac's Star Destroyer. If you're gonna dream, dream big, right?

Again, thank you msx80 for Blueprint, it's awesome.

Share this post


Link to post
Share on other sites

I just tried downloading the updated software, but Google Chrome (and possibly my powerful antivirus) stopped it's download and said it was potentially dangerous because it wasn't commonly downloaded. Is this just my browser/antivirus being overcautious or something, since this is the first time this has happened? It won't let me complete the download because of this, even though I trust the file enough :hmpf_bad:

Might have to try another browser...

Share this post


Link to post
Share on other sites

I had a similar experience using Chrome. Problem was I hit the "Discard" button that was suggested instead of just noting the warning and keeping the downloaded file. The only issue for me now is running the 64-bit version with 64-bit Windows. I can run the 32-bit version fine.

I haven't have any crashes, and the only issue I've seen in my limited use is some extra ghost item callouts, A part is called out in an assembly step, with a quantity, e.g. "1x" but there's nothing there, and nothing missing.

Share this post


Link to post
Share on other sites

I had a similar experience using Chrome. Problem was I hit the "Discard" button that was suggested instead of just noting the warning and keeping the downloaded file. The only issue for me now is running the 64-bit version with 64-bit Windows. I can run the 32-bit version fine.

I haven't have any crashes, and the only issue I've seen in my limited use is some extra ghost item callouts, A part is called out in an assembly step, with a quantity, e.g. "1x" but there's nothing there, and nothing missing.

Yeah, appears to be Chrome overreacting about the download rather than my antivirus - just tried downloading it through Internet Explorer 11 (I forgot how awful that browser is with Eurobricks... it's why I ditched it and began using Chrome instead) and all was fine. I shall test it when I have a little more time to do LEGO-related stuff :classic:

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.