Sign in to follow this  
sumghai

Internal lights not blocked by props

Recommended Posts

I'm making a station crew module whose internal consists of a common galley area and four sleeping compartments, each of which will have their own independently-controlled light transforms. In other words, light from one zone should not spill into others if there is a wall panel or prop blocking the light.

However, I find that the door panel props aren't blocking the light coming from the galley:

vtS9SEq.png

I've tried using cube primitives with double-sided shadows to try and block the light, as well as playing around with shaders, but none of that seems to have worked.

Any ideas?

Share this post


Link to post
Share on other sites
Posted (edited)

What is the render queue for the light source and the props? perhaps it doesn't see them as an obstruction in that way?

 

Oh and that is a very pretty IVA!

Edited by steedcrugeon

Share this post


Link to post
Share on other sites
On 7/08/2017 at 11:52 PM, steedcrugeon said:

What is the render queue for the light source and the props?

Not sure what you mean, could you please elaborate?

On 7/08/2017 at 11:52 PM, steedcrugeon said:

perhaps it doesn't see them as an obstruction in that way?

According to various Unity forum threads:

- The prevalent solution seems to be to assign the objects you don't want to be lit to a different layer, then specify a culling mask for the light transform; however, in the context of KSP one cannot move IVAs or props outside of the Kerbal layer.

- There's also some discussion on vertex vs. pixel lighting. Apparently, pixel lighting would properly account for obstructions by meshes but are resource intensive, and so Unity games often put a limit on how many pixel lights you can have in a scene; any lights that go over the limit get turned into vertex lights, which are (AFAIK) computationally "cheaper" to render but do cause raycasts to pass right through objects.

Here's one of the more comprehensive threads on the subject, with varying (and sometimes conflicting) suggestions. I'm still trying to figure this out, so any help would be appreciated.

On 7/08/2017 at 11:52 PM, steedcrugeon said:

Oh and that is a very pretty IVA!

Thanks! It's still very bare-bones at the moment while I work on higher level functionality like cabin lighting, master-slave shutter control and emissives

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this