Is there a way to make certain lights affect certain nodes and only that node? if not, how could I possibly draw Lines with lineSeg in a Dark scene and have them look for example really bright green, independent from the current lighting of the scene.
For more context: i want to display the Earth, lit by a D-Light as the sun and then display orbit paths, groundstations and satellites as lines and points with constant color around the earth.
Or, approaching it from the converse, you could apply the light to just the Earth by calling “setLight” from the Earth’s NodePath instead of render. (I’m not sure offhand of whether it’s important that the light be parented below the Earth instead of render, too.)
However, if you have other objects that are to be lit, and your line-segments all have a common ancestor-node that isn’t also an ancestor of the objects to be lit, then serega-kkz’s solution is likely the simpler.
basically the ambientlight is just applied to the line_np. For others coming across: line_np is the lineSeg nodepath and its glowing green now, while preserving the scenes light settings for the earth.