Spot light (both light and halo) shines through other objects

I’m trying to create a visible light source as part of a larger object.

I added a spotlight with halo to the details of this object so they emit light (and glow). The light however goes through all the other objects instead of stopping at the first object in their way and casting a shade.

The halos also seem to be on top of everything instead of hidden underneath the bigger object that is partly covering some light emiting objects.

I searched forum posts all over the internet but couldn’t find anything that does the job.

I searched forum posts all over the internet but couldn’t find anything that does the job.
Maybe the first job is to actually show people what your scene looks like rather than them having to decipher your text.

So the next job for you is to attach a screenshot showing what you currently have, also show exactly what you want to achieve and attach or post a link to a blend file that demonstrates the problem.

Hi

You will need to enable the ‘buffer shadow’ option for the effect you are looking for. This will not only allow shadows in the light, but also shadows in the halo.

Better yet, if you have the CPU power, you can instead use a mix of raytraced shadows and a volumetric object. It will take a bit longer, but it will work with more options.

The image below basically illustrates the problem.

In this case there’s a spotlight inside the box, but it shines all the way through the box, onto the wall at the back and even going through that, hitting the plane and casting a light there too (probably going through the plane). The halo also goes throughout the box and seems to be lying on top of the box instead of on the inside (like you can see at the source of the light on the right)

Here’s the blend file: example2.blend (594 KB)


Here’s the blend file: example2.blend (594 KB)