LDraw

Last updated
LDraw
Created byJames Jessiman
URL https://www.ldraw.org/ OOjs UI icon edit-ltr-progressive.svg
CommercialNo
RegistrationFree
Current statusOnline

LDraw is a system of freeware tools for modeling Lego creations in 3D on a computer. The LDraw file format and original program were written by James Jessiman, [1] although the file format has since evolved and extended. [2] [3] [4] [5] [6] [7] [8] He also modeled many of the original parts in the parts library, which is under continuous maintenance and extension by the LDraw community. Following Jessiman's death in 1997, [9] [10] a variety of programs have been written that use the LDraw parts library, and file format. LDraw models are frequently rendered in POV-Ray or Blender, free 3D ray tracers.

Contents

File format

The LDraw format can divide a model into steps so that the building instructions can be incorporated into the design, and also allows for steps that rotate the camera and even move parts around in an elementary fashion. It also allows for models to be incorporated in the construction of larger models to make design easier. This also makes the file format space efficient: instead of specifying the polygons of every single stud of a specific brick for example, a shared stud file is included multiple times with transformation applied.

Parts, models, sub-models and polygons are all treated the same and are not specific to Lego models (only the parts library is). The format could be used to store any type of 3D model. Some have created bricks of other building systems for use with LDraw.

The following main three filename extensions are used by LDraw: [11]

The file format uses plain text data, and uses the charset UTF-8 without BOM.

Example File: 3003.dat, the Implementation of a 2 x 2 Brick

0 Brick  2 x  2 0 Name: 3003.dat 0 Author: James Jessiman 0 !LDRAW_ORG Part UPDATE 2002-03 0 !LICENSE Redistributable under CCAL version 2.0 : see CAreadme.txt  0 BFC CERTIFY CCW  0 !HISTORY 2001-10-26 [PTadmin] Official Update 2001-01 0 !HISTORY 2002-05-07 [unknown] BFC Certification 0 !HISTORY 2002-06-11 [PTadmin] Official Update 2002-03 0 !HISTORY 2007-05-07 [PTadmin] Header formatted for Contributor Agreement 0 !HISTORY 2008-07-01 [PTadmin] Official Update 2008-01  1 16 0 4 0 1 0 0 0 -5 0 0 0 1 stud4.dat  0 BFC INVERTNEXT 1 16 0 24 0 16 0 0 0 -20 0 0 0 16 box5.dat  4 16 20 24 20 16 24 16 -16 24 16 -20 24 20 4 16 -20 24 20 -16 24 16 -16 24 -16 -20 24 -20 4 16 -20 24 -20 -16 24 -16 16 24 -16 20 24 -20 4 16 20 24 -20 16 24 -16 16 24 16 20 24 20  1 16 0 24 0 20 0 0 0 -24 0 0 0 20 box5.dat  1 16 10 0 10 1 0 0 0 1 0 0 0 1 stud.dat 1 16 -10 0 10 1 0 0 0 1 0 0 0 1 stud.dat 1 16 10 0 -10 1 0 0 0 1 0 0 0 1 stud.dat 1 16 -10 0 -10 1 0 0 0 1 0 0 0 1 stud.dat 

The above code defines the basic 2×2 brick. It consists of a five-sided box (box5.dat, outside) and an inverted five-sided box (inside), the connection between those two, consisting of four quads (the four lines starting with 4), the four studs on top of it (stud.dat) and the long hollow stud in the inside (stud4.dat).

All lines in an LDraw file are either empty or start with a command number, where 0 means no command (though over time, some lines starting with 0 followed by specific text in capitals also got a meaning as meta commands). [12] The command 1 for example includes a subfile. It specifies the file's path and a transformation matrix that should be applied to it, as well as its color (where 16 means "use the color that was used when including the current file"). Command 4 specifies a four-sided polygon. There are also commands that define 2D lines. Such lines give the parts a clear contour even in non-shaded orthographic renderings.

Example File: pyramid.ldr, a Lego Model of a Pyramid

The following code specifies a simple pyramid model with three layers made of 2 x 4 bricks (brick # 3001) with changing color and a 2 x 2 brick on top.

0 Example Pyramid for Demonstration of LDRAW Library 0 Name: pyramid.ldr 0 Author: James Jessiman  1 1 -40 -24 60 1 0 0 0 1 0 0 0 1 3001.dat 1 1 40 -24 60 1 0 0 0 1 0 0 0 1 3001.dat 1 1 60 -24 0 0 0 1 0 1 0 -1 0 0 3001.dat 1 1 40 -24 -60 1 0 0 0 1 0 0 0 1 3001.dat 1 1 -40 -24 -60 1 0 0 0 1 0 0 0 1 3001.dat 1 1 -60 -24 0 0 0 1 0 1 0 -1 0 0 3001.dat  0 STEP  1 4 -20 -48 40 1 0 0 0 1 0 0 0 1 3001.dat 1 4 40 -48 20 0 0 1 0 1 0 -1 0 0 3001.dat 1 4 20 -48 -40 1 0 0 0 1 0 0 0 1 3001.dat 1 4 -40 -48 -20 0 0 1 0 1 0 -1 0 0 3001.dat  0 STEP  1 14 0 -72 20 1 0 0 0 1 0 0 0 1 3001.dat 1 14 0 -72 -20 1 0 0 0 1 0 0 0 1 3001.dat  0 STEP  1 0 0 -96 0 1 0 0 0 1 0 0 0 1 3003.dat  0 STEP 

Other examples

See also

Related Research Articles

<span class="mw-page-title-main">JPEG</span> Lossy compression method for reducing the size of digital images

JPEG is a commonly used method of lossy compression for digital images, particularly for those images produced by digital photography. The degree of compression can be adjusted, allowing a selectable tradeoff between storage size and image quality. JPEG typically achieves 10:1 compression with little perceptible loss in image quality. Since its introduction in 1992, JPEG has been the most widely used image compression standard in the world, and the most widely used digital image format, with several billion JPEG images produced every day as of 2015.

<span class="mw-page-title-main">Lego</span> Plastic construction toy

Lego is a line of plastic construction toys manufactured by the Lego Group, a privately held company based in Billund, Denmark. Lego consists of variously coloured interlocking plastic bricks made of acrylonitrile butadiene styrene (ABS) that accompany an array of gears, figurines called minifigures, and various other parts. Its pieces can be assembled and connected in many ways to construct objects, including vehicles, buildings, and working robots. Assembled Lego models can be taken apart, and their pieces can be reused to create new constructions.

<span class="mw-page-title-main">Lego Mindstorms</span> Hardware and software platform by Lego

Lego Mindstorms is a discontinued hardware and software structure which develops programmable robots based on Lego bricks.

Lego Technic is a line of Lego interconnecting plastic rods and parts. The purpose of this series is to create advanced models of working vehicles and machines, compared to the simpler brick-building properties of normal Lego.

.doc is a filename extension used for word processing documents stored on Microsoft's proprietary Microsoft Word Binary File Format; it was the primary format for Microsoft Word until the 2007 version replaced it with Office Open XML .docx files. Microsoft has used the extension since 1983.

<span class="mw-page-title-main">Lego Duplo</span> Lego theme for toddlers

Lego Duplo is a core product range of the construction toy Lego by The LEGO Group, designed for children from 1+12 to 5 years old. Duplo bricks are twice the size of traditional Lego bricks, making them easier to handle and less likely to be swallowed by younger children. Despite their size, they are still compatible with traditional Lego bricks.

<span class="mw-page-title-main">Lego minifigure</span> Plastic figurines manufactured by the Lego Group

A Lego minifigure, often simply referred to as a Lego figure or a minifig, is a small plastic articulated figurine made of special Lego bricks produced by Danish building toy manufacturer The Lego Group. They were first produced in 1978 and have been a success, with over 4 billion produced worldwide as of 2020. Minifigures are usually found within Lego sets, although they are also sold separately as collectables in blind bags, or can be custom-built in Lego stores and on lego.com. While some are named as specific characters, either licensed from already existing franchises or of Lego's own creation, many are unnamed and are designed simply to fit within a certain theme. They are highly customizable, and parts from different figures can be mixed and matched, resulting in many combinations.

<span class="mw-page-title-main">Lego Trains</span> Lego theme

Lego Trains is a product range and theme of the construction toy Lego, which incorporates buildable train sets. The Lego Trains theme became a sub-theme of Lego City in 2006. Products in the range have included locomotives, tracks, rolling stock, stations, signal boxes, and other track-side buildings and accessories. The theme is popular among adult fans, as well as children, and has spawned international associations and conventions. The train system is sometimes referred to as 'L-gauge' among Lego fans, in reference to traditional model railway scales. Lego trains use a nominal gauge of 37.5 mm, based on 5-stud track centerlines gauge, corresponding with a circa 1:38 scale.

Office Open XML is a zipped, XML-based file format developed by Microsoft for representing spreadsheets, charts, presentations and word processing documents. Ecma International standardized the initial version as ECMA-376. ISO and IEC standardized later versions as ISO/IEC 29500.

<span class="mw-page-title-main">Lego Mindstorms NXT</span> Programmable robotics kit

Lego Mindstorms NXT is a programmable robotics kit released by Lego on August 2, 2006. It replaced the Robotics Invention System, the first-generation Lego Mindstorms kit. The base kit ships in two versions: the retail version and the education base set. It comes with the NXT-G programming software or the optional LabVIEW for Lego Mindstorms. A variety of unofficial languages exist, such as NXC, NBC, leJOS NXJ, and RobotC. A second-generation set, Lego Mindstorms NXT 2.0, was released on August 1, 2009, with a color sensor and other upgrades. The third-generation EV3 was released in September 2013.

Lego Star Wars is a Lego theme and multimedia franchise revolving around the Star Wars media franchise created by George Lucas. Part of the theme are, next to, over 910 Lego building toy sets 1328 Lego minifigures, an eponymous video game series, containing six games, multiple animated short films and Television series.

<span class="mw-page-title-main">Scratch (programming language)</span> Programming language learning environment

Scratch is a high-level, block-based visual programming language and website aimed primarily at children as an educational tool, with a target audience of ages 8 to 16. Users on the site can create projects on the website using a block-like interface. Scratch was conceived and designed through collaborative National Science Foundation grants awarded to Mitchel Resnick and Yasmin Kafai. Scratch is developed by the MIT Media Lab and has been translated into 70+ languages, being used in most parts of the world. Scratch is taught and used in after-school centers, schools, and colleges, as well as other public knowledge institutions. As of 15 February 2023, community statistics on the language's official website show more than 123 million projects shared by over 103 million users, over 804 million total projects ever created, and more than 95 million monthly website visits.

<span class="mw-page-title-main">Lego Digital Designer</span>

Lego Digital Designer is a discontinued CAD software made by Qube Software and the Lego Group. It allows people to design a virtual model using a selection of virtual Lego bricks. These models could be saved locally, as well as uploaded to the Lego website for sharing and ordering as a physical product. It is available for macOS and Windows, but only as a 32-bit application, which means that it no longer runs on current versions of macOS. The program allows users to build models using virtual Lego bricks, in a computer-aided design like manner. Until January 16, 2012, these could be uploaded, along with instructions and a box design, to the Lego Design byME website, from where the models could be ordered for delivery as a real, packaged set. Users can also take screenshots of their models and store the models on their computer in an .LXF file. On November 9, 2011, Lego declared that the Design byME service was going to end on January 16, 2012, due to its failure to meet quality expectations and for being too complex. In its absence, custom brick orders have had to be made via the Pick a Brick service. The closing of Design byME has not affected the ability of users to print custom instructions for their models.

<span class="mw-page-title-main">Lego Art</span> Lego theme

Lego Art is a Lego theme introduced in 2020. It offers sets based on iconic personalities and characters in pop culture, allowing builders to reproduce them in a mosaic-like format using Lego 1x1 studs. Following the launch of Lego DOTS, a theme mainly targeted towards children, the Lego Art theme is the second 2D tile creative concept to be launched by The Lego Group in August 2020.

<span class="mw-page-title-main">BrickFair</span>

BrickFair is a Lego convention and exhibition held annually in the Eastern United States. It was first held in 2008 at Tysons Corner, Virginia by Todd Webb, and in subsequent years, the flagship Virginia convention has been held in Chantilly, typically during the first weekend of August. BrickFair is a four-day event, operating generally Thursday through Sunday. The convention displays Lego models, displays and trains, most often covering more than 100,000 square feet of convention space. BrickFair conventions are also held in New England and the Southeastern United States, with the advent of BrickFair Alabama in 2012 and BrickFair New England in 2013. BrickFair operates in every season and in four East Coast states. BrickFair is believed to be the largest Lego convention in the United States and one of the largest in the world. The Virginia convention has had up to 22,500 attendees in its public hours.

Lego Speed Champions is an auto racing-inspired theme of Lego building sets first released in 2015. It features classic and modern styles from well-known car brands.

Nexo Knights is a 3D animated television series that aired on Cartoon Network and premiered in 2016. It was produced by The Lego Group to coincide with the Lego theme of the same name. The series is based on a fantasy castle concept and is set in a futuristic kingdom called Knighton, which is home to five young knights. The storyline follows the adventures of the five knights as they defend their home from a court jester named Jestro and his monsters. Four seasons were produced for a total of 40 episodes. The fourth season finished airing in 2017. In 2018, The Lego Group discontinued the Nexo Knights theme, which also resulted in the cancellation of the series.

<span class="mw-page-title-main">Hilary Page</span> English toy maker

Hilary "Harry" Fisher Page was an English toy maker and inventor of Self-Locking Building Bricks, the predecessor of Lego bricks. He founded the Kiddicraft toy company.

<span class="mw-page-title-main">Building blocks (toy)</span> Description and definition of "building/construction blocks"

Building blocks are modular construction parts, usually made of plastic, which can be assembled in a form-fit manner. The basic components are usually cuboid-shaped, cylindrically studded at the top in a grid pattern, hollow-bodied at the bottom and smooth at the sides. The structured upper surface interacts by friction and positive locking with the correspondingly negative lower surface of other clamping components, so that complex designs can be assembled. The design allows the parts to be connected with compressive force and the blocks to be clamped with plastic pins.

References

  1. "LDraw.org - File Format 1.0.2". LDraw.org. Retrieved 9 July 2019.
  2. "LDraw.org - CATEGORY and KEYWORDS Language Extension". www.ldraw.org. Retrieved 2019-07-09.
  3. "LDraw.org - Colour Definition Language Extension". www.ldraw.org. Retrieved 2019-07-09.
  4. "LDraw.org - Language Extension for Back Face Culling (BFC)". www.ldraw.org. Retrieved 2019-07-09.
  5. "LDraw.org - MPD Language Extension". www.ldraw.org. Retrieved 2019-07-09.
  6. "LDraw.org - Official Model Repository (OMR) Specification Version 1.0.3". www.ldraw.org. Retrieved 2019-07-09.
  7. "LDraw.org - Language Extension for Texture Mapping". www.ldraw.org. Retrieved 2019-07-09.
  8. "LDraw.org - Localisation Guideline". www.ldraw.org. Retrieved 2019-07-09.
  9. Courtney, Bliss & Herrera 2003, p. 396.
  10. OrionP (8 November 2003). "James Jessiman Memorial". LDraw.org. Retrieved 9 July 2019. On July 25, 1997, James Jessiman passed away.
  11. Courtney, Bliss & Herrera 2003, p. 322.
  12. Courtney, Bliss & Herrera 2003, pp. 152–153.

Further reading