Jump to content

LDraw: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
mNo edit summary
Line 24: Line 24:
}}
}}


'''LDraw''' is a system of [[freeware]] tools and a [[3D Graphics file format|3D graphics file format]] standard for modeling [[Lego]] creations.
'''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,<ref>{{cite web|url=https://www.ldraw.org/article/218.html|title=LDraw.org - File Format 1.0.2|work=LDraw.org|access-date=9 July 2019}}</ref> although the file format has since evolved and extended.<ref>{{Cite web|url=https://www.ldraw.org/article/340.html|title=LDraw.org - CATEGORY and KEYWORDS Language Extension|website=www.ldraw.org|access-date=2019-07-09}}</ref><ref>{{Cite web|url=https://www.ldraw.org/article/299.html|title=LDraw.org - Colour Definition Language Extension|website=www.ldraw.org|access-date=2019-07-09}}</ref><ref>{{Cite web|url=https://www.ldraw.org/article/415.html|title=LDraw.org - Language Extension for Back Face Culling (BFC)|website=www.ldraw.org|access-date=2019-07-09}}</ref><ref>{{Cite web|url=https://www.ldraw.org/article/47.html|title=LDraw.org - MPD Language Extension|website=www.ldraw.org|access-date=2019-07-09}}</ref><ref>{{Cite web|url=https://www.ldraw.org/article/593.html|title=LDraw.org - Official Model Repository (OMR) Specification Version 1.0.3|website=www.ldraw.org|access-date=2019-07-09}}</ref><ref>{{Cite web|url=https://www.ldraw.org/documentation/ldraw-org-file-format-standards/language-extension-for-texture-mapping.html|title=LDraw.org - Language Extension for Texture Mapping|website=www.ldraw.org|access-date=2019-07-09}}</ref><ref>{{Cite web|url=https://www.ldraw.org/article/559.html|title=LDraw.org - Localisation Guideline|website=www.ldraw.org|access-date=2019-07-09}}</ref> 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,{{sfn|Courtney|Bliss|Herrera|2003|p=396}}<ref>{{cite web|url=https://www.ldraw.org/article/222|title=James Jessiman Memorial|author=OrionP|date=8 November 2003|work=LDraw.org|access-date=9 July 2019|quote=On July 25, 1997, James Jessiman passed away.}}</ref> 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 (software)|Blender]], free 3D [[Ray tracing (graphics)|ray tracer]]s.

== History ==
The LDraw file format and original program were written by James Jessiman,<ref>{{cite web |title=LDraw.org - File Format 1.0.2 |url=https://www.ldraw.org/article/218.html |access-date=9 July 2019 |work=LDraw.org}}</ref> although the file format has since evolved and extended.<ref>{{Cite web |title=LDraw.org - CATEGORY and KEYWORDS Language Extension |url=https://www.ldraw.org/article/340.html |access-date=2019-07-09 |website=www.ldraw.org}}</ref><ref>{{Cite web |title=LDraw.org - Colour Definition Language Extension |url=https://www.ldraw.org/article/299.html |access-date=2019-07-09 |website=www.ldraw.org}}</ref><ref>{{Cite web |title=LDraw.org - Language Extension for Back Face Culling (BFC) |url=https://www.ldraw.org/article/415.html |access-date=2019-07-09 |website=www.ldraw.org}}</ref><ref>{{Cite web |title=LDraw.org - MPD Language Extension |url=https://www.ldraw.org/article/47.html |access-date=2019-07-09 |website=www.ldraw.org}}</ref><ref>{{Cite web |title=LDraw.org - Official Model Repository (OMR) Specification Version 1.0.3 |url=https://www.ldraw.org/article/593.html |access-date=2019-07-09 |website=www.ldraw.org}}</ref><ref>{{Cite web |title=LDraw.org - Language Extension for Texture Mapping |url=https://www.ldraw.org/documentation/ldraw-org-file-format-standards/language-extension-for-texture-mapping.html |access-date=2019-07-09 |website=www.ldraw.org}}</ref><ref>{{Cite web |title=LDraw.org - Localisation Guideline |url=https://www.ldraw.org/article/559.html |access-date=2019-07-09 |website=www.ldraw.org}}</ref> 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,{{sfn|Courtney|Bliss|Herrera|2003|p=396}}<ref>{{cite web |author=OrionP |date=8 November 2003 |title=James Jessiman Memorial |url=https://www.ldraw.org/article/222 |access-date=9 July 2019 |work=LDraw.org |quote=On July 25, 1997, James Jessiman passed away.}}</ref> 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 (software)|Blender]], free 3D [[Ray tracing (graphics)|ray tracer]]s.


==File format==
==File format==

Revision as of 12:14, 2 October 2024

LDraw
Area servedWorldwide
OwnerLDraw.org
Created byJames Jessiman
URLhttps://www.ldraw.org/ Edit this at Wikidata
CommercialNo
RegistrationFree
Current statusOnline
LDraw
Filename extensions
.dat, .ldr, .mpd
Developed byJames Jessiman, LDraw.org
Type of format3D computer graphics, text file
StandardsLego
Open format?yes
Free format?yes
Websiteldraw.org

LDraw is a system of freeware tools and a 3D graphics file format standard for modeling Lego creations.

History

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.

File format

Units

LDU (LDraw Units) — is a base distance unit used in the LDraw format.

Units comparison table
LDU mm LU Flat P Stud Brick in Notes
LDU = ≈0.4 1/4 1/8 1/20 1/20 1/24 1/64 LDraw Unit[11][12][13]
mm 2.5 = 5 5 millimetre = 0.1 cm = 0.01 dm = 0.001 m
LU 4 ≈1.6 = Lego Unit[14] = 1 p ("plastic"[15]; thickness of brick wall)
Flat 8 ≈3.2 = 1/3 "plate" height (without pin), distance between two nearest, not diagonal)
P 20 ≈8.0 = "pin" step, distance between centers of two neearest pins, not diagonal)
Stud 20 ≈8.0 = brick wide (real brick wide: P-0.2 mm = 7.8 mm)
Brick 24 ≈9.6 3 = 1/8 brick height (without pin)
in 64 25.4 = inch = 1/12 ft (foot) = 1/36 yd (yard)

Specification

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:[16]

  • files implementing a part, subpart or primitive use .dat
  • a Lego model consisting of 1 or more bricks use .ldr
  • multiple .ldr files can be aggregated into files of type .mpd

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).[17] 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

James Jessiman Memorial Award

James Jessiman
Memorial Award
Awarded for"Contribution to the furthering of LDraw, the DAT format, and James' memory."[18]
CountryAustralia
First awarded2009 - Present
Websiteldraw.org

Since 2001, LDraw.org project org's awards notable contributors with the «James Jessiman Memorial Award».

Recepient is selected by LDraw.org Steering Committee, and approved after a consultation with Jessiman's family[19].

Until 2005 there used to be held a prize giving ceremony at BrickFest in Washington D.C. The 2006/2007 SteerCo has slightly changed the formula of this presentation. The prize is now be given "virtually" and is no longer bound to an actual LEGO Fan Event, due to the fact that LDraw.org is primarily a online community with members spread all over the world. The recipient beside getting the established plaque - is honored for an entire year at LDraw's front page (have a look at the top right-hand corner). The SteerCo's decision aimed to balance the lack of chances for non-Americans to attend BrickFest.

— LDraw.org, Community: James Jessiman Memorial, https://ldraw.org/article/222.html

Recipients

  • 2001 - Steve Bliss
  • 2002 - not awarded
  • 2003 - Jacob Sparre Andersen
  • 2004 - Lars C. Hassing
  • 2005 - Michael Lachmann
  • 2006 - Orion Pobursky
  • 2007 - Kevin Clague
  • 2008 - Philippe Hurbain
  • 2009 - Tim Courtney
  • 2010 - not awarded
  • 2011 - Travis Cobbs
  • 2012 - Steffen Lohse
  • 2013 - Magnus Forsberg
  • 2014 - Sergio Reano
  • 2015 - Roland Melkert
  • 2016 - Nils Schmidt
  • 2017 - Chris Dee
  • 2018 - Michael 'Mike' Heidemann
  • 2019 - Gerald Lasser
  • 2020 - Lasse Deleuran
  • 2021 - Leonardo Zide[20][21][22], software engineer at Treyarch, author of LeoCAD (an open-source program for creatiing virtual Lego models with LDraw).
  • 2022 - Takeshi Takahashi
  • 2023 - Massimo Maso

See also

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. ^ "LDraw.org - LDraw File Format Specification". ldraw.org. Retrieved 2024-09-25.
  12. ^ "LDraw measuring tools". philohome.com. Retrieved 2024-09-25.
  13. ^ "LEGO Unit Converter". studs.sariel.pl. Retrieved 2024-09-25.
  14. ^ "The LEGO Brick". The BYU Design Review. 2019-12-18. Retrieved 2024-09-25.
  15. ^ Alphin, Tom. "LEGO figures in Scale models". BRICK ARCHITECT. Retrieved 2024-09-25.
  16. ^ Courtney, Bliss & Herrera 2003, p. 322.
  17. ^ Courtney, Bliss & Herrera 2003, pp. 152–153.
  18. ^ "James Jessiman Memorial Award". LDraw.org. Retrieved 2024-09-01.
  19. ^ "LDraw.org - James Jessiman Memorial". ldraw.org. Retrieved 2024-09-29.
  20. ^ "Meet Leonardo Zide". wiki.ldraw.org. Retrieved 2024-09-29.
  21. ^ "Scalable Ambient Obscurance". research.nvidia.com (Research). Retrieved 2024-09-30.
  22. ^ McGuire, Morgan; Mara, Michael; Luebke, David (2012-06-25). "Scalable ambient obscurance". Proceedings of the Fourth ACM SIGGRAPH / Eurographics conference on High-Performance Graphics. Eurographics Association. pp. 97–103. ISBN 978-3-905674-41-5. Retrieved 30 September 2024. We thank Naty Hoffman (Activision Studio Central), Leonardo Zide (Treyarch), and Louis Bavoil (NVIDIA) for their input on this paper and implementation, [...].

Further reading

  • Courtney, Tim; Bliss, Steve; Herrera, Ahui (2003). Virtual LEGO: The Official LDraw.Org guide to LDraw Tools for Windows. San Francisco: No Starch Press. ISBN 978-1-886411-94-4.
  • Clague, Kevin (2002). LEGO Software Power Tools: including LDraw, MLCad, and LPub. Rockland, Mass: Syngress. ISBN 978-1-931836-76-0.