Hello All! I want to create an FPS game environment where the player’s torch beam illuminates a different version of the blender scene they’re in. I have a couple of ideas on how it might be done but has anyone succeeded with anything like this before?
I want the light to illuminate ghostly figures that are only visible when the torch is pointed their way. I hope this is do-able.
I’ll experiment with it tonight and post if I get anywhere with it.
EDIT: I thought I might be able to do it with a duplicate torchlamp lighting up just the objects on another layer - but that won’t work.
This seems to be working! It took me a while to dissect what BPR had done to build his scene - but it works roughly how I want. It’s certainly useable despite some collision detection issues.
Once these guys are properly designed, mobile (animated) and have their audio (which you’ll be able to hear even when you can’t see them) they should be pretty scary.
At 22 seconds you can see the “scan” mechanic where you can see objects behind walls etc. This is done by using a clever node material and some Z-offset.
A simple setup that will make an object only appear in the torch beam is:
And it runs per-pixel, so even if the object is big, only what is in the torch beam will be revealed.
Well - that’s working, and it’s looking very promising too. I thought it would be nice to add some blood splatters to the walls using the same method. At first I tried duplicating the corridor meshes with alternate texture files but they didn’t show properly. So, I’ve changed tack and tried blood streaks on alpha’d PNG files on cards just in front of the corridor wall geometry.
As you can see, this isn’t working. I can’t stop the light from illuminating the poly card the blood splat is on. Any ideas?
in the nodes, you need to have your alpha card always effecting alpha, for the card, while the illumination needs to mix into that somehow in a manner that adds to the alpha of the blood only.
maybe have a mix node between( full transparent / card transparent blood show)based on if illuminated by lamp or not?