A programmer with zero knowledge of 3DCG (let's say Mr. A) said, "Please tell me what skills you need to create a program using FBX SDK Python", so I made a simple summary.
There may be other people who have the same troubles as I expected, so I will publish it.
I made the material so that it is easy for Mr. A to understand, so the glossary may not be very accurate. Please understand what you are doing.
It is roughly divided into three categories.
Even with 3DCG and programming experience, it is difficult to use the FBX SDK Python without math skills. We recommend that you start by studying math.
It is a method to express the position and direction in the three-dimensional space with three numerical values (x, y, z).
Addition / subtraction / inner product / outer product of 3D vectors are often used, so it is better to suppress them.
Both are units of angle. 180 ° = π [rad].
Radians are a prerequisite for understanding trigonometric functions.
It means sin and cos.
This is a prerequisite for calculating Euler angles.
It is a method to express the direction of rotation by rotating three times.
There are 12 ways of expression such as z-y-x
and z-x-y
in "Which axis should be rotated in which order?".
The following articles are detailed. [https://ja.wikipedia.org/wiki/%E3%82%AA%E3%82%A4%E3%83%A9%E3%83%BC%E8%A7%92](https: // ja .wikipedia.org/wiki/Euler angles)
It is a method to express the direction of rotation with four numerical values (x, y, z, w).
I think it's a good idea to suppress quaternion multiplication and conjugate quaternions.
The following articles are detailed. https://qiita.com/kenjihiranabe/items/945232fbde58fab45681
It's about the orientation of the 3D coordinate system.
Note that this will change the positive and negative of the vector quaternion.
The following articles are easy to understand. https://ja.wikipedia.org/wiki/%E5%8F%B3%E6%89%8B%E7%B3%BB
Both of them appear frequently, so you need to be careful not to make a mistake.
Even if you have experience in math and programming, it is difficult to use the FBX SDK Python without 3DCG related knowledge.
Here, we list the knowledge and skills related to 3DCG.
It is a story about whether the sky direction is the y-axis or the z-axis.
Both y-up and z-up often appear, so you need to be careful not to make a mistake.
It is a story about whether the unit of length is 1 meter or 1 centimeter.
Both of them appear frequently, so you need to be careful not to make a mistake.
It is the skeleton of a humanoid character.
For example, if you move your right shoulder, your right elbow will follow. However, even if you move your right elbow, your right shoulder does not move.
The relationship between such joints is expressed in a hierarchical structure such as right shoulder → right elbow → right wrist.
By setting the direction of rotation (quaternion and Euler angles) for each joint, you can determine the pose (posture) of the whole body.
See below for details. https://styly.cc/ja/tips/blender-modeling-start5-2/
T-stance is a type of humanoid character pose. It is often used as the initial posture.
A line graph drawn in an area where the horizontal axis is the time axis and the vertical axis is the amount of change.
For example, record the time change of Euler angles of joints as an animation curve.
See below for details. https://docs.unity3d.com/ja/2018.4/Manual/animeditor-AnimationCurves.html
How many frames are there per second?
30 and 60 are often used.
FBX
This is a 3DCG file format.
You can save polygons, skeletons, animation curves, etc.
We have also summarized the programming skills required to work with the FBX SDK Python.
Python
First of all, you need to be able to use Python.
The following lessons are recommended. https://dotinstall.com/lessons/basic_python_v4
FBX SDK Python
Obviously, you need to install the FBX SDK Python.
See below for details.
Although not directly related to the FBX SDK Python, it is better to introduce tools to manage Python libraries.
I personally recommend Poetry.
For details, refer to the following. https://qiita.com/sk217/items/43c994640f4843a18dbe
It's not directly related to the FBX SDK Python, but I think it will introduce a framework for writing unit tests.
I personally recommend Pytest.
For details, refer to the following. https://dev.classmethod.jp/server-side/python/pytest-getting-started/
I have listed them in a row.
It's a long way from inexperienced, but let's do our best!
I'm pleasure to be of some help.
Recommended Posts