Jump to content

Artifacts and Attenuation Issues with Omnidirectional Lighting


photo

Recommended Posts

I have been running into some visibility and artifact issues when using the Point Omnidirectional Light with both instantiating the light in the Editor and using C++. 

I am trying to mimic sunlight at a Solar System scale, and the Omnidirectional Light is required as the project needs accurate lighting. I have 1 unit equal to 1 km, and a basic scene with an Earth to scale at a distance of 150,000,000 km from the light source. 

I started in increments to try to find the correct parameters for the omnidirectional light. I started with the default Omnidirectional Light with the Mode set to Dynamic lighting, and an ObjectMeshDynamic Sphere of radius 1 at 2 units away from the Omnidirectional Light.  

Going off of the Light Sources Parameters Documentation, it gives the impression that setting the Attenuation Power to 0 or close to it will prevent the light fall off the further the distance from the source. It also gives the impression that any objects within the Attenuation Distance with an Attenuation Power at 0 will be illuminated. I slowly incremented the sphere's radius and distance from the light source until I reached the desired radius and distance. I had to set the Omnidirectional Light's Intensity to inf, Attenuation Power to 0, and Attenuation Distance to inf to get the best results. After about 200,000 units away from the light source, the sphere was no longer visible. 

I tried to experiment with the Omnidirectional Light with a Sphere Shape, and it did seem to light up the scene a bit better than the Point Shape. However, the light still did not reach the Sphere Object at its required distance. 

The only way I could get any Omnidirectional Light to reach the Sphere Object at its required distance was by setting the radius of the Omnidirectional Light Sphere Shape to inf. It produced the attached image with inconsistent artifacts. 

 

My question is if there is any way to have the Omnidirectional Light to light the scene at the required scale and distance? Or are there any settings that could allow for Omnidirectional Light to reach this distance? 

I know the World Light will reach these distances. However I need to use an Omnidirectional Light to represent the sun in a scene that models the solar system, and the World Light does not produce this desired effect. 

EarthModelSphereLightArtifacts.png

Link to comment

Hi!

Unfortunately, artifacts cannot be avoided working with such big distances. I would recommend to change the scale to a smaller side (e.g. 150 000 000 to 150 000 units), keeping the proportions. Then the light source will look more pleasant.

image.png

Link to comment

I was able to get the omnidirectional light to work.
It looks like I cannot set the needed intensity within the Editor, it needs to be through programming. I set the intensity to 10 quadrillion and it worked at a distance of 150,000,000.
The problem I am having now is the falloff. I assumed setting the attenuation power to 0 or close to 0 would prevent noticeable falloff, especially at these large distances. But even setting the power to 0 and the distance to 10 it is noticeable.
I think this is also causing shadow casting with the omnidirectional light not to work as intended.

Screenshot (226).png

Link to comment
×
×
  • Create New...