Skip to content

Repository files navigation

PsDaL

現在のバージョン: PsDaL_ver 0.17.00b

PsDaLは、Photoshop互換PSDのレイヤーへ動き、接続、目パチ・口パク、髪・胸・布の揺れを設定し、ローカルでアニメーションを書き出すWindows向けツールです。

主な機能

  • PSDレイヤーの表示順、リンク、支点、移動、回転、拡大縮小
  • 胴体→上腕→下腕などの多段接続、固定支点、循環接続の防止
  • 前髪、後髪、胸、レイヤー別布揺れの4方向指定と個別反転
  • 布揺れと胸揺れを同じレイヤーへ合成するGPUアニメーション
  • レイヤー別の出現・消失と180フレーム基準のディレイ
  • PSD内の目・口素材による通常/高度再生
  • 設定TXTの保存と復元(旧設定TXTの互換読み込みを含む)
  • WebM、MP4、GIF、Spritesheet + JSON書き出し
  • キャンバス外を含む自由な出力範囲とNVENC優先エンコード
  • 書き出し中の表示プレビュー固定と操作停止
  • 日本語/英語UI

対応範囲

入力はPhotoshop互換PSDのみです。PNG、JPEG、WebPなどの画像読み込み、PSD分割、顔差分生成、一般的なPSD書き出しには対応していません。

入力PSDに収録済みのeye_openeye_closemouth_openmouth_closead_eye_01ad_eye_99ad_mouth_01ad_mouth_99は、目・口のアニメーション素材として再生できます。

必要環境と空き容量

  • 64bit版Windows 10またはWindows 11
  • 初回セットアップ時のインターネット接続
  • PsDaLを置くドライブに2GB以上の空き容量
  • WebM/MP4書き出しに対応する一般的なCPU
  • 高品質動画を高速化する場合はNVENC対応NVIDIA GPU(任意)

NVIDIA GPUがない場合も動作します。高品質WebM/MP4はNVENCを利用できないときにCPUエンコーダーへ自動で切り替わります。必要メモリはPSDと出力サイズにより変わるため、メモリ不足時は出力サイズを下げるか、他の重いアプリを閉じてください。

初回セットアップ

配布ZIPを通常のフォルダへ展開し、setup.batをダブルクリックします。

セットアップはPsDaLフォルダ内へ次を構築します。

  • ポータブルPython 3.12
  • PsDaL専用Python環境
  • NumPy、OpenCV、PyAV
  • ダウンロード、pip、仮想環境用のローカルキャッシュ
  • 起動に使用するローカル設定

システムのPATH、レジストリ、既存のPythonは変更しません。日本語、空白、丸括弧を含む配置パスに対応しています。ダウンロードが中断した場合は.partファイルから再開するため、同じ場所でsetup.batを再実行してください。

構成の概略:

PsDaL/
  setup.bat
  start.bat
  restart.bat
  stop.bat
  environment/
    tools/python312/
    venvs/psdal/
    downloads/
    cache/
  runtime/

environmentruntimeは配布ZIPへ収録されません。

通常起動と終了

起動

start.batをダブルクリックすると、PsDaLをバックグラウンドで起動し、準備完了後にブラウザで開きます。番号選択はありません。

  • 通常起動: start.bat
  • 安全な再起動: restart.bat
  • 状態APIをブラウザで開く: start.bat status
  • 状態をコンソールで確認する: start.bat check
  • 終了: stop.bat

通常の画面はhttp://127.0.0.1:7866です。同じPsDaLフォルダで既に起動している場合は重複起動しません。7866番ポートを別のアプリが使っている場合、その外部プロセスは操作せずエラーを表示します。

終了

作業後はstop.batをダブルクリックしてください。停止APIで正常終了を試みた後、必要な場合だけこのPsDaLフォルダから起動したサーバーを対象に終了します。他のPythonプロセスや外部アプリは停止しません。

ブラウザを閉じるだけではバックグラウンドのPsDaLは終了しません。起動と終了はstart.batstop.batを対にして使用してください。

基本ワークフロー

  1. Photoshop互換PSDを読み込みます。
  2. レイヤー一覧で表示、順番、リンク、支点、動き、回転、拡大縮小、布揺れ、出現・消失を調整します。
  3. 顔、前髪、後髪、胸の設定を調整します。
  4. 必要に応じて設定TXTを書き出します。
  5. 書き出し設定で比率、サイズ、形式、出力範囲を選びます。
  6. プレビューを確認し、動画またはゲーム向け素材を書き出します。

PSDと顔アニメーション

8bit RGB/RGBAのPhotoshop互換PSDを推奨します。キャラクターパーツは前髪、後髪、顔、胴体、腕、脚、服、小物などの独立したラスターレイヤーにしてください。調整レイヤー、テキスト、スマートオブジェクト、複雑なレイヤースタイルは完全に再現できない場合があります。

顔アニメーションの標準名:

  • eye_openeye_close
  • mouth_openmouth_close
  • ad_eye_01ad_eye_04
  • ad_mouth_01ad_mouth_04

ad_eye_05ad_eye_99ad_mouth_05ad_mouth_99も追加素材として番号順に読み込みます。追加素材は初期状態で「表示しない」です。高度設定では、PSDに存在する素材の順番、有効・無効、頻度、速度を変更できます。

出力比率を繰り返し変更しても、顔差分の位置・サイズ、顔範囲、マスクは元PSD座標を正本として毎回直接変換します。前回の変換結果を次の変換元にしないため、縦横比変更による累積ずれを抑えます。

揺れ方向と反転

前髪、後髪、胸、レイヤー別布揺れは、次の4方向を共通で選択できます。

各揺れには1~4倍の速度を個別に設定できます。速度は動きの周期だけに作用し、揺れ幅、FPS、書き出し時間は変更しません。

  • 左→右
  • 上→下
  • 左上→右下
  • 左下→右上

各項目の「反転」は方向とは独立して保存されます。反転をONにすると選択方向の符号だけを反転します。揺れ機能がOFFのときは対応する方向と反転も操作できません。

旧設定TXTの後髪方向と胸揺れの旧反転値は、新しい4方向+反転へ変換して読み込みます。新形式で明示された反転値は優先して保持します。

接続と支点

接合モードでは子レイヤーと親レイヤーを選び、プレビュー上の1点を指定して双方の接合位置を設定します。接続したレイヤーは親の移動・回転・拡大縮小を継承し、胴体→上腕→下腕のような多段接続ができます。

自分自身への接続や循環する接続は拒否されます。独立回転は表示中心または指定支点を基準とし、1ループあたり-6~6回転の範囲で設定できます。

書き出し

出力範囲は元PSDキャンバス外へ移動・拡大できます。外側は選択したキャンバス背景に従います。

  • WebM、MP4: 通常確認用
  • 高品質WebM、高品質MP4: 30FPS固定、NVENC優先、CPUフォールバック
  • GIF: 短いループ確認用
  • Spritesheet + JSON: Unity/Godot向けZIP

書き出し開始時に再生を停止し、その直前に見えていたプレビューを固定表示します。書き出し中は再生ボタン、レイヤー単独再生、高度再生テストを操作できず、裏側でもプレビュー再生しません。完了後に先頭フレームを描画してから固定表示を外し、停止状態を維持します。

設定TXT

「設定TXTを書き出す/読み込む」はPSD読み込み後に利用できます。出力設定と範囲、全体設定、レイヤー順、リンク、支点、動き、回転、拡大縮小、布範囲と反転、出現・消失、顔再生順、胸範囲を保存・復元します。

設定TXTの正本形式はPSDAL_ANIMATION_SETTINGSです。旧PNGAL_ANIMATION_SETTINGSは互換入力としてのみ受け付け、書き出し時には使用しません。

アプリを移動する場合

  1. stop.batでPsDaLを終了します。
  2. PsDaLフォルダ全体を新しい場所へ移動します。
  3. 新しい場所でsetup.batを再実行します。
  4. start.batで起動を確認します。

起動時にPsDaL専用Pythonのパスを現在のフォルダへ修復します。古いドライブや外部Pythonを参照先として採用しません。

保存場所とアンインストール

PsDaLが導入するPython、依存ライブラリ、キャッシュ、ログ、一時データは、すべてPsDaLフォルダ内のenvironmentruntimeへ保存されます。

アンインストール手順:

  1. 必要なPSD、設定TXT、動画、GIF、スプライトシートをPsDaLフォルダの外へ保存します。
  2. stop.batを実行します。
  3. PsDaLフォルダ全体を削除します。

システムのアンインストーラー操作、PATH修復、レジストリ削除は不要です。

トラブルシューティング

画面が開かない

  1. start.bat checkで状態を確認します。
  2. コマンドプロンプトでnetstat -ano | findstr :7866を実行し、7866番ポートを使っているプロセスがないか確認します。
  3. runtime/psdal-7866.stderr.logを開き、起動エラーを確認します。
  4. PsDaLの起動状態が不明な場合はstop.batを実行し、停止完了後にstart.batを実行して復旧します。

セットアップが中断した

通信と空き容量を確認し、同じ場所でsetup.batを再実行してください。途中のダウンロードは.partから再開します。

動画書き出しに失敗する

出力サイズを下げ、GPUやメモリを使用する他のアプリを閉じて再試行してください。高品質動画はNVENCに失敗するとCPUへ切り替わります。

ライセンス

Copyright 2026 1mm-module

PsDaL本体はApache License 2.0で公開します。著作権表示はNOTICEを参照してください。第三者ライブラリにはそれぞれのライセンスが適用されます。PSD解析用のag-psdについてはvendor/ag-psd.LICENSEを参照してください。


English

Current version: PsDaL_ver 0.17.00b

PsDaL is a local Windows tool that loads Photoshop-compatible PSD files, configures per-layer motion, joints, blink/lip-sync, and hair, breast, and cloth sway, then exports animation assets.

Features

  • Layer order, visibility, links, pivots, translation, rotation, and scale
  • Multi-level joints such as torso → upper arm → lower arm, with cycle prevention
  • Four shared sway directions and independent Reverse controls for front hair, back hair, breast motion, and per-layer cloth motion
  • GPU animation that composes cloth and breast deformation on the same layer
  • Independent Appear and Disappear transitions with delays based on a 180-frame loop
  • Normal and advanced eye/mouth playback from layers already stored in the PSD
  • Settings TXT export/import with legacy compatibility
  • WebM, MP4, GIF, and Sprite Sheet + JSON export
  • Output framing beyond the PSD canvas and NVIDIA NVENC preference
  • A completely frozen visible preview while export is running
  • Japanese and English UI

Supported Scope

PSD is the only supported input. PNG, JPEG, WebP, PSD splitting, face-variant generation, and general PSD export are not included.

PSD layers named eye_open, eye_close, mouth_open, mouth_close, ad_eye_01ad_eye_99, and ad_mouth_01ad_mouth_99 are available as animation frames.

System Requirements and Disk Space

  • 64-bit Windows 10 or Windows 11
  • Internet access during initial setup
  • At least 2 GB free on the drive containing PsDaL
  • An ordinary CPU capable of WebM/MP4 encoding
  • An NVENC-capable NVIDIA GPU for faster high-quality export (optional)

High-quality video automatically falls back to CPU encoding when NVENC is unavailable.

Initial Setup

Extract the distribution ZIP, then double-click setup.bat. Setup installs portable Python 3.12, a PsDaL-only virtual environment, NumPy, OpenCV, PyAV, local caches, and launch settings under the PsDaL folder. It does not modify the system PATH, registry, or an existing Python installation.

Interrupted downloads resume from their .part files when setup is rerun in the same location. Paths containing Japanese characters, spaces, and parentheses are supported.

Normal Startup and Shutdown

Double-click start.bat. PsDaL starts in the background and opens in the browser after it is ready. There is no numbered menu.

  • Normal startup: start.bat
  • Safe restart: restart.bat
  • Open the status API in a browser: start.bat status
  • Check status in the console: start.bat check
  • Shutdown: stop.bat

The default URL is http://127.0.0.1:7866.

When work is finished, double-click stop.bat. Closing the browser does not stop the background server. Use start.bat and stop.bat as the matching start/stop pair. Shutdown is scoped to the server launched from this PsDaL folder and does not stop unrelated Python processes or applications.

PSD Face Layers

Recommended names are eye_open, eye_close, mouth_open, mouth_close, ad_eye_01ad_eye_04, and ad_mouth_01ad_mouth_04. Additional ad_eye_05ad_eye_99 and ad_mouth_05ad_mouth_99 layers load in numeric order and begin hidden from playback.

Advanced settings change the playback order, enabled state, frequency, and speed of assets stored in the PSD. Face variants, face bounds, and masks always transform directly from immutable source-PSD coordinates when the output aspect changes, preventing cumulative drift across repeated aspect changes.

Sway Direction and Reverse

Front hair, back hair, breast motion, and per-layer cloth motion share four directions: horizontal, vertical, upper-left to lower-right, and lower-left to upper-right. Reverse is stored independently and flips only the chosen direction. Direction and Reverse controls are disabled when their associated motion is off.

Each sway supports its own 1x–4x speed. Speed changes only the motion cycle; amplitude, FPS, and export duration remain unchanged.

Legacy back-hair direction and breast reverse values are mapped to the new direction-plus-Reverse representation during Settings TXT import. Explicit reverse values in the current format take priority.

Export

The output frame may be moved or enlarged beyond the original PSD canvas. Outside areas follow the chosen canvas background.

High-quality WebM and MP4 use fixed 30 FPS timing, prefer NVENC, and fall back to CPU encoding. Export stops playback, freezes the exact preview currently visible, blocks preview interaction and background playback, draws frame zero after completion, then removes the freeze overlay while leaving playback stopped.

Moving the App

Run stop.bat, move the entire PsDaL folder, rerun setup.bat in the new location, then run start.bat. Startup repairs the PsDaL-owned Python path from the current folder and does not adopt an old drive or external Python path.

Storage and Uninstallation

Managed Python, dependencies, caches, logs, and temporary data stay inside the PsDaL folder under environment and runtime.

To uninstall:

  1. Copy any PSD files, Settings TXT files, videos, GIFs, or sprite sheets that must be kept outside the PsDaL folder.
  2. Run stop.bat.
  3. Delete the entire PsDaL folder.

No system uninstaller, PATH repair, or registry cleanup is required.

Troubleshooting

The App Does Not Open

  1. Run start.bat check to inspect the current status.
  2. Run netstat -ano | findstr :7866 in Command Prompt to check whether another process is using port 7866.
  3. Review runtime/psdal-7866.stderr.log for startup errors.
  4. If the PsDaL startup state is unclear, run stop.bat, wait for shutdown to complete, then run start.bat to recover.

License

Copyright 2026 1mm-module

PsDaL is released under the Apache License 2.0. See NOTICE for the copyright notice. Third-party components remain subject to their own license terms. See vendor/ag-psd.LICENSE for ag-psd.

About

Photoshop互換PSDのレイヤーアニメーション設定、RIFEによる目・口の中間補間、動画・ゲーム向け素材書き出しをローカルで行うツールです。

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages