Jump to content

Photo

How To Get An Ldd Piece Or Model To Ldraw


  • Please log in to reply
7 replies to this topic

#1
PWNZOR

Thanks to the

Please Login or Register to see this Hidden Content

, and to

Please Login or Register to see this Hidden Content

, I was able to finally begin modeling Jet's helmet, via importing the LDD piece into LDraw.

What you'll need:
  • LEGO Digital Designer, preferably with the LDD Extended mode
  • Both of the software from

    Please Login or Register to see this Hidden Content

    , but not yet installed.
  • My

    Please Login or Register to see this Hidden Content

  • LDraw + MLCAD installed
  • Please Login or Register to see this Hidden Content


Step One:
  • Install the 3DXML view, then the Screenprint, in that order!
  • Run the Screenprint program
  • Run LEGO Digital Designer, the brick(s) you want to convert, and save the LDD file (in case you have to restart).
  • Press F10, or whatever you set the hotkey to for the Screenprint program, to generate the 3DXML file.
    • If this doesn't work, see the notes below.
  • Change the extension on the 3DXML file you created (right-click the task icon on the bottom right of the screen, and press 'Explore Results' to get to the file) to a .zip, and extract it
  • Open up the extracted file in your text edit program (Notepad++, anyone?), and copy all the numbers between the <positions></positions>tags, and paste in a clean separate text document, but don't include the <positions></positions>tags themselves. Save it to any extension, or no extension at all.
Step Two:
  • Run my 3DXML to LDraw converter. For some reason, you have to run it via command line.
    java -jar "C:\[Location of .jar file]\3DXML_To_LDraw.jar
    I found out it was my computer's problem; you should be able to double-click the .jar just fine
  • Take this file, and put in the parts folder in your LDraw directory. Open up MLCAD, open this new part, and save the .ldr file.
  • Run the LrdDat2Obj program.
  • You now have your .obj file! You should be able to try for other converters, but I use this particular one because Lightwave reads .obj files.
Notes:
  • You may have to try running the Screenprint program a few times, but always run it before LDD.
  • I ended up uninstalling it and reinstalling it; try that if nothing else works.


#2
Le Vee

Cyrem said the LdrDatObj link was dead, so here is a new one.

Please Login or Register to see this Hidden Content



#3
PWNZOR

Cyrem said the LdrDatObj link was dead, so here is a new one.

Please Login or Register to see this Hidden Content



Fixed, thanks. LDraw updated their site, which is nice, and it doesn't take 2 minutes to load a webpage, but they removed all of the extra tools. :'(

#4
Le Vee

Fixed, thanks. LDraw updated their site, which is nice, and it doesn't take 2 minutes to load a webpage, but they removed all of the extra tools. :'(


Yea, I know. It's a shame.

Anyway, I was going to ask you this, but a crazy touchpad destroyed my text. Do you still have the 3DXML docs? A while back, I found an Blender 3DXML import script, but it relied on a website to import the mesh data (a poor and sloppy way to do it). However, those links have been pulled, and the script cannot function. If you still had the docs, the script could be fixed to import 3DXML (but it's an big could. Legal junk and all that).

#5
PWNZOR

Fixed, thanks. LDraw updated their site, which is nice, and it doesn't take 2 minutes to load a webpage, but they removed all of the extra tools. :'(


Yea, I know. It's a shame.

Anyway, I was going to ask you this, but a crazy touchpad destroyed my text. Do you still have the 3DXML docs? A while back, I found an Blender 3DXML import script, but it relied on a website to import the mesh data (a poor and sloppy way to do it). However, those links have been pulled, and the script cannot function. If you still had the docs, the script could be fixed to import 3DXML (but it's an big could. Legal junk and all that).


I'm not sure what you mean by 3DXML docs. If you mean the file format, I know the generated 3DXML file is a zipped file of a long list, with each line under <position> having the coordinates of triangle vertices (x1 y1 z1 x2 y2 z2 x3 y3 z3). Raw LDraw parts just need those same coordinates with a "3 16 " in front of it. (see Philo's link above). My little java file does this automatically if you supply the numbers between the <position> </position> tags. I can give you my code if you want; it's nothing special. I probably should make it run based off the 3DXML file itself, but I'm too lazy :P. Maybe later.

#6
JimbobJeffers

Thanks for the tutorial! Hopefully I can get some Lego objects from LDD to Unity.

Is it possible to separate the limbs from the minifigure body/legs in LDD? That way it would be easier to animate, I would rather not have to do this for every position in an animation cycle...

#7
PWNZOR

Inside of LDD? It's not likely; however you should be able to do this inside of your modeling program.

In Lightwave Modeler, I'd merge all intersecting points and then press ] to select all contiguous polygons and group them. You can then split that to another file, having the shoulder of the arm be at the origin.
In Layout, I'd then position that arm to its position.

You might be able to just use it as is and use Bones to play with it, but I've not much animation experience (never had an incentive to learn - LW9+ doesn't have the correct LW5.x animation export plugin or something).

If you're animating for some other purpose (not LRR) then you can do whatever, though my suggestion for splitting the model apart will still apply.

#8
JimbobJeffers

Thanks for the descriptive help! I'll have a play around when I next get the chance, if I achieve anything extra-special I'll post it on this forum.