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 Tocaro · Aug 09, 2012 at 02:33 AM · shadersmaterialstexturestwo

Two textures one Material

I want to have a shader that allows you to place two textures on the same object (or more, and preferably the ability to add specularity and bumpmap). I'd settle for just being able to add the two textures though.

I did find the diffuse detail shader (which is totally awesome), but the second texture it applies is semi transparent (I believe according to how white or black the pixel is), and if you try to shrink the secondary image by increasing the x or y tiling and turning wrap mode to clamp, it leaves a stretched out trail of pixels over the the base image.

Presumably the answer to all this is that I'm just going to have to learn how to make my own shaders Gulp, but it seems like at least the initial idea (of just having a shader that allows for two textures on a material and the other texture can be shrunk and moved around) would be a common enough need that maybe one is already there, or it's incorporated in there already and I'm just not looking the right place.

Lastly just in case it's not clear what I'm talking about, think about a plane or a cube where the top part has a repeating wood tile texture that compromises the floor. What I'd like to be able to say, add a rug into the material that holds the repeating texture, and I'd like to be able to move it around and scale using the offset and tiling.

Thanks.

Comment
Add comment · Show 4
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 reptilebeats · Aug 09, 2012 at 02:35 AM 0
Share

you can have more than one material on an object, dont know if this helps

avatar image Tocaro · Aug 09, 2012 at 02:40 AM 0
Share

I have actually done that with planes, i.e. just set the material list size to 2 even though it only has 1 actual material, and that does actually work, but I think that's unique to planes.

If there was say a cube with a different material on each side, I don't know what increasing the number of total materials would do, but I'd guess it would just double up on the last material?I'd really want something with more control.

avatar image reptilebeats · Aug 09, 2012 at 03:22 AM 0
Share

if you use different materials then you can change the scale and offset for each individual one, this will give you more controls,

avatar image Tocaro · Aug 09, 2012 at 03:48 AM 0
Share

True, but that's not what I mean by more control.

Like I said, I think adding an extra material just doubles up on the last material.

But if my object has more then one material (Which most of $$anonymous$$e do cause I stink at UV mapping), it's only going to overwrite the last material. I think...

Anyway, it's either going to do that or apply itself on every face, I wouldn't be able to chose which material it overlaps if their are multiple.

0 Replies

· Add your reply
  • Sort: 

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

9 People are following this question.

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

Related Questions

Why are most of my materials displayed as black or transparent? 1 Answer

Materials: unlit transparent texture vs standard shader's albedo texture 0 Answers

How to create a shader that makes the texture look far away? 0 Answers

alpha mask on a 0 Answers

How to apply a color to the second texture in this 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