Outerra forum

Outerra Engine => Technology => Topic started by: montify on April 14, 2014, 10:57:55 am

Title: Sphere in Outerra
Post by: montify on April 14, 2014, 10:57:55 am
Hello Outerra.


Do you use the cube2sphere Mapping for Outerra? (like normalize the Vector around the Origin, OR the Mathproof Version http://mathproofs.blogspot.co.at/2005/07/mapping-cube-to-sphere.html (http://mathproofs.blogspot.co.at/2005/07/mapping-cube-to-sphere.html))

Title: Re: Sphere in Outerra
Post by: cameni on April 15, 2014, 04:27:41 am
Neither, they aren't regular enough.
We are normalizing vector <u, v, 1 + (0.5/(√2 - 1) - 1)∙(1 - u²)∙(1 - v²)>, where u,v are face coordinates in -1..1. This gives pretty homogenous spacing, but the inverse has to be found by Newton solver. Luckily, it's only rarely used in practice, so it's not a problem.