Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Download Outerra Tech Demo. Unofficial Outerra Discord server, MicroProse Discord server for OWS.

Author Topic: planet partionning + vector data  (Read 5303 times)

geonemo

  • Newbie
  • Posts: 1
  • newbie
planet partionning + vector data
« on: August 01, 2014, 09:22:33 am »

I am refactoring a simplified planetary engine, and I would like the partition system to be compatible with the one in Outerra, for a mutually beneficial result. I originally used lat/long with OSM bitmap tiles. But this time, I am using OSM vector data. The goal is to store one binary file every 4 levels in exact alignment with your cube partitioning.

I understand you are normalizing vector(u,v,+-k) on the 6 faces of a cube, with k=1+0.2071067812(1-u2)(1-v2).

I am having a hard time mapping vector data on the cube though. The way I see it, I have to transform lat/long data into x,y,z on the sphere, then apply a Newton solver to transform x,y,z back to uv, which invariably has a negative effect on my mood ;-)

Would you do it that way, and if so, would you consider sharing the algo you use to reverse x,y,z back to u,v? In another thread, you are suggesting a look into a javascript file called cubeface.js but the link is broken.

Thanks in advance.
« Last Edit: August 01, 2014, 09:39:00 am by geonemo »
Logged

cameni

  • Brano Kemen
  • Outerra Administrator
  • Hero Member
  • *****
  • Posts: 6721
  • No sense of urgency.
    • outerra.com
Re: planet partionning
« Reply #1 on: August 01, 2014, 11:49:14 am »

You are going good :)

We have got a Newton solver there as well. I once saw someone noting that it should be solvable, but so far all attempts turned out to be more complex than the Newton, of which there are usually just a few steps needed. So I have made peace with it in the end ...
Logged