Laser beam sweep objects and disappear behind them?

You know, when a laser beam sweeps solid objects, it obviously disappears behind those objects, or rather the light is stopped by those objects. Unlike in this picture where it just goes through (I used a simple subdivided edge with halo material for this example).


I used a boolean modifier with a big cube to cut off the laser beam in previous animations but that is a ridiculously cumbersome technique. What would be a better way?

Attachments


If the laser is a simple subdivided edge with a halo material, why not make the edge shorter?

That is indeed an option. However, when I tried doing this the last time (with a cylinder and an emit material instead of an edge with an halo), some problem arose: Probably because of imprecise calculation (no computer can calculate infinite numbers) the object was not scaled perfectly along its normal and therefore deformed. Maybe a bit difficult to explain.

I’ll try this with an edge and see if it works. However, if there is a more “automated” approach, I would still be grateful to hear about it.

It’s been sometime since I did anything like this… and it was in a different software… (XSI)… but I believe that this may be easiest to accomplish in the compositor… by separating out and rendering in layers… not really sure how to do it in Blender frankly… but perhaps if you started a thread in the compositing area someone might come with a quick compositing solution…