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 jeango · Mar 25, 2015 at 10:16 AM · terraingeneration

Stratum (layered) terrain generation

Hi all, I've played "running with rifles" which gave me some ideas for a game of my own. One thing I really loved about it was that they display isolines on the terrain, which is both a great use of the military theme, and a strong visual feedback about terrain slopes.

Now I'd like to do something similar for one of my games, but instead of using isolines, I'd like to generate my terrain (based on a heightmap) by stratum.

a little bit like this: alt text

I'm hoping that perhaps I'm not the first person in the world who wanted to do this, and maybe there's an asset or perhaps a general guideline to do this. But my searches didn't get me anywhere so there ;-)

Comment
Add comment · Show 2
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 Nymisu · Mar 25, 2015 at 10:49 AM 0
Share

You can just use a solid brush on the terrain tool with opacity set to 100 when painting incrementally higher heights to create this kind of terrain. Or do similar in your art program when creating a heightmap.

avatar image jeango · Mar 25, 2015 at 11:00 AM 0
Share

like @Cherno said, the standard terrain won't do here. You can't have vertical edges with the terrain tool.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Cherno · Mar 25, 2015 at 10:49 AM

I think the standard terrain that comes with Unity won't work for that kind of style, but generating your own terrain mesh is not that hard, take a look at the API for the Mesh class for a simple example on how to generate a mesh on the fly furing runtime. Add Perlin noise implementation and you will have your own isoline terrain in less than a day :)

Comment
Add comment · Show 2 · 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 jeango · Mar 25, 2015 at 11:05 AM 0
Share

yeah I figured as much. I guess I'll have to have a look at the $$anonymous$$esh api, but I was hoping to find an asset that would do exactly this for me ;-)

What I need to figure out too is how to isolate the iso lines from my heightmap in order to generate the mesh, but perhaps there's a way to do this with photoshop

avatar image Cherno · Mar 25, 2015 at 11:20 AM 0
Share

Ok, you need to have a few values set up to make your heightmap into a isoline map, chiefly the number of isolines that will appear in your map, meaning how much detailed the slopes will be (less lines = more/highher height level differences). Then you just divide the height value of the heightmap at a certain position by the number of lines and you get your isoline height level at that position. After that, it's just finding out if there's a difference between a position and the neightboring positions in regards to the heigth level, and then place your vertices accordingly. Take a look at voxel generation scripts as they are basically the same.

avatar image
0

Answer by HeywoodFloyd · Oct 23, 2015 at 01:59 PM

As mentioned in the comments by @nymisu, you can't get truly vertical edges in terrain, but they can be pretty steep.

You may want to draw out the terrain you want in an image and import it as a height map: http://docs.unity3d.com/Manual/terrain-Height.html

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

22 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

Related Questions

Invisible trees? 1 Answer

Unity Voxel Terrain and structures 0 Answers

2D Procedural Terrain Generation 1 Answer

Make a high poly count plane with code 0 Answers

How to procedural generation 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