Jump to content

Stop using polar coordinates


Recommended Posts

The game has great preference towards everything happening in equatorial plane. Whenever you start doing anything related to poles you get punished. Polar regions are where weird stuff happens, camera view directions change abruptly, Kerbals do strange things or even die. There are textures crack in polar regions. Using polar orbits, which are in fact rather convenient for interplanetary travel is made very inconvenient by lack of convenient viewing angles in map view.

In my opinion the main reason is using polar coordinates to represent surface position which may seem convenient but for which poles and anything along the rotation axis is area of divergence and singularities.

My suggestion is to replace representing surface position by two numbers in polar coordinates by using three numbers which represent point on unit sphere. This representation may seem a bit more complicated and may require slightly different math for handling but it is smooth and the only place where it has problems is in the center of the body which nobody should enter anyway.

Using this system for surface coordinates would mean there will be no longer any problems with anything standing on the pole.

Using this system for camera views would mean there will be no more sudden direction changes around poles.

Using this system for texturing the ground would get rid of any cracks because the surface can be smoothly mapped to flat area in any region.

Link to comment
Share on other sites

Giving a craft's landed position in latitude/longitude is all fine, really -- trying to get people to learn an entirely new coordinate system just to figure out how to get back to certain spots is going to be messy. However, at a deeper level, I think this sounds like a good idea... assuming, of course, it really is that simple. I have a tendency to suspect there're always going to be some unexpected results from any changes made, really. It always seems to happen, in programming most of all xD

Link to comment
Share on other sites

I don't mean to stop displaying the location in latitude/longitude or that navball should behave differently. This system can always be converted to latitude/longitude. I mean using this system internally because it is arithmetically much more stable than polar.

Link to comment
Share on other sites

No, I thought not, I just wanted to make sure I hadn't misread :)

But even so... can such a system really map a flat texture/heightmap to a sphere without weirdness going on? I mean, they're designed to wrap around a sphere as best they can, obviously, but... yeah. Mapping flat stuff to round stuff has always been pretty annoying, as far as I've ever seen.

Link to comment
Share on other sites

You can never map a flat surface onto a sphere without stitches. But that's not relevant to the problem in hand. The problem with surface cracks is IMO caused by some points being at 0° and some points at 360° which due to arithmetic errors do not fall onto exactly the same point. But with normal representation you don't have anything like that because you don't roll around something. There's no skip from 0 to 360 or -180 to 180 or -90 to +90 on poles etc. It is smooth and arithmetically stable representation. That's the point.

Link to comment
Share on other sites

To avoid seen texture stiches at poles it is best if the planetary texture is designed in a way that whole top and bottom lines have same color, so no visible stiches are visible. But since KSP uses several different textures for displaying various detail levels based on the distance from ground even this might not work perfectly as it would create visible single colored circle on the poles. So using same texture with changed projection (as rendering it would be rendered on equator) might do the trick. But hten you need smoth transition between this one and regular one. But it is doable.

As for generating planetary terrain heightmaps use of single colored top/botom ege textures is a must.

But making camera freely rotate on all three axis and not be limited to polar coorinates would make KSP much better. There will be no more wird camera rotation when passing poles, you could controll EVA kerbals much easier since they orient based on camera direction.

I mean we have "FREE CAMERA" which we can't freely rotate around as we would want.

Edited by SilverWarior
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...