Gas Giant Texture Tutorial

The final result of all of our efforts.

So here’s my much delayed tutorial for making better gas giant textures. I really did intend to get this posted by Friday, but it proved shockingly slow, with a lot of false starts and dead ends. Particularly shocking since I was starting with an okayish initial image. Meh.

Gas giants aren’t really something I’m looking to map. Any decent gas giant map would almost certainly have to be very three dimensional, and I really do not want to map something that complex in three dimensions. Particularly since it is going to change fairly quickly over time. What I want here is pictures. I want to be able to render a gas giant rising in the sky of one of its moons. I want to be able to show attack ships burning in the light of a crescent gas giant. But since I do want to be able to do these things, I need to figure out how to create a reasonably convincing facsimile of such a thing. That is what this article is about.

For those who want to follow along or examine the decisions(good and bad) that I have made, I have posted a zip file with all of my textures, planetGenesis graphs and blender file here.(ed. We had a problem with Google Drive that delayed posting the zip file, but it is now available. We apologize for the inconvenience.)

I’m starting with planetGenesis for the basic noise. The noise itself is actually pretty simple, and I should be able to implement it in Cycles nodes directly. I originally intended to massage it in Photoshop, though, so I did it in planetGenesis. I may post a tutorial on my manual use of the Photoshop Liquefy filter later, but for now, this puppy is all procedural. I’ll also look into doing this in pure Cycles later as well.

I start by creating a perlin noise with a very low frequency on the x and y coordinates, and a high frequency on the z coordinate. This creates a spherical noise with strong horizontal stripes. In pG, this is a fractal with in this case 4 octaves. The result with only 1 octave would be a straight noise, but I like the final result better with several octaves. Four seems like a good compromise between time and attractiveness of the texture.

This produces our basic noisy stripes.

Next I created a fairly high frequency noise(in all three dimensions). This will serve as a distorting noise to make the general swirling. Connect this to the left channel of a multiply combiner. To the right channel attach a constant value “noise”(Add Noise>Gradients>Constant Value). After quite a bit of experimentation I found that 0.32 was a good strength for this distorting noise. Attach the multiply combiner to the left channel of a warp combiner. This will provide the distorted stripes. In my early experiments, this beauty was pretty satisfactory all by itself. This is what I was originally going to pass into photoshop for further improvement.

These distorted stripes could be a decent gas giant texture all by themselves.

The next part turned into a bit of a spaghetti nodes nightmare, I’m afraid. I created a low frequency noise to control where I would place a few large storms. I clamped this and pushed it down to make a fuzzy mask that only effected a few specific locations. I used this mask to mix between the original distorted noisy stripes and the new storms.

It’s just a mask, so not so pretty, but this controls the placement of the storms and, in the next step provides the control that swirls the existing distorted stripy noise that gives the storms their details. I could’ve swirled yet another noise, but it would’ve made the spaghetti graph even more insane with little visible effect.

Next I passed that mask through a multiply combiner(with a constant that, after experimentation, I set to 9.0), this gave some strength to the distorting effect I applied to the original swirly stripes with another warp combiner. The result was generally a mess. I don’t quite understand why adding zero to the coordinates of the stripy noise causes it to get all distorted. I think that may be a bug in the warp combiner. Since I don’t want to turn this into a coding post, I’m just going to work around that possible bug by mixing the storm-distorted noise with the swirly stripes. Since I have yet to add three-way combiners to pG, the mixer is a bit of a mess. But the results aren’t bad.

Here we have our bigger storms. Unfortunately, it looks even worse than the swirly distorted stripy noise.

I could differentiate these storms from the general background storminess by painting in a different color by hand. Instead, I’m going to add the storm mask directly back into the noise to differentiate the storms from the overall noise after passing it through a multiply combiner with another strength value. This makes the big storms contrast more strongly with the surrounding environment. I ended up going with a -1.0 on that final strength to make a bump map for the clouds as well.

Raising those storms.

Or maybe lowering them…

I also made a full-coverage map of the large storms. I’m thinking that it might work better to mask a gradient map of this in as a separate diffuse color set. This picture will be in the zip file, but I decided not to post it here.

This is the final network I used to render my noises.

I think I have all of the defining noises I need or might need, so it’s on to Blender.

This was a long, drawn out process of trial and error, and I still consider the result to be a WIP. Mt initial idea was simply to plug some of the image textures I generated in planetGenesis into the gas giant material I posted in my last article. This idea fell apart about the time I discarded Photoshop editing in favor of purely procedural rendering. Now, I’m just feeding in the grayscale images as non-color data. This worked well for bumps and strength factors, but required a lot of rejiggering with color data. The color ramps required a lot of playing about to make them look good.

I tried a lot of things like a rough glossy and subsurface transmission. None of these made the effect better, some made it worse. After a lot of trial and error, rendered at half resolution, this was my final working material node graph. For clarity, I have separated nodes into blocks by responsibility.

The bump block was the simplest and most straight forward. I simply loaded my chosen bump texture, ran it through a multiply node with a scalar strength and passed the result into a bump node. I then passed that into the normal vector slot of the diffuse bsdf.

My final material nodes in Blender.

The diffuse block was a bit more complicated. I used my storm mask texture to control mixing between a texture generated by passing the initial storminess texture through a brown-orange to off-white color ramp and a second storm texture generated by a 50-50 mix of the storm coloring noise texture and the so-called great storms texture passed through a dark-red to red to whitish color ramp. The result of all this was passed to the color slot of the diffuse bsdf.

Finally, I generated a somewhat subtle emission shader. This was created by passing the initial storminess texture through an invert node, because I wanted the higher bumps to represent thicker clouds being cooler at higher altitudes and also absorbing more of the heat radiated from the hotter lower clouds. I then multiplied this by an emissive radiation strength(in this case, I settled on 1.0 as a good compromise between subtlety and visibility.  I passed this final strength into the strength slot of the emission shader.

For the color of the emission shader, I passed the initial storminess shader into an orange to ruddy-brown color ramp. In retrospect, I may try a blackbody shader to determine the color for this, but that may work best with multiple cloud layers and volumetric scattering and absorption. Basically, I’d need to scale the input texture to an appropriate temperature range. I’d also need to scale the emission strength realistically for temperature.

I played around a lot with just the emission shader alone to get the effect I wanted, and this really does make a lovely brown dwarf shader. With multiple cloud layers and volumetrics, this should be darn powerful. Maybe even showing the play of light from a nearby star and the glow from a brown dwarf’s internal heat.

I’m really liking the effect I got from this, but at full resolution… It. Is. Slow to render. for such a simple scene, this shouldn’t be taking me four hours to render. I’m thinking I missed something in the optimizations, but if this is really how things are, I’m a little afraid of volumetrics. I’m also thinking that any scene with interesting spacecraft and such will need to be composited from multiple passes. Especially, if my spacecraft have any volumetric transparency, gloss or complicated geometry.

So the final render is what you see at the top of the page.

Beyond, that… yeah I could spend another week polishing this up, but right now I think I just need to get this posted. Thank you for your patience. Until next week, this is The Astrographer signing off.

This entry was posted in Mapping, Planetary Stuff, World Building and tagged , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s