In this recipe, we will create a spaceship hull material. We will add random, tiny light windows based on the values of procedural textures, and the spaceship's logo as if it were painted in red on the hull, as shown in the following screenshot:
The final, rendered spaceship hull material assigned to a displaced Torus primitive
To start creating this spaceship hull, we need the spaceship and space first. Follow these steps to build a quick and easy model and set up the scene:
0.050
. Click on the Use Nodes button and set the Strength value to 10.000
. Change the Color value of RGB to 0.800
.0.100
.6.10677
, Y to -0.91141
, and Z to -2.16840
. Set the Rotation values of X to 112.778°
, Y to -0.003°
, and Z to 81.888°
.25
for Preview and 100
for Render. Then set the Clamp Indirect value to 1.00
, but let the Clamp Direct value remain as 0.00
. Go to the Film subpanel and check the Transparent item. Then set the output File Format to RGBA.1.00
. Under the Performance subpanel, set the Viewport BVH Type to Static BVH (this should speed up the rendering a bit, considering the fact that the model is static and doesn't change shape). Check the Persistent Images and Use Spatial Splits items.4
for both View and Render. Set the Camera view mode to Rendered and go to the Material window.Now let's start creating the material. The steps to create a basic hull shader are as follows:
spacehull
.Mix Shader1
. In the first Shader slot, select a new Mix Shader node (label it as Mix Shader2
), and in the second slot, select an Anisotropic BSDF node.0.250
. In the Diffuse BSDF node, set the Roughness value to 0.500
.Mix Shader
node (press Shift + A and navigate to Shader | Mix Shader) and paste it between the Mix Shader1 and the Material Output nodes. Label it as Mix Shader_Spec_Amount
and connect the output of the Diffuse BSDF node to the first Shader input socket (so that the link from the Mix Shader2 node automatically switches to the second socket). Set the Fac value to 0.300
.100.000
.SHADER
, as shown in the following screenshot:The SHADER frame
The steps to create hull's panels are as follows:
Image Texture1_Hull
, Image Texture2_Hull
, and Musgrave Texture_Hull
. Place them in a column.Mapping1_Hull
, Mapping2_Hull
, and Mapping3_Hull
. Place them in a column to the left of the texture nodes. Connect the UV output of the Texture Coordinate node to the Vector input sockets of the three Mapping nodes. Connect the Vector output of each of the Mapping nodes to the Vector input socket of each of the texture nodes.image spacehull.png
. Then click on the little arrows to the left of the Open button in the Image Texture2_Hull node to select the same image texture. Go to the Musgrave Texture node and set the Scale value to 115.500
, the Detail value to 4.500
, the Dimension value to 0.200
, and the Lacunarity value to 0.600
.2.000
, Y to 4.000
, and Z to 6.000
. Then go to the Mapping2_Hull node and set the Scale value of Y to 2.000
and Z to 3.000
. Next, go to the Mapping3_Hull node and set the Scale value of Z to 0.100
.1.000
. Label it as Multiply1_Hull
. Then connect the Color output of the Image Texture1_Hull node to the Color1 input socket and the Color output of the Image Texture2_Hull node to the Color2 input socket.Overlay_Hull
. Set the Fac value to 0.050
. Connect the output of the Multiply1_Hull node to the Color1 input socket and the Color output of the Musgrave Texture node to the Color2 input socket.ColorRamp_Hull
, and connect the output of the Overlay_Hull node to its Fac input socket. Move the black color stop to the 0.500
position.Bump_Hull
, and connect the output of the Multiply1_Hull node to the Height input socket. Set the Strength value to 0.400
.HULL
, as shown in the following screenshot:The HULL frame
The output of the HULL frame connected to the SHADER frame nodes
The steps to create hull's logo are as follows:
Mapping4_Name
and Image Texture3_Name
, respectively. Connect the UV output of the Texture Coordinate node to the Mapping4_Name node, and the output of this node to the Vector input socket of the Image Texture_Name node.spacehull_name.png
image, an image texture of the ARGUS logo with a transparent background (alpha channel).Mix_Hull_Name
and paste it between the Overlay_Hull node and the Diffuse BSDF shader node. Then connect its Color output to the Color input socket of the Glossy BSDF and Anisotropic BSDF shader nodes.-3.300
and Y to 1.000
. Set the Scale value of Y to 2.500
. (These values depend on the scale and location you want for your logo on the spaceship; just experiment looking at the real-time-rendered preview.)NAME
, as shown in the following screenshot:The ARGUS logo on the hull
The steps to create the windows are as follows:
Mapping5_Windows
, Image Texture4_Windows
, and Image Texture5_Windows
. Connect the Texture Coordinate node's UV output and the Mapping node's output to the Image Texture nodes as usual. Then set the Mapping node's Scale values to 10.000
for the three axes.spacehull_windows_lights.png
image. Then click on the Open button of the Image Texture5_Windows node and load the spacehull_windows_bump.png
image. Set Color Space for both the image nodes to Non-Color Data.1.000
. for both the nodes Label them as Multiply2_Windows_Light
and Multiply2_Windows_Bump
. Connect the output of the Image Texture4_Windows node to the Color1 input socket of the Multiply2_Windows_Light node, and the output of the Image Texture5_Windows node to the Color1 input socket of the Multiply2_Windows_Bump node.ColorRamp_Windows
, and move the black color stop to the 0.919
position. Connect the output of the Multiply2_Windows_Light node to its Fac input socket.Bump_Windows
, and connect the output of the Multiply2_Windows_Bump node to the Height input socket. Set the Strength value to 50.000
.The WINDOWS frame
The windows bump visible on the hull
The steps to create the location mask for the windows are as follows:
Mapping6_Mask
, Checker Texture1_Mask
, Checker Texture2_Mask
, Checker Texture3_Mask
, and Checker Texture4_Mask
. In all, the four Checker Texture nodes change Color2 to pure black.1.000
, and label it as Screen_Mask
. Connect the Color output of the Checker Texture1_Mask node to the Color1 input socket of the Screen_Mask node, and the Color output of the Checker Texture2_Mask node to the Color2 input socket.Add_Mask1
. Connect the output of the Screen_Mask node to the Color1 input socket. Then connect the Color output of the Checker Texture3_Mask node to the Color2 input socket.Add_Mask2
. Connect the output of the Add_Mask1 node to the Color1 input socket. Then connect the Color output of the Checker Texture4_Mask node to the Color2 input socket.ColorRamp_Mask
. Connect the output of the Add_Mask2 node to its Fac input socket. Then move the black color stop to the 0.100
position and the white color stop to the 0.000
position. Set Alpha of the black color stop to 0.000
.1.600
, the Checker Texture2_Mask node to 8.800
, the Checker Texture3_Mask node to 3.000
, and the Checker Texture4_Mask node to 9.700
. Go to the Mapping6_Mask node and set the Scale values to 0.500
for all the three axes.MASK WINDOWS
as shown in the following screenshot:The MASK WINDOWS frame
The steps to create the final connections are as follows:
The MASK WINDOWS frame output connected to the WINDOWS frame nodes
Mix Shader3
and paste it between the Mix Shader_Spec_Amount and the Material Output nodes.The output of the WINDOWS frame connected to the SHADER frames nodes and the result in the Rendered preview
The steps to create the light emitter for the windows are as follows:
ColorRamp_Lights_Colors
, change Interpolation to Constant, and add six more color stops (eight total). Change the color values alternatively of R to 0.800
, G to 0.517
, B to 0.122
; and R to 0.800
, G to 0.198
, and B to 0.040
(or any other color you prefer).3.000
, as shown in the following screenshot:The windows on the hull getting illuminated by the ColorRamp_Lights_Colors node and an Emission node output connected to the SHADER output
100.000
), and through the usual Mix Shader nodes. We added one more Mix Shader node (Mix Shader_Spec_Amount) to include the possibility of setting more specularity than anisotropy, and vice versa.100.000
. A very high value like this is needed because the specularity is then mixed again with the Diffuse BSDF component to the purpose to obtain a slider to tweak the effect.The appearance of the hull can be improved even further using some displacement to add geometric details to the spaceship surface, which (at the moment) is a bit too smooth:
2
for both View and Render.spacehull_displ.exr
texture.0.200
. In the Texture Coordinates slot, select UV.This way, the displacement features get mixed with the hull bump panels of the shader, giving a nice result. The spacehull_displ.exr
texture is a 32-bit float displacement map created and stored in the Blender Internal engine. I modeled the Planes and scaled Cubes a simple greeble panel, then I baked the displacement on a different and unwrapped Plane, as shown in the following screenshot:
The greeble scene ready for the baking
Finally, we can try to set the first Subdivision Surface modifier level to 4
and lower the second Subdivision Surface modifier's level to 1
. Then, starting from the top one, apply all the modifiers. You will inevitably lose the details but will obtain a much lighter mesh—589,824 faces against the initial 2,359,296—and considering the fact that most of the details come from the texturing, the result looks pretty good (at least from a distance). It also looks good if the shading is set to Flat instead of Smooth.
The Torus spaceship with the applied modifiers