/sssekai_blender_io

Project SEKAI Blender Asset Importer / PJSK 资源导入插件

Primary LanguagePythonMIT LicenseMIT

sssekai_blender_io

Code style: black

Blender asset importer for Project SEKAI (JP: プロジェクトセカイ カラフルステージ! feat.初音ミク) asset bundles.

Features

Asset Types

  • Character (legacy and 'v2') armatures and stage objects (with hierarchy) from asset bundles are generally supported.
  • Animations from asset bundles (and RLA/RTVL packets) for characters and stage objects are generally supported
  • Hair/Cloth physics are approximated with the game's own definition, and implemented as rigid body simulations.

Shading

NPR toon shading is approximated with SekaiShaderStandalone, which supports

  • Customized diffuse/shadow textures
  • Artist authored outline strength
  • SDF face shadows from 'v2' assets

Documentation

Read the wiki page for more!

Supported Languages

PRs are welcome for additions.

  • You can find the translation file here.
  • The script used to generate the translation file is here. Run this in the root of this repo, with any Python 3.8+ interpreter to update the translation file. Exisiting translations will be preserved.

You can find your language code by entering bpy.app.translations.locale in the Blender Python console.

Currently supported languages and maintainers:

  • English (en_US, mos9527)
  • 简体中文 (zh_HANS, mos9527)

Installing & Updating

1. Dependencies

sssekai_blender_io requires sssekai to function. Ensure sssekai is installed correctly before attempting to install the addon itself.

Method A. Package the dependencies into the addon ZIP

This is the recommended method for most users as it is the least intrusive or error-prone one.

  • Download this repo as zip, and unzip it.
    • Or preferablly, clone this repo.
  • Locate your Blender's Python interperter (as stated in Method B)
  • Run <path_to_blender_python> make_addon_zip.py <output_zip_name WITHOUT the zip extension>
    • e.g. /Applications/Blender.app/Contents/Resources/4.3/python/bin/python3.11 make_addon_zip.py sssekai_blender_io-master
  • Install the packaged addon zip like any other Blender addon. (e.g. sssekai_blender_io-master.zip in the example).
  • You can now skip the rest and jump to Install The Addon section for help.

Method B. Manage dependencies with Blender Python's pip

Only recommended if you're interested in debugging/developing the addon yourself. This method is platform-dependent.

ATTENTION: This method only works when you can freely write to the Blender installation directory on your system.

  • Navigate to your Blender installation path, and find the Python interperter of your version.
    • e.g. C:\Program Files (x86)\Steam\steamapps\common\Blender\4.0\python\bin\python.exe
      • ...and no, managing your Blender installation with Steam isn't recommended.
    • (For Windows, Linux) It is recommended to use the portable ZIP package instead of other versions to avoid permission issues
      • i.e. MSI installer for Windows, Snap Store for some Linux distros
    • (For macOS) Make sure that you can write to Blender's application path (e.g. /Applications/Blender.app/). The details shall be omitted here for the sake of sanity.
  • Install the dependencies with pip in-built with Blender's python.
<blender_python_path> -m ensurepip
<blender_python_path> -m pip install --no-user -U sssekai 

2. Install the addon

  • In Blender, go to Edit > Preferences > Add-ons > Install... and select the zip file you just prepared/downloaded.
  • The addon should appear in the 3D Viewport sidebar (N key) under the tab SSSekai

License

MIT

References