Light tree: orientation cone of a reverse-sided light points the wrong way

Đang mở Phù hợp với người mới
#332 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
76/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
computer-graphics

Hướng nghiên cứu

Bắt đầu với LightTreeCone(const Light*) trong lib/rendering/pbr/light/LightTreeUtil.h và kiểm tra cách trục hình nón được suy ra cho các đèn hướng ngược. Tái hiện bằng tám DiskLight trong issue, spread 0.5, cùng phương pháp lấy mẫu ánh sáng thích ứng và đồng đều; hoàn tất khi tỷ lệ đèn hướng ngược không còn cho thấy mức suy giảm 4% đã được báo cáo, còn các trường hợp hướng thông thường và độ tỏa rộng hơn vẫn không bị ảnh hưởng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Summary. With adaptive light sampling, reverse-sided lights with a spread below 1 are under-selected: the image is about 4% too dark, and BSDF samples do not compensate. Version 2026.29.1, scalar mode.

Reproduce. Eight DiskLights (radius 0.2, spread 0.5) facing down onto a diffuse floor, max_depth 1, light samples only. Ratio of light_sampling_mode adaptive to uniform:

lights adaptive / uniform
sidedness reverse 0.9558
the same lights with regular sidedness (rotated instead) 0.9998
reverse, with bsdf_samples on too 0.9559

With spread 0.8 or 1 there is no loss.

Cause. LightTreeCone(const Light*) (lib/rendering/pbr/light/LightTreeUtil.h) takes the cone axis from light->getDirection(0), the local +z, for every light. A light with sidedness reverse emits toward -z, so with a spread below 1 the tree's orientation bound excludes directions the light does emit into, and the importance of the light is underestimated.

Fix (untested). Use -getDirection() as the cone axis for reverse-sided lights (two-sided lights already set mTwoSided).

Ngôn ngữ chính
CMake
Star
4.7k
Fork
321
Merge trung bình
13 phút
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của OpenMoonRay/openmoonray

Tất cả issue của OpenMoonRay/openmoonray

Issue tương tự

Thêm issue về Computer Graphics

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.