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
1
Question by Hamesh81 · Dec 06, 2013 at 06:05 AM · shadertexturecombineblendgreyscale

How can I combine a color texture with a b&w texture and get color?

alt text

The picture above shows exactly what I'm trying to do. Basically I'm working on a skin shader and have one color texture for the skin, and over the top of that am applying a black and white detail texture. I then need these two to combine/blend similar to how the Photoshop Luminance or Soft Light blend modes work, to give the third pic below. So the first texture is darkened by the greys and blacks of the second, but the color of the first texture is preserved, if that makes sense. All whites are ignored. This is also similar to what the builtin Diffuse Detail shader does except it would need to work with transparency as well.

At the moment I'm getting this by changing the color of the second texture. This is NOT practical because for many skin tones a color would have to be selected manually each time. I have looked at and taken apart many different shaders but I still can't get close to this. Any ideas how I could do it?

shader.jpg (109.1 kB)
Comment
Add comment
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

2 Replies

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

Answer by Hamesh81 · Dec 06, 2013 at 12:15 PM

I worked it out! Once you setup the two textures to be layered over the top of the other (see the builtin in Decal shader if you don't know how), for the greyscale texture you simply multiple it by the color of the other texture and... tadaa you have an overlayed greyscale image with the color of the colored texture! Hope this helps someone out

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 CHPedersen · Dec 06, 2013 at 12:22 PM 1
Share

Cool. Glad you got it worked out. I supplied another answer but deleted it again because you beat me to posting. ;)

avatar image
1

Answer by Moor · Dec 06, 2013 at 06:09 AM

make a b&w texture as normal map and place both in the Bumped Diffuse shader

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 Hamesh81 · Dec 06, 2013 at 07:54 AM 0
Share

Not quite sure I get you. I'm trying to combine the color/diffuse information not the normal map information.

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

18 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

Related Questions

Change between 2 textures based on a variable 1 Answer

2 texture blend shader 2 Answers

Shader that blends more than 2 textures 0 Answers

render Alpha only on another Alpha 0 Answers

Shader for texture blending with a sharp outline. 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