Creating a Photorealistic Moon in 3D

How to render the moon with accurate moon phases

Reading time
8 min
Published on

October 21, 2024

Syntactic Labyrinths

An waning gibbous moon against a dark background with stars wallpaper rendered in Cinema 4D.

The moon is not only incredible to look at in real life, it’s also a wonderful sight to behold in CG. Having a photorealistic moon setup in 3D is one of those staple exercises for any 3D artist. And it gives you a great treat every time you fire up a render. 

For several years we’ve been exploring various techniques for creating realistic space scenes for use in Syntactic Labyrinths. Making a space short film truly pushed us into Research and Development for all areas space related. From realistic stars to atmospheric shaders for planets, we’re always finding new ways to improve on these 3D renders. 

Today I’d like to have a look at creating a photorealistic moon. This will be a simple example of how many techniques come together to create one believable setup. 

The Shader 

Creating a realistic moon starts with a sphere. And a very large one at that. The importance of working with large sizes when making planet renders is that we want to avoid shallow depth of field at all cost. 

Large celestial bodies appear completely in focus when seen from space. Their distance from the observer is so large that from a relative stand point they live in one single plane of focus. 

This is different however from the “foggy” edge we see on pictures of planet Earth. This is in fact not an effect of depth-of-field. The edge is blurry due to a large concentration of atmospheric particles accumulating from the angle we’re looking at. A sort of Fresneling caused by distortions.

Once you have a large sphere it’s time to build your material. 

Depending on the distance from the camera you might need a high resolution texture map, or a very high resolution one. In our case I wanted a pretty detailed result that could seamlessly fit in between the other shots of the film. 

NASA has a very realistic set of Moon textures that go up to 23K. This is great for most use cases! You can download it from their website through this link.

If you want more resolution you can have a look at the data gathered by NASA's Lunar Reconnaissance Orbiter. Or take the more time-efficient approach and thank those who have figured it out for us! 

Both Prateek on Artstation and Tuomas on Gumroad have gone through the painstaking effort of converting the NASA data into beautiful 92K texture maps. 

For the material setup I’m simply adding the color map into the Diffuse channel without any additional corrections. And I’m adding the displacement map into the Displacement channel. 

The material editor in Cinema 4D and Chaos Corona building a Moon material.

To correctly set your displacement map you will first need to know whether your map is a 32-bit .exr or not. If it is, you should be setting the minimum value and the maximum value at equal distances from each other. 

If you’re using an 8-bit or 16-bit displacement map you should play around with the min and max values independently until your values match the result you’re looking for. 

What I tend to do is to have a reference of the moon at a similar frame next to my render engine window. Then I just play around with the Displacement settings until I’ve got a match! 

Remember that this is relative to the size of your sphere in your scene. 

The material editor in Cinema 4D and Chaos Corona building a Moon material.

To make sure your values are correct you can divide the Radius of your sphere by the radius of the real moon (without converting from km to cm). Then that’s your conversion unit. 

Next you can multiply the height of the tallest mountain on the moon (5.5km) by this conversion unit. Followed by multiplying the deepest crater on the moon (-8.2km) by this unit. 

For my sphere I got a Min Value of -163.4 cm and a Max Value of 109 cm

If you’re using Chaos Corona, like I am, you can place your texture maps inside of a CoronaBitmap shader. This allows the software to apply the Out-of-core Memory function which helps you preserve some RAM. 

The next two things to define are the roughness values and the IOR value

As the moon is so incredibly far away we can use a high Roughness value for the entire moon. This simply gives the illusion that all the surface is really big and made up of lots of tiny high roughness dust particles. 

One of the simplest ways to achieve subtle variation is to use the image texture you’re already using in the Roughness channel. However, we want the roughness level to be much, much higher. I’ve added a Layer to the Roughness channel with a Color shader set to a value of about 80%. I’ve then added the color map set to Screen mode. 

All the bright parts of the moon’s surface will be slightly rougher than the dark parts. That’s a simple method to add some variation and in turn, realism. 

The material editor in Cinema 4D and Chaos Corona building a Moon material.

The IOR of the Moon is also an interesting topic. Lunar dust, or as they call it, Lunar regolith is made up of a large variety of materials. All the way from quartz to silicates and aluminum oxide. 

I looked up these materials in our IOR 3D Database and found IOR values between 1.459 and 1.665. However, as lunar dust is at least 50% composed of SiO2, I’m settling for an IOR value of 1.518. 

And that should be it when it comes to shading! 

Accurate Moon phases 

An important aspect of creating a photorealistic render of the moon is how the moon is “living” in space. Instead of placing the sun anywhere in the scene, we can add tons of realism by matching it with real world positions. 

And honestly, the simplest way to achieve this is by matching your moon with a dummy moon from an orbit system. I found this amazing earth-moon orbit system on Sketchfab

After importing the .fbx file I’ve scaled the orbit system in Object Mode so that the moon asset matches the size of my moon. Then I added a sun to the scene and animated it to follow the position of the sun inside the orbit system. 

A Cinema 4D viewport with the moon and its earth orbit setup.

The color of the sun as seen from space is white. But if we’re being specific with our color temperatures, we’re looking at 5900K “white”. This makes it a slightly warmer white than what we would be used to seeing on a bright sunny day from Earth. As in that case the sunlight would be filtered through the blue atmosphere of our planet. 

I then placed the moon at the exact position of the dummy moon, matched axis rotation to be zeroed out and rotated the moon to face the Earth just like it does in the real world. 

I then copied the Rotation keyframes of the dummy moon into the rotation parameters of my moon. Now it works!

The Cinema 4D keyframe Dope sheet with keyframes.

The moon rotates along the spline of the earth-orbit, while always facing the Earth. With a setup like this you don’t have to worry about getting physically accurate results. 

A photorealistic render of the moon in a realistic moon phase rendered in Cinema 4D with Chaos Corona.

A photorealistic render of the moon in a realistic moon phase rendered in Cinema 4D with Chaos Corona.

A photorealistic render of the moon in a realistic moon phase rendered in Cinema 4D with Chaos Corona.

A photorealistic render of the moon in a realistic moon phase rendered in Cinema 4D with Chaos Corona.

Now you can focus all your attention on getting the look of the render you want :)

Seeing Stars against the night Sky

Stars are such subtle sources of light that depending on how much additional light is in your view, you might get to see them or you might not get to see them at all. If for example one were to stand on the surface of the moon while the sun is shining — the brightly lit moon surface and sun glow would make it borderline impossible to also see the stars. Space would be pitch black. 

On the other hand, if one were to be standing on the moon during night time, the stars would be brightly visible all around you. The relative light output between stars and sunlight is so drastically different that, realistically speaking, we would have to choose which of the two we want to expose to. 

Non-realistically speaking however, we can do whatever suits our taste and desired result. 

Let’s first add in the stars and then we can play with the light intensities until you find the value you like for your scene. 

Depending on your purpose you might want to choose an HDRI with stars or simply a back-plate. What I would suggest however is that you use a 32-bit high dynamic range star-map. This will give you enough light information so that your stars don’t turn grey when underexposed. The brighter stars will keep shining through longer until they all disappear into blackness. 

As we were in dire need of such star-maps all throughout the production of Syntactic Labyrinths, we built them ourselves!

A digital product box for Blauw Films resources.
Download Star System for Free

Star System is available for Free on our Resources page. It includes star plates, HDRIs and even single stars. 

In my moon renders I landed on a light value of 0.05 in Chaos Corona

Feel free to play around with this until you find what you’re looking for. 

Realistic sense of Scale and Motion

Now that you can pretty much make any render you want, it’s important to consider how you want to frame your shots. And when you’re rendering an animation, you’ll want to consider how you want the motion to affect your shot. But honestly, both considerations are closely related to each other. 

Any celestial body is incredibly large in scale. So large in fact, that it would take a lot of time to move around it, unless the speed you’re traveling at is just as incredible.

When we’re creating a 3D render, we’re creating an illusion. 

And we can use this subconscious understanding of how things work in real life to make the illusion of your 3D render feel realistic.

  • Move slowly - and it generally feels big. 
  • Move quickly - and it feels as if you’re in hyper-speed. 
  • Move the sun - and it feels as if it’s a time-lapse.

There really isn’t a right or wrong way to tackle this part of the process. Every decision you take related to the scale and motion of your scene impacts the feel of your scene. 

In a way I feel it’s easier when your render is a part of a scene. As in that case your story and sequence is guiding the context and meaning of every subsequent shot. A Kuleshov effect of sorts. 

Just let your personal preference and experience when composing a shot guide you towards getting the result you’re looking for :) 

Download the Wallpapers

For all of you who have gotten this far in this article I have a gift for you! :)
You can download the 3 wallpapers below and have fun with it! 

A photorealistic half moon in space with stars in the background rendered in Cinema 4D and Chaos Corona.
Download Moon Wallpaper 01

A photorealistic backlit moon in space with stars in the background rendered in Cinema 4D and Chaos Corona.
Download Moon Wallpaper 02

A photorealistic moon close up in space with stars in the background rendered in Cinema 4D and Chaos Corona.
Download Moon Wallpaper 03

Conclusion

Creating realistic renders of any planet can be quite the challenge. Especially if you’re attempting a photorealistic and naturalistic result. 

With many years of Research and Development for Syntactic Labyrinths I can tell you that you can make it much easier for yourself by building a trusted setup. 

Set it up correctly once and have endless fun after. Or at least until the next update of your 3d software. I hope this blog has given you a good sense of how to create realistic moon renders. And if so, I’d love to see what you make! Feel free to send over your renders at leo@blauwfilms.com

Table of Contents
Stay connected with Blauw Films! 
For the latest updates, breakdowns and exclusive content, follow us on Instagram, LinkedIn and YouTube

Reading List

References

0 Comments

Active Here: 0
Be the first to leave a comment.
No Name
Set
Moderator
4 years ago
This is the actual comment. It's can be long or short. And must contain only text information.
(Edited)
Your comment will appear once approved by a moderator.
No Name
Set
Moderator
2 years ago
This is the actual comment. It's can be long or short. And must contain only text information.
(Edited)
Your reply will appear once approved by a moderator.
Load More Replies

New Reply

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Load More Comments
Loading

Up next

That was the latest post.

Check back soon for more entries to the library.

Previous

That was the oldest post.

We are working on updating our archives.

You might also like

A blue arrow pointing right from the Blauw Films website.
Planet Earth in a half translucent blue and purple color with a glow rendered in the Blauw Films crystal material.

Join the Newsletter!

Be the first to hear about our latest releases and news!

Want to start Dreaming in Blauw[1]?

Oh no! That didn't seem to work.

By entering your email, you agree to receive a curated newsletter from Blauw Films.

[1]: Dreams of Blauw are any form of crystallised thought based on honest expression. Sometimes they linger a shade of blue in your after-image.