How to Import Assets: Difference between revisions

From Thrive Developer Wiki
Jump to navigation Jump to search
No edit summary
(remove link to asset import page)
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
First you need the import tool. You can download the latest release to get it (after 0.4.2 is released, for now you need a dev build). The import tool is LeviathanEditor.
[[Category:Graphics]]
Updated for Thrive 0.7.0


Additionally if you are making a modified version of an asset you'll want to download the raw version of the asset. You can do so using subversion (or a web browser) with this link: [https://boostslair.com/svn/thrive_assets thrive assets] (username and password is "thrive")
All importing of assets to Thrive can be done via the Godot editor. These are the file types currently used in Thrive (though other file types compatible with Blender Textures are generally .png files. Models are generally .glb files (which is necessary for animated models) or directly imported from Blender as .blend files. Icons can be either .png or .svg files.
The raw files are in the "raw_assets" folder.


== How to run the tool ==
Additionally if you are making a modified version of an asset you'll want to get the raw version of the asset. You can clone the whole of Thrive from GitHub, which gives you all the assets as they are used in the game. Note that you need Git and [[Git LFS]] to clone it properly. Some assets that don't need to be converted are stored in the main repo, but also use [[Git LFS]]. The raw versions are also stored [https://github.com/Revolutionary-Games/Thrive-Raw-Assets here].
There is currently no GUI for the importing. LeviathanEditor can be ran from the terminal or cmd.exe with the import flag, like this: "LeviathanEditor --import source_folder target_folder" Replace source_folder and target_folder with the folders where the raw assets are and where the assets should be placed. Be careful with spaces in the filenames as you need to put quotes around the path if there are spaces.


There is also a helper script included (AssetImportHelper.rb) if you have ruby installed (on Windows use [https://rubyinstaller.org/ Ruby installer]) you can just double click the script to run it (or in terminal / cmd.exe run "ruby AssetImportHelper.rb").
These instructions are for modellers. For programmers there are no Godot technical guide by us yet, so look up Godot 4 tutorials.
It will automatically create the source and target folders on first run. Then you can place your raw assets in the "raw assets" folder and run the script again. The processed assets will be placed in the "processed assets" folder.
 
Once imported you can rename the .asset file and move it into the Thrive Data folder to have the game detect the file. You can replace an existing file to have your asset version replace it.
 
== Asset requirements ==
The type of asset to import is detected based on the extension:
* Image files should be .png files (and a multiple of 2 in size)
* Models need to be .fbx files (blender has a default exporter for fbx)
 
== Options files ==
The importing of assets can be tweaked by including options json files. For example the image compression and animation importing can be set using the files.


== Requirements for Models ==
== Requirements for Models ==
Line 24: Line 12:


Here's a short list:
Here's a short list:
* Model must be placed at 0,0,0
* In most cases, the model should be placed at 0,0,0.
* No rotation may be set
* It's generally best to center the mesh on its origin. In Blender, activate the Snap pie menu (default Shift-S) and select 'Cursor to Origin', go into Edit mode, select all vertices, activate Snap pie menu (Shift-S) again and select 'Selection to Cursor (Keep Offset)'.
* No scaling may be used (use scaling / rotating in vertex edit mode to not apply the scaling to the model, but directly to the vertices)
* It's best to apply all transforms (translation, scale and rotation) on the model before importing into Godot.
* Armature's need to have named animation tracks (note: when importing a specialized options file is needed to import animated meshes)
* The model can be translated, rotated or scaled in Godot if needed, though in some cases this can add complications.
* Vertice count needs to be reasonable compared to how much screen space the model takes up
* Armatures should have named animation tracks.
* Vertex counts for models should be reasonable compared to how much screen space the model takes up.

Latest revision as of 17:21, 31 August 2024

Updated for Thrive 0.7.0

All importing of assets to Thrive can be done via the Godot editor. These are the file types currently used in Thrive (though other file types compatible with Blender Textures are generally .png files. Models are generally .glb files (which is necessary for animated models) or directly imported from Blender as .blend files. Icons can be either .png or .svg files.

Additionally if you are making a modified version of an asset you'll want to get the raw version of the asset. You can clone the whole of Thrive from GitHub, which gives you all the assets as they are used in the game. Note that you need Git and Git LFS to clone it properly. Some assets that don't need to be converted are stored in the main repo, but also use Git LFS. The raw versions are also stored here.

These instructions are for modellers. For programmers there are no Godot technical guide by us yet, so look up Godot 4 tutorials.

Requirements for Models

There is an outdated page that has some general instructions for how to make models that are suitable for importing: blender-and-ogre-tutorial

Here's a short list:

  • In most cases, the model should be placed at 0,0,0.
  • It's generally best to center the mesh on its origin. In Blender, activate the Snap pie menu (default Shift-S) and select 'Cursor to Origin', go into Edit mode, select all vertices, activate Snap pie menu (Shift-S) again and select 'Selection to Cursor (Keep Offset)'.
  • It's best to apply all transforms (translation, scale and rotation) on the model before importing into Godot.
  • The model can be translated, rotated or scaled in Godot if needed, though in some cases this can add complications.
  • Armatures should have named animation tracks.
  • Vertex counts for models should be reasonable compared to how much screen space the model takes up.