griff's blog
Building an avatar in Blender from scratch Step 9: Animation
November 13, 2010 by griff
Comments (0)
Well I have animated DEKA using thyme's Seamless3D to create a Hanim1 avatar and animations.
The avatar created in Blender was imported into Seamless3D and various parts of the mesh assigned to my part tree structure.
The first three animations were bvh files (one from the internet, two created in Poser5). The bvh files were processed in BVHacker first then imported into Seamless3D.
The final animation - the eyebrow raising was done using a simple animation using a "displacer node", that is part of the Hanim1 spec, and a simple scalar interpolator.
So here is a video of the final product with 4 animations:
The sad thing about it all is that only two pieces of VRML/X3D software support this avatar. Instant Reality and BS Contact (eyebrow not tested on Contact) - and as there is no wandering logo in the video, you can guess what I used.
As an aside note, all the software used to create and animate DEKA was free - even Poser 5 which I got a few years back in a giveaway by Curious Labs(?) when the new version Poser 7 came out.
griff :)
Building an avatar in Blender from scratch. Step 8: UVmapping Deka
September 20, 2010 by griff
Comments (0)
So we have Deka created but we need to create a UVMap so that we can texture on the clothes etc. Normally in the past I would have used UVMapper, but for this I continued on in Blender using another Jonathon Williamson tutorial which you can find here .
There are a number of things that I can say up front about the tutorial:
1. His final result is two textures - the head and the whole body. For VRML we want a single texture - so ignore the two textures build it all on one texture.
2. The final result from the tutorial has the body as one single piece to texture - but that, as the tutorial says, wastes pixel space. So that whole section I ignored.
3. The tutorial use a mirror while mapping - which saves time but does not give you the real picture of the UVMap until you apply the mirror. I did it without using the mirror which means extra work - but to be honest not that much - basically duplicating the seams for the right/left arms and the right/left legs. (You can select edges for seams by going into the Edge selection mode and Right Click then Shift Right Click on edges you wish to select.)
4. The tutorial uses Blender 2.5 but I did it in 2.49 - there are major differences but most of them apply to item 2 above. The seams created in the initial part of the tutorial are all you need.
The final map I ended up with is not the same as the usual uvmap of Avatar Studio or even Second Life - they are planar maps (front and back) - and the sides are stretched and distorted.
The initial map was created at 2048x2048 - so that I could work with it in Photoshop or Gimp to create textures. Then, when I was happy, I reduced it to 1024x1024.
The above image shows the basic Blender setup that I used. The screen is split into two sections - a windiw showing the 3d model in the Edit mode (left A) and a window showing the UVEditor.
I added an image to Deka by selecting all the vertices in the Edit Window and then loading an 2048x2048 pixel basic skin image in the UVEditor window (Image -->Open). The UV map to be created is restricted to this image by UVs-->Layout Clipped To Image Size. (Menus under the UVEditor window)
The mapping in Blender is done by creating seams then unwrapping about those seams. The figure below shows how I subdivided Deka (head, torso, legs/feet and arms/hands) and and the seams I created (orange lines) - basically a slightly simpler version of those in the video tutorial. Wherever possible the seams are in areas that are seldom viewed (inside of legs underneath of the arms etc)
The image below gives a brief step by step method of unfolding the head.
1. Select all vertices for the head (A key).
2. Then in the Edit Window Mesh --> UVunwrap -->Unwrap - the Result is A in image below.
3. In the UVEditor Window, the flattened vertices of the map are dragged to the centre of the image (G key)then scaled (S key) to fill the texture - the Result is B below.
4. Still in the UVEditor window, the map is scaled to 50% of full size (S key 0.5)and dragged to the top left corner - Result C below.
5. And finally so that the UV map is a few pixels away from the image edge, it is scaled to 95% - S key 0.95
This procedure was repeated for the torso, legs and arms and then the hands and feet were fitted into the open spaces.
The final UVmap looks like the left side of the image below. The right side is a quick preliminary texture using a fancy lace texture for the top and a jean texture with vertical thread discolouration for the pants. The insets are enlargements if the front (A), the back (B) and the side (C). The model is VRML exported from Blender and viewed in Instant Reality which Russ Kinter is using for his Deep Matrix chat system.
Note there is little or no stretching of the fancy lace pattern at the sides, no obvious seam where the seams were created on the model and no smearing of the jean threads as you go around the model and the threads remain essentially vertical (allows adding side seams to military pants/unforms, jeans, stockings etc)
I hope to post some more textured examples at a later date.
griff :)
Building an avatar in Blender from scratch. Step 7: Eyes and cheeks
August 22, 2010 by griff
Comments (0)
At the end of the last blog post, I had reached the stage of adding the eyes and cheeks to the head. The first image shows the filling in of the jaw line - I had thought it would be two quad faces - but it rendered better as two triangles and a quad,so as it unlikely I would add any loops there, that is how I filled that jaw line space. (Image 1A & B red rectangles, below)
Now to the eyes. First the four vertices in the yellow rectangle were selected and then moved in towards the nose and outer corner if the eye - to define the upper rounded shape of the eye and the cheek area. (Image 1 B & C in yellow, above). Next the 4 vertices in the blue rectangle were selected and extruded once (E key, edges, then drag mouse downwards)
This forms 4 quads that are the top of the eyelid (image 2A above, blue rectangle). the four new vertices that are created are then duplicated (Shift D and mouse drag) and dragged down below the eye and tweaked so that they curve along the lower part of the eye (Image 2B above, blue rectangle). Now they are extruded once (E key, edges, then drag mouse downwards - Image 2C above, blue rectangle) to form the start of the cheek area.
The pair of vertices in the red rectangle are then selected, scaled to zero (S key, 0). merged (ALT M). This is repeated for the vertices in the green rectangle (Image 2C above)
The four vertices in the green rectangle are then selected and a face/quad made (F key) and this is repeated for the four vertices in the red rectangle (image 2D above, and image 3A below).
Image 3b shows the result - a formed eyesocket. Tweak vertices as necessary for best fit/feel. If you want to add more detail to the eye (bags around eyes, eyelid detail etc.) then loop subdivide those quads defined by the vertices in the red rectangle. The same goes for the lips - faces defined by the vertices in the blue rectangle (Image 3A above). Image 3B shows a 3D look at the final eyesocket I created.
The next step is to fill the cheek quads. I soon realised I need one more loop cut ( loop defined by blue selection in 3C above) - producing the additional loop (Image 3D). Then it was just a matter of starting at the top (Image 3D, red selection), extruding the vertex and creating a face from 4 vertices (just like the side of the head fill). This was repeated all the way down - one row at a time.
The final avatar and face are shown in figure 4 below
I added extra loops at the joints (red rectangles) - choosing not to go for the triangles at the joints that Williamson recommends. I also tweaked the foot - adding a low heel and shoe sole (green rectangle), and some extra loops in the lower chest and hip area.
I also filled in the eye hole with two quads (blue selection)- you could use spheres if you wanted to animate the eyes - but that would probably require adding extra vertices in the eye loop as mentioned above.
The final result is 1058 surfaces - about a third more than the av studio avatar but about half a Poser 2 avatar.It is easier to texture than either of them - and allows for nice textures at the side (no ugly stretching). I will post more on the texturing and animation
For now I have a female avatar which I call - Deka
griff :)
Building an avatar in Blender from scratch. Step 6: Mouth, nose and side head fill
August 16, 2010 by griff
Comments (0)
At the end of my last post, I had set up the base head for adding in the harder parts of the head (Image 1 below)- the nose and mouth - the features of the face. As I said then, I was a little on my own as Jonathan Williamson's tutorial ( here or here) describes building an avatar that does not have eyes - rather shades/goggles/glasses. But it turned out to be quite easy to adapt and change things.
I had set the model up to add the mouth and nose with the last two simple extrusions (marked above for the chin and bridge of the nose. And then I added the the nose and mouth - just like Williamson does at 44.10 of his video tutorial. (Note I changed the order of building at this point as Williamson adds in the quads at the side of the head before this. I figured this would be easier to do after I had added the hard parts.) Here is the result, Image 2 below - and I have hidden the back of the head mesh in the front view so the additions are easier to see.
Now I proceeded to fill in the side of the head starting with the extrusion of a single vertex (highlighted with the red box) as shown in Image2 and 3A(remember we are mirroring all actions so this gets done on both sides of the head).
Now select the 4 vertices shown and fill with a face (the F key) - Image 3B. Repeat a vertex extrusion and fill once more to the right and then down twice (Image 3C)
I then divided twice, along the vertical edges, the quads highlighted by the green box. This was done so that I can link up to the detail of eyes and cheek bones later. It also allows me to set up some quads later for adding ears - though I don't intend to do this with a female avatar as I plan to add hair eventually. (Note - this is just adding detail where it is needed, not a wholescale subdivision of the head with the consequent increase in faces to be rendered later in vrml - a benefit of this type of building faces as quads not triangles.)
The two edges marked in yellow are extruded three times to match the vertices at the back of the head (image 3D). If you look at the vertices outlined in purple you should see all the quads that will be added next using the face creation from 4 vertices procedure.
Image 4 shows the completion of that step (the green arrow). Then the edge of the final face creation down the side of the head (red box) is extruded twice (to match vertices in the chin) and finally a face is created from the four vertices in the blue and yellow boxes - and bingo most of the side of the head is filled - just the eyes, cheeks and a little area along the jaw line (count the vertices and guess what will happen here ;-) )
More to come - but almost finished now
griff :)
Building an avatar in Blender from scratch. Step 5: Base Head
July 26, 2010 by griff
Comments (0)
I see Anne has posted a blog on creating a head in Blender, so I should continue my adventure in creating an avatar. Up until now, I have been following the construction methods outlined in Jonathan Willianson's tutorial at Montage Studios. The trouble is the character he models is a super hero type avatar - and rather than have eyes it has a fancy set of goggles/shades - so I was in my own a little more. (NB If the above link does not work then try this one here)
However Johnathan has a number of other tutorials that gave me some guidance.
1. Modeling a female human head - parts 1-3 here - higher polycount but still useful principles.
2. Modeling a Human Head parts 1-6 here
(Note the links for these will change as new tutorials are added they get push further down the list - so look at higher number pages if necessary.)
So here we go
First, select the three vertices in the neck ( just select the two in the red box - the third gets chosen because we are building using the mirror method remember ?). Hit Shift D and drag the mouse up to the forehead - we get a duplicate of those 3 vertices.
Next, select the rightmost vertex (green box) and extrude it once - we now have 5 vertices joined by 4 edges.
Using these 4 edges extrude the edges (the E key) around the the head in the side view - rotating, scaling and tweaking the position as necessary until reaching the start of the neck.
Now the neck :
To start the neck, extrude twice more down the back of the neck (red box in image 2), then select the two edges outlined in green - extrude twice more towards the front with the second extrusion ending on your centre line - the mirror will produce two extrusions on the left side and the neck will close.
And finally, go around the neck selecting pairs of vertices and then chose matching pairs of vertices on the torso neck loop - so with four vertices chosen hit the F key and make a face. Repeat this 3 more times and connect/fill the right side - the mirror handles the left side. (See how the mirror technique reduces the work load?)
Onto the Chin -
Select the vertices at the top front of the neck (red box image 3) and extrude 4 times scaling and rotating as you go in the direction of the arrow until you are just below the lips. (Different chin profiles may require more or fewer extrusions but 4 works quite nicely.)
Finally for this blog post, chose the original five vertices you created on the forehead (green box), adjust the vertices to suggest the structure for the eyes and extrude down once to the bridge of the nose.
We have the base head shape set up to add the main features of the face.
More to come,
griff :)
Building an avatar in Blender from scratch. Step 4: Arms
July 14, 2010 by griff
Comments (0)
More on my building of an avatar in Blender - this time preparing the neck and creating the arms.
First step was to cut a hole where the head will join the neck and tweak the vertices to round the hole. (first image red rectangle front), then I deleted the four faces (first image, red rectangle side). Note when you delete the four faces the hole you are left with is defined by 8 vertices - more in that when we make the hands.
These 8 vertices you just do the extrude process (as edges) the required number of times. Again I left out the elbow joint as Williamson puts in triangles and I want to test this out when I use Seamless3D for the animations. As I said before, it is very easy to add in extra loops of vertices. With each extrusion the vertices are scaled to fit the background images. Result is the image below.
You will note that I added in some more loops in the torso (red rectangles, second image) and tweaked the vertices in the chest area. To be honest I did not like the result - that will be changed back later. Minor tweaking around the buttocks too. ( One oddity, when I added the extra loops Blender seemed tho redefine what it considers the starting rectangle - the mirrored whitish rectangle - no idea why and it seems to be inconsequential)
Next step the head - the hardest part !!
TY for the comment Steve. Glad someone is reading this stuff - though I'm having a lot of fun building this avatar - and learning too ;-)
griff :)
Building an avatar in Blender from scratch. Step 3: Legs and feet
July 9, 2010 by griff
Comments (2)
Continuing on with building the lower body - this time legs and feet. This is where I diverge from Johnathon Williamson's video tutorial - I will explain below.
The first step is to extrude two rings of vertices from the hip edge created in Step 2 - these are relatively close together as they will function as a joint in the animations to come. they are perhaps the trickiest parts of the legs - extrude, scale, rotate, move - and repeat till they look nice and fit the front and side images (First Image - red portion).
From here it is just a matter of extruding rings of vertices down the leg. This is the first divergence. I have not placed any rings of vertices at the knee joint. Williamson actually creates triangles at the back of the knee to help with animation creation. As I'm not sure how this will work in Seamless3D and export to an Hanim animation, I passed right over the knee joint for now. It is easy to go back and add rings of vertices and the triangles. This is future experimentation - right now I want to see if I can get a body shape that works well.
The second divergence is with the foot. Johnathon creates it separately and then attaches it to the leg, I just continued creating the foot by extruding rings of vertices and scaling and moving them to fit at the side (Y-axis, the green arrow in the magnified insert). I'm not sure which is the best method but the way I did it seemed simpler. However, it was for a relatively flat foot - maybe separate creation is better if fancy high heel shoes or boots are needed. Time will tell.
More to come,
griff :)
PS: That is Rick Kimball not Rock in the previous post - but he might prefer Rock or is it too 1950s?
Building an avatar in Blender from scratch. Step 2: Lower torso
July 9, 2010 by griff
Comments (0)
So now we move on to the lower torso. Jonathan Williamson at Montage Studio explains it quite well. Basically extrude the vertices (or edges) shown in the first figure 3x in red and scale as you go (remember the mirror will create the right side). Then follow Jonathan's methods to enlarge out to the hips and delete the faces that are the tops of the legs(in red).
Hips part 2
More to come,
griff :)
PS: I think Rock Kimball might be proud of me ;-) Also trying to think of a name for the lady.
Building an avatar in Blender from scratch. Step 1: Start torso
July 9, 2010 by griff
Comments (0)
As Russ has pointed out, avatars created in Avatar Studio have to be modified to work in Deep Matrix using a feature of thyme's Seamless3D that appears to be broken. In addition video cards and internet speed have changed since the early years of Blaxxun chat and it should be possible to improve the quality of the avatar (better texturing and no more arms that look like they are about to fall off).
So with the above in mind, I set out to see what I could do with Blender. Jonathan Williamson has a nice video tutorial at Montage Studio that I use as a guide and learning experience. It does require a basic understanding of Blender (basically how to select points and edges, how to move/scale/rotate them, how to subdivide and extrude edges and how to create a new face from 4 vertices).
Now, Jonathon's method which is a mix of "box modeling" (for most of the body) and "edge by edge modeling" for the head and for adding detail. It sounds hard and techie - but actually I was amazed at how easy it was once I got started.
The method it based on having a front body image and a side body image of a human. I also wanted the images in a T-Pose as I want to use BVH files and thyme's Seamless3D to animate the final avatar. You can buy such images in CD collections - but I also wanted cheap! So I had a think - and a free way to produce the necessary images came to me - Daz Studio.
The basic Daz Studio is free and comes with some free models. So I fired up Daz Studio and loaded Victoria 4 (a 40,000+ poly figure). I then created 3 renders at a size of 1024x1024 pixels - one from the front and two from the side. The 2 side images were necessary so that I could get a good side view of the torso or of the head without the arms and hands blocking out the fearure I was working on. Watch as this blog proceeds for changes in that side image.
So the first step was to install the a front and side view image in a two pane window. Then create a box which you cut in half and then mirror. Jonathan skips over this but it is standard practice in box modeling and you should be able to find an explanation quite easily.
In the image below, the right square is the one we play with and the left one is the mirror around the axis (red line). After that, extrude the right most face of the box once then the extrude the top face 4x as per video tutorial - and then tweak individual vertices to get a nice fit in both front and side views - to get what you see.
More to come,
griff :)
PS: the links do not seem to be much different from the text ( :( )- Montage Studio above is the link to the video.
