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

Looking for recommendations to Create a physically accurate sun #674

Open
Drosaca opened this issue Oct 18, 2024 · 4 comments
Open

Looking for recommendations to Create a physically accurate sun #674

Drosaca opened this issue Oct 18, 2024 · 4 comments

Comments

@Drosaca
Copy link

Drosaca commented Oct 18, 2024

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,

@gkjohnson
Copy link
Owner

Your best bet for getting some kind of realistic sun and sky effect is probably to use an environment map for lighting.

@Drosaca
Copy link
Author

Drosaca commented Oct 22, 2024

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?
Additionally, do you still believe that using a normal map would be the better approach here?
If this simulation doesn’t face any known limitations, I would greatly appreciate any suggestions on the types of objects or parameters that would help achieve the most realistic results.

@Drosaca
Copy link
Author

Drosaca commented Nov 15, 2024

I Tried with a physical spotlight and a sphere with emissivity set at 1 the spotlight is in the center of the sphere and all of this is positioned at 1 astronomical unit (in meters) with the real lumen value
which gives this
image
it's too bright even to see the colors
if I reduce the brigness by 10^4 it's better but not physically accurate
image

@gkjohnson
Copy link
Owner

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.

Additionally, do you still believe that using a normal map would be the better approach here?

I don't think a normal map would help with lighting here. Do you mean an environment map?

render an image that closely resembles what a real camera would capture
...
all of this is positioned at 1 astronomical unit (in meters) with the real lumen value which gives this

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 .colorMapping and .toneMapping settings).

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

2 participants