Trying to Reproduce a light source Lara Croft Go in Unity

950 Views Asked by At

I want to have a light that projects onto multiple planes of my level geometry, to mimic the effect in this video: http://youtube.com/watch?v=vujrxOmh8Jc

I attempted to recreate it with a point light, like this: unity light with custom attenuation

But mine only projects on the the flat plane, instead of on the perpendicular plane like in the Lara Croft Go game: enter image description here

Any thoughts on what I am doing wrong are appreciated.

2

There are 2 best solutions below

2
On

Edit

Based on the video sample, it looks like a spotlight that is positioned screen down and to the right of the character, such that it casts on the exposed faces of the level geometry. This works because of the fixed angle of the camera.

So, instead of a point light following around the character, put a spotlight above them and the right of the camera which moves with the character (a null object may help here).

--Original

That looks like ambient light on the vertical plane in the reference image. I don't know how it would be possible with a point light since the light would be blocked by the flat geometry and thus cast a shadow just like your sphere is doing.

You can use ambient light to make that plane visible or setup a 'sun' light using a directional light. If you only want specific parts of the scene to light up you can use area lights in those parts of the map or additional point lights that are fixed.

0
On

There seems to be a custom lighting on the "point lights": using a ramp to define the falloff, and they might be computed entirely in the shader without relying on unity lights at all : There are instances of multiple lights blending together properly when overlapping (one on Lara and one on the point of interest for example), without adding together, but rather as a max() function.

The shadows are not correlated to Lara's position or parallax. Shadows on the environment never move, but they affect everything, which hints at shadow mapping rather than projectors.

A prepass might be computing the shadows from a directional, and the result modulates the shading of the point lights (and not a spot like suggested, since spot still have a position, shadows would move). There is one notable exception : Lara's shadow itself seems to change direction when she climbs on walls, while levers' shadows don't move at the same time. None of those have multiplication or addition issues like projectors, hinting at a prepass that generate a "shadow mask" blending both directional shadows with a "per tile oriented" projector for Lara. This mask is then modulating the lighting, which is added on top of ambient (which is not flat, probably the triband) and then modified by the fog.

All speculation of course :)