Difference between revisions of "Conditional Line"

From LDraw.org Wiki
Jump to navigation Jump to search
(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...")
 
 
(6 intermediate revisions by the same user not shown)
Line 6: Line 6:
  
 
This can be best seen at an example. See here a door with a curved hinge, which 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:
+
In the following image, the condlines have been suppressed:
  
 
[[Image:without conditional lines.png]]
 
[[Image:without conditional lines.png]]
  
You can see that such images look somewhat unsatisfactory. Enabling them in the render makes the picture much more beautiful:
+
You can see that such images look somewhat unsatisfactory.
 +
Enabling condlines in the render makes the picture more beautiful:
  
 
[[Image:with conditional lines.png]]
 
[[Image:with conditional lines.png]]
 +
 +
== Color for Condlines ==
 +
 +
Condlines should have usually have the default edge color 24,
 +
unless a very special other purpose requires using a very special different color.
  
 
== Other Benefits ==
 
== Other Benefits ==
Line 19: Line 25:
 
They also can be used for a second, not directly intuitive purpose:
 
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,
 
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.
+
and thereby use them to calculate normals over the whole surface, making the surface appear more smooth.
 
<!-- an example image would be nice here -->
 
<!-- an example image would be nice here -->
  
 
== Syntax ==
 
== Syntax ==
  
You can read more about the syntax (how to put condlines into your file)
+
You can read more about the syntax of condlines in an LDRAW file
at the LDRAW file format specification.
+
at the [[LDRAW file format specification]].
  
 
== Programs ==
 
== Programs ==
  
Adding conditional lines manually is too tedious.  
+
Adding conditional lines manually is tedious, and you most probably will make mistakes during that.
The easiest way to add them is using the program [[edger2]].
+
Using a program is much easier.
 +
Here is a list of programs which can add condlines for you:
 +
* [[Edger2]]
 +
 
 +
[[Category:LDraw Files Syntax]]

Latest revision as of 05:49, 2 April 2018

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. In the following image, the condlines have been suppressed:

Without conditional lines.png

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

With conditional lines.png

Color for Condlines

Condlines should have usually have the default edge color 24, unless a very special other purpose requires using a very special different color.

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 use them to calculate normals over the whole surface, making the surface appear more smooth.

Syntax

You can read more about the syntax of condlines in an LDRAW file at the LDRAW file format specification.

Programs

Adding conditional lines manually is tedious, and you most probably will make mistakes during that. Using a program is much easier. Here is a list of programs which can add condlines for you: