Release Notes, LDLITE Version 2.4
What is LDLITE?
LDLITE is a program that displays 3D models. Its file
format is a superset of the *.dat format used by the program LDRAW. A vast
library of parts for LEGO-brand building bricks have been defined in *.dat
format , and it is a popular format for exchanging descriptions of LEGO models.
Version 2.4 is a functional, stable release for the MS
Win95/98/NT platform, fully compatible with LDRAW. Source code for LDLITE is
available under the GPL.
Paul Gyugyi, paul@gyugyi.com
Release date: January 6, 2002.
Disclaimer
LDLITE version 2.4, Copyright (C) 1998-2002 Paul J.
Gyugyi
LDLITE comes with ABSOLUTELY NO WARRANTY; for details see
the file COPYING distributed with this program. This is free software, and you
are welcome to redistribute it under certain conditions; for details see the
file COPYING distributed with this program.
Download
The LDLITE project is now hosted at http://sourceforge.net/projects/ldlite where you can obtain
the latest binaries and source code, make feature requests, file bug reports,
and join the mailing list.
Platforms supported
- MS Win95/WinNT/Win98 (binary available, source code
available)
Version 2.4 Release Notes
New features:
- Files that do not end in a newline should now render correctly.
- Added check for malloc failure during large files.
Known limitations:
- The menu command for shading no longer works. Use -E1 on the command line instead.
- Options dialog box still needs revised to include all these new options.
Version 2.3 Release Notes
New features:
- MPD files should now render correctly, regardless of size.
- A new command line option, -K, will cause the image to be centered in the
middle of the window, rather than the ldraw default of 2/3-of-the-way-down.
- A new command line option, -D, will tell LDLite to start ignoring
STEP commands after levels of included files. Use the option -D1 to
have LDLite only wait for a keypress or save a bitmap at STEP commands in the main
file.
- A new command line option -Fr will suppress the drawing of Type 2 and Type 5 lines.
This really makes the image more legible when you are zoomed-out in a drawing of a
large scene, for example with a scaling of -S0.4 or below.
- A new command line option -E now controls shading, rather than the old
menu-option/registry-value. -E0 (the default) produces non-shaded images. -E1
produces the standard LDLite shading. -E2 has a shading that fades to black
as the objects get more distant. -E3 produces shading as if there were a point
source of light at the origin.
- Source code integration with ldglite is in progress. The code base has a lot of
#ifdef OPENGL statements.
Known limitations:
- The menu command for shading no longer works. Use -E1 on the command line instead.
- Options dialog box still needs revised to include all these new options.
Version 2.2 Release Notes
New features:
- Filenames with spaces and "weird" characters in them should now always work.
On the command line, surround the file name with double-quotes. You can also
surround filenames with double-quotes inside .dat files, in case you want to
type-1-line include a "weird" filename.
- -Rconverted_file.dat will now convert a file to pure LDRAW syntax. It may
mess up your comments by reformating, stripping double-quotes, and converting
numbers to raw integer formats, but the drawing commands will be converted OK.
Use this to "inline" the effect of ROTATE commands, for example.
- If there is a file named ldliterc.dat in the current working directory (usually
the directory the selected file is in), LDLite will process those lines before
processing the slected file. Use this for overriding color definitions, for example.
Known limitations:
- Options dialog box still needs revised to include all these new options.
Version 2.1 Release Notes
New features:
- Type 2 and Type 5 lines are controlled by the -Wn setting, and the width
can be any odd number.
- Saving of bitmaps now auto-crops the image size, just like LDRAW
did. The non-cropped images can be generate with the -i4 option (which
is compatible with the command line options of ldglite, another
LDRAW-compatible program).
- When generating bitmap files, using the option of -MF instead of -MS
will generate only the final bitmap image and none of the intermediate
steps.
Known limitations:
- Options dialog box needs revised to include all these new options.
- Conversion to standard LDRAW syntax via -R is still broken.
Version 2.0 Release Notes
New features:
- Can produce bitmaps larger than screen resolution,
primarily to be used for generating printed instruction sheets. (see -Ux,y
command line option)
- Type 2 lines can be drawn thicker (see -Wn command
line option)
- Supports loading of file names with non-standard
characters, such as MS IE uses for temporary file names.
- Saving bitmaps now correctly names the bitmaps when
the source file was not in the current directory.
Known limitations:
- -U and -W options not integrated into options dialog
box
- Conversion to standard LDRAW syntax is broken.
Commandline Options
The following are an exhaustive list of the commandline
options supported by LDLITE. Command line options do not need to be specified in
any particular order. Options consist of a dash, a single character, and
sometimes an argument. Note that there must not be a space between the character
and the argument. Currently all options are not case sensitive.
- -Afloat,float,float,float,float,float,float,float,float
This specifies an initital scale/rotationmatrix, and is commonly used
to set the viewpoint for the model.
- -Binteger
This specifies the
background color to use in the image. The decimal integer can be any valid
color number, although it is not affected by any color redefinition
statements.
- -Cinteger
This specifies the
default drawing color to use (i.e. it defines what the color value 16
initially maps into). The decimal integer can be any valid color number,
although it is not affected by any color redefinition statements.
- -Dinteger
Tells LDLite to start ignoring
STEP commands after integer levels of included files. Use the option -D1 to
have LDLite only wait for a keypress or save a bitmap at STEP commands in the main
file.
- -Einteger
Controls shading. -E0 (the default) produces non-shaded images. -E1
produces the standard LDLite shading. -E2 has a shading that fades to black
as the objects get more distant. -E3 produces shading as if there were a point
source of light at the origin.
- -Fcharacter
This controls the rendering of elements in the drawing. "-FR"
specifies that the model should not draw any edges, only polygons.
"-FW" specifies the model should be rendered in Wire-Frame mode,
which only draws the lines in the model.
"-FS" specifies that a
lower-quality faster rendering is desired, and currently ignored by
LDLITE. If you specify both "-FR" and "-FW" on
- -G
Debugging output is
written to the status bar, and if "-l" is specified, to the
logging file.
- -Iinteger
Specifies the type
of image file to generate. LDLite current supports only two
values: -I4 will generate BMP24 images, and -I-4 will generate
auto-cropped BMP24 images.
- -K
Causes the image to be centered in the
middle of the window, rather than the ldraw default of 2/3-of-the-way-down.
- -L
Anything written to the
status bar will be written to the file ldlite.log. If a logging file already
exists, it is deleted.
- -Mcharacter
This sets the
LDRAW mode: -MC will set continuous mode, where the model will be drawn
without interruption. -MP (the default) will have LDLITE pause for a mouse
click at each "0 STEP" line. -MS will create a bitmap file each
time it encounters a "0 STEP" line and automatically exit when the
model file has been completely processed. -MF is like -MS but will only
create the final file.
- -Ofloat,float
This will
offset the origin of the image in the x and y directions. For whatever
reason, LDRAW sets the default origin to be 2/3 of the way down the screen;
LDLITE keeps this tradition.
- -P
LDLITE will operate in
polling mode. After the model finishes rendering, LDLITE will go out and
check every second or so to see if the file has been modified. If so, it
reloads and redisplays the model.
- -Rfilename
LDLITE will
convert the model file to LDRAW syntax, producing the file
"filename", and automatically exit. You should also specify -MC,
or you might have to click the screen a few times to get past any 0 STEP lines.
- -Sfloat
Scales the model file
by "float" before drawing. Curiously enough, negative numbers work
just fine.
- -T
Actives "twirl
mode". After the model is done being drawn, this will change the
viewpoint by a 10 degree rotation about the y axis and redraw the model.
- -Uinteger,integer
Sets the
size of the image to be (first integer) pixels wide and (second integer)
pixels high. Does basically the same thing as -V. If both -U and
-V are specified, -V has precedence.
- -Vinteger
Sets the
"video mode", or window size. -V0 sets 320x200, -V1 sets 640x200,
-V2 sets 640x350, -V3 sets 640x480, -V4 sets 800x600, -V5 sets 1024x768, -V6
sets 1280x1024. No attempt is made to emulate the non-square aspect ratio of
-V[012]. The default, if no -V or -U option is set, is to run full screen.
-V0 is identical to -U320,200.
- -Winteger
Sets the width for
Type 2 lines. Default is 1. If integer is > 1, lines will be
drawn with a thickness of 3 pixels.
- -Zfloat
Sets the Z axis
clipping threshold. Normally in zbuffer graphics, the horizon is at the
largest possible integer value, and the viewer is at the most negative
integer. If a new brick has a lower z value than what is on the screen, it
is drawn. (This test is done on a pixel-by-pixel basis). By setting the -Z
option, pixels with Z values lower than the specified number will not draw
on top of what is already there. This can be used to create a cross-section
image that slices off everything closer than the specified value.
Installation
- To have access to the building brick libraries, you
should first install the LDRAW program. I'd also recommend installing the
LDRAW Add On (LDAO) program. LDLITE does not actually need anything from
those programs, but works well with them.
- Locate your "Base LDRAW directory", where
you installed your LDRAW files. This is usually named C:\LDRAW. If you
didn't install LDRAW, just create a directory somewhere. In this directory,
create a subdirectory called LDLITE.
- Place the files in this archive into the LDLITE
directory. LDLITE will look for files in the ..\MODELS, ..\P and ..\PARTS
directories. (you could actually put the LDLITE files in any directory and
it would work OK).
- Run the ldlite.exe file. If you have never installed
LDAO, you will get a dialog box asking you to set the base LDRAW directory.
You should see a blank window with a white background. Go to
"File-Open" and click on "ldl-logo.dat", which is
distributed with this archive. You should see a grey rectangle. Click on the
image (with the left button), and LDLITE will draw the next step, which will
draw the letter L. You will see comments from the ldl-logo.dat file
appearing on the status bar in the second field. Continue clicking on the
image until all steps have been drawn and the title bar says
"Finished" and the letters spell LDLITE. The file
"ldl-logo.dat" does not use any of the LDRAW library *.dat files.
- Start Ldlite, and chose "File/Open" to
find "..\models\car.dat", a standard file distributed with LDRAW.
You should see the first step in the car.dat file, a pair of axle plates and
a plate. Click on the image (with the left button), and LDLITE will draw the
next step. Continue clicking on the image (or quit the program by clicking
on the close box) until all steps have been drawn and the title bar says
"Finished". Then click on the close box. If you get an error
message, the base path in your LDRAW.INI file may be incorrect. Go to the
"Options" menu and select "Set path for LDRAW parts",
select the LDRAW base directory and press OK.
- Go to the "Options" menu and select
"View". This will allow you to change the zoom factor and view
position for the model. If you have not installed LDAO, the view position
list box will not work.
- You can use all the standard LDRAW command line
options, either from a command windows, the Start/Run dialog, or using a
shell program, such as LdrawAddOn (Highly recommended).
- Ldlite will register itself as the default program
for .dat files if no other program is already configured that way. You can
then double click on a .dat file from the Explorer window and it will start
ldlite.
- Netscape can be configured to automatically run
ldlite when it encounters .dat files. After running LDLITE at least once, go
to the Netscape menu item Edit/Preferences/Navigator/Applications, select
"ldlite Document", Edit, and set the mime type to
application/x-ldraw. Now if you download a .dat file from a properly
configured server, such as lugnet or the two dat links here: wood4.dat, mudray.dat, you'll be given the option to download
the file or view it with ldlite.
Credits
The entire LDRAW community is very helpful, and I've
gotten a lot of advice and help. I'm especially glad to get code snippets in the
mail. Much thanks to Steve Bliss, Lars Hassing, Leonardo Zide, Jeremy Sproat,
and Don Heyse for making this a much better program than I could produce myself.
Great thanks to Todd Lehman for setting up the LUGNET discussion group server to
support LDLite and for listing the LDLITE home page as CLSotW. Of course none of
this would have a purpose without James' LDRAW parts library and the continued
work on pieces by other folks on the LCAD mailing list.