Assimp: Difference between revisions
From Spring
Jump to navigationJump to search
| Line 20: | Line 20: | ||
<table> | <table> | ||
<tr><td valign="top">'''1)''' Open an existing Blender model or import a different format through the File menu (File > Import).</td> | <tr> | ||
<td valign="top">'''1)''' Open an existing Blender model or import a different format through the File menu (File > Import).</td> | |||
</tr> | </tr> | ||
<tr><td valign="top">'''2)''' In the 3D view, at the top right, there will be a '+' icon. click this </td> | <tr> | ||
<td valign="top">'''2)''' In the 3D view, at the top right, there will be a '+' icon. click this </td> | |||
<td> [[File:3-12-2013 5-02-21 PM.png‎‎|secret panel]]</td> | <td> [[File:3-12-2013 5-02-21 PM.png‎‎|secret panel]]</td> | ||
</tr> | </tr> | ||
<tr><td valign="top">'''3)''' In that panel, select Display > Shading > GLSL </td> | <tr> | ||
<td valign="top">'''3)''' In that panel, select Display > Shading > GLSL </td> | |||
<td>[[File:3-12-2013 5-02-04 PM.png‎‎|display settings]]</td> | <td>[[File:3-12-2013 5-02-04 PM.png‎‎|display settings]]</td> | ||
</tr> | </tr> | ||
<tr><td valign="top">'''4)''' Make sure you have a lamp in your scene while in this mode or your model will be dark. | <tr> | ||
<td valign="top">'''4)''' Make sure you have a lamp in your scene while in this mode or your model will be dark. | |||
</td> | </td> | ||
<td> [[File:3-12-2013_5-11-14_PM.png‎‎|blend light source]]</td> | <td> [[File:3-12-2013_5-11-14_PM.png‎‎|blend light source]]</td> | ||
</tr> | </tr> | ||
< | <tr> | ||
<td valign="top">'''5)''' Applying texture: | |||
## In the UV/Image editor, click the image icon (Tooltip: Browse Image to be linked) to select your texture. If it's not there, click on Image > Open Image to browse for it. | ## In the UV/Image editor, click the image icon (Tooltip: Browse Image to be linked) to select your texture. If it's not there, click on Image > Open Image to browse for it. | ||
## In the 3D View, select (right-click) your object and hit Tab to enter Mesh Mode. | ## In the 3D View, select (right-click) your object and hit Tab to enter Mesh Mode. | ||
| Line 50: | Line 54: | ||
### Under Influence > Geometry, check Normal. Make sure it.s 1.00. | ### Under Influence > Geometry, check Normal. Make sure it.s 1.00. | ||
## You'll need to do this for each piece.</td> | ## You'll need to do this for each piece.</td> | ||
</tr>< | </tr> | ||
<tr> | |||
<td valign="top">'''7)''' Piece hierarchy: | |||
## Select piece A, hold shift and select piece B. Hit Ctrl+P and it will make piece A a child of piece B. | ## Select piece A, hold shift and select piece B. Hit Ctrl+P and it will make piece A a child of piece B. | ||
## Make sure all the pieces are descending from one single piece. | ## Make sure all the pieces are descending from one single piece. | ||
Revision as of 03:25, 13 March 2013
Development < Game Development < Assimp
Assimp
Open Asset Import Library (short name: Assimp) is used in Spring for loading a number of model formats including Collada & 3ds (currently obj is parsed by a different codepaths).
What Spring supports in its Assimp renderer:
- extended metafile (
%modelfilename%.luanext to the modefile) - still uses tex1 & tex2 texture system of S3O (same shader as S3O)
- 2nd texcoord
- loading of the texture filepaths from the model (don't have to be in
unittextures/) - when texture filepaths aren't included in the model, it searches for
%modelfilename%.*&%modelfilename%2.*inunittextures/ - special modelpieces `SpringHeight` & `SpringRadius`
Blender Workflow Tutorial
This is a stub containing a simple outline of a Blender workflow. Disclaimer: I'm no modeling expert, there may be a better way to do this.
| 1) Open an existing Blender model or import a different format through the File menu (File > Import). | |
| 2) In the 3D view, at the top right, there will be a '+' icon. click this | secret panel |
| 3) In that panel, select Display > Shading > GLSL | display settings |
| 4) Make sure you have a lamp in your scene while in this mode or your model will be dark. | blend light source |
5) Applying texture:
|
|
7) Piece hierarchy:
|