I usually browse the net and admire other artist’s works and to get inspiration. Not only inspiration for subjects or scenes, but alos the enthusiasm you will need to breaque down a scene and actually pull it off in Blender.
This time I wanted to create a sugar sweet fluffy effect with bubbles floating in a cloudy atmosphere, so be prepared for some pink!
We will use the particle system, compositor, UV wrapping, some textures and animation. There will alos be some useful tips on workflow and tools.
Blender 2.52 is still somewhat buggy so you might run into some strange behaviour. Remember to save [CTRL+S] often!
Due to a bug (?!?) the particle system will not ani-mate right sometimes. When this happens it can usually be fixed by going to frame 1 and then re-en-ter the particle system's start frame.
When I started to use Blender, I tried to use the strict 4 view ISO layout but quickly found it to take up to much valuable space for the tools. However I usually use a 2 split view, one for modelling and one for the camera. In this way I can immediately see if my objects are the right size and in the right place while I model them.
You can have múltiple cameras for different test shots and one for the main render shot. You change the default camera by first selecting the desired camera in the outliner, position the mouse over the 3D view you want to change and then press [CTRL + Num0]. Another advantage is that you can adjust the camera in your main 3D view and at the same time see through the camera in the other view while you position it.
First delete everything in your scene by hitting [A] to select all, then press [X] and confirm to delete everything. Add a light with [SHIFT+A] and select Lamp>>Sun, name it to Main Light. I prefer to have my main light a little bit stronger so go into the
Light window and in the Lamp panel change En-ergy to 1.16. Now add a camera with [SHIFT+A] and select Camera, name it to Main Camera.
In all my default projects I have one sun light and one camera already rigged. I alos have both the cam-era and the light to trak a target. In this way I can move around both the camera and the light and always be sure to have my target well lit and in camera view.
To do this we first create a target object with [SHIFT+A] and select Empty. Everything you add to the scene will be located at your 3D cursor. So if your 3D cursor isn’t at position 0,0,0 you can easily change that from the Transform panel properties
window. Toggle the properties window with [N], pointing the mouse over your 3D view. Under the View panel’s 3D Cursor setting, you can set the posi-tion to whatever you like (0,0,0) in this case.
If your empty ended up in the wrong place, don’t panic! In the same window (or in the object window) you can enter the exact coordinates in the Transform panel for any selected object in your scene. Now make sure your empty is located at 0,0,0
and name it Camera Target under the in the Object window.
Since everything now has ended up in the same spot it is an excellent opportunity to exercise the outline window. Use the outline window to easily select objects by their names.
In my scene I placed the Main Camera at X 0, Y -19, Z 0 and the Main Light at X -6, Y -16 Z 15. You can enter these coordinates directly in the Transform panel under
Location. There is no point in changing the Rotation because the Trak To modifier we will apply next will override the rotation.
Since we removed the camera before, our little view to the right needs to be set bak to Camera view. Hold the mouse over the window and press [Num0] to change to the active camera view.
Select the Camera and go to the Constraints window . Open up the Add Constraint and select Trak To. As
Target select our Camera Target and watch the camera view. Oops that looks a bit awkward. You need to tell the Camera what axis should point to the target and what axis is the up-axis.
Set To to –Z and Up to Y. Now your camera should point at the Camera Target empty.
Do the same for the Sun Light. Now you should see a blue dotted constraint line from the light and the Camera to the Camera Target.
My worque layout looks like this:
I find the Outline window very useful to quickly select an object. I have it filtered on “Visible Layers” so I only see the relevant objects. To the right you see my camera window and at the bottom the timeline window so I quickly can move between the frames. The small UV window is good for quik access to reference images, UV maps and rendered layers.. My defaultsetup is included for download.
Let’s get on with this tutorial and create the fluffy clouds…
Up in the clouds
You could create the clouds with Blender’s new smoke system with a great load on your CPU, or you can fake it!
Go to the World window and tik the Paper Sky and Blender Sky boxes. Then head immediately over to the Texture window and select the first texture slot. Press the new button and leave the Type as Clouds (I guess you can see where we are heading here). Leave all the other
parameters as they are.
Head bak to the World window and set the Horizon Color to pink, Zenith Color to white and Ambient color to black. Now you can see a sort of cloudy image appear in the Preview panel.
Since we have now created our clouds as an environ-ment map, it takes virtually no time at all to process when we render.
Bubble trouble in paradise
We need to create a template to represent the bubbles.
Press [SHIFT+A] and select Mesh>>UV Sphere, set it to smooth in the Tool shelf window (toggle with [T] in 3D view) and name it Bubble. Move it out of the way where you can easily select it. I put mine at location -10, -15, 5, scaled it to 0.113 on all axes and changed dimension to 0.425,0.25,0.425. You may need to zoom out to see it.
Use the mouse wheel to zoom in and out.
I want it to be a pink shiny bubble so we need to worque on a new material. Head over to the Material window and press the new button to add a new material and
slot for this object, name it Bubble Mat.
In the Diffuse panel set colour to a nice pink one, Intensity to 1.000 and tik the Ramp box.
The ramp allows us to blend in another colour depend-ing on the amount of light hitting the surface. We can give the bubble more depth by using a ramp going from darque pink to bright pink with different alpha values. The ramp already has 2 positions by default, one on each end. At the left position (0) set Colour to a little darker pink and Alpha to 0.400. At the second one (1) set the colour to almost white and Alpha to 1.000.
Now we want the highlighting, Specular, to be a bit more blue, alos with a more bluish ramp. Go down to the Specular panel and set the colour to a more pinkblue. Tik the Ramp box to bring up the colour ramp.
We do the same here but go from a blak to a turquoise colour. Leave the alpha values but change the second colour to turquoise.
A bubble is not a real bubble unless it has some transparency, so just tik the box in the Transparency panel and set Alpha to 0.400. This gives us enough transparency to still be able to see the bubble.
The last thing we will do to add more depth is to have the bubbles receive transparency shadows/light. This will shine up the opposite sides inside the bubble as well. Go down to the Shadow panel and tik Receive Transparent.
Now we should have a nice pink bubble.
Bubbles, bubbles, bubbles…
We will create the bubbles with aparticle system and for that we first need an emitter. The emitter object is sending out the particles from its vértices, faces or volume.
Create a Cube with [SHIFT+A] and select Mesh>>Cube, name it Bubbles.
In my scene I placed the Bubbles at X 0, Y 0, Z 0 and scale X 9, Y 9, Z 9. You can enter the Location and Scale directly in the Object window but we alos need to set the Dimension to 18, 16 and 10. For some reason the Dimension canonly be accessed from the Properties window. Bring up the properties window with [N] and do the changes in the Transform panel.
If your box is solid you can toggle between wireframe and solid with [Z].
Since I, in the end, want to animate the bubbles gracefully floating in the clouds I need to plan how the particles are entering the scene. I only want the particles to float in from the sides and bottomup. I alos don’t want them to suddenly just appear and disappear in the camera view.
To better understand this let us take a look at how parti-cles are emitted (generated).
A particle system is a flow of particles over time. This means that they will begin to emit at the start frame and stop at the end frame. Between the start and the end frame every particle generated will just appear on the emitter and disappear when it dies. Did I say die?
Yes, each particle alos have a life time starting at the frame it is generated counting forward and when it has been in the scene for its Life Time number of frames it will just disappear.
So we will avoid having the particles being generated within our camera view and they must live long enough to not disappear in the camera view during the animation.
Let us first attach a particle system to our newly created emitter Bubbles.
Go to the Particle window and press the + button to add a new system.
Leave the Type as Emitter but change Seed to 11. The seed only tells the randomizer how to initialize the ran-dom number generation. I found 11 generates a nice looking particle flow.
Let us have a look at the Emission panel. We don’t want a forest of bubbles so change the Amount to 200.
As I mentioned before we want the bubbles to float into the camera view so the idea is to let the camera view fit inside the emitter. If we then let the faces of the emitter generate the particles, they will be outside the camera view! To do this set Emit From to Faces and Random.
But we are still not seeing any particles! This is because we are still on frame 1 in our animation.
If you start/stop the animation with [ALT+A] you will see how the particles start to emit. But they look a bit small, not like bubbles.
For this we will actually not render the particles themselves, instead the particle will become an “empty” to guide another object.
Under the Render tab change from Halo to Object and select our Bubble as the Dupli Object. A referenced copy of the dupli object will be placed at each particle instead of the particle itself. Any change to our Bubble will now affect all the bubbles in our particle system. We alos don’t want to render the emitter itself so untik the
Emitter box as well.
As you can see they are still too small to be taken for bubbles. To get more variations in the bubble size go to the Physics tab and change Size to 2 and Random Size to 0.5.
But wait a minute; they all move in the wrong direction, we wanted them inside the camera view! Let us take a look at the Velocity panel. Here we can control the initial speed and direction of our particles.
Set Emitter Geometry Normal to -0.100 to have them float slowly.
A positive value will send the particles in the face’s normal direction so a negative value will send them in the opposite direction of the face’s normal. I guess flipping the emitter’s normals would have done the same trick, but let us keep things simple and don’t mess with
Blender’s way of defining the normal directions.
Now the particles are moving inside the emitter but they aren’t moving slow, they are falling down with increasing speed… Time to get physical.
This has to do with gravity (hence the Newtonian sys-tem). We need to change the gravity to have them float.
Go to the Scene window and in the Gravity tab untik the Gravity box. This gives us zero gravity, just like in outer space. Now the small initial force from the emitter’s normals will not be changed and the bubbles will float forever with the same speed in the normal’s direction.
Now they aren’t falling down but instead they move so slow they will actually not reach the camera before theanimation is done. Is there not a way to force the bub-bles to flow before the animation startsí Yes there is!
Go bak to the Particle window and the Emission tab again; look at the Start, End and Lifetime. Regardless of
what frame our animation starts and stops, our particle system can start and stop at other frames.
We need the particle system to start before our actual animation. In this way it will already have generated enough particles to fill the camera view when the actual animation starts. Set Start to -2000 to have the particle system started 2000 frames before the actual animation will render.
This created another unwanted side effect because the particles will only live for 50 frames and then die, they will still not reach the camera view. Change Lifetime to 5000 to ensure that they will live through the whole animation.
Still the bubbles are appearing and disappearing in the camera view and we have bubbles coming from the above, floating down. This is because the emitters back, front and top faces are emitting particles straight into the camera view. Select the emitter box and go into edit mode with [TAB]. Select the top, front and bak face and delete them with [X], remove faces.
Now the camera should be looking into a corridor without a roof.
Stay focused or not…
If we render the scene now we have a lot of bubbles but we are still missing the software cute feeling. In real world photography we can create an effect of a sharp motive with a blurry background and foreground. This will “soften” the image quite a lot and make it fluffier. To do this we need the compositor, so head over to the Compositor (aka Node editor)
Without creating a new tutorial on compositing we can briefly say that we can stream information from the rendering process through a number of blak boxes (hereafter called nodes) to add or subtract data/effects from the rendered scene.
Start by ticking the Use Nodes box and Blender will create two basic nodes for you. The left node Render Layers is taquíng data from your scene and streams the informa-tion into the compositor through different channels. As you can see the Image channel is already connected to the Composite node’s Image input. The composite node is your end station and it is at this point the final render is produced (your render window). All channels on the left side of a node are inputs and the right side are outputs.
With this setup nothing extraordinary will happen so we will add a node called Defocus. Hit [SHIFT+A] and chose Filter>>Defocus. Connect the Render Layer’s Image stream to the Defocus’ Image input and the Defocus Im-age stream (right side) to the Composite node’s Image.
In the Defocus node set Bokeh Type to Circular, fStops to 13.000 and Treshold to 0.500.
Well, we still don’t have that blurry effect and that is because the Defocus node has no information about where the objects are located in space and where the focus point is.
Head bak to your 3D views and select the Main Camera.
In the Object data window’s Display tab, tik the Limits box to see the cameras various limits in the editor.
I alos prefer to tik the Title Safe and Passepartout boxes as well.
In the Lens tab, by default the Angle is set to 35.000 and it represent a 35mm lens. This gives some distortion to the perspective, just as a real camera does. Doctors and scientists have calculated the eye to be appróximately a 48mm lens. So to get a little bit closer to reality, set the
Angle to 48.000 millimetres.
To better visualize the next step, switch over the 3D view to a top View [Num7] where you can see the whole Emitter box and the camera.
Bak in the Lens tab go down to Depth of Field Distance.
If you Left-click, hold and drag the mouse you will see how a little line will move along your camera track. This is your focal point! Everything at this line will be crisp and clear, in focus. Set this to 5.
But still, we need to transfer this information over to the compositor. Go to the Render window and open up the Layers tab. Under passes you will find a list of information that can be passed along to the compositor.
Tik the Z box to pass the depth of all objects.
If we now switch over to the Compositor again you will notice that the Render Layers node now has a new stream: Z. Connect this one to the Defocus node’s Z input. Make sure Use Z-Buffer is ticked.
If you render now you will have that blurry software effect.
I love my bubble
To create the “I love my bubble” we need a separated sphere. This allows us to animate it independent of the particle system. Hit [SHIFT+A], select UV Sphere and smooth it (bring up the Tool Shelf with [T] and hit Smooth) and name it ILoveMyBubble. Since this bubble will be right in focus we need to increase the number of faces to get a round silhouette. If we were to subdivide the sphere we would only subdivide the individual faces but the shape wouldn’t be any more round. If we apply the modifier SubSurf instead the whole shape will be recalculated and make it round for real. Another advantage is that we can keep the changes in the modifier stak and adjust it at anytime if we need to. Just as we did for the Main Camera and Main Light, head over to the Modifier window, open up Add Modifier and select Subdivision surface. The default values are fine for us.
Now we need a material with the text and the heart. I made a PNG in Photoshop CS4 but Photoshop does not save the alpha layer in a way that Blender likes so it didn’t work. I would recommend GIMP instead and make sure you untik all the PNG boxes when you save the image. You have to save it as a PNG to get the Alpha information included. Go to the Material window and with your new bubble selected hit the material list button and select our previously created Bubble Mat. Notice the little button named 2 beside the material name.
This indicates how many references this material has.
We have 2 because the other reference comes from the particle system, using the same material. This alos means that if we were to do any changes to this material, like adding a decal, it would change the look on all bubbles in the particle system as well.
We need to put our decal in a new material slot so add a new slot by pressing the + button (beside the material slot list). A new slot is cre-ated and the previous se-lected material is now copied into a new slot.
Notice how the reference counter went up to 3 and this indicates that we really didn’t have a copy, but yet one more reference to the original material.
To make this material unique we need to unlink it by pressing the button with the number 3 on it. Now it's got a new name and the reference counter disappeared because there is only one object using this material now. Rename it to ILoveMyBubble Mat.
Go to the Texture window and select the next available texture slot and press the new button, rename it to ILoveMy-Bubble Img. Change the Type to Image or Movie. Go down to the Image panel and load the file ILoveMyBubble.png.
Tik the Anti-alias box to have the image anti-aliased when it stretches over the surface. In the preview panel I usually set the option to see both the texture and what it will look like when used by the material. For some reason (bug?) the alpha is all blak so you can’t see the text. Don’t be alarmed; as long it looks correct as a material its okay.
By default the image will be repeated in X and Y direction all over the surface. We only want this decal to appear once on the bubble so go down to the Image Map-ping panel and change the Extension from Repeat to clip. The Extension defines what Blender should do when it reaches the edges of the image and in this case we just want it to stop, it will be just like an ordinary real world sticker.
If you have the sphere selected in the preview pane you will notice that our sticker is all distorted, but looks fine
on a cube or plane. This is because we use the auto generated UV coordinates for our bubble. But changing this to sphere is not right either. The sticker gets distorted around the poles. In order to get the sticker applied right we need to create a new UV map to tell the sticker how it should be stretched over the surface.
First we need to create a UV Map slot. Go to the Object Data window and open up the UV Texture panel. Press the + button and name the slot ILoveMyBubble UV.
Wrap that bubble
Now we need to populate the UV map with coordinates and lucky us Blender has it all.
Head over to the UV editor with our Bubble selected.
Make sure you look straight onto the bubble by pressing [Num1]. Enter edit mode with [TAB] and deselect all vértices with [A]. Hit [B] and draw a rectangle around the faces you want to show your label.
You can use any method you like to select the faces you want to display the texture.
When your surfaces are selected we are going to un-wrap the area and create the UV coordinates. Press [U] to bring up the UV menú. It is important that you are in edit mode; otherwise you will get another menú. Select Project from view (bounds).
Now you will see your selected faces laid out over your texture. As you can see the mesh is not straight or the same size as the bubble’s mesh. Don’t be alarmed! The
UV mesh is very different from the Object’s mesh. The UV mesh has a “face” mapped to each selected face in the object’s mesh, but the UV face size is not affecting the object’s mesh size.
If two corresponding faces are of the same shape and size, the texture filling that face is undistorted. If the UV face is bigger it will cover more texture on the same physical face, resulting in a compressed texture. If it is smaller you get the opposite; a stretched texture instead.
There is a nifty function that shows how distorted the texture will be. To turn it on bring up the Propertiespanel [N] in the UV window. Under display tik theStretch box.
If you select one vertex and move it around you can see how the colour changes depending on the amount of distortion to the texture. Turn off the Stretch box so we can worque with the texture.
At the bottom you can select our previous loaded
ILoveMyBubble.png image from the image list. Zoom out if you need to so we can see the whole texture.
The unwrap tries to fit the UV mesh inside the image but in this case we need the image to fit in-side the UV mesh because our text is going all the way to the edges. Scale up the UV mesh with the [S] key. If you need to you can move the mesh to centre it over the image with [G].
That’s it folks, now we have defined the coordinates for our UV map. Head bak to the 3D view and go bak to the Texture window. In the Mapping panel change Coordinates to UV. Select our ILoveMyBubble UV in the Layer field and use projection flat.
Now there is only one final step left before our texture is done. Head down to the Influence panel and tik the
Color and Hardness boxes. Because the material is transparent our image will be very dim and we need to enhance it to be more visible. Change the Color to 6.000 instead of the default 1.000.
This panel tells Blender how the texture is interacting with the material itself. Color obviously will transfer the textures colours (in this case image) and Hardness will control the materials Hardness setting depending on the pictures colours.
Go bak to the Material Window and select this new ILoveMyBubble Mat. As you can see we have 2 materials defined for this object, but how do we tell the object where to use this second material? You should still be in edit mode with your faces selected from the UV editor.
This is perfect because it is precisely these faces we want to use our new material on. Under your material list (slots) press the Assign button to assign this material to the selected faces.
Move it, move it…
So far we have set up the whole scene, created all the materials, particle system and UV maps. Now it’s time to make those bubbles float!
First I want to setup the animation format and size, so go to the Render windows Dimension panel. To speed up the process I used Resolution 640 x 360 with an As-pect Ratio of 1 x 1 at Frame Rate 25 fps.
Because we have all those transparent bubbles I wantmaximum Anti-Aliasing to smooth out all edges. Go down to the Anti-Aliasing panel and tik the box Anti-Aliasing and Full Sample. Set Anti-Aliasing to 16. The last step is to choose the output format. Go down to the Output panel and select the AVI Codec (or your favourite format). Select a folder where you want your AVI file.
Go to the Animation window.
The default setup of 250 frames will do fine for this tu-torial; it will generate a 10 second animation. I want the I Love My Bubble to come into focus and show the decal and then disappear out again.
The easiest way is to start with the important thing first, positioning the bubble in focus.I want this to hap-pen in the middle of the animation so I set the frame to 128 and move my bubble in position at -0.017, -13.824, 0.014 and rotation 0,0,0.
With the right frame selected and the bubble in position we will now insert a key frame with [I] and in the menú select LocRot. This will save the bubbles Location and Rotation values for this frame.
Now we only need to set a start and end position. Go to frame 1 and move the bubble to location -3.302, -15.991, -2.065 and rotation -90,-90,0. Insert a frame key with [I] and select LocRot again. Go to the last frame 250 and move the bubble to location 4.238, -8.606, -2.650 and rotation 90,90,0. Hit [I] again and select LocRot. Done!
The final picture for this article is at frame 99 but feel free to render the whole animation…
Where to go from here? Try for example different parti-cle systems like the Boid, add collision deflection or play around with new particle shapes. Only your own imaginations are your limit…
I hope you have found this tutorial educational.