Studs with Logos

From Wiki
Revision as of 19:20, 9 June 2019 by Steffen (talk | contribs)
Jump to navigation Jump to search

This page explains the possible options you have to modify the appearance of studs with logos in rendering software.

Studs we refer to on this page are the top connectors on for example the standard 2 x 4 Brick. Bottom connectors are also called studs but not topic of this page. The LDRAW Library contains a default implementation for a top stud, which can be found in file stud.dat and is of course a primitive. Depending on your rendering configuration, it could look like this in LDView:


To speedup renderings in editors for parts and scenes, that default implementation (currently) does not include a logo, opposed to what can be seen on real parts.

However, when doing high-quality renders, when creating building instructions, or even during normal part and scene editing, a logo could be desired. For example, to some people (this includes me, the author of these lines), a Lego brick is not a real Lego brick if the top studs have no logo.


The opposite is the case if rendering or processing time shall be saved: in such a case it can be desired to only use a simplified stud (less polygons), or even a stronger simplified stud (just "mimicked" by a single, simple line), or even leave out all studs completely.

For doing these replacements of studs, 2 options exist:

Options for Stud Replacement

Replacement by Editing/Rendering Software at Runtime

Software which renders a part can easily identify studs at runtime, simply by their filename as a primitive: stud.dat. The software might then substitute that by anything it wants, see the following examples:

LDView can substitute studs by native OpenGL cylinders instead of polygons, plus an optional OpenGL logo texture on top:


LDView also can substitute studs by a simplified version with less polygons:


Both things can be configured in LDView's preferences.

During export to POVRay, LDView can also substitute studs by a native POVRay objects implementation:

POVRay Studs exported from LDView.png

MLCad can substitute studs by a coarse version with less polygons, or minimize them to just single lines:

MLCad Normal.png MLCad Coarse.png MLCad Lines.png

Replacement Directly in the LDRAW Library

Replacing the contents of file stud.dat with something else of course also is possible locally in the filesystem.

Support by the LDRAW Library

The LDRAW Library supports both solutions described above. It not only delivers the default stud implementation inside file stud.dat, but additionally delivers implementation variants, which provide the logo implementation in differing detail levels:

stud-logo.dat: Stud-logo.png

stud-logo2.dat: Stud-logo2.png

stud-logo3.dat: Stud-logo3.png

stud-logo4.dat: Stud-logo4.png

stud-logo5.dat: Stud-logo5.png

Additionally, another variant with high contrast is provided, which displays a stud as it can be frequently seen in official LEGO instructions:

stud-high-contrast.dat: Stud-high-contrast.png

Usage of the Variants

You could use a software which can switch between using stud.dat or one of the variants above. At the time of this writing, no such software exists yet, because the stud variants are not official yet.

Until that becomes possible, a current method for changing the stud appearance is modifying the contents of file stud.dat with a simple text editor so that it uses one of the implementations above.

Here is an example, the file contents has been simplified (history headers left out etc.) to more clearly show the change:


0 Stud
0 Name: stud.dat
0 Author: James Jessiman
0 !LDRAW_ORG Official_Primitive
0 !LICENSE Redistributable under CCAL version 2.0 : see CAreadme.txt


1 16 0 -4 0 6 0 0 0 4 0 0 0 6 4-4cylc.dat


0 Stud
0 Name: stud.dat
0 Author: James Jessiman
0 !LDRAW_ORG Official_Primitive
0 !LICENSE Redistributable under CCAL version 2.0 : see CAreadme.txt


0 // 1 16 0 -4 0 6 0 0 0 4 0 0 0 6 4-4cylc.dat
1 16 0 0 0 1 0 0 0 1 0 0 0 1 stud-logo.dat