Phil 1.2.2022

Happy New Year everyone! It’s been warm here in the Baltimore region. Working on terrain visualization.

Got lighting working. You attach the lighting node to the node you want it to move with and then set it to the node you want to light. Here’s the code:

def add_directional_light(self, name:str, root_node:NodePath,   target_node:NodePath, color:Tuple = (1,1,1,1)) -> NodePath:
    dlight = DirectionalLight(name)
    dlnp = root_node.attachNewNode(dlight)
    self.light_dict[name] = dlnp
    return dlnp

I also added grid lines to emphasize the contours of the terrain. I’m liking the overall look:

The last thing I want to do is extent the terrain beyond the nodes so that everything rises from a flat surface