Minifigs Patterns


Minifigs Patterns
#1
Hello. I'm trying to create minifig patterns. I can draw them in Adobe Illustrator. And have some questions.
1) Where I can get proportions of the minifig body?(I pick them from picture in hollywood tutorial, but not very exactly)
2) Is here people, who interested in it?
I don't have enough time to clean them to Ldraw library standarts, but as pattern for later work can. Thank.
Reply
Re: Minifigs Patterns
#2
http://www.flickr.com/photos/jasbrick/5342583416/

That link has a minifig with all measurements in place. However, there are actually two sets of measurements floating around for minifigs which differ slightly. At the LDraw level of accuracy they are probably the same.

Tim
Reply
Re: Minifigs Patterns
#3
Sorry to be a bit out of the subject, but I'm also working with Illustrator to pattern parts (at least one: 2552).

I wasn't able to find an efficient way to export it to a Ldraw file while keeping the colors. Do you have any idea on how to do this, this would save so much time for huge patterns?

What I'm doing is quite complicated:
- Save a DXF with Illustrator
- Import it as a sketch in Catia V5
- Mesh it manually
- Divide the mesh to get one mesh by color (this is the longest part of the process: to do this manually, but this is the only way I found to seperate the meshes and to keep the vertex on the right position, so that if I reassemble the meshes again, the vertex match).
- Export each mesh as a STL
- Convert to Ldraw with STL2DAT
- Put each DAT file in a big one, so that I have all colors in the same part, with all triangles that are matching, avoiding gaps.
- Project and slice using SlicerPro

If one of you has any idea to get faster from Illustrator to Ldraw, feel free to help, I will appreciate.


BTW, I'm alost done with the 2552 file (don't remember which particular pattern number), so I will post it soon on the tracker...
Reply
Re: Minifigs Patterns
#4
Send me an Illustrator file, along with SVG and PNG versions of the same file, and I'll see if I can come up with something. (The PNG will just be for reference, so that I know that what I output matches the input.) If I can make out the input data, writing a program to convert it an LDraw file should be fairly easy.

If you don't have my email address, send it to the LDView email address.
Reply
Re: Minifigs Patterns
#5
This is the area that needs to be filled to fit an LDraw Minifig Torso :

2 4 -12 0 -10 12 0 -10
2 4 12 0 -10 14.345 2 -10
2 4 14.345 2 -10 19 29 -10
2 4 19 29 -10 19 32 -10
2 4 -19 32 -10 19 32 -10
2 4 -12 0 -10 -14.345 2 -10
2 4 -14.345 2 -10 -19 29 -10
2 4 -19 29 -10 -19 32 -10
Chris (LDraw Parts Library Admin)
Reply
Re: Minifigs Patterns
#6
thank you. This information help me.
Reply
Re: Minifigs Patterns
#7
Today i create image of Darth Vader Death Star. If you want you can download Illustrator svg file(in archive) hope it will help somebody to create part.
[Image: a991f736.png]
Reply
Re: Minifigs Patterns
#8
[Image: 545f76e2.png]

Image of Royal Guard Torso. Illustartor file.
Reply
Re: Minifigs Patterns
#9
Thanks. I'm investigating now. Don't expect an immediate result, since parsing an SVG file isn't exactly easy. (Plus, the XML parser I'm using doesn't like one entry in the file, and I had to manually remove that. Hopefully the parser will get a fix for that, though.)
Reply
Re: Minifigs Patterns
#10
Ok. I'm understand that it's hard work. I made those image to improve my skills in Illustrator.(I begin to work with it only 2 weeks ago). So it helps me, but i want to make something useful. So I will post here my works)
Reply
Re: Minifigs Patterns
#11
[Image: ca06354e.png]
Princess Leia torso. And Illustrator file.
Reply
Re: Minifigs Patterns
#12
Hey Stan,

I'm glad to see SOMEBODY working on Star Wars minifig patterns, which are woefully behind patterns from other themes. I'd thought of doing some myself in the past, but had no idea how to get started. So far, all your patterns look really nice, and I hope that translates into some really nice LDRAW parts. Keep up the good work!
____________________________________________________________________________________________________
I'm theJude! So that's what you call me. You know, that or, uh, his Judeness, or uh, Juder, or el Juderino if you're not into the whole brevity thing.
Reply
Re: Minifigs Patterns
#13
Thank you. I hope official Ldraw forum(I wonder why it opened only now:S) helps to coordinate people who can make parts. I think here are a lot of, who wants to see in Ldraw library SW minifigs.
Reply
Re: Minifigs Patterns
#14
I'm really looking forward to an SVG->LDraw converter (whenever it appears, no rush). It'll make sticker generation so much easier.

Tim
Reply
Re: Minifigs Patterns
#15
I must say: me also !

Correct me if I wrong, but problem is that SVG is using complex curves, not only lines and vertexes. So maybe, a good idea would be to search for (or write) a kind of tesselation program, that can output a triangular colored mesh from a SVG or whatever vectorized picture format. Then, to convert this mesh to Ldraw should be quite easy.

I've did some investigations with no success, but I'm 100% sure this king of program should exist somewhere.
Reply
Re: Minifigs Patterns
#16
Parsing the SVG file to create a list of polygons is the only part I'm unsure of. I know how to do everything else. It looks like it should be marginally do-able in a reasonable time-frame based on the Illustrator-generated SVG files I've seen, which seem to use a subset of SVG. I'm still investigating right now, though (although my investigation is through writing code).
Reply
Re: Minifigs Patterns
#17
Gotcha. I thought about doing it myself a while back but learning how to do the meshing was beyond the time I could dedicate to it. You've obviously got all that working already.

Maybe look at Inkscape generated SVG files too. Since it's free and open source it'll be a good second test.

Tim
Reply
Re: Minifigs Patterns
#18
[Image: 08f4bd9e.png][Image: 0355c7ad.png]
Master Yoda has 2 images so SVG files of front and back .
Reply
Re: Minifigs Patterns
#19
Travis,

I've found that it is possible within Illustrator to approximate those smooth curves with edges. Sounds perfectly like what Ldraw needs. I will give a try on one of those SW torso, and post the result here. With some luck, there might be only triangles into the SVG file... It should make things much more easier.

What do you think?
Reply
Re: Minifigs Patterns
#20
That could be a great help. I highly doubt the resulting file will be all triangles, but getting rid of the Bézier curves would certainly help. And if it switches the files from "paths" to polygons, it would help a huge amount, since parsing the paths is a royal pain. (Paths are an arbitrarily long list of commands, such as "moveto", "lineto", "bezier curve to", "close path", etc. all joined together.) Closed paths make filled shapes. Unclosed paths can make edges. They seem to be the hardest thing to handle in the SVG file, but in the Darth Vader torso file, they make up most of the geometry (certainly over half). And they have truly evil formatting. For example, all of the following are ways to represent a single 2D coordinate at (10, -10):

10,-10
10-10
10 -10

(That's right, a negative number doesn't require any separator from the previous number other than the minus sign. Is that evil, or what?)
Reply
Re: Minifigs Patterns
#21
Here are two different symplified svg of the royal guard torso.
SVG

One is using path only, the other is using mainly polygons (there still a path that I don't know how to get rid of)...

converting polygons should be much easier than the splines.
Reply
Re: Minifigs Patterns
#22
Damien Roux Wrote:
-------------------------------------------------------
> Here are two different symplified svg of the royal
> guard torso.
> SVG
>
> One is using path only, the other is using mainly
> polygons (there still a path that I don't know how
> to get rid of)...
>
> converting polygons should be much easier than the
> splines.

In deed it is easier. It was a piece of cake to extract the coordinates from "sw040 simplified 2.svg" into an .LDS file and compile those polygons into a .DAT file.
http://dl.dropbox.com/u/15954981/sw040.zip
And rescaling should be no challange at all. But from there, I'm afraid the polygons have to be entered by hand. :o

/Tore
Reply
Re: Minifigs Patterns
#23
Hi Travis,

I'm sure you've got it or are aware of it but I thought I'd remind you of Ross Crawford's Txt2Dat which can (IIRC) take a spline and convert it to a solid polygon.

http://www.br-eng.info/my-lego-roscomenu...50-txt2dat

Tim
Reply
Re: Minifigs Patterns
#24
Isn't there an way to make a program create triangles using those points instead of lines only?

The difficulty would be to avoid overlapping triangles and make sure they are really "inside" the path... But I have no idea how to program that.
Reply
Re: Minifigs Patterns
#25
Damien Roux Wrote:
-------------------------------------------------------
> Isn't there an way to make a program create
> triangles using those points instead of lines
> only?

I'm afraid that would be extremely difficult to make.

> The difficulty would be to avoid overlapping
> triangles and make sure they are really "inside"
> the path... But I have no idea how to program
> that.

I do hope I'm wrong, but I think it takes a human mind to figure out how to make those polygones, what points to pick.

Once upon the 90's, I made a program I called LDD (LDraw Draw). I used it to make some patterned beams and I think most of the 3005 parts with alphabet and numbers patterns, too. The only reasonable way I can think of, would be to create a modern program based on that idea. But I don't think I'm able to write that complicated programs anymore.

/Tore
Reply
Re: Minifigs Patterns
#26
So then, I hope Travis has an idea (he said, getting polygones could greatly help him).

I was also think of creating the mesh directly in Illustrator, creating only polygones of 3 points (so triangles). But as I'm far away from being an Illustrator guru, I haven't find a way to do that yet.
Reply
Re: Minifigs Patterns
#27
--snip--

> I do hope I'm wrong, but I think it takes a human
> mind to figure out how to make those polygones,
> what points to pick.

If I understand what you mean luckily you are wrong Smile There's even standardised and free libraries these days to do it.

Once a polygonal outline is obtained it's relatively straightforward (not necessarily easy!) to mesh it. There's actually a whole lot of research into it as Finite Element Analysis is a profitable business.

> Once upon the 90's, I made a program I called LDD
> (LDraw Draw). I used it to make some patterned
> beams and I think most of the 3005 parts with
> alphabet and numbers patterns, too. The only
> reasonable way I can think of, would be to create
> a modern program based on that idea. But I don't
> think I'm able to write that complicated programs
> anymore.
>
> /Tore

Alas I can't really write these for fun anymore either. Only for work Sad

Tim
Reply
Re: Minifigs Patterns
#28
Well, I managed to get this quite easily, using Catia to mesh it and to split it into 2 meshes (1 per color).

But now I'm quite confused with scaling... I don't really know which scale has been used to create it first. Stan could you hepl me: how did you manage the unit when creating the pattern.

Dat File
Reply
Re: Minifigs Patterns
#29
I used this code
Code:
2 4 -12 0 -10 12 0 -10
2 4 12 0 -10 14.345 2 -10
2 4 14.345 2 -10 19 29 -10
2 4 19 29 -10 19 32 -10
2 4 -19 32 -10 19 32 -10
2 4 -12 0 -10 -14.345 2 -10
2 4 -14.345 2 -10 -19 29 -10
2 4 -19 29 -10 -19 32 -10
to create pattern for torso. Then scaled width to 450. Hight scaled automaticly. My workspace in Illustrator is 450 x 380 pixels. So no you can scale this pattern.
Reply
Re: Minifigs Patterns
#30
Damien Roux Wrote:
-------------------------------------------------------
> Well, I managed to get this quite easily, using
> Catia to mesh it and to split it into 2 meshes (1
> per color).
>
> But now I'm quite confused with scaling... I don't
> really know which scale has been used to create it
> first. Stan could you hepl me: how did you manage
> the unit when creating the pattern.
>
> Dat File

That was quite easily done as soon as I found the lower right coordinate:
{0,378.842,0} which corresponds to LDraw's {19,32,-10}
That gives:
1 19 19 0 -10 0.0844679 0 0 0 0.0844679 0 0 0 -1 Part2.dat
togeher wirh:
1 16 0 0 0 1 0 0 0 1 0 0 0 1 s\973s01.dat
(Did I mirror the pattern...?)

http://dl.dropbox.com/u/15954981/catia320.mpd


/Tore
Reply
Re: Minifigs Patterns
#31
Looks good. Only colors change left. Thank you.
Reply
Re: Minifigs Patterns
#32
Thanks for the tip Tore.

Stan: Maybe for futur pattern, it would be better not to scale the pattern and keep the Ldraw dimension as there are. If you really want to scan, doing it with x10 or x100 would be better. I had some manual corrections to do, because or decimal rounding errors after scaling.
Reply
Re: Minifigs Patterns
#33
I've posted the part on the tracker:
Link
Reply
Re: Minifigs Patterns
#34
ok. i will rescale my pattern. It was my fail(
Reply
Re: Minifigs Patterns
#35
Uploaded on the tracker:
Link
Reply
Re: Minifigs Patterns
#36
[Image: 9d6a7dff.png]
Emperor Palpatine was very unfriendly. I spent a lot of time on him, but not very successfullySad If someone want you can rework him. SVG file here.
Reply
Re: Minifigs Patterns
#37
Yes, converting the polygon to triangles is straightforward (with the proper libraries). Additionally, having front ones "hide" back ones is also easy (polygon binary operations are standard, and in this case the difference operation would be used to subtract the front polygons from ones behind them). All of this is stuff I will be doing, but getting the polygons in the first place was the hard part (with paths).
Reply
Re: Minifigs Patterns
#38
Good news!

Travis, was the file I sent you with polygons good enough for what you need, or does it still need some changes?
Reply
Re: Minifigs Patterns
#39
I just got far enough to be able to sanity check my work, and both simplified ones seem to have worked. I'm parsing all the paths, but for each curve in the paths, I'm simply using a straight line between the curve's start and end points. This seems to produce a good result with your simplified Imperial Guard torsos. One of the two is inclosed in a white box, though, which isn't really desired.

I still have to update my code to do the polygon difference stuff so that stuff in front covers over stuff in back. And I'll at least try to get curves inside paths to work. However, I'll post something once I have the polygon difference stuff in.
Reply
Re: Minifigs Patterns
#40
Thanks for the heads-up. SVG files don't use splines. They instead use quadratic and cubic Bézier curves. I'm hoping I'll be able to find some sample code for converting these into polylines with a specific "angle between segments" threshold that I can set. Otherwise they're going to be a pain.

Oddly enough SVG arcto commands are a pain to process also.
Reply
Re: Minifigs Patterns
#41
At the bottom of this message is a link to an initial demo of my work in progress.

There are some important notes (READ THESE!):
  • It creates a .ldr file with the same name as the input .svg file, overwriting any existing .ldr file with the same name without prompting.
  • It doesn't properly support any kind of curves inside paths (cubic Bézier, quadratic Bézier, arc). Instead of drawing a curve, it draws a straight line between the two ends of the curve.
  • It isn't fully working with winding rules (odd/even, non-zero, etc). This means that some files look great, while others have overlapping (co-planar) polygons.
  • It only supports a small subset of SVG. In particular, references to named items don't work, nor do coordinate transformations.
  • The output is all triangles; anything that would have generated lines is ignored.
  • I haven't checked if the output triangles all have the same winding (for BFC). I believe that they should, but haven't checked.
  • The only SVG nodes supported are switch, g, polygon, path, rect, and circle.
If you still want to give it a try, go ahead. It's a command line program, and expects the filename of an SVG file as its first (and only) argument. Here is the link:

http://www.halibut.com/~tcobbs/ldraw/pri...at-001.zip
Reply
Re: Minifigs Patterns
#42
[Image: ade57721.png]
Anakin Skywalker. Svg file. This image has 20x scale.
Reply
Re: Minifigs Patterns
#43
Works quite nicely.

I gave a try with Vader's pattern (above), and I had to modify the pattern a bit (grouping each color in a polygon, with no overlapping areas). The file is here.

Problem I have is that it's giving me lots of T-connections. Do you know where does the problem comes from?

But, anyway, many thanks, you did a great job, keep on goin'!
Reply
Re: Minifigs Patterns
#44
To be honest, I'm not sure where the T-connections are coming from. I suspect it's when the upper polygons are subtracted from the ones underneath them. The tesselation (turning the complex polygons into triangles) shouldn't introduce any, since the GLU tesselation library I'm using is, by definition, intended to be used with OpenGL.
Reply
Re: Minifigs Patterns
#45
I mentioned it somewhere else way up the thread, but I'll repeat it here, since it still applies. Some of the SVG files from Illustrator posted in this thread have a node at the beginning that the XML parser I'm using is unable to parse.

If the program doesn't produce a .ldr file at all, open the .SVG file up in a text editor. If you see an XML node near the top with a bunch of stuff enclosed by square brackets ([]), delete the brackets and everything between them. The node should look something like this:

Code:
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
        <!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
        <!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
        <!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
        <!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
        <!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
        <!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
        <!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
        <!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
]>

After editing, it should look like so:

Code:
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

Ignore all semicolons in the samples; they appear to be due to a bug in Phorum.
Reply
Re: Minifigs Patterns
#46
I was looking up Bezier curves to see if there was anything quick I could do to help (it would appear not) and noticed that True Type Fonts use Bezier curves rather than splines. Which means Rosco's code most likely has what you need.

Tim
Reply
Re: Minifigs Patterns
#47
Thanks. I'll take a look.
Reply
Re: Minifigs Patterns
#48
Sorry not in this topic(
Reply
Re: Minifigs Patterns
#49
To those who want to try SvgToDat (and maybe also for Travis he he's still trying to improve the prog):

After some try and some patterns authoring, I can say that at the moment, the best is to avoid overlapping areas in the SVG file, otherwise there will be a lot of overlapping triangle after conversion. This can be done easily in Illustrator.

Then, as the program only takes splines anchor points into consideration, the curved path have to split into smaller straight lines. This can be done in Illustrator by adding control points and then by using the "simplify" option with straight lines.

Then, when all colored area are polygon (one group per color) the program can be ran and gives really good results.

But it's not over yet: colors has to be change manualy to Ldraw ones using MlCad or whatever program.

Then, sometimes there are BFC problems, so this needs to be checked with LdView.

After that, there is a good chance that edger2 will find many unmatched edges. I was able to correct that using unificator. It should work for almost all the gaps.

Finnaly, decimals needs to be rounded, and triangles converted to quads if possible (using Datheader for example).

This is the procedure I used to make 3068pb12. I ended with only two errors caused by very flat triangles and quads, nothing really difficut to handle apparently.



This is my feedback, I hope it will help Travis to improve this wonderful program, and help users who would like to use it.
If one has some questions about Illustrator, I can do my best to help, but I'm not a guru at all. I first really started to use it last week when Stan gave his torso patterns. But as I knew Photoshop already, Illustrator was not that difficult to handle for basic things like drawing a 2D pattern.
Reply
Re: Minifigs Patterns
#50
Not minifig, but pattern. Dish 6 x 6 Inverted (Radar) with Star Wars TIE Advanced Hatch Pattern File id here
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 2 Guest(s)