light source - Printable Version
+- AB4D Forum (https://forum.ab4d.com)
+-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4)
+--- Forum: Ab3d.PowerToys (https://forum.ab4d.com/forumdisplay.php?fid=9)
+--- Thread: light source (/showthread.php?tid=4201)
light source - Radu Iordanescu - 06-24-2020
I have a question regarding the light source,
If in a model there are multiple 3D objects, they all seem to have their own light source. (See attached image as an example)
Is there any way to have a unique light source?
RE: light source - abenedik - 06-24-2020
Objects do not have their own light sources. The light sources are defined with adding DirectionalLight, PointLight or SpotLight to the scene. A light source can be also added by the camera when ShowLight is set to Auto (and there is no other light) or Always.
From what I see in the image, I would say that the upper right position that seems dark is shared with multiple triangles - when calculating normal (the direction of the triangles that is used to calculate the light factor) this average the normal direction (average of the direction off all shared triangles). To create sharp edges and uniform coloring along the triangle, you should duplicate positions so that each triangle have its own positions and no position is shared with other triangles. Sharing positions is used for smooth surfaces where there are no edges between triangles.
I would advise you to use the MeshInspectorOverlay (see samples in Ab3d.PowerToys / Utilities).