Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by SimFirehawk · Mar 19, 2015 at 12:01 AM · objectlightexclude

Exclude objects from lights

Is there a way, that I can exclude specific objects from lights (I know about layers, but for my problem it will not work).

I want to make a game, which is tile based. A user can define with an editor, different rooms, and doors on this tile based map. Afterwards he can add lights (torches) at the wall.

This is all runtime, so I cannot use baked lights.

I want to create for each torch at the wall a point light, with some range. This should light into the room and against the wall, but because of the light is close to the wall, this means if on the other side of the wall is also a room, then this floor will be lit too.

I could solve this with casting shadows by the point light, but this slows down the performance.

My plan was to just ignore all objects lit, which are on the opposite side of the wall (like a cutting plane).

Is this possible with unity?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SimFirehawk · Apr 08, 2015 at 11:22 AM 0
Share

still nobody has an idea, how to solve it?

1 Reply

· Add your reply
  • Sort: 
avatar image
3

Answer by dethtoll · Mar 19, 2015 at 04:03 AM

A quick Google search leads to the Unity documentation page for Light. The "Culling Mask" property sounds like it could meet your needs.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SimFirehawk · Mar 19, 2015 at 08:17 AM 1
Share

thank you for this information. Unfortunately for the culling mask I need layers, which are limited and therefore for a tiling map of 32x32 tiles, this would need 1024 layers. If I am right, unity does not support so many layers.

avatar image SuperUltraHyper · Aug 02, 2018 at 02:27 AM 1
Share

A quick Look at Culling $$anonymous$$ask reveals that it involves layers. Which the OP stated he didn't want to use.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Make a Lava Object Shiny 1 Answer

Light position 1 Answer

How to fix the light passes through the object 1 Answer

How to get a 'glow/highlight' effect on a object 1 Answer

how do you destory an object with light?? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges