Git Product home page Git Product logo

materialpropertybaker's Introduction

MaterialPropertyBaker

マテリアルに変更を加えることなく、タイムラインで動的にマテリアルの値を調整することができるシステムです。

Install

gitから直接導入

UnityのPackage ManagerのAdd package from git URL... に以下URLを入れることで導入可能

https://github.com/sui4/MaterialPropertyBaker.git

#の後にブランチ名、タグ名を入れることで特定のタグ、ブランチを指定することが可能

https://github.com/sui4/MaterialPropertyBaker.git#{tag,branch}

ダウンロード後、ローカルで導入

  1. 任意のフォルダに git clone や ZIPとしてMaterialPropertyBakerをダウンロード

  2. UnityのPackage ManagerのAdd package from disk... からダウンロードしたフォルダ直下にあるpackage.jsonを選択することで導入可能

Git Submoduleを使うことでバージョン管理が容易になります。

注意事項

デモプロジェクトにはキャラクタへの使用例としてぞん子3Dモデルを用いています。

※ぞん子3Dモデル(「ZONKO 3D MODEL type-N」)の利用規約を必ずご確認の上、使用してください。 利用規約:https://zone-energy.jp/3dmodel/terms.pdf

セットアップ手順

  1. マテリアルをタイムラインで制御したい対象にMPB TargetGroup コンポーネントをアタッチ

  2. Create MPB Profile ボタンを押してprofileを生成

  3. profileからベースのマテリアルから変更したい値を設定

  4. TimelineにMaterialPropertyBaker/TargetGroup Track を追加

  5. Clipを生成、紐づけたいProfileをClipにアタッチ

  6. タイムラインを再生すればprofileの値が適用されます!

補助ツール

Diff Baker

切り替えたい値のセットが他のマテリアルとして保存されてる場合におすすめです。

Profileに紐付けられてるマテリアルと対象のマテリアルを比較して値が異なるプロパティをProfileに保存します。

ツールバー MaterialPropertyBaker/Diff Property Bakerよりウィンドウを開けます。

image-20231014205902161

Edit with Material Inspector

対象のマテリアルのインスペクターを使って値を調整・Bakeすることができます。

編集したいProfileをセットすると、IDごとに紐付けられてるマテリアルのインスペクターが表示されます。このインスペクターからプロパティを編集してください。

Bake Modified Propertiesを押すと、元のマテリアルと値が違うプロパティがProfileにBakeされます。

※なお、元々ProfileにBakeされているプロパティがある場合、マテリアルのインスペクタには適用された状態で表示されます。

ツールバー MaterialPropertyBaker/Edit with Material Inspectorよりウィンドウを開けます。

image-20231016180634786

materialpropertybaker's People

Contributors

sui4 avatar mkc1370 avatar murasaqi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.