Skip to content

Render local lights in order of distance from *camera cursor*, not camera #54

@kiss-spicoli

Description

@kiss-spicoli

Hi William :)

Current local light rendering is done for lights nearest to the camera, in order by distance, up to the RenderLocalLightCount.

This has a set of disadvantages, e.g.

  • the lighting on the subject can change when moving the camera (with Count < the number of lights in range),
  • the lights near the subject are not necessarily lit,
  • etc.

Imagine filming with the lights on the camera, not the subject. Just ... no :)

When the user picks the subject using Alt/Point/Left-Mouse/drag.., the lights nearest that point are the ones to prefer.
The current list and sort order code is retained, but the sort key should be a distance_from_camera_cursor, not distance_from_camera*. May require the continuity of any other code using the existing sort? -- if so a new sort switch should be added, old by default, and apply prior to evaluating mNearbyLights.

* my labels for the purposes here, not labels looked up in code.

Ref: https://github.com/ApertureViewer/Aperture-Viewer/wiki/Second-Life-Lighting-System#:~:text=Initial%20Candidate%20Selection%20(pipeline.cpp%3A%3AcalcNearbyLights)
LL: https://feedback.secondlife.com/feature-requests/p/render-local-lights-in-order-of-distance-from-camera-cursor-not-camera

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions