TzuChieh / Photon-v2

A program that takes photographs of a virtual world.
https://tzuchieh.github.io/Photon-v2-site/engine_docs/v2.0.0-beta/Photon/html/index.html
MIT License
84 stars 5 forks source link

A more general `PLatLongEnvSphere` #90

Closed TzuChieh closed 6 months ago

TzuChieh commented 7 months ago

Move some of the geometry hacks in LatLongEnvEmitter as helper methods in PLatLongEnvSphere. PLatLongEnvSphere should stay general & low-level so more environment emitter can depend on it in the future.

Some helper methods of PLatLongEnvSphere can generate hit event.

This should be done before starting the update:

TzuChieh commented 7 months ago

Additional issues found in the process:

TzuChieh commented 7 months ago

I always thought my environment light implementation is slightly off--the noise level just doesn't seem right (just a feeling). Now I think there is actually something wrong: the environment sphere is being modified to have a finite size in an update, and the PDF should not depend on its direction only. Where is the pdfA -> pdfW cosine term? Oh my god....

The default size of the environment sphere is quite large though (> 1km, most cosine terms should be ~1; nevertheless, this is an error).

TzuChieh commented 6 months ago

Should be corrected at this point 95805a3.