Making fictional 3D asteroids

All tutorials about Celestia go in here. For Celestia itself, add-ons, textures, scripting, etc.
Avatar
Topic author
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 8 months
Location: Thyrrenian sea

Making fictional 3D asteroids

Post #1by Fenerit » 23.07.2011, 22:59

INTRODUCTION:

There are several ways to make asteroids and probably the most efficient is through the use of an organic 3D modeler. The organic modelling was developed mostly to go beyond the polygonal one in building complex structures, very similar to the pure fractal operation of the recursivity. An asteroid is a rock floating in the space, and a rock is a complex aggregate of complexes shapes which are difficult to sculpt through the polygons' deformation. The main difficult consist in deforming the polygons to achieve the craters. Usually asteroids are heavy cratered objects, that is, they have circular depressions often well-formed and sharpen, which requires suited deformations and subdivisions to supersede the common boolean artifacts. Organic modelling solves this issue in two way: it does allows the user to design its tools and automatically subdivides the part in which the tools are applied avoiding the stress of the polygons.
This tutorial does use of the Win/MAC 3D sculpting program named Sculptris available for free, but can be useful even for all people which works with their commercial counterparts. Another free, open source program that allows the 3D sculpting is Blender, although I'm unaware whether with the same dynamical subdivision's feature.

SCULPTING:

An asteroid's mesh can be accomplished through the deformation of a sphere. Or, if required, through the importing of a blobbish OBJ made by a mathematical program. This latter method is for whom psicovisually "see" the deformed spheres yielding the "same shapes".

Anyhow, lets start with a sphere and be disabled the "SIMMETRY" sculpt. Lets deform the sphere with the "GRAB" tool by assuming a fairly huge tool' "SIZE" and "STRENGTH".

When your sphere is enough deformed to be hold as the favorite asteroid's shape, do "SMOOTH" it with a lower "STRENGTH". This operation "waving" a bit the parts of the sphere which are too smoothered and therefore innatural. Be sure that the mesh be uniform, without sparkle parts, as are usually seen onto the coarse polygonal meshes.

Image
The deformed sphere

At this point one can add the craters. Download the images below, they are 2 alpha brushes (PNGs) that I've made for this purpose.

Image
PNG for sculping craters without cumulus (right click: save as)
Image
PNG for sculping craters with cumulus (right click: save as)

Alpha brushes are tools; they can be made with whatsoever paint program and are good for user-defined operation. In this case they are just two white radial gradients (like point sprites) of which one is for craters with the central debris cumulus and the other is for craters without the central debris cumulus. Paste the two PNGs inside the Sculptris' "textures" directory or do another folder named like you wish. Then choose it through the "BRUSH"'s icon. Be sure that the "DRAW" button and its "AIRBRUSH" > "INVERT" checkbuttons be enabled, otherwise your deformations will be rised instead of be lowered. With a smart management of the brushes and either "SIZE" and "DETAIL" (which must be high) you can start to add craters. If one is unsatisfied, he can always smoothing the parts. Once the model is sculpted, the mesh can have even 500k or more polys; then it is important to reduce the numbers of the polygons through the "REDUCE SELECTED" button (30-60k polys is good for CMODs below 2mb). Notice that the reduction will hold a good detail, nonetheless.

Image
Over 400k triangles

Image
Reduced to 50k triangles. Not bad. The final CMOD binary is about 1.2 Mb.

MAPPING:

Now the asteroid is assumed ready and need a map. There are two way to do it.
1) Because Sculptris allows the mesh painting, one can paint the mesh within the program itself and then exporting either the model and the texture.
2) To export the .OBJ inside a 3D modeler and do assign to it a resident texture.
The method 1) is for people with a good skill in colors (not me); so we'll concentrate on 2). For what concern the CMOD rendering, the way to do will be the same.
The main problem with Sculptris is that it get the texture of what you have painted, but doesn't apply an user-defined texture to the mesh. Nonetheless, it does write the normals but doesn't store the UV map (texture's coordinates) within the OBJ. This is cause of the whiteness of the CMOD's in seat of CMODview's conversion (OBJ asteroid Stein is an example). To avoid this problem, the methods either needs a 3D modeler's step.

EDIT LATER:

The statement above is partially uncorrect. Because I was sculping with the alpha5 version and got the program's crash when tried to import a texture (PAINT > ADVANCED OPTIONS), I believed that was a software's limitation. The new alpha6 has corrected this bug, and the textures are now imported. However, they doesn't seems to match the model whatsoever be their projections. But this is not important for whom like to paint, since it is enough that the texture be a 1:1 monochromatic texture for having the textures coordinates stored into the OBJ format in seat of Sculptris' export and thereafter successfully processed by the CMODview converter. Unfortunately they are written into the CMOD and managed by Celestia,but are not displayed within the utility. Besides all, asteroid Stein doesn't have neither the texture coordinates.



Supposed you already have a spherical mapped texture (1:1 or 2:1 works either, with Celestia 1.61), both manual painted or resident on disk, do import the OBJ mesh within an external 3D modeler (Anim8tor, Blender, etc.). Re-orient (rotate) the mesh accordingly with the modeler's default center of axis (0,0,0) and apply the spherical UV mapping besides the default modeler's material. If your 3D modeler has a procedural texture builder, do export your creation as Celestia's texture. Applying the spherical UV map and whatoever spherical projected texture to the model, allows the storing of the texture's coordinates within the OBJ. At this point do export newly the OBJ as OBJ. The CMODview is now ready to store the texcoord into the CMOD. Save as CMOD and place the model where you wish. If the CMOD is used standalone within fictional worlds, mind to respect the add-on's folder path ("..models/" for the model, "..textures/medres" for texture); otherwise simply put the texture inside the main Celestia's "..textures/medres" folder and set the directive: Texture "your_texture.*" within the model's SSC.

EDIT LATER:

Like I've said, mind that the CMODview does store the texture coordinates into the CMOD but doesn't write the "texture0 "your_texture.*" directive; thus if you want the model "standalone" in which the texture be not specified within its SSC but within its CMOD, you need of the 3DStoCMOD converter, because you must manual edit the ASCII CMOD.


Image

asteroid in celestia. (do not mind at name: just an uneducated but fast way to check the model :? :wink: ). Notice that if one acts on a well-smoothered mesh, the Sculptris' adaptive subdivision engine is able to avoid the polar pinch.

HINT:
you can do best than me! :P
Last edited by Fenerit on 25.07.2011, 16:16, edited 1 time in total.
Never at rest.
Massimo

Avatar
Topic author
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 8 months
Location: Thyrrenian sea

Re: Making fictional 3D asteroids

Post #2by Fenerit » 25.07.2011, 15:58

The text has been corrected.
Never at rest.
Massimo

Avatar
Topic author
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 8 months
Location: Thyrrenian sea

Re: Making fictional 3D asteroids

Post #3by Fenerit » 25.07.2011, 16:58

Summing up the procedures to manage the OBJ format and its applied texture and to get the final CMOD.
The OBJ is supposed to have material, normals, and texture (UV map/textures coordinates) assigned by the 3D modeler.

Final CMOD with the texture specified through SSC:
1) Export from whatsoever 3D modeler your work as OBJ together with its texture;
2) Import the OBJ within the CMODview and save it as CMOD;

Final CMOD with the texture specified within the model itself:

1) Export from whatoever 3D modeler your work as OBJ together with its texture;
2) Import the OBJ within the CMODview and save it as CMOD;
3) Import the CMOD within the 3DStoCMOD converter and choose "FIX" then "OUTPUT AS ASCII";
4) Open the ASCII CMOD within a good plain text editor and do write your texture's directive under the "material" section;
5) Save the file "as it is" within the editor;
6) Import newly the ASCII CMOD either within the 3DStoCMOD converter or CMODview. Whether within the 3DStoCMOD converter, check "FIX" then "OUTPUT AS BINARY"; whether within the CMODview, just save "as it is" (default is binary).
Never at rest.
Massimo


Return to “Tutorials”