Studs with Logos: Difference between revisions

From LDraw.org Wiki
Jump to navigation Jump to search
No edit summary
Line 7: Line 7:
It can be seen here:
It can be seen here:


[[Image:stud-default.png|300px]]
[[Image:stud-default.png]]


To speedup renderings in editors for parts and scenes, that default implementation
To speedup renderings in editors for parts and scenes, that default implementation
Line 17: Line 17:
a Lego brick is not a real Lego brick if the top studs have no logo.
a Lego brick is not a real Lego brick if the top studs have no logo.


[[Image:stud-logo.png|300px]]
[[Image:stud-logo.png]]


The opposite is the case if rendering or processing time shall be saved: in such a case
The opposite is the case if rendering or processing time shall be saved: in such a case

Revision as of 19:03, 9 June 2019

WORK IN PROGRESS


Studs are the top connectors on for example the standard 2 x 4 Brick. The LDRAW Library contains a default implementation for that, which can be found in file stud.dat, which is of course a primitive. It can be seen here:

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

Editing software easily can identify studs at runtime, simply by their filename as a primitive: stud.dat. The software might then substitute that by anything it wants. Here some 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.

  • MLCad can substitute studs by a single vertical line:

image

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 stud.dat, but additionally implementation variants

  • stud-logo.dat
  • stud-logo2.dat
  • stud-logo3.dat
  • stud-logo4.dat
  • stud-logo5.dat

Each variant provides a logo, in differing levels of detail.

Additionally, a variant

  • stud-high-contrast.dat

is available, which displays a stud as it can be frequently seen in official LEGO instructions.

Here you can see the different variants in comparison:

images

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. This therefore is a scenario for the future. Similar to LDView and MLCad as shown above, software in future might toggle between the different stud implementations offered in the LDRAW library.

Until that is possible, the current solution to use the stud variants is that you modify your library locally in the filesystem. The change is quite simple: you just need to do this: choose the variant you want to use, for example stud-logo.dat. Open the official file stud.dat in some text editor, and comment-out (deactivate) its default implementation, and comment-in (activate) the implementation you want. Example:

Before:

xxx

After:

xxx