When using the ray tracing primary rays debug mode, there is a lighting artifact based on camera height.
I was wondering if anyone knows what causes this? I am using a modified engine using only ray tracing, and I am trying to resolve this lighting problem. It doesn’t occur when the full pipeline is applied, only when primary rays is used - it could possibly be something in the material applied to the terrain.
To recreate, simply load in any terrain from cesium in a blank level
and select view mode → ray tracing debug → ray tracing primary rays.
Then, move around the scene, and you should encounter the following:
As you can see, as the camera lowers the lighting artifact appears, and it follows the camera when you move left and right.
Hello,
Thanks for getting in touch, I haven’t seen this problem before. Unfortunately, I’m not able to reproduce it - I don’t have the Ray Tracing Debug view mode available.
If possible, could you tell me more about your use case for rendering with ray tracing only? That can help us shape our roadmap going forward, and may also shed some light on the cause of the issue.
Hi @agallegos, thanks for your reply!
Are you sure the ray tracing debug view mode is unavailable to you? It will be much easier to resolve this issue if you are able to reproduce it. It comes stock with the engine and can be accessed in the editor here, as long as ray tracing is enabled in the project.
1 Like
Thanks @Colton_Neal_Smith, I gave this a try and have been able to reproduce the problem. I’m seeing similar behavior in Unreal in general, even without the Cesium for Unreal plugin enabled (e.g., when using a Landscape in Unreal or just putting down a plane):
Does this happen for you as well?
It might be some kind of culling being performed by the debug view mode. I’ve sent a question to Epic and hope to be able to follow up with you soon.
1 Like
I can confirm this happens for me as well, with cesium disabled and just a standard plane. There must be something in the rasterization passes that accounts for this, and our engine does not apply them so the final output looks like the ray tracing debug.
Not a cesium problem at all! I just need to figure out why this occurs somehow and change the way the culling is applied.
Thanks for your help!
Happy to help! cc the question on UDN for cross-referencing purposes
Update: I believe this is caused by the way light culling is calculated for ray tracing, specifically in the following compute shader:
GenerateCulledLightListCS.ush
When hard coding the “max” value in this shader, the lighting no longer pops in and out.