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 Senshi · Oct 02, 2010 at 06:00 PM · materialobjecttexturesmultipleblending

Multiple (blended) textures per object/ material.

Hello everyone,

I realize that this has been asked about before, but I could not find a solid answer (or one I could implement). What I'm trying to achieve is a fairly customizable character (robot). I'd like players to be able to choose the base color, tint each decal (and exclude specific textures from customization). An example of what I'd like to create:
Material Robo1:

  • Base Colour [choose-able]
  • Texture (Mode: Overlay/ Add/ Screen): Metal plating. [not editable]
  • Texture: Decal1 (i.e.: logo) [tint-able]
  • Texture: Rust [not editable]

Now my question is not about the scripting itself, but rather:

  • (How) can I add multiple textures to one material?
  • (How) can textures' modes (such as add, overlay, etc) be set?
  • Can a texture's tint/ hue be modified through JS?

I have no experience with Shading Languages, so writing my own shader isn't really an option for me.

Thanks in advance,
Patrick

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 Loius · Oct 02, 2010 at 07:13 PM

You need to create multiple materials (in your modeling program). You can then alter them individually (including shader, which is what provides the add/multiply/etc), and achieve the effect you're wanting here. You can still link the materials to the same texture, they'll just be able to be easily tinted.

Optionally, you could then create a texture programmatically based on how the user customizes their character. Save that texture in the customization screen, then, in-game, use that texture for the player model. That might be better performance-wise, but it's much more complicated. I haven't gotten to that point in my own game yet, so I don't have any code snippets on how to do it, but check out the Texture2D and Texture entries in the Script Reference

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 Senshi · Oct 02, 2010 at 07:52 PM 0
Share

Thanks for your answer! I don't think I understand though. How would I go about making multiple materials? I can do it in Unity, but in Blender I typically use 1 material with X textures. In there I can only assign 1 material per object (except when I use Nodes). Also, I may be missing the obvious here, but (how) can I alter the Shader? Do you mean in it's Shading Language? I have no idea how I'd have to go about doing it coding-wise.

Thanks again for your reply though, I'll look into the Script Reference entries! =)

avatar image
0

Answer by Ilovegames · Oct 22, 2010 at 05:13 AM

I this video will help you it is from youtube and it shows how to assign multiple materials so take a look at it and I hope it helps. http://www.youtube.com/watch?v=hCYViRJFf5w

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

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

No one has followed this question yet.

Related Questions

Better to use multiple objects or textures with basic paperdolling? 0 Answers

Anyone have shader that supports two UV channels? 1 Answer

Playing a range of sounds from an object 0 Answers

How to apply a color to the second texture in this shader? 1 Answer

Spawn object with different material. 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