Upgrade to Pro — share decks privately, control downloads, hide ads and more …

UIを使ったデモシーンの実装

Galupeno
February 25, 2021

 UIを使ったデモシーンの実装

第2回clusterワールド制作ゆるゆる勉強会
https://cluster.mu/e/d74953f2-e141-4398-b84b-f03d625a038b

Galupeno

February 25, 2021
Tweet

More Decks by Galupeno

Other Decks in Design

Transcript

  1. γʔϯʹඞཁͳ΋ͷ Camera
 ϫʔϧυΛࡱӨ͢ΔΧϝϥɻΞχϝʔγϣϯͤ͞ΔࣄͰΧϝϥϫʔΫΛ͚ͭΒΕΔ Render Texture
 Cameraʹඥ෇͚ΔϨϯμϦϯάઌςΫενϟɻCamera͕ΞΫςΟϒঢ়ଶͷ࣌ͷ ΈϨϯμϦϯάɾ൓ө͞ΕΔɻ Player Local UI


    clusterͷϓϨΠϠʔʹಠࣗͷUIΛ౤Ө͢ΔCanvasɻجຊతʹImage΍Textɺ AudioͳͲΛදࣔɾ࠶ੜ͢Δ Raw Image
 ImageͷܑఋɻImage͸Textureʢ੩ࢭըʣΛ౤Өͤ͞Δͷʹର͠ɺRaw Image͸ Render TextureΛ౤ӨͰ͖Δ
  2. ࣮૷ํ๏ 1. γʔϯ্ʹCameraɾPlayer Local UIΛ࡞੒ɻ
 Player Local UI಺ʹRaw ImageΛ࡞੒ɻ
 ϓϩδΣΫτϑΝΠϧ಺ʹRender

    TextureΛ࡞੒ 2.γʔϯ্ͷCameraʹRender TextureΛׂΓ౰ͯΔ 3.γʔϯ্ͷRaw ImageʹRender TextureΛׂΓ౰ͯΔ
 
 ׬੒
  3. 1. CameraɾPlayer Local UIɾ Raw ImageɾRender Textureͷ࡞੒ CameraͱPlayerLocalUIΛγʔϯ্ʹ࡞੒ Raw ImageΛγʔϯ্ʹ࡞੒


    UIͷ߲໨͔Β࡞੒Ͱ͖Δ Render TextureΛϓϩδΣΫτϑΝΠϧʹ࡞੒
 ϓϩδΣΫτλϒΛӈΫϦοΫͰ࡞ΕΔ
  4. 3. γʔϯ্ͷRaw Imageʹ Render TextureΛׂΓ౰ͯΔ Raw ImageͷInspector Render Texture ϓϩδΣΫτλϒͷRender

    TextureΛ
 Raw ImageͷίϯϙʔωϯτɿTextureʹυϥοά&υϩοϓͰׂΓ౰ͯΔ
  5. ΋ͬͱͦΕͬΆ͘ σϞγʔϯͷ࠶ੜத͚ͩCameraͱRaw ImageΛΞΫςΟϒঢ়ଶʹ͢Δ
 ˠ࡞Γͬͺͳͩ͠ͱৗʹσϞγʔϯঢ়ଶɻSet GameObject Active GimmickΛ࢖͏ ΧϝϥϫʔΫΛ͚ͭΔʢAnimator, Set Animator

    Value GimmickΛ࢖͏ʣ
 ˠσϞγʔϯΛυϥϚνοΫʹԋग़Ͱ͖Δ Set Move Speed Rate΍Set Jump Height Rate Player GimmickͰϓϨΠϠʔͷಈ͖ Λ੍ݶ͢Δ
 →σϞγʔϯதʹδλόλಈ͍ͯ΄͘͠ͳ͍ͱ͖ɻ SE΍BGMΛޮՌతʹ࢖͏
 →ఢͷग़ݱɺຯํͷ૿ԉɺṖղ͖ͷΫϦΞɺࢼ߹ͷܾணͳͲΛΑΓײ৘໘ʹૌ͑Δ͜ͱ͕ Ͱ͖Δ ҙਤͨ͠ϧʔτͰϓϨΠϠʔʹา͍ͯ΄͍͠ͱ͖͸ϧʔϓϫʔϓΛ࢖ͬͨΓ……ʂʁ
  6. Render Texture͸௿඼࣭ʹ཈͑Α͏ ߴղ૾౓ × ΞϯνΤΠϦΞεʹߴෛՙॲཧ ߴෛՙ ௿ෛՙ Render Textureͷղ૾౓͕ߴ͘ɺΞϯνΤΠϦΞε͕Φϯʹͳ͍ͬͯΔ
 ߴ඼࣭ͳ΋ͷ΄ͲɺͦΕ͚ͩΞϓϦέʔγϣϯͷϨϯμϦϯάΛ௥Ճॲཧͤ͞

    Δ͜ͱʹͳΔ ϑϨʔϜϨʔτΛ٘ਜ਼ʹΑͬΆͲߴղ૾౓ͰࡱӨ͍ͨ͠΋ͷ͕ͳ͍ݶΓɺ
 Render Textureͷ඼࣭͸௿Ίʹઃఆ͠Α͏
 ʢઓंήʔϜϫʔϧυͷΤΠϜը໘͸256x256ͷඇΞϯνΤΠϦΞγϯάʣ ஫ҙ఺
  7. ϓϦϨϯμϦϯάͰ
 σϞγʔϯ΍PVΛ࡞Δʢߏ૝ஈ֊ʣ 1. clusterʹΞοϓϩʔυͯ͠ΩϟϓνϟιϑτͰࡱӨ͢Δ
 ΧελϜΞόλʔ͕ՄࢹԽ͞ΕΔͷͰ࠷΋ө͑Δ͠ήʔϜ಺༰Λ100ˋ࠶ݱͰ͖Δ
 ௨ৗϫʔϧυͰΈΜͳͱ߹ྲྀɺΠϕϯτΧϝϥͰΧϝϥϫʔΫʹͩ͜ΘΔͳͲͰ͖Δ 2. Unity RecorderΛ࢖ͬͯUnity্ͰࡱӨΛ͢Δ
 Ξόλʔ͸දࣔ͞Εͳ͍͕ɺΧϝϥʹΞχϝʔγϣϯ΍ίϯετϨΠϯτΛ͚ͭͯɺ


    ήʔϜ಺༰ʹ͍͕ۙclusterͰ͸೉͍͠දݱΛՃ͑ͨσϞγʔϯ͕࡞੒Ͱ͖Δ 3. 3DCGιϑτ΍ಈըฤूιϑτͳͲͰ࡞੒͢Δ
 ඇৗʹख͕͔͔ؒΔ͕ɺclsuter΍UnityͰ͸೉͍͠දݱʢΩϟϥͷද৘ɾྲྀମԋࢉʣ΍
 ςϩοϓͳͲ͕ޮՌతʹ࡞੒Ͱ͖Δ ͓·͚TIPS (ͪΐ͍࠮ٗ) (PV࠮ٗ)