-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Looking for recommendations to Create a physically accurate sun #674
Comments
Your best bet for getting some kind of realistic sun and sky effect is probably to use an environment map for lighting. |
My goal is to simulate sunlight hitting a distant object from various angles in space and render an image that closely resembles what a real camera would capture when pointing at the dark night sky. Initially, I was considering creating the sun either as an object that emits light or as an invisible light source to simplify its positioning relative to the object . Do you think this path tracer can handle such a simulation? |
Sorry for the delay in response - generally I would still recommend something like an environment map that has data encoded in a known unit for this use case. Punctual lights (like directional lights, spot lights, point lights) are difficult to model and not realistic representations of light sources, though at far ranges the sun is often modeled as a directional light.
I don't think a normal map would help with lighting here. Do you mean an environment map?
There's a lot that's involved in modeling what a real camera would capture, I think, including lens distortion, etc, which isn't directly supported in the project. But I believe the primary piece that's missing here in terms of displayed light intensity would be tone mapping and color mapping - which will map the light intensities captured by the virtual (or real) sensor to a displayable color range. You should be able to adjust both those fields on the WebGLRenderer (see the |
No worries thanks for your time :). This solution will turn the positioning of the sun more difficult but it could work. As I'm looking for the sun in space It's quite difficult to find an image like that online, by any chance do you know how I could create that kind of environment map or know a good tutorial that could help ?
the
So the PhysicalSpotLight is not realistic ? Maybe this explains some unexpected results I got. Indeed I was wondering why when I rescaled my simulation by reducing distance between objects and turning them smaller, the objects became overexposed. This should not be the case since the unit for light power is expressed in lumen my objects being smaller shoud receive less light and thus keep the same luminosity or maybe i missed something?
yes environment map sry |
I don't have a good tutorial on hand but generally you can render a scene with a sun etc object in the right position and then use that cubemap as the environment map for lighting.
Sorry! Yes I meant
The fact that a spot light terminates at a single point makes it not very realistic. There are some properties to improve this (setting the radius) but it makes it behave a little more like an area light. I want to be clear that this project isn't designed to be a rigorous lighting simulation tool for something like engineering use cases. The formulas used based on those commonly used in modern rendering as far as I understand but it hasn't be tested rigorously to ensure light preserving properties, correct light transfer, etc - in fact there are known issues. This is primarily a library for rendering things using path tracing to the end that they look physically plausible. Regarding the scaling of objects changing the apparent exposure - I'd have to revisit some of the code in the project to remind myself of how some of these lights are behaving with scale but unfortunately I don't recall at the moment and don't have a ton of extra time at the moment to dig in. |
Hi, I' m trying to create the sun in space (as a light emitting object if it's feasible) with a light source as physically accurate as possible.
I was wondering if someone has any recommendations on which kind of light sources I shoud use (AreaLight or PhysicalSpotLight) and which values I should tweak to get the best result.
thanks,
The text was updated successfully, but these errors were encountered: