Jump to content

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?

Link to comment
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

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...