1
\$\begingroup\$

I've recently been working on a little spaceship flying sim in Unity and want to add planets. Up till now, I've been hand modeling them in Blender. But I want to have a way to generate large planets with heightmaps. While researching the topic, I found this video about a voxel planet game and its tech, Here. In the video, they describe a way to render a planet with low distortion. They also relate it to how No Man's Sky does it.

My question is, Are there other methods of rendering planets that have zero distortion? I would prefer if the answers wouldn't be Unity3D specific since i'm considering switching to Monogame or DirectX.

Thanks in advance!

Edit. I've been asked to describe the distortion. The distortion is what happens when a cube gets mapped to a sphere. The video suggests a method of using shader warping when on the ground but using the method of squishing a cube to a sphere when in space. This method causes a noticeable warp when going from space to ground because it switches rendering methods. My question is if there is a way to prevent that warp and provide a truly seamless transition from space to ground.

One more edit, I have found another video on a seamless planet engine called Outerra here It seems to have no warping when leaving the atmosphere. It can be seen at 0:50 and at2:22 in this video.

\$\endgroup\$
  • 1
    \$\begingroup\$ Can you describe what specific kind of "distortion" you're trying to reduce? (Images often help) There are several effects that might be termed distortion, which each imply different countermeasures. \$\endgroup\$ – DMGregory Jul 25 '16 at 18:36
  • \$\begingroup\$ its described in the video \$\endgroup\$ – UDXS Jul 25 '16 at 18:40
  • 1
    \$\begingroup\$ A high-quality question should stand on its own. Please include at least a summary of your problem in the post itself so other users don't have to spend 10 minutes watching a video just to see whether it's a question they can answer. \$\endgroup\$ – DMGregory Jul 25 '16 at 18:43
  • \$\begingroup\$ The distortion in the video comes from making the walkable surface of the planet map to a sphere. The answer to the question "are there methods of rendering planets that have zero distortion" is "sure, don't make them round". If you take a flat/square/triangular shape or collection of shapes and wrap them on a sphere, there will be distortion. That's not a programming issue - that's geometry. \$\endgroup\$ – Jesse Williams Jul 25 '16 at 18:57
2
\$\begingroup\$

The distortion in the video happens because they are mapping cubes on a sphere, which is geometrically impossible without distorting cubes. If you use any modern terrain engine or even a modeling program to model planets, you shouldn't face any kind of distortion.

Edit for clarification:
In the second statement, I am not talking about a voxel planet. It is still impossible to render a voxel planet without distortion; but it is possible for a non-voxel planet (a normal planet, basically).

For a non-voxel planet, all you have to do is paint your terrain directly on a sphere. So basically, in game you get what you see in modeling.

\$\endgroup\$
  • \$\begingroup\$ In fairness, even perfectly flat objects mapped to a sphere suffer from some amount of distortion (and vice versa). This is why it's difficult to model a flat map of the Earth that is truly accurate without distorting the size of continents and the like. \$\endgroup\$ – Jesse Williams Jul 25 '16 at 19:00
  • \$\begingroup\$ In the event that it seems I'm being pedantic, look at the issue that the Dymaxion map of the Earth (by Buckminster Fuller) was trying to resolve. It works in both directions. \$\endgroup\$ – Jesse Williams Jul 25 '16 at 19:02
  • \$\begingroup\$ so can you suggest another way to render a voxel planet? \$\endgroup\$ – UDXS Jul 25 '16 at 19:03
  • \$\begingroup\$ @JesseWilliams That's true only if you are modeling on a flat surface and then trying to map on to sphere. But if you model your planet directly on a sphere, then in game you get zero distortion. \$\endgroup\$ – S. Tarık Çetin Jul 25 '16 at 19:04
  • 1
    \$\begingroup\$ @UDXS No, that video is the best way I can think of about rendering voxels on a sphere. \$\endgroup\$ – S. Tarık Çetin Jul 25 '16 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.