← All ideas

Shadow from the Sun in EEVEE with an HDRI included

On the Internet there exists a plugin that allows you to create a source of lighting in the form of the sun, from the brightest point in the picture, but because of this, the entire image becomes twice as brighter, since the light from this sun is folded with HDRi light... Безымянный.png

100%

Development Status: Open

Upvote 7 Downvote 0
keytwozero
22 Feb 2022

9 Comments

FreeMind

Seems impossible with a renderer such as Eevee. Only lights can cause shadows.

But that turned some gears: What if the HDRI is converted to a Sphere, made out of many light objects, which are colored by the HDRI texture? Hmm....

1
keytwozero Author

I also think about this. Developers can even make an option that will configure the number of such light objects

Shimoon

This is technically not possible with a rasterize engine like Eevee. Shadows are calculated from a defined light source (light objects) but they are only shadow map, so a re-projected, deformed, render of the scene onto itself. This is why you have to set a resolution to it, it is just a distorted image of your scene. Basically, lights in Eevee act like cameras.

So you can't just take the brightest pixel of an HDRi and light the scene from it like you would to in a path tracer engine like Cycles.

Actually, the Eevee rewrite project ( code.blender.org/2021/06/eevees-future/ ) include hardware ray-tracing so maybe that IBL could be supported for Eevee in the futur.

1
123blender123

The ealtime previewing engine of the other 3d software (I dont want to write 3D oftware name here, its name has something to do with Maximum) has that feature for HDRI shadows in its realtim engine. I think its still possible even though whatever method they will use. Some methods exist to make it possible. Its also added to eevee rewrite developer page to add that feature.

the51

Casting a realtime shadow based on IBL is absolutely possible.

There are methods to extract the direction of highest brightness from a IBL environment at real time, e.g. using spherical harmonics.

That vector is then used as a vector for a directional shadow pass. This shadowing would then need to be respected by the diffuse and specular IBL "ambient" lighting, no sorcery there.

The problems here is that it may require some "intensity" parameter that's not really physically based. Else you would get pitch black shadows since we effectively eliminate the ambient light that usually prevents them.

But it's such an specific case that only works decently for single-sun exterior IBL that I am not sure it will be a mainstream feature.

keytwozero Author

But this is not a realtime ...

Lauloque

This explains why it's not possible in a raster engine and how you can bypass it. As it's explained there and also @Shimoon 's answer, this can't happen unless other technologies are added, like raytracing. But even then, it would be very limited compared to an actual raytracing engine.