So recently, I’ve gotten interested in 3D Visual Effects. Also known as CGI, 3D Visual Effects are used nearly everywhere nowadays, and most importantly in movies. However, today I’m using it to create an abstract background. Why? Um, well why not? Also its kinda cool to be able to say that you made your computer’s background. You know what I mean? Anyways, let’s get started.
What You’ll Need:
- Blender 2.72b (Blender.org)
- Post Effects Compositor Optional** (I use Photoshop as mine, but Gimp or any others are completely welcome)
Here are a couple photos of my first try.
And the Final Render!
Okay let’s get started. When you boot up Blender, it should look like this:
Aight so like any sensible artist, we’re gonna copy someone else’s artwork. Just kidding. But we are gonna look at other people’s artwork to design how we’ll make ours.
So what do you see? Before reading the list below, make your own list of notable features. Anything that seems like extra work that we’re going to have to implement is considered a notable feature. Okay here’s mine now.
- Okay so the basics: each fiber glows a muted color, and the end sparkles a brighter color. So basically a gradient of increasing and decreasing strength in that color, with a bright finish.
- The fibers are not straight. We’re going to have to bend them. Also they vary in length, however they’re all mostly thin.
- The arrangement of the fibers is important to the focus. Also the fibers look like glass. Also the fibers don’t look perfect. There are imperfects in the glass of the fiber. Mostly likely from air bubbles as they are made.
- The fibers themselves aren’t glowing that much. It’s around the edges of the fiber. See?
- The depth of field which makes the fibers closest to the camera blur, adds an interesting effect.
Great, so now let’s get started. Let’s clear the scene of all objects (the cube, camera, and light). Also quick note of something that always kills me. The hotkeys and normal interaction with Blender is atrocious. So unfortunately, I won’t be telling you the specific keys to press. You’ll have to watch basic tutorials on Blender online to learn how to navigate the interface. Another side note. If your 3D cursor (look it up) moves by accident and you want to bring it back to the center: click Shift C. That annoyed me for far too long. Anyways back to the point. Add a cylinder to the scene. Set it’s vertices to 8, and then give it dimensions of 0.1 mm for the radius and 20cm for the depth(height). You’ll have to set the units to metric in the scene properties tab. Move the cylinder up to be above the axis, while in Edit Mode, so that the center of mass point stays where it is. You should have something like this:
At this time, put your Blender in its Cycles Render engine. Split the main screen and set a second screen into a Node Editor. Go the materials property tab, and create a new material. Name it “Main”. Create a second one too and call it “Tip”. These are the two materials we’ll apply to the two parts of the fiber. The Main will be applied to the body of the fiber, whereas the Tip will apply to the tip. Highlight the Main again, since that’s what we’re going to edit first. You should have this:
Okay now let’s focus on the node editor. The Node Editor is how we edit certain aspects of the composition. In my understanding, this is how it works. In Photoshop, we have layers. Each layer can affect the layers below them. You can have clipping masks, text, color changers, and various other effects. These effects are reached in Blender through nodes. You add in this little boxes that each represent a effect. Then you connect them in seemingly obscure ways to affect the final result, be that the material you’re editing, the actual final composition, or anything else. To start, get rid of the diffusion node, and add in a Emission Node (from under Shaders). The reason for this is because our fiber will be emitting light. Choose the color you want your fiber to emit. Aight, so this is good. We now have the fiber emitting the light we want to capture. Let’s take a look at it really quick. In the object editor, put the object in rendered mode. You should see a single line that’s the color that you chose. Set the world’s background to see it better. Going back to the node editor, add a gradient texture to create the gradient that I mentioned before in our observations. Now, add a texture coordinates node to control how the gradient is applied. Back in the 3d view, set our cylinder in edit mode and click U, then project from view. Set other node editor to UV editor temporarily and now swivel our fiber 90 degrees to the right. Also scale it up to fit the grid. Add in a color ramp to get more control over the color’s placement on the fiber. Remember to connect everything together. Okay so let’s mess with the color ramp real quick. currently you have darkest at the bottom, and lightest at the top. We want it to start out glowing at the bottom, getting weaker as it gets towards the middle and then get brighter again at the top. On the color ramp, the black designates weaker light, while the white is brighter. So add another reference point to the ramp, and set the points to white/black values according to how we want our gradient to appear. Set the type of ramp to “ease”. It should look like this:
Okay so remember how we said that the fibers don’t glow as much as the edges of the fiber do? Well, we’re gonna create the effect really quickly with a node called the Fresnel Effect. Its purpose is to create the edge effect. Also remember how we said that the fiber kinda looks like glass? Well we’re gonna add that in as well. So add a Fresnel node and don’t connect it to anything yet. Add an Glass BSDF shader and a mix shader. Connect the emission node and the glass to the BSDF and connect the Mix Shader to the Material Output. Also connect the color ramp to the factor input of the mix shader. It should look like this:
Okay looking at the glass shader real quick, you’ll see IOR. That’s the Index of Refraction. For nylon that happens to be 1.55, so set that to IOR. Okay let’s get back to the Fresnel Effect. So before I do that, let me ask you a question. Why did we connect the color ramp to the factor of the mix shader? The emission node already creates the light and the Glass BSDF node already makes it glass-like, so what did the color ramp do? If you recall, the purpose of the color ramp was to darken the emission is such a way that it emulated the gradient of a real fiber. Well there’s another node that’s going to modify how the light is emitted! That’s the Fresnel and its gonna make it so that the light is emitted from the edges. So now that we have everyone’s job down, remember this as we continue and ask yourself why we’re position nodes in certain ways. So we need to combine the Fresnel and Color Ramp to affect the factor of the mix shader. Add a mix RGB to do this. Connect color Ramp to color 2 and Fresnel to color 1. Looking at the mix color, set it to Multiply and the factor all the way up to 1. You should now have this:
If you zoom out on the object editor, you’ll notice the strength of the emission is really low, so set the emission from 1 to 2. Okay so we’re now gonna work on creating those imperfections in the fiber that we talked about earlier. So to do this add in a Noise Texture node, and connect its vector input to the object output on the texture coordinates. This will set an unique imperfect to the fiber. We need to mix the Mix Color (Multiply) we currently have with the Noise Texture. Set let’s add another Mix RGB node. Connect the factor of the noise to the color two of the Mix RGB, and the previous Mix RGB to the color 1. Also the mix type should be set to “Add”. Set the noise scale to 5000. If you look at the quick render now, you’ll notice that the Fiber is far too bright. We’re gonna have to add a Brightness/Contrast node in between the noise and Mix RGB nodes. I’ve found that -1.5 for the brightness and 5 for the contrast works nicely. Also set the detail on the noise texture up. Something like 5 is good. It should look like this:
Great so the Main material is good to go. Now let’s focus on the tip of the fiber. Take the object out of rendered, and go into edit mode. Select just the top 8 vertices which much up the fiber tip. Now go the materials property tab. Select the Tip material. We want the tip to emit as well so let’s set the surface to an emission shader. Choose a color similar to the Main material’s color. For the strength, we’re gonna want something high, like 200 or so, however come back a tinker with this if you don’t like your end result. Hit “Assign” to apply it just the face we have selected in the object, that being the tip of the fiber. Okay so to see this in the object editor without having to resort to the quick render mode every time, let’s give the Main material a color in the viewport. Click on it, and look under the Settings pull down in the property tab. Give it a color (preferably the actual color of the fiber). Look to the tab at the left and Smooth Shade the fiber. Go to the modifiers property tab, and add an edge split modifier, but the angle measure should 60, not 30.
Okay, now go ahead and remove the node editor. We’re done with it for now. Insert a plane, and set its dimensions to be 30cm by 30cm. Add a particle system to the plane, and set it’s type to hair. Click the object sub-tab under the Render Pull down and set the object to “cylinder”. Click 3 on the number pad to see the object from the z and y axis. Rotate the original cylinder by 90 degrees to the right and then click Control A to apply the rotation. Go back to the plane and click Advanced under type, and check the rotation Pull down. Set it to normal. Under Physics Pull down, set the size to 0.25 and the random to 0.03. Under the emission pull down, set the distribution to be ransom, and then set the number amount to 400. That number amount controls how many strands will appear on the plane. Under Velocity, give it a random amount of around 0.04.
Okay so things are going well. Let’s work on positioning the camera. First add one to the scene. Click 1 on the number pad to get a front facing view, and click Control Alt (numpad) 0, to get the camera to snap to your current view. Also a quick side note: now’s a good time to save the blender file because we’re getting close to the rendering stages. Anyways, with the camera selected, go to the camera properties tab and set the start clipping to 1mm. Mess around with the camera’s position and angle to get an interesting view of the cylinders. Here’s how I positioned it (camera view and side view):
This is what it would look like rendered right now:
Great! So this is looking cool, however we want to mess around with the positioning a little bit more. While we’re at it, we also want to mess with the lengths of the fibers and the focus of the camera. So, how do we go about doing this? We’re gonna use something called Weight Painting. The premise of the idea here is that we paint certain areas to control the length of fiber and density of fibers at that point. So first off, with your plane selected, change into edit mode and subdivide the plane. Set the number of cuts to a 100. The reason we did this is that without the vertices, we can’t paint the plane. Well we could but since the plane orginally had only 4 points, painting it wouldn’t give us any control over the fibers. Okay so get out of edit mode, and change into Weight Painting mode. Your entire plane will be blue. Make sure your weight of the brush is 1 and fill the entire plane in red. I suggest a top view to see it better. It should look like this:
Okay so now we’re gonna make it so that this group controls the density(cluster amount of fibers) of the fibers in the particle system. Go the Particle System’s properties tab and look under vertex groups. Set your density to “Group”. Okay so let’s clarify some points here. On your weight painting, where you have red signals that that fibers will show there. Blue signals that no fibers will show there. Your brush has three properties. Weight, Radius and Strength. Weight should always be 1 or 0 depending on whether you’re adding or removing fibers. Radius is the size of your brush. Strength is where it gets interesting. With Strength, you can paint the plane to be yellow/orange(basically values in between the two extremes: red and blue). This strength will control the strength of the density cluster in that location. Knowing that, go ahead a mess with it to match your artistic appeal. Here’s how mine looks:
Notice that all the area outside the camera’s angle is blue. Why make your computer do work that your camera won’t even see? While you’re messing with your painting, if you can’t seem to make the fibers disappear in certain areas, try lowering the amount number of fibers in the particle system properties. Now I’m pleased with the way that my fibers are coming out in length so I won’t even bother with the length weight painting, but if you wanted to, you’d click on the Object Data property panel. Under vertex groups, you’ll notice one that’s called Group. That’s the one controlling your density/cluster. Create another one. Under Particle System properties, under the vertex group pull down, set that new group to control length. Now repeat everything you did from the last weight painting. Paint it again. If you change to object mode, you’ll see that the fibers are positioned according with your paintings.
Okay so now let’s set the focus. Create an empty, and position it near a cluster that you want to be the focus of your scene. Remember to scale it down a little. It should look like this:
Okay now select the camera, go to its properties. Go to the Depth of Field Pull down. Set the empty as the focus and also change aperture from radius to f-stop. You can mess around with this but an f-stop of 3.2 works well. Okay why don’t we take a look at how our render is coming out. Before we click render again, let’s change the sample number. Just know that the higher the sample number, the better the image. For your final render, choose something like 2500, but this will take some time. So for sake of time, I’m setting this one to 150.
Okay so I didn’t like the it was coming out, so I went back and changed properties. These included the f-stop, strength of emission from Main material, density of clusters in the weight painting, and position of camera. Actually I even went back and added another weight painting to control the length. We now have this:
Okay so we have our slightly disappointing render, and we remember that we have one more observation that we have to implement! That is that fibers aren’t straight in real life! We’re gonna have to bend them a little. So to do this, take our original cylinder and move it to another layer. We’re gonna create 4 different varieties that all the fibers in our particle system will follow. The first will be straight. Now duplicate that one and take it into edit mode. Add rings of cuts into the cylinder (like 7 rings should do). Move out of edit mode and duplicate the ringed one two more times. Now take each one individually into to edit mode, and use proportional editing to rotate/move the tip of the fiber thus causing the entire fiber to bend. Okay now group all four together. Name the group “Fibers”. Here’s how mine look:
Okay go back to your original layer with the particle system. Go to it’s properties and under render, click Group and choose the “Fibers” group that we just made. Go p to rotation and set the random amount up to what you want. I chose 1. And now we’re basically done! Only two minor tweaks remain. And also the post effects if you want those. The first tweak is to set the sampling up high. Go as high as your faith in your computer is. If you have a top of the line, I suggest 4000 samples. If you’re less sure, the minimum would be about 2k. I’m going to be using 4000 samples for my final. The second tweak is the size of the image. As a background image, you want the size of the camera to match the size of your desktop. To do this, go to the Render properties panel and look under resolution. The default is full HD however notice that the percentage underneath it is 50%. That means that the final image will have dimensions of 960×540. For me, the iMac uses full HD images as its native resolution, so its as simple as sliding the 50% up to 100% for me. Go ahead and research your resolution (or look for it in your computer’s settings. It’s relatively easy). So after all that work, the final result is this:
Take a look at my tutorial on image post effects editing, to see how I went about doing that. Here’s the final final result!
Okay guys, I hope this was useful to you all. It’s been real. Its wayy too late right now, so I’m off to sleep.
Until next time,