lundi 27 octobre 2014


Procedural Planet (Part 2)


Generating a cubemap: 


     After wandering on several blogs and forums, I decided to try the solution that consists in taking a cut in 6 parts of the sphere (sphere generated from the six planes of a cube). The final goal is to generate a relief on the surface of a sphere through a cubemap. 

     To generate a cubemap and keep consistent form in relation with the perspective of a 3D scene, I use a method that involves taking images captured from the camera in my Unity scene. Circles are generated around the camera and represent (gray) peaks.

Generating relief areas:


Capture of 6 images which will allow to generate cubemap:
(I created a tool for the editor to make it simple)



















The cubemap is used to apply the reliefs on different sides of a cube that will be normalized to be transformed into a sphere:



I notice errors in normal along the edge of the surfaces, probably because of the rounded values cubemap textures:



samedi 25 octobre 2014


Procedural Planet (Part 1)


     This research topic is part of a project with a more ambitious goal: to generate a whole coherent and functional solar system procedurally. At start, the planets will be quite simple and on a small scale and I eventually plan to be able to generate a complete environment (flora and fauna, atmosphere, ...) to a more realistic level than the game "Spore" and that would be similar to No Man's sky (at a much smaller level of course :p).

Perlin Noise :


     Perlin noise is a type of Gradient noise used, among others,  to generate procedural texture with a visual effect that increases the apparent realism in image synthesis. The function has a pseudo-random appearance, yet its visual details are of equal size (see picture). This property allows the texture to be easily controllable. Multiple copies zoomed Perlin noise can be inserted into mathematical expressions to create a variety of procedural textures.


Example of generated terrain with perlin noise:













Animation of the surface of an IcoSphere:


To work smoothly and evenly on all parts of a sphere, it is best to avoid UV-mapping configured  meshes (irregular meshes) and use a sphere made ​​by subdividing an icosahedron triangles.

Here is an initial test applying some modulation on the surface of a sphere with few meshes and low noise :



Now with the maximum number of vertices in unity (and coloring meshes iteratively to determine how the surfaces are ordered in the object):



The reliefs generated surface are quite promising and many potential to generate noise perlin settings offer a variety of behaviors and patterns. However, the level of detail is unsatisfactory and we are still quite far from having a realistic surface.