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 thisisdaleb · Mar 28, 2016 at 12:56 AM · terrainheightmapterrain generationheightmaps

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

So sometime over a year ago I gained the desire to work on a terrain generator that uses the input of a drawing (to define regions such as mountains, fields, lakes/oceans, etc.) and I kept running into the issue of exporting 16-bit raw heightmaps. No matter where I looked, no matter how many fruitless nights I spent on Google, I didn't turn up a single ounce of information. I eventually realized that Unity probably had a way for me to directly input height through scripts. Lo and behold, it does. I don't know how to do that either, but I'll get to that point eventually. Even still, I finally started designing the algorithms needed to make this happen, and it's coming together well.

At the same time, I would love to have a version that doesn't need Unity. While the standalone version couldn't support automatic placement of trees, grass, and textures like the Unity version will, I think having others be able to use the heightmap generator would be nice. Also, knowing how heightmaps actually work would be a set of knowledge that would certainly help me with this project.

Yet, I haven't found ANYTHING that explains the binary layout of a raw 16-bit image. So I thought, maybe the reason it isn't talked about is because it is stupidly simple? So I opened up Eclipse and quickly made an exported 2 raw files, one that is just a bunch of shorts going from 0 to 16000 over and over for 4097x4097 times, and another that gradually goes from 0 to the 16-bit limit at the end of the file (2048x2048 this time [yes not using the +1 to see what happens]). Both create these maps that constantly jump between 0 and another number between each height point. Messing around with settings completely changes the layout of the map but doesn't make either of them look like they should.

So, does anyone know how 16-bit heightmaps are supposed to be made? Am I just an idiot who managed to spend a year on Google when it could have been found in 5 seconds? I'm really lost.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Set Hightmap resolution while importing custom heightmap texture? 1 Answer

Writing a Custom Collider 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

Create map of the USA 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