{"id":452,"date":"2016-06-12T17:00:19","date_gmt":"2016-06-12T15:00:19","guid":{"rendered":"https:\/\/www.anginf.de\/?p=452"},"modified":"2016-08-31T10:28:39","modified_gmt":"2016-08-31T08:28:39","slug":"export-ev3-from-lego-digital-designer","status":"publish","type":"post","link":"https:\/\/www.anginf.de\/?p=452","title":{"rendered":"Export EV3 from Lego Digital Designer"},"content":{"rendered":"<p>Recently I created a complex LEGO model with <a href=\"http:\/\/ldd.lego.com\/\" target=\"_blank\">Lego Digital Designer<\/a> and wanted to import the resulting model into <a href=\"https:\/\/www.blender.org\/\">Blender<\/a>. My export files were missing the <a href=\"http:\/\/www.lego.com\/mindstorms\">LEGO Mindstorms EV3-components<\/a> that I had added.<\/p>\n<p>The reason for this behaviour are the missing parts in the ldraw.xml-File, which is in the same directory as the ldd.exe, the directory <code>C:\\Program Files (x86)\\LEGO Company\\LEGO Digital Designer<\/code> held this file for me.<\/p>\n<p>The ldraw.xml is essentially a mapping file, which maps all the LEGO-internal structures to the more open &#8222;LDRAW&#8220;-File format. The EV3-parts weren&#8217;t listed and even in updated ldraw.xml-Files, which I could find on the web, these were never added.<\/p>\n<p>So I created the missing mappings on my own and the result works pretty good. Not all the colours are correct, but I couldn&#8217;t find an easy way to correct these.<\/p>\n<p>Here are the necessary steps to successfully export LEGO EV3-parts from Lego Digital Designer and import these with correct colours e.g. into Blender:<\/p>\n<ol>\n<li>Copy <a href=\"https:\/\/www.anginf.de\/wp-content\/uploads\/ldraw.zip\">ldraw.xml<\/a> file to your location of ldd.exe, overwrite the old ldraw.xml. (Unzip the ldraw.zip to ldraw.xml first)<\/li>\n<li>Export your model from Lego Digital Designer to &#8222;LDraw-Files (*.ldr)&#8220;-format.<\/li>\n<li>Open the file in notepad++, search for the following part numbers (they are located at the end of the line) and change the BEGINNING of the line from &#8222;1 71&#8220; to &#8222;1 15&#8220;.\n<ul>\n<li>Example:\n<ul>\n<li><code>1 <span style=\"color: #ff0000;\"><strong>71<\/strong><\/span> -90.175277709960937 -176.40634155273437 -275.99981689453125 0 1.0000001192092896 0 0 0 1.0000001192092896 1.0000001192092896 0 0 95658.dat<\/code><\/li>\n<li><code>1 <span style=\"color: #ff0000;\"><strong>15<\/strong><\/span> -90.175277709960937 -176.40634155273437 -275.99981689453125 0 1.0000001192092896 0 0 0 1.0000001192092896 1.0000001192092896 0 0 95658.dat<\/code><\/li>\n<\/ul>\n<\/li>\n<li>Do this for all lines with these part numbers (not all might be in your file, only if you have added the corresponding EV3-bricks):\n<ul>\n<li>95650.DAT<\/li>\n<li>95658.DAT<\/li>\n<li>95648.DAT<\/li>\n<li>99455.DAT<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Import the corrected file in <a href=\"http:\/\/www.leocad.org\/\">LeoCAD <\/a>and export into &#8222;Wavefront (.obj)&#8220;<\/li>\n<li>Open Blender and follow these instructions to get a first decent result:\n<ol>\n<li>File -&gt; Import -&gt; Wavefront (.obj)<\/li>\n<li>Select -&gt; Select all by Type -&gt; Mesh<\/li>\n<li>Press &#8222;s&#8220; (SCALE) and enter a value (blind, there is no dialog box), e.g. &#8222;0.1&#8220; and hit return. Or you resize with your mouse after pressing &#8222;s&#8220;.<\/li>\n<li>Right-click and hold on the camera in blender, and move it around to where you want it to be.<\/li>\n<li>Check your current view by hitting the &#8222;0&#8220; on your numpad. (This will change to the camera view)<\/li>\n<li>Right-Click during camera view on the border of the camera (it will turn orange), and then right-click and hold outside the camera view to tilt for your needs.<\/li>\n<li>Add some lights via Add -&gt; Lamp -&gt; Area\u00a0 (or Sun) and position them.<\/li>\n<li>Render by pressing F12<\/li>\n<li>In the render-menu on the right hand side you can change the size of the resulting image, e.g. &#8222;Preset: HDTV 1080p&#8220;.<\/li>\n<li>By pressing F3 the rendered image is stored to your disc. (Current used path is at the bottom of the render-menu, defaults to \/tmp.)<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Recently I created a complex LEGO model with Lego Digital Designer and wanted to import the resulting model into Blender. My export files were missing the LEGO Mindstorms EV3-components that I had added. The reason for this behaviour are the missing parts in the ldraw.xml-File, which is in the same directory as the ldd.exe, the &hellip; <a href=\"https:\/\/www.anginf.de\/?p=452\" class=\"more-link\"><span class=\"screen-reader-text\">Export EV3 from Lego Digital Designer<\/span> weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-452","post","type-post","status-publish","format-standard","hentry","category-allgemein"],"_links":{"self":[{"href":"https:\/\/www.anginf.de\/index.php?rest_route=\/wp\/v2\/posts\/452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.anginf.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.anginf.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.anginf.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.anginf.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=452"}],"version-history":[{"count":3,"href":"https:\/\/www.anginf.de\/index.php?rest_route=\/wp\/v2\/posts\/452\/revisions"}],"predecessor-version":[{"id":458,"href":"https:\/\/www.anginf.de\/index.php?rest_route=\/wp\/v2\/posts\/452\/revisions\/458"}],"wp:attachment":[{"href":"https:\/\/www.anginf.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.anginf.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.anginf.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}