Day 3 - Modeling & OBJ Format
A little more modeling
Two types of objects
Made by man
- Specific dimensions
- Straight lines
- Right angles
- Uniform duplicates
Made by nature
- Non-uniform duplicates
As a result of these differences, modeling organic things requires different techniques.
Organic modeling ideas
- Proportional editing
- Subdivision Surfaces
Computer Graphics History Moment
Ed Catmull created what is now called subdivision surfaces in Blender, among other very influential accomplishments.
No ones really uses Blender in commercial products, but licensing prevents us from installing professional tools on university computers 😦
The professional games community tends to use Autodesk 3DS Max.
The professional visual effects community tends to use Autodesk Maya.
All of these tools have free student editions. If you are serious about a career in the electron arts, I'd consider learning these tools.
Generating Models from Code
The most universal way to generate models from code is to create a file that represents a model and then import that into what ever software you are using.
There are several model format available. To understand what is available, think about the formats available when you write a document.
Compare to text documents
In terms of files that represent 3D models, two common file formats are .obj and .fbx.
Due to its openness and simplicity, we will generate .obj files is this class. Note that when you export models from one program to import into another program, you probably want to use the .fbx format since it is a more expressive format.
Every line is its own entry 2 kinds of entries for now
- Vertices are defined on lines that start with the character
- v 0 0 0 (defines a vertex at x,y,z coordinates 0,0,0)
- Faces (triangles, etc.) are defined on lines that start with the character
- f 1,2,3 (defines a face with the first, second, and third vertices defined in the file)
Example OBJ file
v 0 0 0 v 1 0 0 v 0 1 0 f 1 2 3
We can generate a simple obj file representing the above triangle with the following python code: