Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 snowinrain · Jun 28, 2018 at 02:29 AM · lightingshaders

[3D] How to make lighting doesn't affect on character ?

As title, I want lighting on my character won't change no matter where the character is (outdoor, under tree shadow, dark scene or even without any light in scene). Up till now, there are 2 solutions I found:

1) Self-illumination shader. Let's say my character has 4 parts (head,body,legs, hands) with outfits, do I need set this shader to all of them (body parts + Outfits) ?

2) Culling Mask in lighting component + Layer. I added lighting to my character, set Culling Mask for other lighting in scene. Is it right ?

Which one is better and easier to implement in my situation ? Or any better solution ?

Thanks in advanced

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 Harinezumi · Jun 28, 2018 at 07:27 AM 0
Share

For lighting an object the same way all the time, I would put the object on its specific layer, then add its own light(s) and set the lights' culling mask to only affect this specific layer. Then make sure that all other lights that shouldn't affect this object don't have this layer in their culling mask.

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by BeytullahUnal · Jun 28, 2018 at 09:26 AM

Depends on the type of lighting you want to achieve, I'd say.

Using an Unlit Texture shader will keep your character textures "illuminated" or rather, colored and not get affected by lighting on the scene. This, however, also means that there won't be shadows at all unless the shadows are drawn into the texture itself. And it will stay like whatever it looks like, always. And yes you need to set this shader for every material your character has. Clothes, body, weapons etc etc.

Culling mask + layering option will give you more room for customizing the type of lighting you want on your character. Like a shadow from character's hat dropping on character's face. Or changing the lighting on your character based on the area it is in etc. You can set a dedicated Light only for your character and then play with it's intensity, direction, color etc to your liking throughout the game. This 'may' be achievable with custom shaders but I'm not familiar with them so I can't suggest anything on that end.

Comment
Add comment · 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
0

Answer by AlejandroBoss10 · Jun 28, 2018 at 02:52 AM

You could use an unlit shader or material so that no matter if there is light or not it will remain the same color.

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 snowinrain · Jun 28, 2018 at 06:14 AM 0
Share

Do I need to apply this shader/material to all outfits and body parts ?

avatar image Harinezumi snowinrain · Jun 28, 2018 at 07:25 AM 0
Share

Yes, you would need to apply it to any parts that you want to be lit the same way (it's logical, if you think about it).

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

124 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Simple way to retain standard lighting model when using custom vertex/fragment shader? 1 Answer

How to illuminate sprite's back and front face but display result of lighting only on the front face? 0 Answers

Best way to light grass? 0 Answers

How can I unclamp light intensity? 1 Answer

Extending the Light Class to select Shadow Colour 0 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