ITADN

Refine the spatial meaning of light data for slabs and such

#691Openkpreid 创建于 2025-10-20
kind: featurearea: graphicsarea: light
K
kpreidcommented
Consider the “slab” — a block half-solid, half-empty. As far as the light propagation algorithm is concerned, this is a block that obstructs 50% of all light, more or less, and thus it appears darkened in the center. <img width="512" height="515" alt="Image" src="https://github.com/user-attachments/assets/e7782276-e8d1-4ddb-9d8c-0b4af48ac609" /> However, it would be better to instead say that the light value for this cube describes only the transparent half, and thus incoming light is not at all occluded by the slab. Another use case is a thin or bumpy wall block which has empty space on two sides — in that case, we may not want any light to pass across the wall, meaning that the light value in the wall block itself is either not computed or used at all, or arbitrarily assigned to one side or the other. For simple cases like the slab, we can compute this decision automatically in block evaluation, based on the bounding box of the block’s all-opaque voxels. In general, it might make sense to allow user-defined hints as to the best way to treat light in a block. This decision will definitely affect light propagation, and in the thin wall case would have to also affect which light values are used in rendering. (Put light interpolation coefficients in the mesh vertices?) This might affect the solution to #338.
2 条评论