Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 doctordingus · Apr 04, 2018 at 05:02 AM · textureterrainmaterialtilesrepeat

How can I use a tile set to texture a large mesh?

I am new to Unity and game design (however I'm very experienced with programming). I am creating a large 3D mesh in Blender for my terrain, as I am trying to make a very low-poly terrain and I don't think Unity's terrain tools allow me to do that. So I have a UV-mapped mesh for the terrain, and I have a tile set of seamless 32x32 pixel PNG images that I would like to use to create the texture for my terrain mesh.

I know how to just create a material from one tile (a grass tile, for example) and apply it to the mesh and have it repeat. But that looks very monotonous and I would like to know how I could add other tiles like dirt patches and what not on top of that.

For reference, I am talking about doing something similar to this (Daggerfall): https://www.youtube.com/watch?v=tAf1QfO4Xug

In the video, there is clearly a grass base tile that is repeated, but then there are also patches of dirt and rock throughout the terrain. It's also pretty obvious that they're using a tile set for it because the edges of the dirt patches all look the same, rather than seamlessly blending into the grass as if it was painted on.

What's the best way for me to go about doing something like this?

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

Answer by toddisarockstar · Apr 04, 2018 at 05:41 AM

tracking down the actual UV mapping of a particular face from an imported mesh would be extremely difficult. this is what modeling software is for. if you created the mesh through code and had organized code references/arrays to what triangles lined up to which points of your mesh and how they are constructed then you could possibly change a texture of a uv face like this: https://docs.unity3d.com/ScriptReference/Mesh-uv.html

in other words it's not practicle.

but what you are seeing in your video is not done through uv mapping ... horray.

it's done through a custom shader. the shader you are seeing would allow for three textures. one to represent texture1, one texure represents texture2 and the third texture is used as a texture map telling the shader where to use texture1 and texture2.

the shader picks up on the float value of a color channel in the third texture to decide what percentage to display texture1 over texture 2. unfortunely, as far as i know, this type of shader is not included in unitys default shaders but it shouldnt be too difficult to either write one or find a custome shader code like this on the web
if you are not finding similar options in unity's terrain building/editing options

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 doctordingus · Apr 04, 2018 at 06:19 AM 0
Share

Great, thanks! I don't know anything about creating or using custom shaders so I'm gonna have to find out some more info about it. That being said, I was hoping there'd be some sort of way to directly paint various textures onto the terrain mesh, while having it sorta "snap" to each individual unit, for the rough edges. Generally, something simpler than writing a shader and then having to make sure my texture map looks how I want it to. I guess yeah, if I want to do that I should be doing it in modeling software, rather than Unity. Anyways, thanks a bunch!

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

119 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 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 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 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 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 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Need help generating structures according to texture 1 Answer

Change Mat/Texture of Procedural Chunk Combind Meshes 0 Answers

Importing custom tree into terrain editor - how do I do it? 1 Answer

Can i apply terrain materials to specific textures only? 0 Answers

Texture Tiling Stopped Working in Unity 4? 2 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