Ive just been messing around with unity and I thought that a game with seamless space to planet travel would be pretty neat. I kind of thought that it would be simple so that all I would do is make unity terrain into a sphere, add a center of gravity, put a layer of “fog” that would act as an atmosphere and filter the space skybox to a different color and make the illusion of a sky and then finally have them rotate on a axis and revolve around a certain point (the star). But it seems that Unity wants to be hard to deal with and I cannot find anyway possible to make terrain spherical. The reason I would rather have terrain than just some sphere is because I could use assets that make terrain editing really easy and detailed such as Gaia. So does anyone know a way to make terrain spherical so that I can do this?
You can’t make a spherical terrain. But if you just want to create the illusion of spherical falloff you can do this by bending far vertices away from the camera in the shader, as in Animal Crossing Curved World Shader | Alastair Aitchison
I don’t think that you can use unity’s built in terrain system for a true spherical terrain/planet.
However one way that it is usually dealt with a “Quadrilateralized spherical cube” where each cube face is a quad-tree. There’s a really nice explanation here: Creating a Planet : Geometry | britonia and another here Making Worlds 1 - Of Spheres and Cubes — Acko.net
There’s also another discussion here already Spherical Terrain Object? - Questions & Answers - Unity Discussions
There is no way to use the built-in Unity terrain tool for any of this so you will need to generate your own meshes, deform them, implement a LOD (Level-Of-Detail) system, create collision and handle gravity etc for yourself.
@FluffyFreak, actually in regards to your answer, while i agree there are ways around this, i mean i wouldnt recommend what im going to say for an rpg personally, but an rts or something low poly, it doesnt work to badly,
take a sphere object, and then on your character scripts basically have to get the characters rotation and transform and adjust as they make their way around the “world”.
i dont have code with me at work unfortunately, but i converted a portion of a building placement script i made for an rts game, took the code that followed an objects curvature and everything looked rightish.
when it comes to buildings i made “foundations” so that the buildings corners were not just “floating”.
when it comes to terrain foliage i used the same thing as i did with the characters and buildings, and then wrapped the sphere in a mesh with a meshcollider i made to wrap the terrain mesh. and then used mountain models and what not to create the “terrain”.
hardest part was probably pathfinding to be honest.
it was a bit of a bitch to make work, and i didnt ever truly achieve the look i wanted(i am not a graphics/visuals person, i do logic), but it worked!
ill try to hop on later and post some code.
A lot of 3D design can’t be done well with Unity but Blender is a free and open source tool that can create .obj files in 3D. If you want to take the time to learn that tool, you can download it here: https://www.blender.org/. I would love to see a planetary terrain update to the Unity Engine I guess.
Unity is good for implementing 3D objects in a game but alot of design work is best done with Blender