Hello, I am trying to figure out how I can bring my light into another shape.
What I mean with this is if I am able to to “cut” off the emitted light of a Point-,Spot-, or SurfaceLight somhow.
In my case, I am trying to create a realistic car game, and I especially want to have realistic headlights on my vehicles. (If you don’t know, car lights are set pretty low to not blend other passing drivers.)
Example :
If you know what I mean, can someone help me how I could be able to set the lightning like that?
No, that is not what I need, the SpotLight just emits light which is as high as wide. I need it to cut off, like in the picture above. So that it is cuts off as a straight line.
Beams would only cast well, a beam. I don’t think it would cast any type of dynamic lighting like Spot, Point, and Surface would.
I believe OP is trying to say they want a dynamic light that can be modified in a way that it casts a shape. In their case, they want it to be a horizontally-elongated light, with very little height.
I would suggest using a SurfaceLight on a thin part that’s transparent, but wider than the car, and have the light face forward or on whatever face the invisible part. This way, it’s somewhat a ‘long light’.
Hello! I know this was 4 years ago and I’m super late to this, but after looking at a way to do this for a long time I found a way, and I thought I’d share it here just in case someone else needs it, or perhaps you still do!
If you use Future lighting, your light can respect and cast shadows for obstructing objects. In my case, I used very specific attachment alignments previously, but you can also just do it with regular pointlights. If you put a part in front of the light, it will cast a shadow, and you can replicate that shape by just aligning parts or wedges in front of the light itself for it to cast that shadow. However, we don’t really want that part(s) to be seen by the player since it looks pretty goofy.
Unfortunately, parts can no longer cast shadows when their Transparency property is set to 1 (invisible). So, how do we make an invisible part cast a shadow?
It’s actually as easy as setting your part’s Transparency property to math.huge. You’ll notice that after doing this, your part will still not cast a shadow, however, you can add a Highlight to the parent part and it’ll automatically cast a shadow, even if completely invisible!
Then, you can use your creative mind to make the shape with visible parts, and end up with the shape that you’re looking for, as I achieved myself. This is how the first result looked like.