Click or drag to resize
AB4D logo

LinesUpdaterIsEmissiveMaterialUsed Property

Gets or sets a bool that specifies if EmissiveMaterial is used to display the lines. The default value is true.

Namespace: Ab3d.Utilities
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax
C#
public bool IsEmissiveMaterialUsed { get; set; }

Property Value

Boolean
Remarks

If IsEmissiveMaterialUsed is true the lines are self illuminated regardless of the lights on the scene. In this case the following code is used to create a Material:

C#
lineMaterial = new MaterialGroup();
lineMaterial.Children.Add(new DiffuseMaterial(Brushes.Black));
lineMaterial.Children.Add(new EmissiveMaterial(new SolidColorBrush(lineColor)));

If the lines should be illuminated only by the Light, the IsEmissiveMaterialUsed can be set to false.

Another case when the IsEmissiveMaterialUsed can be set to false is to prevent some undesired color effects when two 3D lines overlap.

This can occur because when EmissiveMaterial is used the final color of the overlapping 3D points are calculated with adding the colors of the individual 3D points. For example if two orange 3D lines overlap, the overlapping colors will be yellow.

The problem is probably caused by the GPU. Strange thing is that this problem only occur on some of the colors, but not on others (for example Red and White do not have such problems).

The best way to prevent this problem is to define the 3D lines so, that they are not overlapping. Another solution is to try to find another color that do not have the problems.

If the problem cannot be prevented, set the IsEmissiveMaterialUsed to false. In this case the lines will not be self illuminated any more, so you need to provide lights that will illuminate the lines.

Note  Note
When the IsEmissiveMaterialUsed is changed, the already drawn lines will not be updated. So you need to set IsEmissiveMaterialUsed before creating the lines.
See Also