Mmm, that is actually pretty much all the code involved in the rendering. I can point you to the main spots but it is a lot of code to look intonaruto123sdo wrote: ↑Sun Aug 01, 2021 5:11 pmI guess this will be the final step. Could you show me the code which explains how the camera takes material into consideration and combines "c" to determine the final pixel in the rendering result?Dade wrote: ↑Sun Aug 01, 2021 9:13 am It is the light received by the surface, what the camera sees depends by other factors like the material and orientation of the seen surface.
You need to multiply "c" for the dot product of the surface normal and shadow ray direction: this is the received light. Than you need to evaluate the material for the shadow ray direction and multiply for the incoming light computed before. This is what camera see.
Questions about projectors (spotlight with image)
Re: Questions about projectors (spotlight with image)
-
- Posts: 19
- Joined: Mon Jun 14, 2021 9:47 pm
Re: Questions about projectors (spotlight with image)
Oh, please go ahead to point out the main spots, and I will take time to read the code, thanks.Dade wrote: ↑Sun Aug 01, 2021 8:49 pmMmm, that is actually pretty much all the code involved in the rendering. I can point you to the main spots but it is a lot of code to look intonaruto123sdo wrote: ↑Sun Aug 01, 2021 5:11 pmI guess this will be the final step. Could you show me the code which explains how the camera takes material into consideration and combines "c" to determine the final pixel in the rendering result?Dade wrote: ↑Sun Aug 01, 2021 9:13 am It is the light received by the surface, what the camera sees depends by other factors like the material and orientation of the seen surface.
You need to multiply "c" for the dot product of the surface normal and shadow ray direction: this is the received light. Than you need to evaluate the material for the shadow ray direction and multiply for the incoming light computed before. This is what camera see.
Re: Questions about projectors (spotlight with image)
This is the PathTracer class and the RenderSample method is the one to compute a sample (follow the RenderEyeSample() path): https://github.com/LuxCoreRender/LuxCor ... r.cpp#L931
The sample is than splat on the Film (i.e. the image).
This is the implementation of the perspective camera: https://github.com/LuxCoreRender/LuxCor ... ective.cpp
The sample is than splat on the Film (i.e. the image).
This is the implementation of the perspective camera: https://github.com/LuxCoreRender/LuxCor ... ective.cpp