Archive for July, 2008

31
Jul
08

Textures – Beginning

I finally arrived in the textures tutorial (altough I had already read some of the lessons to texturize the models I did).

One of the lessons, about creating water surface, required the use of yafray (Yet Another Raytracer). I downloaded the latest version (0.0.9) and I tried use it, but blender crashed whenever I was to render an object. I further discovered that this problem was related to the different version of the compilers used by Blender and Yafray plugin. As I don’t want to download the source to recompile both with the same compiler, I overcame the problem using a xml exporter, that allows blender to export a xml file as a input to yafray [1].

After setting yafray, I tried to finish the lesson [2]… without sucess. I still don’t know which step I did wrong in part because I didn’t know what I was doing! Yes, I’m following these texture tutorials like a recipe. If I knew about the steps I was following, I could probably detect the mistake.

So, prior to anything, I decided to study about the basic concepts that make texturing possible. The first thing I’m investigating is about the three main color types: diffuse color (Col), specular color (Spe) and mirror color (Mir).

menu

I then created a plane and set “Col” to blue, “Spe” to red and “Mir” to green and set “Ray Mirror” to [0.3]. I rendered the same image with different background colors. In the images below we can “see” each of the colors.

test

By these results, we may observe that the mirror color acts like a filter: it reflects the colors in the enviroment (the background in the case) after filtering with “Mirror Color”. Thus in the white background (red + green + blue) it’s supposed to reflect green, but in pink (red + blue) it’s suppose to reflect nothing.

It’s interesting to note that the area affected by the light isn’t green (as expected since the source of light is white). It means that the mirror does not work for lights. Since we cannot see the source of the light directly, it makes sense for us not be able to see its reflex too.

29
Jul
08

Armature

The last lesson of the tutorial is named “Using bones”. It teaches how to add bones (armature) to characters. This tool is very useful in animation, where we have to change the character pose all the time.

I found the tutorial quite advanced, but it made me research (and learn) a lot. All references I had to use are listed below:

I also faced a problem related to linking two pieces together using make edge/face. I posted the problem and got it solved in this forum.

I used a model of a human body (without the head) that I made following the first lessons of the tutorial and made some improvements using new tools and technics I learned since then (mainly “Loop Cut” and “Merge Vertex”).

man_jumping
Jumping
man_running
Running

I think I didn’t construct the armature correctly because when raising one of the bone arms (the legs are ok!) it deforms the corresponding arm.

man_running

I’ll try posting the problem in the blender artists forum to discover what is happening.

28
Jul
08

Bevel Object

Here I’ll keep some information about Bevel Objects that I either found in the web or discovered playing with this tool. To begin, in the top view let’s Add > Curve > Bezier Circle and Add > Curve > Bezier Curve. You should have something like this:

img1

Rotate the Bézier curve -90 degrees in Num3 view and then switch to Num1 view. Now let’s use our Bézier curve to shape the 3d surface of out Bézier circle. To do so, give the curve a name: in object mode select the curve, press F9 and edit the OB field like below:

curvename

Now, to “link” the circle to the curve, in object mode select the circle, press F9 and edit the BevOb like below:

curvename

Then, try to modify the curve and observe how the “circle” behaviors. You may notice that you’re creating a 3d solid by revolution of a curve. You may also have discovered where the rotation axis is, and the strange result that you get if the curve crosses this axis, like below:

axis

There are other things you can try, for example, extruding the Bézier curve to use a composite Bézier curve. Then try closing the curve with Ctrl+C or use a Bézier region instead of the Bézier circle.

Using this technic I modeled a simple bottle. The basis was a Bézier circle and I used a closed region formed by Bézier curves do shape it.

axis

27
Jul
08

Moo…

The last lesson I studied, about Bézier curves, showed how to use a Bézier curve do model another object, but this object was required to be a curve too (e.g. a Bézier circle).

Today I learned that it’s also possible to use a Bézier curve to model a mesh object using the “modifier” tool [1]. As an example a cone is used to model a horn.
I had the idea then of modeling an ox and its horns. To do so I remodeled the blender example monkey head.

monkey

ox

The big problem is that I’m not used to work in 3D. So I did all the job using the ortographic front view as a parameter. The result is a weird side view and top view.

ox2

26
Jul
08

Bézier curves

Today I studied about Bézier curves. It seems to be a cool subject and I hope to study it in depth in Computer Graphics.

The lesson in the tutorial about Bevel Objects was not clear for me, so I read from the blender manual and I think I understood.

That page also links to a nice tutorial about using Bézier curves to model 2D shapes. I decided to follow it using the logo of Computer Engineering / Science of my University. To apply the gold texture I followed a texture lesson from the tutorial.

logo

So, we conclude that drawing 2D images is quite easy using Bézier curves. The main advantage of Bézier curves is that to store it we need no more than 6 vertices (I think). In the logo above I used less than 100 Bézier curves.

25
Jul
08

Cursor and 3d Transform Manipulator

jeep
The image above is a jeep I modeled following this tutorial.

Below to the left, we have the cursor and to the right the 3d manipulator (or selection):
cursor

The cursor’s position can be set by left-clicking. Its position determines where a new object will be centered.

The 3d manipulator is set at the object center of mass when it is created. You cannot change its relative position with the object in the object mode. So if you try to move the object away, this manipulator will move together. But when you enter edit mode, the manipulator is different from the object one (you can see the object manipulator in edit mode: it’s the pink dot). Thus, if you move the object in edit mode, the object manipulator won’t move and you change their relative position.

It is possible to set the position of the cursor or the 3d manipulator using the snap menu (Shift+S). Remember that selection = 3d manipulator.

The behaviour of these commands are different for the 3d manipulator in object and edit mode. Let’s consider first the object mode:

  • “Selection->Grid” moves the 3d manipulator to the nearest intersection of the grid.
  • “Selection->Cursor” sets the 3d manipulator position with the cursor position.
  • “Selection->Center” does not apply to object mode (as far as I know)

Let’s now consider the edit mode:

  • “Selection->Grid”: the same as in object mode.
  • “Selection->Cursor” moves the 3d manipulator and all selected vertices to the position of the cursor.
  • “Selection->Center” moves all selected vertices to the position of the 3d manipulator.

And now the cursor commands:

  • “Cursor->Selection” sets the cursor position with the 3d manipulator position.
  • “Cursor->Grid” moves the cursor to the nearest intersection of the grid.
  • “Cursor->Active”: in object mode it places the cursor in the center of the last object selected.

There’s another useful shortcut which places the cursor in the grid origin: Shift+C

23
Jul
08

Creasing, Bevel and Textures

Today I studied two more lessons from the tutorial. One teaches how to model a simple dice and the other how to model a goblet and then apply some texture in it.

dice

In the dice modeling I was introduced to a tool named “Bevel”. Its function is basically to smooth out a sharp edge or corner. Observe the Bevel tool being applied in a cube:

bevel

In the goblet modeling, another interesting tool learned is the “Crease”: it’s useful when after applying a smoothing modifier, you want some parts to be less smooth (it was used to flatten the goblet base). For an example, consider the use of creasing in the sphere (smoothed cube) below:

bevel

Finally, I learned how to apply a reflexive surface to the goblet. The result follows:

goblet

22
Jul
08

Introduction

This blog contains some of my studies/works not related to my Computer Engineering course.

One subject I’m working on is 3d modeling in Blender, due to a group of which I’m part. In this group we’re supposed to develop a game using a game engine named JMonkey Engine and the first step is to get familiarized with Blender. I’m following a long tutorial for completely newbies in the subject.

Penguin of a tutorial

I’ve done no proper work yet, but I’m getting used to Blender tools and its shortcuts and some 3d modeling technics. Soon I intend to start modeling the characters of another game I’ll develop with some friends. This game is still in brainstorming phase, but once the development starts I may publish some stuff here.