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 /
  • Help Room /
avatar image
0
Question by MKayJay · Sep 21, 2021 at 08:34 AM · procedural meshprocedural-terrainprocedural texturing

How do I generate Submeshes based on a texture?

I'm currently playing around with procedurally generated terrain, and now I've come to the part where I want to add grass to some of the biomes. For reference, I'm using the grass shader from MinionsArts video here: https://www.youtube.com/watch?v=xKJHL8nQiuM

Basically, the shader renders grass, based on a mesh. So what I currently do is to use the same mesh as I generated for my terrain, to show the grass, and that works somewhat. If we take a look at the picture below, it shows a few problems. Notice the height difference, that is where there's a border to a new mesh. (This is not my main concern right now though) The interesting part is the grass. The one I pointed out seems to have some color bias from the terrain it is on. I've seen this in multiple biomes, but I'm not sure if this is relevant. alt text My goal is to basically render grass, in certain biomes, based on the color of that biome, and this is where my knowledge gets a bit messy.

My idea is to make a copy of the corresponding terrain mesh and then manipulate the copy, by removing parts of the mesh where I don't want grass. Then I want to create sub-meshes based on the Biome Map (A runtime generated texture that also is used to paint the terrain), which would likely leave me with a few sub-meshes per 'chunk'. From there I plan on assigning a material to each sub-mesh so that I can correctly color the grass. The shader has color properties that I can either predefine or simply pickup based on the color of the biome.

So what I'm looking for is some input on how to do the whole sub-meshing part. I've still come up short with a solution that I understand. Alternatively, if there's a smarter way of doing this, I am of course all ears :-) I should add my shader skills are very very basic, but I have a hunch there may be a solution in that direction, but haven't been able to find it/ask the right questions to google yet ;-)

Thanks for your time, I hope I was clear enough, I do tend to struggle a bit about the level of info I need to put into questions like this :-)

unitygrass.jpg (98.8 kB)
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

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

166 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 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

Apply Material (with custom texture) on procedural mesh 0 Answers

Different textures on different meshes but same material 0 Answers

Procedural Mesh issues after trying to clean up code. 0 Answers

Procedural generating - generating trees at given mesh - vertices/height 0 Answers

How can I reference a specific set of triangles or quads in a procedurally generated mesh? 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