-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KHR_lights_area #1948
KHR_lights_area #1948
Conversation
| `width` | The centered width of the light along the X-axis. | :white_check_mark: Yes | | ||
| `height` | The centered height of the light along the Y-axis. | :white_check_mark: Yes | | ||
|
||
QUESTION: If an area light is scaled down by parent transforms, does it emit less light because it has less world space area? Currently this would be the behavior given the current definition. This seems intuitively like it makes sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about simplifying the object a bit, specifically:
- define an area light source as 1x1 square, set intensity relative to 1m2;
- remove
width
andheight
properties; - derive real-world size from node transforms?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct that one could do this, but in my experience every implementation I've see has width and height as explicit parameters:
http://playcanvas.github.io/#graphics/area-lights.html
https://docs.chaosgroup.com/display/VRAYNUKE/Rectangle+or+Area+Light+%7C+VRayLightRect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I see. My concern here is that this design makes it possible to represent the same light in infinite amount of ways by combining light's own dimensions with node transforms. Such flexibility should be thoroughly evaluated for a portable runtime transmission format.
On the other hand, if we can precisely specify how all these properties interact with each other, it might be better to keep them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I implemented it using a naming convention and I went for 1x1 + node transform.
In Playcanvas we decided to go with shape property, which can be specified for current Directional, Spot or Omni lights, and these are the shapes we support:
So it'd be great to make this extension more generic than only supporting rect area lights? example of some types: |
It increases the complexity a fair bit but disk and sphere are useful light types. Capsule is the other light area type that I know UE4 supports. |
@mvaligursky based on your feedback I have converted this from just a "rect" light extension to one that covers "sphere", "disk" and "rects." While this generalization makes sense, I do worry that it increases the implementation burden on 3D engines for supporting this extension, and thus may make it harder to get buy-in. But I think it is important to be responsive to feedback and to go with the decision-making flow of this group. |
We have a similar custom extension that we use in BRIO for functionalities in ray tracing. This spec would be really good to have a standardized approach. Only change I'd recommend here is to change the |
@kowsheek thanks for the support -- I've made that change! It is a good one. |
Started a survey here on whether to expand to sphere and disk based on @mvaligursky's suggestion: https://twitter.com/BenHouston3D/status/1368966602205630464 |
I don't think a sphere is an area light. It's a sphere light. Or a gaussian sphere light or whatever. Area must be flat. Or you're in for capsule too. I'd limit this to a few basic flat shapes. Polygonal or spheres and capsules and whatnot, could be obtained using a different extension lights_mesh and use a node that points to a mesh so the shape is free. |
Are there any updates on this ? @bhouston @donmccurdy |
I would love to push it forward! I think getting rect area lights in would be incredibly valuable to many different applications. |
Are there any news on this feature? Is there anything that prevents this from being pushed further? I'd love to help! |
Yes this would be really nice to have! |
Closing this for lack of interest for now. |
What is the community's "2024" thoughts on an area light extension? With @julienduroure fantastic glTF Blender exporter additions, glTF is a first-class citizen. |
Would be great to have when exporting from Blender to Unreal (or vice-versa), keeping those lights intact. |
here is a quick proposal for a rect area light (expanded to include sphere and circle per requests below.) This specification does not determine its implementation, just its specification and intended behavior.
Real-time rect area lights are though generally implementing using the 2016 SIGGRAPH LTC method described here: https://eheitzresearch.wordpress.com/415-2/
Three.js area light:
One extra thought: Maybe this should have been build upon the existing
KHR_lights_punctual
extension and just add another light type to it called "rect"?