The Beginner’s Guide to LDD to POV-Ray™ Converter

This tutorial is out-of-date and not being updated at this time. As such, the directions may be incorrect or not too clear.

Table of Contents
Introduction
Requirements
Installation
Setting It Up
Rendering
F.A.Q

Introduction

LDD to POV-Ray™ Converter is a free, Windows-only application which takes an .lxf or .lxfml model created in LEGO® Digital Designer, and converts it to .pov and (optionally) accompanying .ini files which can be used to render a high-quality image of the model using the POV-Ray™ rendering engine.

Fun Stuff!

If you would like to see example renders created using LDD to POV-Ray Converter, check out the creator’s Brickshelf page.

Requirements

You will need a couple of items for this tutorial:

  • Windows XP SP2 or greater (32- and 64-bit Windows are supported)
  • LDD to POV-Ray Converter (obviously)
  • POV-Ray 3.7.0 For Windows or higher
  • LEGO Digital Designer 4.1.7 or higher
  • Administrator rights for installation
  • An .lxf or .lxfml model to render. I will be using my flat screen TV MOC, which you can get from my BrickSafe page.
  • Plenty of hard drive space. LEGO Digital Designer itself requires over 1 GB of space, and LDD to POV-Ray Converter requires 30 MB for the program, and at least 500 MB more for the other files it creates. You also have to meet the POV-Ray system requirements, which are available on the POV-Ray website.

You will find two available versions LDD to POV-Ray Converter download page: a 32-bit (x86) 64-bit (x64) version. Which one is to be downloaded? I will make it simple: match the version to your computer’s bit. Right-click on Computer and for look for the following text:

(Click/tap on any picture in this tutorial to view the full size.)

64-bit Windows

then download the 64-bit version. If you see the following text, or you are running Windows XP,

32-bit Windows

then download the 32-bit version. What I have done is have you match the application’s bit to your OS bit. This is because the POV-Ray download contains both the 32- and 64-bit versions. If you are using 32-bit Windows, by default you will use the 32-bit version of POV-Ray, thus you will use the 32-bit version of LDD to POV-Ray Converter. The same applies for 64-bit Windows. 😉

Installation

Ensure LEGO Digital Designer and POV-Ray are already installed before you move on. I will not detail the installations for those programs (this is the The Beginner’s Guide to LDD to POV-Ray Converter after all), but I will say you can safely install them using their default settings.

All set? Good, let’s get started!

License and registration, please

The license agreement. We will obviously need to accept this to continue with the installation. If not, then why did I write this tutorial? 😛

Installation path

Showing off the default installation path, which will be the same regardless of 32- or 64-bit version. Unless you have a specific reason for restricting use to only one user account (which will change the installation path to %AppData%), change the radio button to the Everyone setting. The rest of the tutorial assumes it was installed for all users using the default installation path.

Installation progress

Installation progress. Not too much to see here.

Click Yes!

Alright, this is an important step here. This dialog asks you if you want to install EldoS Corporation StorLib devices by the EldoS Corporation. This software must be installed for LDD to POV-Ray Converter to work. It allows the program to read the db.lif archive located in %AppData%. While you do not have to check the box (I did not), be sure to click the Install button!

Installation complete

It’s installed! It’s installed! IT’S INSTALLED!!!!

A restart is required

This dialog box says you need to restart your computer for everything to work. Most of the time, this is simply to ensure everything will run properly and is not required. In this case, however, if you fail to restart before restarting, your renders will fail with various errors, creating frustration. Unless you have other programs/process/important matters going on, go ahead and click Yes to restart now. Just remember that LDD to POV-Ray Converter will not work until you do.

Setting It Up

We now move onto the trickiest part of the tutorial, setting up LDD to POV-Ray Converter for rendering. It does take not much to set up, but if something goes wrong here, you will have render failures, a hard time attempting to fix the failures, and a good chance of stepping on some LEGO bricks in pure frustration. 😛 That last part is not true (or is it???), but this is where the most can go wrong. Be sure to pay extra attention here. 😉

We need to set up the folder paths where LDD to POV-Ray Converter will find the LDD’s bricks and where it will store its own includes bricks (they are higher quality brick models that replace the LDD bricks so the renders look nicer). Do that by opening LDD to POV-Ray Converter, clicking the Settings button then the Setup paths… option. Now, either look at this animated gif displaying the folder paths or copy-paste the paths from the following code boxes. Either one (both) will do. If you do not use the %AppData% environment variable, be sure to replace C:\Users\le717 with your user name!

Animated gif of `db.lif` and `LDDIncludes` folder paths

  • db.lif is located at
    %AppData%\LEGO Company\LEGO Digital Designer
  • The LDDIncludes output folder is located at
    %ProgramFiles%\LDD Tools\LDD To POV-Ray Converter\LDDIncludes

Next, we need to configure POV-Ray to support LDD to POV-Ray Converter. It does not work “out of the box” like you might thing. LDD to POV-Ray Converter works in a special way, so we have to tell POV-Ray to recognize the specialness.

POV-Ray Main Screen

Start by opening POV-Ray and click on Tools>Edit master POVRAY.INI.

POV-Ray POVRAY.INI file

This is the master POV-Ray configuration file, povray.ini, opened in POV-Ray’s built-in text editor.

POV-Ray povray.ini file

Scroll all the way to the bottom of the file and add the following line of code:

Library_Path="\\.\LDDIncludes"

Notice this is the same as the POV-Ray include path: field shown in the animated gif above. Also notice the periods and backslashes in the path. You cannot add a direct path to the LDDIncludes folder, you must use these abstract paths. This is again due to LDD to POV-Ray Converter’s specialness. Skip this part, and nothing will work, period. Once you add the code, save povray.ini and close the tab.

Now, did that kill you? Certainly not! Next, we move on to the fun part of this tutorial, rendering! 😀

Rendering An Image

We start by opening the model we downloaded at the beginning of this tutorial. We need to make sure LEGO Digital Designer’s viewpoint is displaying the model in a suitable manner for rendering. We we finally start rendering, the image will be shown from the same angle as we see it in LDD. As can be seen from this image, I did not save the camera in a good location. We will need to fix that.

Close the toolbar and reposition the camera

First, we will close the sidebar. I really do not know if this effects the render or not, but better safe than sorry. 😉 Then, we will move the camera to a better location. Do not worry if it does not look the same as mine does, just get it to roughly the same location.

Change the brick position, and save

In order to save the updated camera position, we will need to move a brick to a different location. Let’s move the piece closest to us (the black 2×4 flat tile) over to the right, then save the model.

Save the model and close

Restore the brick to its proper location (this render of a flat screen TV would look really weird if that part of the panel was unattached during the big event :P), click save again, and close LDD. The LDD to POV-Ray Converter developer recommends saving the LXF model often when preparing a model for rendering in case something goes awry or changes need to be made, which may require the model to be converted again. Go ahead and open LDD to POV-Ray Converter now (if you have not already).

LDD to POV-Ray Converter main screen

This is the LDD to POV-Ray Converter main screen. As you can see, here a lot of tabs filled with loads of options! However, since this is The Beginner’s Guide to LDD to POV-Ray Converter, we will leave most settings at their defaults.

Click the Browse button in the “Input file” section and browse for tv.lxf, and change the Output path if you wish (by default, it is saved in the same location as the model). As you can see, I have it on my Desktop for quick access. Switch over to the “Rendering” tab. LDD to POV-Ray Converter defaults to your computer’s screen resolution (for some odd-ish reason). Ideally, you would change it to a more standard resolution (720p, 1080p, 4K, etc.), which is exactly what we are doing here. Change the output values to Width: 1280 and Height: 720. Leave the rest of the menus and sliders be (yes. you must resist the urge to slide them up and down, no matter how fun that may be). When that is done, click the Convert button.

Model Converted!

Hooray! Our model is successfully converted! 😀 For more details on what this word “Convert” means in this context, read the Convert the Model? section in the F.A.Q. 😉

Render now or later prompt

This dialog provides a bit of information and guidance about using the .ini file it generated for rendering, and asks if rendering should begin immediately? While your first reaction would be to click “Yes”, we are going to click “No”. Why are we starting the render right off, you ask? I have a trick up my sleeve that will save you rendering time later on, should you need it, and this means rendering has to be held off for just a few more minutes. 😉

Open tv.ini in POV-Ray (it will be loaded in that built-in text editor we used earlier).

http://news.povray.org/povray.windows/message/%3C3743AC23.C596D1D3%40aol.com%3E/#%3C3743AC23.C596D1D3%40aol.com%3E

It Renders!

Now you press the “Run” button at the top of the program (or press Alt and G at the same time) to start your render. If you see yellow text like this, then you know it will render. If you get an error message, make sure you have your settings correct.

At this point, go get a book to read or do something. POV-Ray is very, very CPU intensive, and you won’t be able to use your computer until it is done. Also, as much as you would like to see the image as it renders, go ahead and close the render windows when it comes up. It makes the render take a lot longer than it needs to. 😉

It's Done!

At long last! Your render is done! POV-Ray will play a little sound, and you can open the folder to which you rendered to see your picture. If you use my model for this tutorial, you’re render will look something like…

Final Render

Would you say our render came out beautiful? Actually, I doubt this image is the very definition of beauty (in fact, it is probably the furthest from that definition), but we will stick with that for now. 😛

Now let’s get back to that truck the top!

F.A.Q

Convert The Model?

The error: I use the word “convert” only for lack of a better word. A .pov file is not a 3D model but more like a script; it contains code that defines camera and lighting location(s), environment settings, and anything else POV-Ray requires to render It does not contain any 3D mesh, rather, it refers back to your original 3D model to render the image. If you are confused, let me explain it like this using a common scenario.

Suppose you built something in LDD. You want to take your creation and convert into a 3D format for use in a 3D animation or render. LDD to POV-Ray Converter says it converts .lxf models, plus it has “Converter” in the name, so technically it can be used to import your model into a 3D animation project, like Blender, right?

“I’m sorry, Dave. I’m afraid I can’t do that.” – HAL 9000

The fix: LDD to POV-Ray Converter is not a way to convert your .lxf model into a 3D model. It only lets you render an image of your model. It performs absolutely no conversion whatsoever.

While the word “Converter” in the name is somewhat a misnomer, you have to understand the context in which it is being used. Therefore, anytime the word “convert” and it’s variations is used, I am really saying to create the .pov file which contains the camera, lighting, environment and other settings used to render the image.

Help! I am getting an “Parse Error” message!

If you are receiving the following error message:

Parse Error: cannot open include file ldd_default_colors.inc.

there are possibly two different reasons this error could occur.

  1. The error: LDD to POV-Ray Converter was closed. The way LDD to POV-Ray Converter works is by creating a virtual path POV-Ray uses to perform the render. It exists only while LDD to POV-Ray Converter is running, thus closing the program severs the cord, so to speak. This is the most common issue behind the error message.The fix: It means LDD to POV-Ray Converter must be left open and running while POV-Ray is rendering.

  2. The error: Your computer was not restarted after the installation completed. Unlike the majority of programs, LDD to POV-Ray Converter requires the computer to be restarted before rendering can begin.The fix: Restart your computer, then try rendering again.

Help! I am getting an “Access is denied” error message!

The error: This means either LDD to POV-Ray Converter or POV-Ray does not have the required permissions to access LEGO Digital Designer‘s brick library. Usually such an error occurs only on Windows Vista and higher.

Uh-Oh!

  1. The fix: right click on both the LDD to POV-Ray Converter and POV-Ray shortcuts and click “Run As Administrator”.
  2. The fix: Close LDD, then rerun the conversion. If you have closed LDD already, restart LDD to POV-Ray Converter.
  3. The fix: This error message can also be caused by nt having the Library Path set correctly. Read the “Help! I am getting an “Parse Error” message!” question for more details on that.

The End!

47 thoughts on “The Beginner’s Guide to LDD to POV-Ray™ Converter

  1. Thanks for the tutorial, you’ve obviously put a lot of work into it.

    I get a strange error. I’ve downloaded the software and converted an lxf file. But when, at the end of the process, I’m prompted to open it, all I get is “POV-Ray 3.7 not found”. I’ve run everything as an Administrator.

    Any ideas? Thanks.

    1. D’oh! Ignore me, I didn’t realise I not only have to download the convertor, but also the software with which to view the new file….

  2. I can’t seems this to work.

    I get this error messages when I try open it:

    Access to the path %ProgramFiles%\LDD Tools\Ldd to POV-Ray Converter\LDDincludes is denied.

    I know the answer is probably up there somewhere, but, I’m not very computer literate?! And while I did try reading through it, some of it was beyond me. Sorry!!

    Thanks!!

  3. Hi: thank you very much, your guide is very clear and I could install the program and use it to render my projects with awesome results. Thanks again! Best regards

  4. Hi another time!

    Does someone know, how to transform Pov-Ray file to actual set. I mean a set, which you can rotate, maybe, 360 degrees.
    Thanks for help!

  5. Hi!
    I have a trouble: rendering program is rendering very long time. I don’t know why, but it took about a half of day! And the progress is now 56%!
    How I can speed up this program?

    Thanks.

    1. Hey!
      Very, very sorry for taking so long to respond. Lately it seems there have not enough hours in a day!
      POV-Ray is a very CPU-intensive renderer. It is used in PC stress-test benchmarks it can be so brutal. Because the way it renders only on a CPU and not a GPU, the only hardware way to speed it up is to get a faster CPU, which can cost a pretty penny. On the software side, I’ve found disconnecting my laptop from the web, closing unneeded processes and services, setting my power plan to high performance, and closing the render preview (and subsequently leaving it alone until it is done) helps speed up renders. You can also try rendering in a very large resolution with AA disabled (AA makes renders take longer), then using Photoshop and a certain scaling algorithm to shrink it to the desired final size can speed them up. You can find more details on that method in the LDD to POV-Ray Converter topic on Eurobricks. 😉

      Sorry I could not help you any more! 😦

      1. A huge way to speed something up on Windows, depending on how many processors you have, is to set the priority to High and set other intensive programs to low or below normal.
        In addition to priority, set your AFFINITY of other programs and if you have enough processors, you can dedicate certain processors to work solely on your render.

        It really does make a huge performance improvement, but it slows everything else down so make sure you won’t need your computer till it’s done 🙂

        -The [Guy]

  6. Hey! Thanks for the tutorial! I Have tried everything but I cant get this to work. First, i cant convert the file no matter what unless the “Don’t generate includes” box is checked. I created the LDDIncludes file, and edited the settings accordingly. That could be the source of the problem, but i’m not sure. Secondly, no matter what i try, whenever I hit run, I get the “parse” error message. I have restarted at least 3 times, so I don’t think that is the problem. Any help?

    1. Well, nevermind! I got this working somehow by messing around with security! Your tutorial was a life saver!!!! Thanks again!

  7. Heyo, first off… you are awesome!! Holy crap this saved me a lot of time tinkering around trying to figure out which of the million settings to tweak to make things work.
    Very well written and annotated with images for people new to the programs. I just sailed through the process and got to enjoy the fruits of my lego building labor in detailed realistic splendor 🙂
    5 hrs of rendering later of course haha.
    Two quick adds for what I did to make it work for me on windows 7 64 bit, with the newest available versions of all of the software (as of 5/21/2014):

    1. After installing both LDD to POV-Ray and POV-Ray I had to physically add the folder “LDDIncludes” to make the above output link go somewhere, it had not been created when I installed the programs. Easy schmeezy!
    2. Instead of running the programs as admin, I found another way to open up the permissions by right clicking on the LDDIncludes folder that I had created and clicking properties, then the security tab, then the edit button, and gave “users” (I think) the ability to write to this folder. After that, no error message! Anyway, just a different way to the same goal 🙂

    Thanks again for your tutorial!

    1. I’m a bit surprised people are able to follow this in the somewhat mess it is in (which I worked on after I received your comment), so thank you for commenting! I know I get readers on this tutorial nearly all the time, so it is always nice to hear from them! 😀 I enjoy annotated tutorials as well (for me, it makes it easier to follow since I can see what I need to do), so I guess that is why I follow that style.

      I’m glad you were able to enjoy your render, even if it was five hours later. 🙂

      As for the points, I’ll sew about adding a note about possibly having to manually create the folder. Yes, that is just an another method to the same thing. Running as admin, however, is a bit easier and doesn’t have the possibility to break stuff like editing permissions does. 😉

      You’re welcome. Glad to be of assistance. I write to help others, and it seems people are benefiting. 🙂

      Quick question, if you do not mind: how did you come across this tutorial? Friend, forum, social media, search engine, etc.? I have no clue where all this traffic is coming from, to be honest. 😛

  8. Thanks a lot for this tutorial. I have a problem though, when I click run in povray, it opens a new tab “ldd_default_colors.inc”. In that tab is a line that is highlighted in yellow and says: #include “ldd_colors_declarations.bin”. Please help me fix this?

  9. Hi there,
    When trying to convert my model using the converter, I get a message saying “Access to the path ‘C:\Program Files\POV-Ray\ldd_3001.bin’ is denied.
    I’ve tried searching for the bin in question but I can’t find it anywhere. There are other numbered bins but not 3001. I have uninstalled it and re-installed all of the software several times yet, still I get this. Any ideas?

    1. Hey there!
      I am really, really sorry for not replying sooner. Usually I reply on the same day or within the next two days after someone comments, but your comment slipped past me somehow. Really sorry about that. :\ 😦

      Usually such an error message means you do not have the required privileges to run the software, and occurs on Windows Vista and higher. Try this: right click on both the Converter and POV-Ray shortcuts, and click “Run As Administrator”, then try converting. That should do the trick.

      Let me know if it works, and thanks for reading the tutorial! 😀

  10. I dont know what Im doing wrong, but Ive tried all sorts of combinations for these paths. I feel like something was written incorrectly in the tutorial about the line of code for the Library Path. If you were to type or copy that line of code, half the line is commented out, so I tried whats in the photo and thats still wrong. I keep getting access denied of the ldd_main.bin file in the Includes folder. Ive tried administrator privelages, different bit versions, and still nothing. This is absolutely frustrating me and no one apparently has the same issue as me, to find on any forum.

    1. Hello!

      Although my message at the top states my tutorial is out of date, I am slowly updating it for the newest version of the Converter and making some improvements along the way (as you may be able to tell judging by the inconsistent images, formatting, and wording). 😉

      As for the wrong library path error, I do a lot of editing using the Android WordPress app, and it apparently likes to break sourcecode boxes. I have fixed it now, but I’ll paste it here.

      Library_Path="\\.\LDDIncludes"

      It has been a while since I have rendered anything myself, but I do not recall hearing about that error either. JSYK, I’ll be adding a new section about common errors and their fixes. From reading the FAQ page on the tool’s website, it would appear that error is caused by an improper library path, that line you rightly reported as broken. Now that you have the fixed version, see if it solves your error. If not, let me know and I’ll try to help you further (actually, let me know even if it does work!).

      Take care!

  11. I was wondering if anyone has thoughts about how to convert a .jpg into lego digital designer. I have not been successful in finding a tool or application.

  12. Thanks a lot for your help, there’s just one problem: when I click Render, it says ‘Parse Error: cannot open include file ldd_default_colors.inc.’ Please help…

    1. Couple of things:
      1. Did you restart your computer after you installed the Converter and POV-Ray and before you tried to render? You’ll get that error until you restart (for once, that message in any installer saying you need to restart before changes can take affect is true). I’ve gotten that same error myself, and a restart was the fix.
      2. Is the Converter and POV-Ray running as Administrator? I recently reinstalled the tools on my laptop, and I had to run them as Administrator so the Includes could be created and it render properly.

      I’m pretty sure #1 is your best bet on this error, Otherwise, try number 2 (which only applies to Vista onward, BTW).

      1. I’m having the same problem, but I’ve tried both restarting and running as Admin and neither work. I still get the error “Cannot open include file ldd_colors_declarations.bin”. Help soon, as I’m trying to enter a building competition and cannot without rendering.

    2. Hey!
      Someone else just asked me this exact same question, and he found the answer.

      You have to leave the Converter open and running while you are rendering with POV-Ray. The converter creates a virtual path, existent only when it is running. If you close the converter, POV-Ray will be unable to find the files needed to render.

      So, to fix your error, open up the Converter, then POV-Ray. Open your INI file created by the Converter that contains the render settings, click Run, and prepare to wait while your LDD model is rendered with POV-Ray! 😀

      1. Yes, you do run the .INI. That is not documented in this tutorial because it covers an older version of the program (1.2), not the newest release. You can still render using the .POV, but the .INI is recommended. Hopefully I can get this tutorial updated for the newest version soon. 😉 Any questions about the methods in here, or are you all good?

      1. Nope. Sorry about that. I had no choice over what words were used in the creation of the program, so all I can do is tell what it really means. 😦 But you can make some really cool LDD renders! 😀 Check out my Flickr to see what I mean. 😉

Triangular Reactions

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s