CPSC3710 – Computer Graphics
by Lezar de Guzman
For my project, I have decided to model a plastic dancing ladybug that we keep at home as a decoration. It has a light sensor on top which powers it, causing the ladybug and leaves to move back and forth. I chose it because the model seemed not too complicated, yet not too simple (for me at least), and also, having it physically would make it easier to model. Plus, the thing is just plain awesome.
The modeling software I used was Blender 2.65a. I had worked with Blender once before, a couple of years ago, for a very simple project. Having not used it in a while, I had forgotten how to do so, and so had to re-learn simple things like navigating the UI and basic modeling. To help with this, I watched a number of tutorials online. For a little bit of well-needed inspiration, I also watched all four Blender Open Projects, short films created to show off Blender: Elephants Dream, Big Buck Bunny, Sintel, and Tears of Steel.
Initially, the UI was overwhelming, and there were a large number of shortcuts to be learned, but after watching tutorials and experimenting here and there, it became easier to navigate through the whole thing. Of course, I barely made use of all the functionality of Blender, but I felt comfortable with what I was able to use.
One thing that interested me, though, was a new render engine in Blender called Cycles. From reading and watching various articles and tutorials, it seemed that it allowed for more realistic images (and a painfully longer render time) compared to the Blender internal render engine. I decided to give it a try, with (a bit too high) hopes of creating something with realistic lighting and materials.
Photos of the actual object from four different angles.
The background is me (creatively) holding a piece of paper.
Modeling and Shading
To assist with modeling, I took a number of picture of the ladybug from various angles. I first started with various angles. I decided to break up the model into various objects: the base, the leaves, the ladybug, and the stem. I first started with the base. I started with a UV sphere. I removed the bottom of the sphere to create the flat base. The top of the base was much more complicated than I expected. First I had to flatten the top a bit, as it is in the photos. The hard part though was figuring out how to make the hole in the middle and the sensor. I just used loop cut to create extra vertices, adjusted them one by one so they lined up in a rectangle, and then deleted the faces between them to create a hole. I did similarly with the hole for the sensor. Looking back now, I realized that I could have just used the knife tool instead. After modeling the base, I applied a solidify and a subdivide surface modifier to create a smother look.
The base in edit mode without any modifiers
After I created the base itself, I had to attach the sensor, which I worked on at a separate layer, as I did with all my objects. At first, I tried to create it by just extruding the hole of the base down, but because of the subdivide surface and solidify modifiers, it didn’t look very good. Instead, I selected the vertices around the sensor hole, extruded it, and separated it into a new object, the sensor, but I didn’t apply any modifiers to it. Then I extruded those vertices down the z-axis and created a face between those. Finally, the base was done (minus a few adjustments that I would do later).
I then added a material to the base. This was extremely difficult to get right. I wanted to material to look exactly like the real ladybug base – a glossy green plastic. Finding the right settings was much tougher than I thought. I ended up using a mixed shader with a glossy shader and a diffuse shader as input to it. I used also used layer weight, with fresnel as the factor, similar to this tutorial. It didn’t too bad. It looked horrible. Although, I think I probably didn’t have the right settings compared to the tutorial’s. I applied this weird green material to the sides of the base, and I applied a different rough grey material to the top of the base. (Later, I realized the top of the base was more brown than grey)
After this I had to add a material to the sensor. I basically used the same grey-later-to-become-brown material to the sides around the sensor, and applied a glossy dark brown material to the sensor itself. One of the new (amazing) features of the Cycles render engine is the ability to have a rendered preview of your object by changing the Viewport Shading while in 3D View. The preview automatically (amazingly) re-renders every time you change the object or your current view. So, every time I changed my material, it would automatically re-render, which allowed my to see the outcome of my changes. I thought my colours ended up looking extremely weird, but I considered the base complete for the time being and moved on to the next phase of my project: the leaf.
Left: my modeled base from a really weird-looking angle
Right: my rendered base with a really weird-looking material
Note: The render is from the rendered preview in Cycles. I used 30 samples, taking about 16 seconds to fully render.
I made the leaf using an icosphere. I cut off the bottom half and scaled it a little bit along the x-axis. To help with creating right size and angles for the leaf, I applied my photos as backgrounds to be seen when viewing from top, bottom, back, front, and left ortho. This allowed me to actually see my leaf compared to the real object. I then modeled the leaf by translating vertices around and scaling them along the y-axis, which went across its width. As with the base, I added a solidify and subdivide surface modifier. The difficult part was attaching the stem, which I did by extruding one side of the icosphere along the x and z axes. It was rather difficult to get the proper angle, width of the stem, as well as make the surface blend smoothly with the rest of the leaf as with the real one. I used a linked duplication to create two more leaves, leaving (pun intended) the first one as a master. I then translated the two leaves to their proper locations on the base, using the pictures again as reference. Both of them have a mildly different rotation about the y-axis.
Figure 4 – Cheating
As with the base, I proceeded to apply a material. For the leaves, I also applied both glossy and defuse shaders, using a lighter green colour than the base. I played around with this for a while, trying various configurations, and even adding a translucent shader, since the leaves were very slightly translucent. I ended up using a mix shader, with glossy and diffuse, but used a factor of .800 (leaning towards diffuse). I also changed the roughness of the glossy shader to .010, which gave it a sharper reflection. Well, I couldn’t get it to become exactly like my real ladybug, but I was still happy with the results compared to the atrociously abominable anomaly of a material that I used previously. I applied a similar material to the base.
A screenshot of the preview of the base, sensor, and leaves
This was probably the hardest part to model and shade. Similarly to the leaf, I also used an icosphere, the bottom half cut off, and scaled along the x-axis. I wasn’t sure at first how to get the head done. My first instinct was to extrude, translate, and scale as I had been doing before. This created an odd boxy looking head. Failing that, I created another icosphere and chopped it up so that I just had about a third of the top half. Then I scaled it and merged the vertices to the body. Again, I applied solidify and subdivide surface.
Next, the wings. This was the hardest part. If you look at the real photo, the wings are slightly raised. I modeled them by selecting the vertices which corresponded with the wings and extruding them up the z-axis. It was alright, but it still didn’t look right. I had to sort of indent the part where the wings merged. After a lot of trial and error, I finally knifed across the poor ladybug’s wings. You can see the knife cuts I made as the narrow triangles on its back.
The next part were the antennae. They were done by extruding two front triangles on the ladybug’s head forward along the x-axis and scaling them down. At the corners, I just rotated and extruded along the y-axes. The bulbs at the end were just extruded and then scaled wider. Finally, I was done the model.
The ladybug with some seams visible
After modeling, I had to create the colour of the ladybug. I added seams to the ladybug to separate the antennae, head, and wings (body). Then I did a UV unwrap and exported the UV image to GIMP were I created the image to apply to the ladybug by having the UV image as a separate layer. I thought this part was difficult and require a lot of trial and error to get the spots, eyes, and line into the right size and shape. At first the spots and eyes were elongated, which I didn’t expect to happen. I compensated for this by scaling the spots down along the y-axis in GIMP. At first I had a straight black line going down, but the red of the wings jutted out into the black head, and so I ended up adding the triangle at the bottom of the line, as seen below.
Left: the unwrapped UV map
Right: the image used as shader colour (ie., creepy ladybug eyes staring at you)
After this I applied the same glossy and diffuse material material, but using UV mapping and the coloured image above as the colour of the shaders. I then positioned the ladybug to its approximate location. The result is the preview render below.
Preview render of the ladybug, leaves, and base
Modeling the stem was rather simple. I started a cylinder with 8 vertices. I then extruded it up. I created the curves of the stem by extruding out and rotating, little by little. The difficult part of modeling the stem was creating the right curvature. This was difficult because I did not have a picture with a good view of the stem. I worked around this by holding up the real ladybug object against my monitor every once in a while and comparing it to a right orthographic view. The end of the stem was done by angling it such that it was parallel with the bottom of the lady bug. I had previously rotated the ladybug about the y-axis by around 30 degrees so that it wasn’t straight up anymore, as it is in the photos. I then extruded out and scaled the last ring of vertices to create the cone shape. It isn’t really attached to the ladybug, though, but it isn’t noticeable. I then applied a subdivide surface to the whole stem.
A view of the stem “attaching” to the ladybug
I then created the base of the stem as a separate object because I had difficulty creating it properly with the subdivide surface modifier, but looking back, I should’ve just created the stem with a larger number of vertices initially. If you look at the real photos you will notices the is a small notch in the base, which looked really awkward with subdivide surface. I created a cylinder with a similar radius to the stem and created the notches. I then attached another cylinder perpendicular to it. At this point I also added cylinders to the base of the leaves, so that my model more closely matched the real object. For the stem, I applied the same material as the leaves. I used a translucent and diffuse mixed shader for the stem base, with a factor of .900 (leaning towards the diffuse shader).
I was just about ready for rendering. I had to do a few touch-ups first. The first was applying an image texture as the colour of the base to simulate the grey lines on the light sensor. I changed the it to a fully sharp glossy texture so that it would reflect the ladybug and stem. This can be seen from the user perspective picture below. I also shrank the size of the middle hole because it was too large compared to the real hole, and I also created the inner walls of the middle hole by extruding its vertices down and separating it as a new object, which I joined to the sensor object. I also changed the colour of the brown top from grey-later-to-become-brown to greyish-brown.
Since my goal was to model the ladybug, I needed to compare my model to the real photos. I did this by positioning the camera at different locations. To simulate the paper I created a plane and extruded one of its edges up the z-axis to create a crease. The shadow on the top perspective (which is really my arm and the camera) was done by placing a plane a above ladybug (although, now that I think about it, modeling an arm and a camera and placing it above the ladybug would have given more realistic results). Some shots were harder to get than others (front and right). This was because the plane would sometimes get in my view.
My attempt to recreate the photos from the previous pictures
Rendering was rather difficult because Cycles takes a lot longer than the default internal render engine. I was also using a laptop, which although had a decent GPU (for a laptop), still wasn’t very fast. At first I decided to render with about 1000 maximum light bounces to give less noise, but because it was taking to long I lowered it to about 200. I rendered at 1920x1080.
The Final Rendered Images (AKA The moment we’ve all been waiting for)
Here is a render from one angle. Unfortunately, even after 2000 samples (over an 1.5 hours), there still remained some noise. For this shot, I added depth of field to the camera, with a rather small radius, so the tiles in the background would have a little blur. The floor is a glossy material with a checker texture. I added a plane with an emission material behind the camera to have some lighting more lighting, along with a present sun. The plane is can be seen as a reflection.
Here’s a photo from the bottom (also 2000 samples), just to show off my lovely Dollarama sticker, which I took a picture of and attached it to the bottom as a material and separate object. You can also somewhat see the bottom of the ladybug from its reflection on the floor. I used a slightly larger radius for this image (focused on the Dollarama sticker of course!), and I adjusted the tiles to have greater contrast and smaller size. I also added another light-emitting plane to have light come in from another angle. For reasons I do not know, the sticker has quite a bit of noise.
Something I noticed that it seems that under certain low lighting and maybe low sampling, the rendered image seems more realistic. If we look at the image with just the leaves and the base only, it seems more realistic than even the final render. I am not exactly sure why this is. My only guess is that some things just look better when you don’t have enough light to seem them for what they truly are.
The new Cycles render engine seems promising. The ability to view a rendered image in the 3D view is definitely an advantage, as is the more realistic way light is treated to produce better images (which you should see someone else’s pictures for a better idea).
Overall, my experience with Blender was very good, although I occasionally had difficulty getting a good view. It seems that it has a lot of functionality for a free 3D modeling software, although, I have never used any other, so I can’t really compare. I hope to try to animate my ladybug to simulate the real thing (which sadly broke during the whole modeling process).
Also, $1.50 for a solar-powered dancing ladybug is a good deal!
Here are the tutorials I watched/read to help me learn how to learn blender. The last one, Creating a cup of coffee, I highly recommend for any other beginners with Blender. It goes through a whole project of making a realistic 3D picture: from modeling, adding materials and using nodes, lighting and camera, to finally rendering.
UI Navigation and Simple Modeling
Blender: Interface and Navigation | Blender Cookie
Blender: Intro to Modeling | Blender Cookie
Blender 2.5 - Basic Interface | www.blendtuts.com
How to use modifiers | www.blendtuts.com
Blender Tutorial Series - Part 15 - Eyeball – YouTube
Blender 2.6 UV Mapping Tutorial Marking Seams - Making a CubeeCraft NES Console Model (New Version) - YouTube
Materials, Nodes, and Cycles Rendering
Everything 3D: Reusing Cycles Materials the Smart Way
Doc:2.6/Manual/Render/Cycles/Nodes/Shaders - BlenderWiki
Blender Tutorial: Realistic Materials with Cycles – YouTube
Creating a cup of coffee! - YouTube