• 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 $$anonymous$$ · Nov 05, 2014 at 10:56 AM · terrainheightmaps

Multiple Terrains and Terrain Heightmaps

Okay so i have the stitching of the terrain down packed. But what i am looking for is how to find the left, right, top, bottom vertex values of each terrain I have and then join them at the the average between the both of their Y value's.

Terrains are display like this: 0[2][3] [4][5][6][7] [8][9]0 (It actually continues from 9 by going 10,11,12,13,14,15) [2][3][4][5]

So i want to be able to identify the right edge of "0" and connect the vertices Y values with he left edge of "1".

I have terrain stitching and i have used SetNeighbours although that does not achieve the next step i wish. alt text

untitled-1.png (175.6 kB)
untitled-2.png (190.3 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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by AlwaysSunny · Nov 05, 2014 at 10:50 AM

The basic process is:

Pick an axis to operate on first (east/west or north/south).
Pick a direction to work on in that axis.
Starting with one edge of your terrain grid, stitch all terrains to their neighbors on that axis.
Stitch all terrains to their neighbors on the other axis.
Perform any texturing necessary.
Then call set neighbors

The stitch operation will examine a certain number of rows or columns in the heights of two adjacent terrains. Just averaging the outer-most rows or columns will create unwanted jaggedness. The outer-most row or column of each terrain pair (the strip of heights which need to match exactly) will be averaged. For the other selected rows, each height should be "pulled" toward this newly-averaged height value to create a smoothing effect. The strength of that pull is determined by the distance from the respective edge, with a very strong pull at one or two strips from the edge, tapering off to no pull whatsoever after N strips from the edge.

Make sense?

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Set Hightmap resolution while importing custom heightmap texture? 1 Answer

To support physics Colliders , the resolution of the hole’s mask Texture is equal to the resolution of the Terrain’s heightmap - 1 what does that mean? 0 Answers

What makes up the binary data of a 16-bit heightmap? 0 Answers

Why is my terrain so bumpy when I use heightmaps? 1 Answer

Unity imports heightmaps in kind of upside down order. 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