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
1
Question by Komak57 · Feb 18, 2014 at 07:32 PM · tilealgorithmworld

Tile to Sphere world algorithm

Came across a few thoughts in my game developments. Originally, it was going to be large maps that acted as levels. When the bare code was lain down, I decided it might be far more fun to make a survival game with the code. I've been scanning the nets for different implementations of making the world, and it seems most developers do flat worlds of varying sizes. I wanted to create a spherical world that appeared flat. My first approach was to create an actual spherical world that was so large, that it looked flat (like earth). This cause numerous problems between scale, and unity float accuracy limitations. The second issue with this, was that I couldn't rotate the capsule collider, and would essentially have to rewrite all the necessary collider information from scratch, alter gravity, etc. Next, I thought to create a flat map, and wrap/bend it into a sphere. Using max3ds, this actually worked to some degree, but I still had a huge world and various coordinate issues.

The question here is, what is the most direct way to tile a map in such a way that you would simply render, and walk into the tile at the top of the map after reaching the bottom. Part of the complications with such an idea is getting the top and bottom tiles to accurately mesh with hills and structures. Are there any rendering tricks I should research as far as loading detailed terrain closer, and vague terrain farther? Links are great, terms and descriptions are also greatly appreciated.

Comment
Add comment · Show 3
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 robertbu · Feb 18, 2014 at 07:46 PM 0
Share

Interesting problem. For a design discussion like this one, you'll likely get more help on Unity Forums. With that said, there have been a number of interesting posts on UA in the last year dealing with large spaces and the floating point problem. One solution is to leave the character at the origin and move the world. There are other solutions as well. One paper referenced is:

http://www.floatingorigin.com/pubs/thorneC-FloatingOrigin.pdf

avatar image Komak57 · Feb 21, 2014 at 04:29 AM 0
Share

Researching deeper, and with the assistance of people with preexisting game design knowledge, I've come across a few ideas I need bounce off of knowledgeable Unity developers. Initially, I was going to render it as I did some of my 2D games and split a world into a grid of 3D tiles, load them into a script through prefabs, and render them with a tiling engine. This is a very similar method $$anonymous$$inecraft would use to generate chunks, and 'would' allow me to tile straight into the other side of the world, but it appears this isn't as efficient a route. I'm being told that creating the world in unity, and running a script to conform objects, and toggle renderable sections based on view distances is more the direction to take. $$anonymous$$y biggest concern is the edges of this world.

Say for instance, I have a 3x3 plot of land. Now say I'm in coordinate 0,1 (top middle) and I'm looking north, I should be looking at 2,1 (bottom middle) and all mobile objects there. The current suggestion is to render bordering sides, display characters and NPCs offset from the player location (not world location) and teleport the player to the bottom upon crossing a border. Do you guys know of better methods to get this done?

avatar image Komak57 · Mar 28, 2014 at 08:03 AM 0
Share

I've managed to write a custom array that returns rolling values for a grid based on coordinates that may be outside of the bounds. I've been trying a few different methods to move smoothly from one to the next, teleporting the existing terrain, and generating new terrain, but all I can seem to come up with is a full reset, which can be rather taxing. Really need a generic chunk load/unload system to go along with it.

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Komak57 · Mar 29, 2014 at 06:06 PM

Found an end-game solution to fast, real time, infinitely sized (yet still static), rolling terrains. This allows you to use a heightmap (of any size) and render it in variant degrees of detail from close, to far, asynchronously (meaning it doesn't lock up your FPS). It's called Geo Clip Mapping : http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter02.html

Thanks goes out to fholm and the IRC community.

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

18 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

Related Questions

board game algorithm 0 Answers

Random tile map algorithm 0 Answers

How can I set World Builder to generate right to the edge? 0 Answers

My precedural Algorithm for Tidy TileMapper is not working! 3 Answers

2048 game moving tiles algorithm question 1 Answer


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