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 Logopolis · Feb 25, 2015 at 08:57 PM · terraincolorlandscapesplat

Can I use splat maps to mix RGB colors?

Hello,

I'm building a strategy game in which I'd like different areas of the landscape to be displayed in different colors, to denote what "nation" those areas belong to. I'd like to have ~12 different colors, so if I made each one a different splat texture, that would be 3 render passes. Instead, what I'd like to do is use just three splat textures: a red, a green, and a blue texture, and mix them at each landscape location to produce whatever arbitrary RGB color that I want. My question is, does splat texture mixing work additively so that it will successfully produce color mixes? What happens if the splat values don't add up to 1? For example, to get a near-white combination, they would need to add up to ~3, and to get black they'd need to add up to ~0. Has anyone tried producing arbitrary colored landscape in this way? Or is there a better way?

UPDATE:

I've implemented this, and found that it works fine so long as the red, green and blue splat values sum to no more than 1. They can sum to less than 1, and I get a dark combined color, as expected. However summing to > 1 causes unpredictable results, sometimes darker than expected, sometimes the wrong color. This means that I can't create bright combined colors. For example, I can create bright red using splat values [R:1.0, G:0.0, B:0.0]. But if I try to create white using these values: [R:1.0, G:1.0, B:1.0] I get poor results (in my tests, I got blue with a white outline). If I lower all of the splat values so that they sum to 1 [R:0.33, G:0.33, B:0.33] then I get dark grey, as I would expect. In conclusion, because the sum of splat values cannot exceed 1, this technique is very limited in that it doesn't allow for bright combined colors. It's like mixing a color where R,G and B together can sum to no more than 255.

Has anyone else tried to do dynamic color mixing on terrain like this? Any suggestions for how it could be done?

-Mike

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

1 Reply

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

Answer by Logopolis · Mar 17, 2015 at 03:23 PM

I've tested this again with Unity 5, and it now works correctly!

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

2 People are following this question.

avatar image avatar image

Related Questions

Landscape creation software to use with Unity3D 0 Answers

How to change leave color at runtime? 1 Answer

Terrain splat 1 is null. 0 Answers

terrain splat null problem 0 Answers

Terrain Type Detection; Based On Splat Color 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