Skip to content

Configurable light direction for polyhedra shading #49

@bjmorgan

Description

@bjmorgan

Polyhedra shading currently uses a fixed light direction along the viewing axis (camera position). The Lambertian shading formula computes cos_angle = abs(normal[2] / norm_len), so faces pointing at the viewer are brightest and edge-on faces are dimmed.

This works well for tilted views but gives nearly uniform shading when looking straight down a layer of octahedra, since all visible faces have similar angles to the viewer.

A configurable light direction (independent of the camera) would allow shading to be visible from any viewing angle. For example, a light from the top-left would give clear face brightness variation even in a top-down view.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions