|
In lugnet.cad, Todd Lehman wrote:
> What's the "best"[1] automated or semi-automated way to render a large
> number of parts images into GIFs? (It's OK if there are multiple steps or
> if a final pass has to convert the results from PNG or BMP to GIF.)
> [1] Or for that matter, what's *any*...?
Quick and Dirty:
- Install LDLite and LDraw Add-On
- Point LDAO at LDLite for catalog-images (see
<http://blisses.home.att.net/ldao/useldlite.html>).
- Run the Make Catalog repeatedly, once for each color.
- After running each color-batch, copy/convert all the files in ldraw\vec\ to a
more permanent location, like brictionary/images/<color>/. Otherwise, the next
batch will overwrite the current batch.
- Either clear out ldraw\vec\ between runs, or click the "Re-generate all
images" option in Make Catalog on each run.
That's not very automated, but you could do it today.
In LDAO, I use a more-or-less brute force method for generating the catalog:
- Get a list of the part-files.
- Generate .DAT script(s), repeating the code:
0 CLEAR
1 <color> 0 0 0 1 0 0 0 1 0 0 0 1 <filename>
0 STEP
For each part/color combination.
- Launch the generated DAT script into LDraw/LDLite, with the -MS option, to
save step-images. Either of these programs will create a set of bitmap files in
the ldraw\bitmap\ directory, using the name of the DAT script, but with the
step-number on the end of each filename. The output filename formats are
slightly different between the two programs, and LDraw can only handle 100 steps
per script.
- Move, rename and reformat each step bitmap image in the ldraw\bitmap\
directory to the desired name, location and format.
Just in case you need a comparision between LDraw and LDLite for part-image
generation:
LDraw advantages:
- LDraw runs in DOS, while LDLite only runs under Win32.
LDLite advantages:
- LDLite produces better images--more and more accurate colors, with shading,
better edge-lines.
- LDLite is faster.
- LDLite can handle more than 100 steps.
- LDLite will use the total WinScreen, while LDraw is generally limited to
640x480. If the part has an odd position, it is less likely to get chopped off
by LDLite.
- LDLite can draw with any color, not just the 32 defined by LDraw.
Both programs crop the output images to fit the actual drawn area.
> What I would like to do for the LUGNET Brictionary is let something loose on
> my C:\LDRAW\PARTS directory and have it spit out thousands of images like
> the ones Tom Stangl made here...
>
> http://www.lugnet.com/ldraw/parts/
> http://www.lugnet.com/ldraw/parts/?c=15&n1=3004&n2=3004
>
> ...but work toward a display format more like this:
>
> http://www.lugnet.com/database/elements/sample-2571.html
>
> and possibly also like one or more of these:
>
> http://www.lugnet.com/database/elements/sample-2357.html
>
> So at the minimum, I want to be able to make White and Clear images of every
> element, but if I can do that then I can (probably) make all colors just as
> easily.
>
> It'll take a good gigabyte or so of disk space for all the images, but it'll
> be well worth it.
>
> The nice thing about having all the parts pre-rendered in all colors, BTW,
> is that a set inventory containing LDraw part numbers can be run through a
> script to pump out a page showing pictures and names for all[2] the parts in
> the set, in full color and crosslinked into the Brictionary for more
> details.
>
> --Todd
>
> [1] Or for that matter, what's *any*...?
> [2] All that are available in LDraw format, anyway.
|
|
Message is in Reply To:
| | Best way to make parts images?
|
| What's the "best"[1] automated or semi-automated way to render a large number of parts images into GIFs? (It's OK if there are multiple steps or if a final pass has to convert the results from PNG or BMP to GIF.) What I would like to do for the (...) (25 years ago, 27-Nov-99, to lugnet.db.brictionary, lugnet.cad)
|
5 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|