Conditional Line

From LDraw.org Wiki
Revision as of 09:39, 2 April 2018 by Steffen (talk | contribs) (Created page with "A '''conditional line''' (sometimes abbreviated as '''condline''') is an edge line contained in an LDRAW file which is not always displayed, but only under certain view angles...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A conditional line (sometimes abbreviated as condline) is an edge line contained in an LDRAW file which is not always displayed, but only under certain view angles.

The purpose of that is to make rendered instructions look good in the case where a curved surface disappears out of the viewer's view.

This can be best seen at an example. See here a door with a curved hinge, which disappears out of the viewer's view. Here is an image rendered where the conditional lines have been temporarily removed from the render:

You can see that such images look somewhat unsatisfactory. Enabling them in the render makes the picture much more beautiful:

Other Benefits

Condlines not only can improve the look of edge lines in an instruction image. They also can be used for a second, not directly intuitive purpose: When rendering programs calculate normals of curved surfaces, they can use the condlines as a hint for the "curvature" of that surface, and thereby make it appear more smooth in a render.

Syntax

You can read more about the syntax (how to put condlines into your file) at the LDRAW file format specification.

Programs

Adding conditional lines manually is too tedious. The easiest way to add them is using the program edger2.