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 psdev · Jul 11, 2011 at 05:50 AM · materiallightsurface

Can I have a light affect only one material?

Some 3D rendering apps have checkboxes to allow you to say whether a particular light source affects a particular surface.

Is there any way I can do this with a material in Unity? I would like to have a spot light that only affects say the character's clothing and not his face or hair or anything else.

Is this easily possible?

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 psdev · Jul 11, 2011 at 11:18 PM 0
Share

Layers don't work for this do they? As I want one material of several on a single gameobject (character) to be affected by the light and the rest to ignore it.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by GuyTidhar · Jul 11, 2011 at 06:06 AM

Look for "CullingMask" field in your light component.

There you can choose which layers are effected by the light.

To set the layer check out this:

http://unity3d.com/support/documentation/Components/Layers.html

Comment
Add comment · Show 1 · 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 psdev · Jul 11, 2011 at 06:32 AM 0
Share

Thanks, appreciate the reply and I just read it, but is this on a per GameObject basis only? If I have a character which is a parented hierarchy of bones and an FBX skinned mesh render which the 1 mesh contains all of the different materials: hair, skin, dress etc. Can I assign JUST the dress material to the Layer? or does that apply to the WHOLE gameobject - and thus all the materials on my character?

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Specularity Material Problem 0 Answers

Directional Light Sun Sprite Reflecting Incorrectly in Translucent Shader (Shader Forge) 1 Answer

Glowing column of light 1 Answer

Weird shine (gloss?) when far from object 0 Answers

How could I access light direction in a surface shader? 1 Answer


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