ã¿ãªããããã«ã¡ã¯ãMinaFrancescaã§ãã
ååã®ã©ã€ãã£ã³ã°ã«é¢ããèšäºã¯Unity2018ãŸã§ã®ãã®ã§ã2022/2/15çŸåšã¯Unity2019ã䜿ãã«ãŒã«ãšãªã£ãŠãããŸãããã®ããã©ã€ãã£ã³ã°ãšããã«é¢é£ããŠããæ§ã ãªèšå®ãã现ãã説æã¯å°ãªãã«ããŠãããããã°ããŸãããïŒããšãããŠãã§ãUnity2019察å¿ãšããŠæ¹ããŠã玹ä»ããŠãããŸãã
ãã¡ããããã§ã玹ä»ããå 容ãäœããããã¹ãïŒãšããããšã§ã¯ãªãããšããããšã¯ãçæãã ããã
ä»åäœæ¥ã¯ãŒã«ãã¯ç§ã®HOMEã¯ãŒã«ããã¿ãŒãªããã¡ãã䜿ã£ãŠèª¬æããŠãããŸãã
âãã®èšäºã«ã€ããŠ
ãªãããããå¿ èŠãããã®ãïŒãšããã話ã¯ïŒäžéšãã®ããïŒæå°éã«ããŠèª¬æããŠãããŸãã
ã©ã€ãã£ã³ã°ã«é¢ããæ§ã ãªããã¥ã¢ã«ãæ¢ã«äžã®äžã«ãããããããŸããããããã§ã¯çŽ¹ä»ãããŠããªãããããã¯ããã ãã§ã¯è¶³ããªãéšåãè£ã£ãŠãããŸãã
ã©ã€ãã£ã³ã°ã ãã§ãªãããã«é¢é£ããã¯ãŒã«ãäœæã®ãã€ã³ããã玹ä»ããŠãããŸãã
ããã§ã¯äžèšã®é ç®é ã«èª¬æããŠãããŸãã
âç®æ¬¡
ã»ããšã©ã«ããŒã®æŽçæŽé ã»ç¶ºéºãªLightmapãçŒã ã»ã¢ãã¿ãŒã®èŠãç®ãèæ ®ããã©ã€ãã£ã³ã° ã»ãªãã¥ãªã¥ãŒãžã§ã³ã«ãªã³ã° ã»ãªãã¬ã¯ã·ã§ã³ãããŒã ã»PostProcessing ã»å®€å ãšå®€å€ã®ã©ã€ãã£ã³ã°ã®å€å ã»Lightmapã綺éºã«çŒããMeshBakerèšå® ã»RealtimeïŒMixedïŒã©ã€ããäžæã«äœ¿ã
éçºç°å¢ã¯äžèšã®éãã§ãã Unity 2019.4.31f1 (64-bit) VRCSDK3 CyanTriggerãå©çšããŠããŸã
ããšã©ã«ããŒã®æŽçæŽé
ãŸãã¯ã©ã€ãã£ã³ã°æ¬ç·šã«å ¥ã£ãŠè¡ãåã«ãã¡ãã£ãšãç¯ä»ããããŠãã ããã ãèªèº«ã®Unityã®ããšã©ã«ããŒãããŸãã¡ã©çºããŠã¿ãŸãããïŒããšã©ã«ããŒã®æŽçæŽé ã¯ãå°ããªãããžã§ã¯ãã§ã¯ãã»ã©åé¡ã«ãªããŸããããé 眮ãããªããžã§ã¯ããå€ããªãã°ãªãã»ã©ãããšãã管çã倧å€ã«ãªã£ãŠããŸãã
ç§ã¯ãã¡ãã®ã¢ã»ãããå©çšããŠããŸãã Rainbow Hierarchy 2 https://assetstore.unity.com/packages/tools/utilities/rainbow-hierarchy-2-106670?locale=ja-JP
å ·äœçã«ã©ããªããšãåºæ¥ãã®ããšãããšãéå±€ã«ãªãéšåã«ç¹ç·ãä»äžãããã®ãšãã²ãŒã ãªããžã§ã¯ãã«ã¢ã€ã³ã³ãèšå®ã§ããŸãã ãŸããäžã®ç»åã§ã¯ç®ã®ããŒã¯ã®ã¢ã€ã³ã³ãé衚瀺ã«ãªã£ãŠããŸããããã¯ãã«ãæã«é衚瀺ã«ããŠããã¹ããªããžã§ã¯ããæããŠããŸããããããããšã§åŸãããããïŒããã¯åºããŠãããã ã£ãïŒæ¶ããŠãããã ã£ãïŒããšè¿·ãããšãç¡ããªããŸãã
次ã«åœåèŠåãèªåã®äžã§æ±ºããŠãåºæ¥ãéããããå®ã£ãŠããããšãå¿ãããŸããããç§ã®å Žåã¯ãã¹ã«ã«ã±ãŒã¹ïŒå é ã倧æåïŒã§ããäžèšç»åã§ã¯èŠããŸããããããã«ã¢ã³ããŒã¹ã³ã¢ããã€ãã³ãããŸã䜿ãåãããšäŸ¿å©ã§ãã äŸãšããŠããLighting-Night / Lighting-Dayããªã©ã
ãããŠããããã空ãªããžã§ã¯ãã§ããããããã©ã«ãåããããŠãããããªç¶æ ãäœããšçŸããããšã©ã«ããŒãšãªãã§ããããã¯ãŒã«ãã®ã»ããã£ã³ã°ã«é¢ãããã®ãã©ã€ãã£ã³ã°ã«é¢ãããã®ããµãŠã³ãã«é¢ãããã®ããšãã£ãå ·åã«åããŠæŽé ããŸãããã
ãããžã§ã¯ãã倧ãããªãäºå®ã®æ¹ã¯ããã®ãããã®çŽ°ããããšãããšãããããããšè² æ ã«ãªã£ãŠããŸãã®ã§ããã²ãå§ãããããšããã§ãã
綺éºãªLightmapãçŒã
Lightmap ParametersãäœæããŸãã
Lightmap Parametersããã®ããã«èšå®ããŸã
MeshRendererã³ã³ããŒãã³ãã®Scale In Lightmapã10ã«èšå®ããŸã
ããšã©ã«ããŒã§MeshRendererãšæ€çŽ¢ãããšã
MeshRendererã³ã³ããŒãã³ããä»äžãããŠãããªããžã§ã¯ããäžæ¬ã§éžæã
èšå®å€æŽã§ããŸãã
ã¢ãã«ã®ã€ã³ããŒãç»é¢ãèµ€æ éšåã®ããã«èšå®ããŸãã
skpã¢ãã«ã®å Žåã§ããèµ€æ ã®ããã«èšå®ããŸãã
ãã¡ãã¯fbxãobjã¢ãã«ã®å Žåã§ããèµ€æ ã®ããã«èšå®ããŸãã
Generate Back Face ã¡ãã·ã¥ã®è£é¢ãç¡ããŠéæã«ãªã£ãŠå°ãå Žåã¯ãGenerate Back Faceãã«ãã§ãã¯ãå ¥ããŸãã
Generate Colliders ã³ã©ã€ããŒãèšå®ããäºå®ãããå Žåã¯ããã¡ãããã§ãã¯ããŠãããšãããšãã倧éã«ã³ã©ã€ããŒãèšå®ããå¿ èŠããªã䟿å©ã§ãã
Mesh Compression ã¡ãã·ã¥ãå§çž®ããŠè»œéåããèšå®ã§ããå§çž®çã¯åŸ®åŠã§ããéåžžHighã§å€§äžå€«ã§ãã çšã«ãã®èšå®ã«ãã£ãŠã¡ãã·ã¥ãç Žç¶»ãããããžã©ãžã©ãšéãªã£ãŠãããã®ãããªèŠãç®ã«ãªã£ãŠããŸãå ŽåããããŸããèŠãç®ããããããªïŒãšæã£ãããã®èšå®ãçã£ãŠãã ããã
PointLightãé 眮ããŸãããã
Lightã¯ããªããžã§ã¯ãã®äžã«åãããªãããã«é 眮ããŸãã éåžžã¯ãNo Shadowsãã®èšå®ã§å€§äžå€«ã§ãããå³ã®ãã圱ããã©ã¯ãªã©ã®ããœããœãšããæããã奜ã¿ã§ããã°ãSoft Shadowãã䜿ã£ãŠã¿ãã®ãè¯ããããããŸããã
PointLightããããããããŠãããšãäœæ ãå ã£ãŠãããªãLightãåºãŠããŸãã
ãã¡ãã®èšå®ãåèã«ããŠãã ãããPixel Light Countãäœãèšå®ãããŠããããšãåå ã§ãã
ããã¯ãã¬ã€ã€ãŒã®èŠçå ã§äžåºŠã«åŠçããŠãããã©ã€ãã®æ°ã§ãå€ãããã°ããã»ã©è² è·ã¯é«ãŸããŸãããããçµå±ã¯BakeããŸãã®ã§Unityãšãã£ã¿ãŒäžã§äžäŸ¿ã®ãªãããã«æ°å€ããããŠãããŸãã
â»VRChatå ã«ãããŠã¯ãã®èšå®ã¯åæ ãããªããšã®ãææããããŸããã®ã§è¥å¹²æç« èª¿æŽããŸããã
çŒããããªããžã§ã¯ããStaticã«ããŸãã
éé²ã«ãã¹ãŠãStaticã«ããã®ã§ã¯ãªããContribute GIã«ãã§ãã¯ãå ¥ããã ãã§ãBakeã®å¯Ÿè±¡ã«ãªããŸããåããäºå®ã®ãã®ãäŸãã°ãã¢ãã³ãããªã©ããããã£ããã®ã¯Contribute GIã®ã¿ã«ãã§ãã¯ãå ¥ããŸããé¡é¢åå°ããããå Žåã¯Reflection Probe Static ããã§ãã¯ãå ¥ããŸãã
ç»åã®ããã«èšå®ããŸãã
ç»åã®ããã«èšå®ããŸãã
Lightmap Resolution / Lightmap Size ãã¡ãã¯ä»äžãã®å Žåã®æ°å€ã§ããéçºæ®µéã§ã¯ãã5 / 512ããããã§ååã§ãã
Lightmapper Progressive GPUïŒPreviewïŒã«èšå®ããŸããã°ã©ãã£ãã¯ããŒãã§çŒãã®ã§ãšãŠãé«éã§ãã 察å¿ããŠããªãã°ã©ãã£ãã¯ããŒããã䜿ãã®å Žåã¯ãBakeæã«ãããåæã«CPUã«èšå®ããªããããŠããŸããŸããåæã«èšå®ãå€ãã£ãŠããŸã£ãŠGPUã§Bakeãå§ãŸããªãå Žåã¯ãæ°ããé«æ§èœãªã°ã©ãã£ãã¯ããŒãã®è³Œå ¥ãæ€èšããŸãããã
ããŠãã®èšå®ã¯æèŠãåããããšããã§ããç§ã¯åºæ¬Directional Lightã¯BakeããŸããã
äœæ Bakeããªããã®çç±ãšããŠäžèšããããããŸããBakeããŠããŸããšãããããªåé¡ãèµ·ãããŸããïŒåé¡ãªãå ŽåããããŸããã±ãŒã¹ãã€ã±ãŒã¹ã§ãïŒ
ã¯ãŒã«ãå¶äœã«é¢ããåé¡
ã»æš¹ãèã®åœ±ãå°é¢ã«èœã¡ãªã
ã»é¢šã§æš¹ã®èãæºããŠããã®ã«ãã®åœ±ãåããŠãªããŠäžèªç¶
ã»çŒãããã©ãªããæ±ããäžèªç¶
ã»æš¹ãèãçã£é»ã«ãªã
ã»ãã€ãŸã§ãã£ãŠãBakeãå§ãŸããªãå Žåããã
ã»æ°Žã·ã§ãŒããŒã䜿ã£ãæ°Žãæ¶ãã
ã¢ãã¿ãŒã«é¢ããåé¡
ã»ã¢ãã¿ãŒãçã£æ
ã»ã¢ãã¿ãŒã«ãã圱ãèœã¡ãªã
ããžã¥ã¢ã«é¢ã§ãããããªåé¡ãèµ·ãããŸããäžèšãèžãŸããŠDirectionalLightãBakeããŠã倧äžå€«ãªã±ãŒã¹ãšããã§ã¯ãªãã±ãŒã¹ãèããŠã¿ãŸãã
DirectionalLightãçŒããŠãOKãªã±ãŒã¹
ã»Terrainã®æš¹ãèãæ°Žã·ã§ãŒããŒã䜿ã£ãæ°Žã䜿çšããŠããªã
ã»å€ªéœå ïŒæå ïŒãå¿ èŠãªãã¯ã³ã«ãŒã ãªã©ã®å®€å ã·ãŒã³ãéé空éãç®±ãã®
ã»å€§äººæ°ãéãŸãäºå®ãããã®ã§ãšã«ãã軜éåããã
ã»ãªã¢ã«ã¿ã€ã ã®åœ±ã¯ç¡ããŠãè¯ããããžã¥ã¢ã«ã«ãããªã«ãã ãã£ãŠããªã
DirectionalLightãçŒããªãã»ããè¯ãã±ãŒã¹
ã»å€ªéœå ïŒæå ïŒã«ããæšé°ãè¡šçŸããã
ã»æŒå€ãµã€ã¯ã«ããŸãã¯ãã®åãæ¿ããå®è£ ããã
ã»Terrainã«ããèæšãé 眮ãããŠããèªç¶è±ããªã·ãŒã³
ã»æ°Žã·ã§ãŒããŒã䜿çšããæ°Žãããã·ãŒã³
ã»ã¢ãã¿ãŒã®èŠãç®ããã©ããªã·ã§ãŒããŒã䜿ã£ãã¢ãã¿ãŒã§ãåºæ¥ãã ãåäžã«ããã
ã»ãšã«ããããžã¥ã¢ã«é¢ãæãªããããªã
ã¢ãã¿ãŒã®ã·ã§ãŒããŒãééç¶æ ã®VRChatãã¢ãã¿ãŒãçã£æã«ãªã£ãŠããŸã£ãŠã¯ãŒã«ããæ°ã«å ¥ã£ãŠããããªãããšããã®ã¯åºæ¥ãã°é¿ãããã§ãããã LightProbeãå©çšããŠäºåèšç®ãããææ³ããããŸãããã©ã€ããç¡ããšããã«è¡ããšæ¥æ¿ã«ã¢ãã¿ãŒããŸã£ããã«ãªã£ãŠããŸã£ãŠãæããèŠããç¹å®äœçœ®ã«ç«ã¡ç¶ããŠãã¬ã³ããšäŒè©±ããçµéšã¯ãããŸãããïŒ VRChatã®å¿ æ»ã®æé©åã«ãããDirectional LightãçŒããªããŠãåå90FPSã«å°éããã¯ãŒã«ããåµãããšãå¯èœã§ãã
ååã®Unity2018ã®èšäºã§ã¯ããšããããããããŠããã°ããšããäœã§ããããããããè³åŠãæèŠã®åããããšãããªã®ã§ãä»åã¯ãã£ãšãã£ããæãäžããŠãããŸãã
以äžã«ç¶ããŸãã
ã¢ãã¿ãŒã®èŠãç®ãèæ ®ããã©ã€ãã£ã³ã°
å·ŠããPlayerãã§ã¯ãªãã¬ã€ã€ãŒãå³ããPlayerãã®ã¬ã€ã€ãŒã§ãã
Directional LightãïŒã€çšæããŠãããããã¯ãŒã«ãçšãšã¢ãã¿ãŒïŒãã¬ã€ã€ãŒïŒçšãšã§äœ¿ãåããããšã§ãèæ¯ã«åãããªãã¢ãã¿ãŒã®æãããä¿æã§ããŸãã
ãã®æ¹æ³ã¯ãã¢ãã¿ãŒçšã®DirectionalLightãå¥ã«ããã®ã§ãDirectionalLightãçŒãããæ¹ã«ãæçšã§ãã
ã¯ãŒã«ãå šäœã«é©çšãããDirectionalLightã§ããïŒçŒãããæ¹ã¯Bakeèšå®ã«ïŒ
ãã ãCulling Maskã®èšå®ã§ãããã®ãã§ãã¯ãå€ããŸãã
ã¢ãã¿ãŒïŒPlayerïŒçšã®Directional Lightã§ãããããã«ãã§ãã¯ãå ¥ããŸãã
ããããããšã§ãã¯ãŒã«ããšã¢ãã¿ãŒïŒãã¬ã€ã€ãŒïŒãšã§å¥ã ã®æãããèšå®ã§ããŸãã
å®éã«èªèº«ã®ã¢ãã¿ãŒãé 眮ããã¬ã€ã€ãŒãPlayerã«èšå®ããŠã¿ãŸãããã
ã¢ãã¿ãŒïŒãã¬ã€ã€ãŒïŒãå¿å°ããæããã§èŠããããã«ãã¢ãã¿ãŒçšã®Directional Lightã®æããã調æŽããŸãããã Culling Maskã«ãã£ãŠå ã®åã¶ãã®ãå¶åŸ¡ããŠããã®ã§ãDirectional LightãïŒã€çœ®ããããè² è·ã2åããªããŠããšã«ã¯ãªããŸããããå®å¿ãã ããã ããã§ãã¯ãŒã«ãã®ããžã¥ã¢ã«ãä¿ã¡ã€ã€ã¢ãã¿ãŒã®èŠãç®ã確ä¿ã§ããŸãããã©ãããŠãDirectionalLightãçŒããããšããå Žåã§ãã¢ãã¿ãŒã®èŠãç®ãæãªãããšã¯ãããŸããã
åãããã«æ°Žã«ã ãæå¹ãªDirectionalLightãäœãã°ãæ°Žã·ã§ãŒããŒãçããããšãåºæ¥ãŸããã
ãã®æ¹æ³ãæ瀺ããäžã§ç§ã¯DirectionalLightã¯çŒããªãããšãéžæããŠããŸããç§ã®äœãã¯ãŒã«ãã¯æš¹ã ãèè±ãå€ãã宀å ãšå®€å€ã®ã·ãŒã³ãå ±åããŠããŸãã
倪éœå ïŒæå ïŒãè¡šçŸãããšãã®èªç¶ãªå ãšåœ±ã«ãã£ãŠèŠæ ããè¯ããªããŸãã
ãŸãã©ããªã·ã§ãŒããŒã䜿ã£ãã¢ãã¿ãŒã§ãã£ãŠããåºæ¥ãã ãçåããããªæããã§èŠããã¢ãã¿ãŒã§é¡ã®åã«ç«ã£ãŠæ¥œããããŒã¯ã楜ãã¿ããã®ã§ãã
ïŒïŒãã€ã«ã«ãåã¶å®çžŸãçµãŠãã®æ¹æ³ã«èŸ¿ãçããŠãããŸãããããŸã ã©ãããããããããããªããšããæ¹ããç¹ã«ãã ããã¯ãªãããšããæ¹ã¯ããã²åœèšäºã®éãã«ãã£ã¬ã³ãžããŠã¿ãŠãã ãããã
ãªãã¥ãªã¥ãŒãžã§ã³ã«ãªã³ã°
ã©ã€ãã£ã³ã°ãšã¯å€ããŸãããäžå¿ãã£ãã説æããŠãããŸããã
ãªãã¥ãªã¥ãŒãžã§ã³ã«ãªã³ã°ã¯ããOcclusion Areaããšããã³ã³ããŒãã³ããCubeã«ä»äžããèšå®ãããç¯å²ããã®ç»åã®ããã«èŠã£ãŠãã ããã
éé²ã«å šäœããªãã¥ãªã¥ãŒãžã§ã³ã«ãªã³ã°BakeããŠããŸããšãã¯ãŒã«ã容éã倧ãããªã£ãŠããŸããŸãã
宀å ãããå Žåã¯ïŒïœïŒãåºããã£ãŒã«ãã®å Žåã¯ïŒïœïŒïŒãããã§ãã
ãªãã¬ã¯ã·ã§ã³ãããŒã
é¡ã®ãããªãªããžã§ã¯ãããåå°ããŠèæ¯ãæ ã蟌ããããªãªããžã§ã¯ããããå Žåã¯ãReflectionProbeãé 眮ããŸãããã
åŸãã®ã¹ã¿ã³ããã©ãŒã«ã泚ç®ãã ãããå察åŽã®æ¬æ£ãæ ã蟌ãã§ããŸãã
ãšãŠãçŸå®å³ãå¢ããŸãã®ã§ãã²èšå®ããŸãããã
PostProcessing
Nearã0.01ã«èšå®ããŸããããã¬ãæè·é¢èšå®ã§ããå¿ é ã§ãããã¹ãã§ããããã«ãã£ãŠè²ãŸããæãVRCã«ã¯ãããŸãã
PPSïŒåœåã¯ãªãã§ã倧äžå€«ã§ãïŒãšãã空ãªããžã§ã¯ããäœæããŠãPost Process Volumeã®ã³ã³ããŒãã³ããä»äžããŸãã
ã¬ã€ã€ãŒãå ã»ã©ã®TransparentFXïŒä»ã®ã¬ã€ã€ãŒã§ãè¯ãã®ã§ãããããäžçªããã£ãœãååã®ã¬ã€ã€ãŒãªã®ã§ç§ã¯ããã«ããŠããŸãïŒã«èšå®ããã®ããå¿ããªããããã§ç»é¢å¹æãããããŸãã
â»ã©ã®ã¿ã€ãã³ã°ãªã®ãããããªãã®ã§ãããLayer22ãPostProcessingãšããŠå称ãèªåèšå®ãããããã«ãªã£ãŠããã¿ãããªã®ã§ãã¡ãã䜿çšãããšè¯ãããã§ãã
VRCWorldã®Prefabãé 眮ããŠããããšãšæããŸãã
Reference Cameraã®èšå®ã«Main Cameraãå¿ ãã»ããããŠãã ããã
VRChatã«ã¢ããããŒãããæã«ããã®èšå®ã空ã®ãŸãŸã ãšç»é¢å¹æãããããŸããã
è¡ç¯ã¯ãŒããããšå ããšè¯ãæãã§ãã
ç©ãããããããšèŠæ ãããã®ã§æ³šæããŸãããã
宀å ãšå®€å€ã®ã©ã€ãã£ã³ã°ã®å€å
宀å ã«å ¥ãæãšåºãæã§ã¢ãã¡ãŒã·ã§ã³ãèšå®ããã¹ã ãŒãºã«ã©ã€ãã£ã³ã°ãåãæ¿ããŸãã
ã¢ãã¡ãŒã·ã§ã³ã«ãã£ãŠPostProcessã®Globalã®ã¹ã©ã€ããŒãåããŠããããšã«æ³šç®ããŠãã ããã ããã«ãã£ãŠå®€å ãšå®€å€ã®ã©ã€ãã£ã³ã°ãã¹ã ãŒãºã«åãæ¿ããŸãã
å ¥ãå£ä»è¿ã«IsTriggerã®ã³ã©ã€ããŒãé 眮ããCyanTriggerã§ãã¬ã€ã€ãŒãšã®æ¥è§Šå€å®ãåããŸãã
ããã§ã¯Animatorã®triggerã«ãåºãæãšå ¥ã£ãæãšã§0ãš1ãä»£å ¥ããŠããŸãã
triggerã0ã®æãš1ã®æãšã§ã¹ããŒãã移åããŸããããã«ããAnimationClipãåºãåããŠã宀å ãšå®€å€ãšã§ã©ã€ãã£ã³ã°ãåããŠããŸãã
ã¡ãªã¿ã«ãªã¹ããŒã³ããŠç¬æã«å€ã«åºãå Žåãæ³å®ããŠãresetãšããããªã¬ãŒãäœããç¬æã«ã¹ããŒããæ»ãåŠçãå¿ããã«å ¥ããŠãããšããã§ãããã
ãã®å Žåããªã¹ããŒã³å°ç¹ã«IsTriggerã®ã³ã©ã€ããŒã眮ããããã§Animatorã«resetã®ããªã¬ãŒãåŒãããã«CyanTriggerã§èšå®ããŸãã
ãã¬ã€ã€ãŒã®æ¥è§Šå€å®ã«ãã£ãŠresetã®ããªã¬ãŒãåŒãããªããã€triggerã®æ°å€ã0ã«æ»ããŸãã宀å ã ãã®ã¯ãŒã«ãã§ã¯å¿ èŠãããŸãããããå€ã«çŽ æµãªãåºãäœãããïŒãšããå Žåã«ã¯æçšã§ãã
Lightmapã綺éºã«çŒããMeshBakerèšå®
æ®å¿µãªãããã¡ãã®èšå®ããã£ãŠããŠãããŸãçŒããªãã±ãŒã¹ã¯ååã«ãããŸãã
ãªããžã§ã¯ããçã£é»ã«ãªã£ãŠããŸã£ãããããããBakeããã€ãŸã§çµã£ãŠãå§ãŸããªãããšããããšããããŸãããMeshBakeãããã®ãå€ãã£ãããã¢ãã©ã¹åãããã¯ã¹ãã£ããã®ããã倧ãããšã解å床ãã¡ãã£ãšäžããã ãã§ããã¶ããšèŠãç®ãæãªãããŠããŸããããçµæã¯ãŒã«ã容éãè¥å€§åããåŸåã«ãããŸãã
ããã§ã¯ç§ã®çµéšäžãã£ãšãæåçã®é«ãèšå®ãã玹ä»ããŸãããæ©ã¿ã®æ¹ã¯ãã²ãè©Šããã ããã
ã¯ãŒã«ãå¶äœã®å Žåã¯ãTextureBaker and MultiMeshBakerãã䜿ããŸãã
察象ãªããžã§ã¯ããèšå®ããç»é¢ã§ãã
Exclude meshes with out-of-bounds UVsã®ãã§ãã¯ãå€ããŸãã
æ£ãããªããžã§ã¯ããèšå®ããããã確èªããŸãã
Create Empty Assets For Combined Materialã®ãã¿ã³ã§assetãäœæããŸãã
Multiple Combines Materialã«ãã§ãã¯ãå ¥ããŠãããäžã®ãã¿ã³ãæŒããŸãã
ããããã€ã³ãã§ããConsider Mesh UVsãã¹ãŠã«ãã§ãã¯ããããŸãã
æåŸã«Blend Non- Texture Propertiesã«ãã§ãã¯ãå ¥ããŠã玫è²ã®ãã¿ã³ãæŒããŸãã
æåŸã¯ããªãã¿ã®èšå®ã§ãã
以äžã§ãæåŸã«ãBake All Child MeshBakersããæŒããŸãã äœãåé¡ãããå Žåã¯æŒããŠãäžç¬ã§åŠçãçµãã£ãŠããŸã£ããããšã©ãŒããã°ã«åºçŸãããããŸãã
ãŸãšããMeshããã®ããã«åºåãããŸãã
Scall in Lightmap ã10ã«èšå®ããã®ããå¿ããªãã
MeshBakeãçµãã£ãããšã«æ®ã£ãMeshBakerã®ã²ãŒã ãªããžã§ã¯ãã¯æ¶ããŠãè¯ãã®ã§ãããããšã§ãŸãåãèšå®ã§å©çšãããå ŽåããããããããŸããã ãŸããMeshBakeããåã®ãªããžã§ã¯ãã¯ã念ã®ããããã¯ã¢ããã§ãšã£ãŠãããšå®å šã§ãã ããããã®ãŸãŸã§ã¯ãã«ãæã«ããããå«ãŸããŠããŸãã¯ãŒã«ããµã€ãºã«å ç®ãããŠããŸããŸãã ããã§èµ€æ éšåããEditorOnlyãã«èšå®ããŸããããã§ãã«ãæã«ã¯ãããã®ãªããžã§ã¯ããå«ãŸããªããªããŸãã®ã§äŸ¿å©ã§ãã
äžåºŠLightmapãçŒããŠãããã®ãMeshBakeãããšäžã®ç»åã®ããã«Lightmapã®ç»åãçŽã¥ããŠãããããŸãããããã¯MeshBakeããçµæã®ãªããžã§ã¯ãã«ã¯é©åããŠããªãã®ã§ãäžåºŠLightmapãã¯ãªã¢ããŠå床Bakeããªããå¿ èŠããããŸãã
Lightmapã®ããŒã¿ã¯Sceneåãšåããã©ã«ããçæãããŠããã«ä¿åãããŠããŸãã
èµ€æ éšåã«ãã§ãã¯ãå ¥ããã¯ã©ã³ãå§çž®ãããŸãããã
ããã§ããã¡ã€ã«ãµã€ãºã倧ããå Žåã¯MaxSizeã512ããããŸã§ã¯èœãšããŠã倧äžå€«ã§ããReflection Probeãåãå Žæã«çæãããŠããŸãããã¡ããèµ€æ éšåã«ãã§ãã¯ãå ¥ããŠã¯ã©ã³ãå§çž®ããŸãããã
RealtimeïŒMixedïŒã©ã€ããäžæã«äœ¿ã
ã©ã€ãã¯å šéšãã€ã¯ãããã ã»ã»ã»ïŒãšãã䜿åœæã«åãããŠããŸãããïŒ å®ã¯RealtimeïŒMixedïŒã®ã©ã€ãããšãŠãæçšã§ãããBakedã©ã€ãã§ã¯è¡šçŸã§ããªãããšãå€ã ãããŸãã ããã§ã¯ãã®ããã€ãã®èšå®äŸãã玹ä»ããŸãã
äŸãã°æ°Žé¢ã«æµ®ãã¶ããããã¯ååãããæ²ãã§ããã¯ãªã¹ã¿ã«ãBloomã§åŠçããŠãè¯ãã®ã§ãããæ°Žé¢ã«ãŒããã£ãšéãå ãåœãããšãæ°Žé¢ããšãŠã綺éºã«ãªããŸãã
éãPointLightã眮ããšãã®ããã«ç¶ºéºãªæ°Žé¢ãè¡šçŸã§ããŸãã
Realtimeã®ã©ã€ãã¯è² è·ãé«ãããšããèªèã¯ééãã§ã¯ãããŸãããã䜿ãæ¹ããã£ãããããŸããã°ãè² è·ã¯æå°éã«çµµå¿ããããžã¥ã¢ã«ãçã¿ã ããŸãã
èµ€æ éšåã«æ³šç®ããŸãã
Realtimeã§ãMixedã§ãã©ã¡ãã§ãæ§ããŸããã
Rangeã極ããŠå°ããæ°å€ã§ãããã®ä»£ããã«Intensityãããªãé«ãæ°å€ã§ãã
Rangeã¯åºããŠå ãåœããé¢ç©ãå¢ããã°å¢ããã»ã©è² è·ãã°ã³ã°ã³é«ãŸããŸãããIntensityã¯ã©ããªã«ãããŠã倧ããªè² è·ã«ã¯ãªããŸããã
ShadowTypeã¯ãã¡ããNo Shadowsã§ãã
ãããŠæåŸã«CullingMaskã®ãã«ããŠã³ã確èªããŸãããã
PlayerãPlayerLocalãMirrorReflectionã®ãã§ãã¯ãå€ããŸããããã§ã¢ãã¿ãŒã«ã¯ãã®ã©ã€ããåã°ãªãããè² è·ãšããŠã¯ã ãã¶ããããããŸãããIntensityãé«ãã«èšå®ããŠããŠãã¢ãã¿ãŒã«ã¯åã°ãªãããã¢ãã¿ãŒãçã£çœã«ãªãããªããŠããšããããŸããã
æ°Žé¢ã«ã ãå ãåæ ããããã®ã§ããã°ãWaterã®ã¬ã€ã€ãŒã ãã«ãã§ãã¯ã§ãOKã§ãã
ãã¡ãã®å Žåã¯ã©ãã§ããããå°é¢ã«çœ®ãã¿ã€ãã®ãæŽèœç §æã§ãããçŸå®äžçã§ããã°åšå²ã®å°é¢ããŒããããšæãããªãã¯ãã§ãã
æ®å¿µãªããTerrainã®LightmapçŒãä»ãã¯ç§ã¯ããŸããå§ãããŸããã2Dãã¯ã¹ãã£ã®èãçãããŠããå Žåãèã¯çŒããŸããããæš¹ã ãçŒãããšãããšæš¹ã ã¯çã£é»ã«ãªã£ãŠããŸããŸããã€ãŸãäžèªç¶ãªç»ã«ãªã£ãŠããŸãããšããããšã§ãã
ããã§Realtimeã©ã€ãã®åºçªã§ããå ã»ã©ã®æ°Žé¢ã®ã¯ãªã¹ã¿ã«ãšåæ§ã«ãRangeã極ããŠå°ããããIntensityãé«ãèšå®ããŸãã
Rangeã¯ïŒã§ãããšãŠãçãç¯å²ãªã®ã§è² è·ãããªãæããããŠããŸãã
Terrainã¯Environmentã®ã¬ã€ã€ãŒãªã®ã§ããã®ããã«CullingMaskã®ãã«ããŠã³ã§Environmentã ãã«ãã§ãã¯ãå ¥ããŸãã ããããããšã§Terrainã«ããå ãåã°ãªãã®ã§ãè² è·ãããªãæå°éã«åºæ¥ãŸãã
ã§ãããã¡ãã䜿ãããã¯çŠç©ã§ããåºãèŠæž¡ããå Žæã§ãããå€çšãããšããã«SetPassCallsãè·³ãäžãããŸãã
âç·šéåŸèš
以äžã§Unity2019察å¿çã©ã€ãã£ã³ã°ã®èšäºãšãããŠããã ããŸãããããã ã£ãã§ããããã Googleæ€çŽ¢ã§ããã«èŠã€ããã©ã€ãã£ã³ã°èšäºã§ã¯ãæ®å¿µãªããæ å ±ãäžè¶³ããŠããããã«æããŸããããå€ãã®æ¹ãèªç±ã«ã®ã³ã®ã³ãšUnityã®ã©ã€ãã£ã³ã°ã楜ããè¡ãããããä»åUnity2019察å¿çãšããŠæ°ããæžãããŠããã ããŸããã ãŸããCyanTriggerãšAnimatorã䜿ã£ã宀å€ãšå®€å ã®ã©ã€ãã£ã³ã°åãæ¿ãã®ä»çµã¿ããããããBakeããªããšããéžæè¢ã äœãããå¿ ãBakeããªããã°ãªããªãããšããããã§ã¯ãªããçŽ æµãªããžã¥ã¢ã«ãæ¯èŠ³ãåµãåºãããã«ãRealtimeã®ã©ã€ããè³¢ã䜿ããšããããšãã玹ä»ãããŠããã ããŸããã
ããããä»åãBakeryã«é¢ããå 容ã¯çãããŠããã ããŸããããšããã®ããUnity2019ã«ãªã£ãŠGPUã§ã®Bakeãããã¹ã ãŒãºã«è¡ããããã«ãªã£ãããããŸããŸãBakeryã䜿ãæå³ã¯èããŸãããVRChatã®ã¯ãŒã«ãã«è¡ã£ãŠãããã¯Bakeryã§çŒããŠããªïŒãªããŠèŠåãã¯ãŸãã€ããªãã§ãããããBakeryãããªããŠã綺éºã«Lightmapã¯çŒããŸãã
ã©ã€ãã£ã³ã°ã¯ãšãŠã楜ããå·¥çšã§ããçŽ ã£æ°ãªãã£ãæ¯è²ãã°ã³ãšèŠæ ããããã®ã«ãªã£ãŠããå·¥çšã§ããèšå®é ç®ãèŠããªãããããªãããšã¯ç¢ºãã«å€ãã®ã§ããããŸãã¯ãã®èšäºã§çŽ¹ä»ãããŠãããŸãŸã«ã©ã€ãã£ã³ã°ã«ãã£ã¬ã³ãžããŠã¿ãŸãããã ããå€ãã®æ¹ãVRChatã§çŽ æµãªãéšå±ããåºãæã«å ¥ãããããããæ¬èšäºããã²å€ãã®æ¹ãšã·ã§ã¢ããé¡ãããããŸãã ããã§ã¯æ¥œããVRChatã©ã€ããã
MinaFrancescaã§ããã