Monday, August 15, 2011

How to Create a Wineglass


Today I'm going to show you a modeling tool I guarantee you will use many times in the future. The Spin Tool!


What this tool does is take a 2D, flat "slice of an object that you modeled and then spin it around the 3D cursor. So all you have to do is model a "cross section" and Blender will do the rest.

Start up Blender and select the cube. Tab into Edit Mode and select all the vertices now hit X to delete them so we have a blank object to model our profile. Go into Front View (Num Pad 1) and Orthographic view as will (Num Pad 5).

Now to make our cross section, we need to add and place individual vertices to achieve the exact shapes we want. To do this, you simply hold down Ctrl and left click where you want to add the vertices. You can then hit G to position them if they get a little off. Don't sweat it too much though, the vertices do not have to be placed exactly.

Tip: A bonus of modeling in orthographic mode with a straight on view like this is you get a grid you can use as guides to get everything straight.



To make it look like a wineglass, imagine you took a real wineglass and made two vertical cuts in it (very close together) so you ended up with a sliver of the glass. Now look at the outline of the piece. That's what you have to model.

Here's mine. As I mentioned before, it does not have to be very exact, in fact mine is quite terrible :) But you'll see in the next steps it will turn out looking pretty decent.


Now for the spin, we need to place the 3D cursor at the center of where the spin should be performed. We also have to make sure we are in the right orientation because that also affects the spin.

Select one of your middle vertices in your slice and hit Shift + S and select Cursor to Selected. The cursor will move to that point. Now switch to Top View (Num Pad 7). 


Over in the Toolbox, find the Spin button under the Add header. Click it. You'll notice that you get like a quarter pie type a thing. Right below the Toolbox panel there should be the settings for the Spin you just added.

Set the degrees to 360 so we get a complete rotation. Your model will look pretty blocky because its only spinning using just a few multiplications of the slice. Increase the number of steps until it gets a little smoother. Don't increase it too much because you'll end up with too many vertices (which can slow down Blender).


Before we move on, select all the new vertices and in the Toolbox click Remove Doubles and Recalculate. When you use the Spin tool, Blender puts one of your slices right on top of the original so there are two of the same vertices which can cause weird artefacts. Remove Doubles will take care of this. Sometimes the normals (basically which way a face it pointing) can get messed up which can also cause artefacts. Recalculate usually takes care of this.

Tab out of Edit Mode, set the Shading method to Smooth. It's starting to look pretty good, but we can smooth it out even more without adding any extra vertices using a SubSurf modifier. What it does is look at the faces of your mesh and "artificially" subdivide them to make the model appear smoother. I say artificially because while it has the appearance of subdividing, it really adds no new vertices to the mesh.

In the Properties window, switch to the Modifiers tab (the wrench) and add a Subdvision Surface modifier (SubSurf is a shorter way of saying it).

I always use the Catmull-Clark because Simple just looks awful.

I set the number of subdivisions on mine to 2. Be careful with going to high because it can really start to bog down the computer and increase render times.







The modeling is done! Before we texture it, let me make a disclaimer: I am a terrible texturer, past the basic stuff, my texturing is pretty bad, but I'm learning. It's one of the hardest things about 3D. But, I can manage this :)

Go to the Materials tab and add a new material. I left everything the same except I turned down Specularity a touch and increased the hardness of the specularity.

Next we need some transparency. When light travels through a transparent material, it refracts, it doesn't just pass through perfectly straight. Only Raytracing can simulate this effect. Typically, you should avoid Raytracing when you can because it drastically increased render times, but for things like this it is necessary.

Alpha effects how transparent the material is.

Specular determines how transparent to make the specular highlights.

IOR determines at what angles the light ray refract. Set it to 1.52 for glass. Here's a document of some different IORs for different materials.

Gloss affects the smoothness of the reflection.



Set your transparency to something like what I have above.
Now we need to add just a touch of mirroring because in the real world, glass does have some mirroring.


Don't go overboard with it, unless you want a completely fake looking thing.

Well that's pretty much all there is. One thing to note is you'll need some sort of interesting background to see the refraction clearly. I just put  plane underneath it with a wood image texture applied to it.

I hope you got something from this tutorial. If you never remember exactly how I modeled a wineglass, just remember the Spin tool, its invaluable. Until next time :)

No comments:

Post a Comment