Skip to content
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

Option for light brightness to be proportional to amount of visual sphere the light occupies #61

Open
henryseg opened this issue Jan 2, 2019 · 1 comment

Comments

@henryseg
Copy link
Collaborator

henryseg commented Jan 2, 2019

With this, lights would all have non-zero size, so no point lights. The brightness of a light as seen from a point p would be how much of the sphere of geodesic rays starting at p hit the light. This removes infinities coming from the inverse linear, quadratic, etc. models. Done simply, this just involves working out a different function for brightness based on distance from the light, which now also depends on the radius of the light.

@henryseg
Copy link
Collaborator Author

henryseg commented Jan 9, 2019

For a light of radius r that we are distance d away from, the fraction of our sky that is filled with the light is:

1 if d <= r. Otherwise:
In spherical space: 1 - sqrt(1 - sin(r)^2/sin(d)^2)
In euclidean space: 1 - sqrt(1 - r^2/d^2)
In hyperbolic space: 1 - sqrt(1 - sinh(r)^2/sinh(d)^2)

These will look similar to the "physical" model we have already at large distances, but should hopefully work better closeup. Maybe it would be good to try having one light be a really large "sun" some distance away?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant