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 Spazticus_legacy · Dec 07, 2011 at 10:58 PM · terraintexturesplatsplatmapsterrainpainting

Can we use a terrain-style splat shader on custom ground geometry?

We're well under way on our first Unity-based project. The ground is already built in Maya (and will continue to see some edits), so for this project we cannot use the Unity terrain system. Still, we are hoping to find a way to use a single texture to define some good terrain texture blending, specifically to use RGBK values to combine four diffuse/detail shaders, and if possible to add an alpha channel to define some black as necessary. I see a lot of discussion of splat shaders here, but i'm new to Unity and most of what i see predates version 3.4 and the rest is over my new-to-unity head... i could use some solid info to share with the engineers so i don't waste their time if we need something written here. Any thoughts?

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
3
Best Answer

Answer by Owen-Reynolds · Dec 08, 2011 at 01:21 AM

If you look the the downloadable builtin_shaders->Terrain->Splats folder, AddPass is what Unity uses. It does the obvious thing, and is short. They use rgba for 4 textures.

The trick is to set it up -- control texture stretched over the whole thing, splats scaled the way you want. And to get a good way to paint the control texture. That stuff is hidden in the Terrain script, but isn't too bad.

Comment
Add comment · Show 4 · 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 Spazticus_legacy · Dec 09, 2011 at 01:22 AM 0
Share

Thank you, that is a huge help! It took a little while to implement this in the scene and convince it to generate predictable results, but most of this was in exploring different texture file formats and generating some base-line sample textures for testing.

I still have some trial and error to do, but for now you've become my own personal savior. Cheers!

avatar image Emericanized · Jun 18, 2012 at 04:53 PM 0
Share

Hello Owen, I've got the AddPass shader setup on a plane in unity, but no matter which channel I set to 100% white in Photoshop (in the control texture), the shader seems to be stuck in a semi-transparent state.

Have you any experience with this problem?

Thanks for your time.

avatar image Emericanized · Jun 18, 2012 at 05:45 PM 0
Share

follow-up: Ins$$anonymous$$d of using the AddPass shader, i tried the FirstPass shader, and it seems to have solved my problem! Will this interfere with lightmapping later?

As a footnote: _Base$$anonymous$$ap doesnt seem to do anything for me!

avatar image Owen-Reynolds · Jun 19, 2012 at 05:01 AM 1
Share

Sorry -- they both work the same except Add has the extra Decal:Add. Unity combines the 1st four ground textures with FirstPass, then "adds" (probably to a render texture) the rest in groups of 4 with AddPass. If you have 4 or less ground textures, you weren't using AddPass anyway.

If you read, _Base$$anonymous$$ap is used in the fallback shader. It's a low-res texture made ahead of time by blending everything together. It's used if your graphics card can't blend on the fly (and also for far away parts of the ground.) You can see it by setting Base$$anonymous$$ap distance really low.

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

Spalt Maps Problem.... 0 Answers

Why is directional light screwing up my textures? 2 Answers

Can't find the paint / raise / lower terrain setting in unity 2018.3 1 Answer

How to change textures on terrain? 2 Answers

Deleting terrain splatmap through scripts. 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