Material Nodes: Making a Planetoid ( intermediate-advanced )

(Modron) #1

Here’s a simple way to make a planetoid using nodes.

This tutorial assumes basic knowledge of a few things, like UV mapping and texture paint, however, if you would prefer, you can substitute a procedural texture for the UV texture, and forget about the geometry node. Also, if you do this, you will probably want the use the ‘value’ output of the texture node, instead of the ‘color’ output.

  1. we are going to make a planetoid, so, to get started, make a sphere, and UV map it. Using texture paint, create a black and white image of where you want your continents to sit. you can make the water black and the land white, or the other way around, it really doesn’t matter. Save the image, we will use it in a moment.
  2. select your sphere, and open the materials window. Make a material for the land, with no specular, and a clouds texture for the bump map. Then, make another material for the water, with a high specular, and a stucci, or musgrave texture as the bump map. You can use the same channel, just choose add new, or toggle the appropriate channels on or off in the materials buttons. Anyway, we have two materials, one for land, one for water. make another material to hold the mask texture, or you can put it in one of the channels that’s toggled off in your exsisting materials. Anyway, load the mask you just painted into a texture channel.
  3. now, split your 3-D screen, and make a nodes window.
  4. go back to materials, and on one of them, doesn’t matter which, press the ‘nodes’ button, and you will see two nodes appear in the nodes window. The material will be solid black at this stage, so, in the nodes window, press the red arrow buttons, which will now be highlighted in red, and browse for a material. Choose the land material. Now, with shift+D, duplicate the land node, then, with the browse button, call up the water material. You now have two material nodes, and an output node.
  5. we need three more nodes, a mix node, a texture node, and a geometry node. Call these up using shift+A.
  6. use the browse button on the texture node to call up your mask texture, and
    a) connect the ‘UV’ output on the geometry node, to the ‘vector’ input of the texture node.
    b) connect the ‘color’ output of the texture node to the ‘fac’ input of the mix node.
    c) connect the color output for the water node to either of the color inputs of the mix node.
    d) connect the color output for the land node to the remaining color input of the mix node.
    e) connect the color output of the mix node to the color input of the ‘out’ node.
  7. render.

(FuzzMaster) #2

Nifty. I’m rendering a nice space scene now.

(SoylentGreen) #3

And that’s the real advantage of the material nodes: Blending between materials and not only between textures!

Nice thing to do: use fresnel transparency with a material node and connect the alpha output to the fac input.

(chavez_3D) #4

Thank you for that tutorial!
Tried it with success!
The problem which I encountered is:If I am blending a Material with raytransp on with one without, it does not work during raytracerender.
If I render it without raytracing it works well, but there is no transparancy of course.
Is there a solution for that problem?

(Cosimo_0) #5

when you say “make a sphere and UV map it”, are you supposed to add a white image as texture and then pain it?

I’m sorry, I don’t know how to use the “texture paint” feature.

(chavez_3D) #6

Important is, that there is a proper UV Layout, which means UV are not overlapping.
You can use a selfpainted Tex or any other black/grey/white pic as texture for the fac input in the mix node.
So you do not necessarily need to use tex paint tool.
You can also export the UV Layout and create your Tex in a paintprogramm like any other imagetex.

(treatkor) #7

thank you for the tutorial, Modron. I like this technique. here’s what i came up with:

(Modron) #8

cool, it turned out nice. you can fake an atmospheric halo, too, by going into camera view, doing a shift S for snap cursor to selection, adding a circle with a bunch of verts, and possibly subdividing or duplicating it to add yet more, giving it a halo material. then, tweaking the halos alpha and hardness and size to where it looks about right. ( i think [email protected] originally came up with this method )

(ecgilboy) #9

Nice tutorial…thanks…

(BeBraw) #10

That’s a nice and simple tutorial. You can use the same method with vertex paint color now. It is even possible to use multiple vertex paint color maps at once (Col field defines which one is used in input). Vertex paint can be especially useful on dense meshes.

(oodmb) #11

for planets i recomend the toon shader where the lighting is hard like a point light. look at some nasa photos. (unless of course your planet is very close to its sun or it has multiple suns)

(Modron) #12

I wasn’t really going for a great planet render, just trying to convey the idea of using the UV mask for materials. There are really quite a number of things wrong with my planetiod though, in terms of its overall appearance. The ocean, for instance, is full if tremendous, huge waves, because the bump map is too big. But thanks nonetheless for the input, I never really thought of using the toon shader for a planet, but it makes sense. [email protected], S68, and Env, are all good at making planets, so if people want to learn a proper planet making technique, check out their works. In fact, I think env made a tutorial on it at one point, and S68 made a plugin called BWF ( blender world forge ) that will model big chunks of land, or even a small planet, according to the variables you set for it. It might need an older version to run on though, not sure. Btw, Bebraw, that’s cool about the vertex colors, I didn’t know that.

(BeBraw) #13

Modron: You can get more blending ideas at . That tutorial is meant for 3dsmax but it seems doable in Blender with no problems.

(yafray) #14

my 2 different displacement maps don’t get mixed (only colours) - am i doing something wrong ? greetings

(Modron) #15

I have not tried it with displacement maps, maybe displacement works differently? Did you try it with normals mapping?

(yafray) #16

true - there is alot of difference . i usally use displacement mapping because normals mapping is just a render fake. but so far i didn’t see a way to mix displacement maps over the material nodes . at least with normals the mixed bumping works good like in the tutorial :slight_smile: .

(The_Warder) #17

could someone explain how to do this with more than 2 materials. I need to do three

(Modron) #18

I think you can now use RGB values, though I have not actually attempted it.

(lisamarietuck) #19

thanks very much for this tutorial, was a real help

(Modron) #20

Glad to be of help. I think I may add a couple more examples of this type of composite material.