How to create your own moon

This article will show you how to make a 3D model of the Moon from scratch. It would seem, Why create a model of the moon yourself, if you can buy it? If only because when making your own model of the Moon, you will be able to set the desired parameters, for example, the size and thickness of the shell, image resolution, rotation limits, the position of the secant plane, you will be able to make a hole for the lamp, and so on. Let’s get down to creating our own moon.


A wide variety of 3D models of the Moon can be found on the Internet. Some can be purchased online, while others can be downloaded as files and 3D printed. Finished models can be divided into 2 categories:

  1. The surface of the Moon is drawn in detail and high quality, but if you place a light source in the model, its details are not illuminated from the inside

  2. Surface details are well drawn when illuminated from the inside, but without their highlighting can not see

Step 1. High-quality drawing of details

Details are not illuminated from the inside if you place a light source inside
Details are not illuminated from the inside if you place a light source inside

Step 2. Details are well traced when backlit from the inside

If you don’t have a 3D printer, you can buy a lamp like Moon lamp

Step 3. Preparing the software

Below I give a list of the software involved. After becoming familiar with the technique, you will be able to do the same thing as me, using ordinary tools.

Modeling tools

Download my modified version Banate CAD from Github

Banate CAD package is written in Lua, so to run scripts on Windows install Lua for Windows

STL file editing tools

Meshmixer

Step 4. Preparation of materials

Plastic fiber for printing

The images above are for PLA products. 3D printed products using different types of white PLA can have different shades. The plastic supplier claims that option B is the best, but it is this fiber that, alas, is stuck in my printer.

Light source

You can illuminate the model of the moon in different ways, the light source can be powered by batteries, from the mains, and so on. The choice of the light source is also influenced by the size of the model. There are a lot of options, and if we start discussing them here, we will deviate from the topic of printing. It is enough to understand that there are a lot of options. Note that the warm white light of the source is more pleasing to the eye.

Matte spray paint

Most PLA models are highly reflective, so I recommend a matte finish. Matte spray paint will easily solve the problem.

Step 5. Images of the Moon

Two images of the moon are required for the simulation. They are in the folder BanteCAD/Examples… I reduced the resolution to 720×360, which should be enough for the model. Search the web for higher resolution images if needed.

Bump map

For surface modeling, there is a special map, usually called a bump map. The shade of gray indicates the height of the corresponding point on the sphere. With a bump map, all surface details can be accurately displayed on the model. However, if you compare the bump map to the Moon in the sky, you will notice that they are different from each other.

Visual map

The details of the real moon are not only about different heights at different points. Color is also important. Naturally, we can tell the printer to print different colors, but luckily we see the real moon in grayscale. To allow light to penetrate the model at different intensities, you can print the model with different wall thicknesses and overlay a grayscale image on the model. To adjust the wall thickness of the model, we need a visual map of the moon.

Post-processing

  • Lunar surface map Is a regular bump map. We need to take into account the internal thickness, so I use the Level function to shift the value to the right (a brighter image will be displayed on the bump map).

  • Inner map of the moon Is the shape of the inner surface of the model. Using this map, we determine the thickness at each point of the surface, that is, the desired shade of gray. This map is constructed from a visual map, to which in turn thickness settings are applied based on a bump map. Or, to use another calculation method, by subtracting the bump map from the inverted visual map.

Configurable parameters

  • If you lower the bump map, the elevation on the surface will be less, and the sag will also decrease, but you will have to distribute the surface details differently.

  • If you move the level of the visual map to the left, the shell becomes thicker, and vice versa. It should be remembered that you should not shift the level too far to the right. The casing must be at least 0.4 mm thick (if a 0.4 mm extruder nozzle is used), otherwise you will have to manually make a hole in the casing.

  • The range of the light gray scale depends on the level range of the visual map.

Attached files: moon.xcf

Step 6. The lunar shell is too thin – and here’s the result

The shell should not be too thick, but not too thin, so that holes do not form on it in unexpected places. If the shell is thinner than it can print, the printer simply won’t print anything, and holes may even form on the surface in unexpected places. You can fix it like this.

  1. Open the STL file generated by BanateCAD in Meshmixer.

  2. Delete the interior surface model.

  3. Run the Edit command.

  4. Select the Hollow command.

  5. Set the thickness to 0.5mm (for a 0.4mm extruder).

  6. Run the Hollow command again.

  7. Accept the changes, the lunar surface shell is now 0.5mm thick.

  8. The plane is rotated and cut in the same way as in the lunar envelope settings.

  9. Export the STL file.

  10. Open the lunar shell STL file in Microsoft 3d Builder.

  11. Eliminate defects.

  12. Open the STL file of the lunar surface with a shell thickness of 0.5 mm.

  13. Eliminate the defects of the object.

  14. Select the entire object.

  15. Accept the changes, the lunar shell is now 0.5mm thick.

  16. Export the STL file.

Step 7. Modeling – BanateCAD

BanateCAD can model a 3D shape based on a bump map. In the examples folder, I posted the corresponding script. It reads the surface map and the inner moon map, and then simulates both shapes. Below are the steps to simulate with BanateCAD:

  1. Open the BanateCAD.wlua file.

  2. From the File menu, choose Open.

  3. Open the file moonlamp.lua in folder Examples.

  4. Optional: change the parameters.

  5. From the Compile menu, choose Compile and Render.

  6. After a while, a 3D model will appear.

  7. From the File menu, select Export -> Export STL.

  8. Enter a name for the STL file and click the save button.

Configurable parameters

The output diameter of the sphere in inches, the bump map and the interior map are generated based on this parameter:

local outputSize = 3 -- inches

Surface Height Ratio:

local outputSize = 3 -- inches

The resolution should not be larger than the PNG image resolution:

USteps = 720,
WSteps = 360,

Step 8. Create a shell – Meshmixer

Based on the shapes made in BanateCAD, we can create a shell by subtracting the surface of the inner shape from the shape.

Following are the steps to create a wrapper with Meshmixer:

  1. Open the exported STL file with Meshmixer.

  2. Wait for the download to complete.

  3. Select both models in the Object Browser.

  4. On the left toolbar, select Edit, then select Boolean Difference.

  5. Wait for the completion of the calculation.

  6. Select the Accept command.

  7. Wait for the completion of the calculation.

  8. Leave one model in the Object Browser, this will be the lunar shell.

  9. Save the file.

Step 9. Modifying and Displaying the Model – Meshmixer

Any parameters can be adjusted before 3D printing. There are such options:

  • If you want to place the model of the Moon on your desktop, I suggest that the Z-axis rotate from -45 to -60 degrees, so the Moon will be facing you as usual.

  • If you want to hang the model of the Moon from the ceiling, I suggest that the Z axis rotate from 120 to 135 degrees for the same reason as above.

  • If you want to install a backlight inside, do not forget to make a hole for the wire (if you have any difficulties with printing a hole on a 3D printer, you can, like myself, just drill a hole with a drill after printing.

  • 90% of the cutaway Moon percentages are flat, so you can hide the seams and print it easily without sagging.

When finished, export the STL file for printing.

Step 10 3D printing

Open the object in a 3D slicer, make sure there are no holes in the shell, and start printing.

If the Moon needs to be perfect, you can skip the previous step of cutting the plane and enable the caliper option. But, in my opinion, it is rather difficult to remove the remnants of the caliper.

If the previous step caused you difficulties and you were unable to print the STL file, use my file

Bring the top, light source and bottom together.

Step 11. Coating the surface with matte paint

Most PLA 3D prints are highly reflective, so I recommend covering the resulting surface with a matte paint.
Most PLA 3D prints are highly reflective, so I recommend covering the resulting surface with a matte paint.

I am currently trying to print a lunar lamp with a larger diameter of 110mm: this is the largest size that can be printed with a Robo C2 printer. One printout will take tens of hours. I want a moon with parameters like this:

local r = 52
local h = 3

The final!

You did it! Now you can show off to the familiar results of your work, or just donate the finished model to your friends!

find outhow to upgrade in other specialties or master them from scratch:

Other professions and courses

Similar Posts

Leave a Reply