To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 17697
Subject: 
Converting LDD parts to LDraw
Newsgroups: 
lugnet.cad
Date: 
Thu, 5 May 2011 19:14:47 GMT
Viewed: 
22777 times
  
This method derives from this Superkalle post on Eurobricks. Many thanks to him!

  • Download and install Dassault Systems 3DVIA Screenprint. In order to control your screen captures in native 3D XML file format, it helps to install also the 3D XML player. Both of them are freeware.
  • Launch 3DVIA Screenprint. An icon will appear in your Windows tray.
  • Launch LDD (preferably in extended mode to get all parts)
  • Make sure that “Outline on bricks” is NOT enabled, or the 3D capture woudn’t work properly. If necessary uncheck this option and restart LDD.
  • Add the part you want to convert.
  • Press F10 key, the hotkey of 3DVIA Screenprint. The file is captured and displayed by the viewer
  • Get the file (right-click on 3DVIA icon and choose “Explore results”), rename it from .3dxml to .zip and unzip it. Inside is a text only 3dxml file, open it with a text editor.
  • Scroll down to the VertexBuffer section, that contains a long string of numbers behind Positions. Each group of 9 represent the 3 coordinates of the three vertices of mesh triangles.
  • Now you only have to separate these groups, add 3 16 in front, and save the file as .dat. I simply used a scriptable text editor to do that automatically. Now you have the raw LDraw file!
Of course that’s only the beginning, you’ll have to open it in MLCad, give it proper orientation, scale (x25) and origin, then add edge lines/condlines with Edger2, do primitive substitutions, etc...

See the result here...


Philo


Subject: 
Re: Converting LDD parts to LDraw
Newsgroups: 
lugnet.cad
Date: 
Fri, 6 May 2011 06:06:42 GMT
Viewed: 
19104 times
  
Thanks for posting this! I might give this a try at some point so we can finally have the farmer/blacksmith cowl and the cow in Ldraw. They probably also have an improved version of my first part, 6251.dat.


Subject: 
Re: Converting LDD parts to LDraw
Newsgroups: 
lugnet.cad
Date: 
Fri, 6 May 2011 08:21:16 GMT
Viewed: 
19325 times
  
They probably
also have an improved version of my first part, 6251.dat.

No need to do the conversion for this one, it was already done in LUT program
http://www.ldraw.org/wiki/index.php/L(EGO)Draw_Parts_Page_27 (file at
http://www.holly-wood.it/tmp/LEGODraw/m6251.dat)

BTW your cat, albeit a bit sketchy, was outstanding for a hand made job!

Philo


Subject: 
Re: Converting LDD parts to LDraw
Newsgroups: 
lugnet.cad
Date: 
Mon, 9 May 2011 06:51:02 GMT
Viewed: 
20155 times
  
In lugnet.cad, Philippe Hurbain wrote:
No need to do the conversion for this one, it was already done in LUT program
http://www.ldraw.org/wiki/index.php/L(EGO)Draw_Parts_Page_27 (file at
http://www.holly-wood.it/tmp/LEGODraw/m6251.dat)

BTW your cat, albeit a bit sketchy, was outstanding for a hand made job!

Thanks. I had forgotten about the LUT version of that part.

With your instructions I've started on part 4505. I got the number from another
post of yours, though everyone else seems to only know it as x79. I found that
with your technique I had a problem reorienting the part (it was at a strange
angle) and repositioning it until I hit on a good idea:

1) Add a 1x1 brick to the field before adding the part. I also added a 1x1 round
brick on top of that to serve as a stand-in for a head. Make these temporary
bricks a different color.
2) After converting, load in MLCad and set the rotation center to 0,0,0. Select everything and scale up 25x with the matrix 25 0 0 0 25 0 0 0 25.
3) Select one of the large triangles on the side of the 1x1 brick, front view,
and recolor it so it stands out.
4) Find two points on the triangle that have the biggest X difference. Measure
delta x (dx) and delta z (dz), i.e. dx=x2-x1, dz=z2-z1. Calculate
A=arctan(dz/dx). Select everything and rotate by angle A around direction 0,1,0.
5) Using the same two points, repeat this procedure for dx and dy. Calculate
A=arctan(dy/dx), and rotate by angle A around direction 0,0,-1.
6) Using the two points with the largest Y difference, measure dy and dz.
Calculate A=arctan(dz/dy). Rotate by A around -1,0,0.
7) Perform any remaining rotations in whole 90 degree steps.
8) Use the same triangle, and one on another side of the 1x1 brick, to find the
average X, Y, and Z positions for the corners of the brick. Adjust the position
by the negative of the average to move the brick to 0,0,0, and then move the
brick down as needed to position the main part where you want it.
9) Delete the temporary parts, leaving only the main part.

As with any released LUT pieces this one requires a lot of cleanup work, which
I've started on. It has no edges at all, and of course needs changes to the
interior (notably an inverted stud, and some expansion to deal with the fact
that the head is 26 LDU wide, not 25), but probably the worst thing I found is
that the wrinkles on the sides of the cowl are not represented in the part
as-is, so I'll have to add some guesswork edges and triangles for detail. Funny
how you can never fully get away from hand-made.

I'm not sure what to put in the history header, since this isn't from an
official LUT part release but the original data basically comes raw from LDD. Is
"Converted from LDD" good enough?


Subject: 
Re: Converting LDD parts to LDraw
Newsgroups: 
lugnet.cad
Date: 
Mon, 9 May 2011 07:59:32 GMT
Viewed: 
19957 times
  
With your instructions I've started on part 4505. I got the number from another
post of yours, though everyone else seems to only know it as x79. I found that
with your technique I had a problem reorienting the part (it was at a strange
angle) and repositioning it until I hit on a good idea:
(snip)
Ah - yes, thanks for posting this. Indeed getting the right orientation is a bit
tricky the first time. You can also get the orientation another way: a litle
later in the 3dxml file you have several lines beginning with "Polyline
vertices": these are the lines forming the base grid of LDD. You may also use
that to derive correct orientation.

And in fact, if you don't rotate LDD view after startup, this orientation is
always the same, and you can follow this procedure:
- select everything
- translate by Z=+11
- Rotate around X-axis by an angle of 35.264° = atan(sqrt(1/2))
- Rotate 45° around Y axis
- scale by 25.

As with any released LUT pieces this one requires a lot of cleanup work, which
I've started on.
Yeah, getting the shape is only the tip of the iceberg!

It has no edges at all, and of course needs changes to the
interior (notably an inverted stud, and some expansion to deal with the fact
that the head is 26 LDU wide, not 25),
Add to that the cylindrical part not built with the right number of facets
(16)...

but probably the worst thing I found is
that the wrinkles on the sides of the cowl are not represented in the part
as-is, so I'll have to add some guesswork edges and triangles for detail. Funny
how you can never fully get away from hand-made.
...especially when the meshes you start with are not exact. A guy attracted my
attention on the ghost shroud (http://www.holly-wood.it/tmp/LEGODraw/m2588.dat)
that don't even has the right number of folds...

I'm not sure what to put in the history header, since this isn't from an
official LUT part release but the original data basically comes raw from LDD. Is
"Converted from LDD" good enough?
I guess that...

Philo


Subject: 
Re: Converting LDD parts to LDraw
Newsgroups: 
lugnet.cad
Date: 
Wed, 11 May 2011 04:45:44 GMT
Viewed: 
20376 times
  
In lugnet.cad, Lee Gaiteri wrote:
In lugnet.cad, Philippe Hurbain wrote:
No need to do the conversion for this one, it was already done in LUT program
http://www.ldraw.org/wiki/index.php/L(EGO)Draw_Parts_Page_27 (file at
http://www.holly-wood.it/tmp/LEGODraw/m6251.dat)

BTW your cat, albeit a bit sketchy, was outstanding for a hand made job!

Thanks. I had forgotten about the LUT version of that part.

With your instructions I've started on part 4505. I got the number from another
post of yours, though everyone else seems to only know it as x79. I found that
with your technique I had a problem reorienting the part (it was at a strange
angle) and repositioning it until I hit on a good idea:

<snip>

I'm not sure what to put in the history header, since this isn't from an
official LUT part release but the original data basically comes raw from LDD. Is
"Converted from LDD" good enough?


I guess it's not clear that the LUT parts *are* LDD meshes already?

An official LUT part release is also data from LDD.

     -- joshua


Subject: 
Re: Converting LDD parts to LDraw
Newsgroups: 
lugnet.cad
Date: 
Wed, 11 May 2011 20:27:46 GMT
Viewed: 
20383 times
  
In lugnet.cad, Joshua Delahunty wrote:
In lugnet.cad, Lee Gaiteri wrote:
I'm not sure what to put in the history header, since this isn't from an
official LUT part release but the original data basically comes raw from LDD. Is
"Converted from LDD" good enough?

I guess it's not clear that the LUT parts *are* LDD meshes already?

An official LUT part release is also data from LDD.

I figured that, but since these aren't part of one of the official releases as
such, I wasn't sure if it would be appropriate to tag them the same way. For
batch releases, it's customary to give them the date of the release. This is
sort of new territory.


©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR