이건 개 쓰레기라서 가능하면 쓰면 안 된다
근데 입이 아닌 코등의 다른 부위를 움직여서 하는건 ㄱㅊ
이게 좋음
'게임 > VRChat' 카테고리의 다른 글
텍스처 메모리와 성능과의 연관성 (0) | 2024.02.27 |
---|---|
부스 출시전 검토 사항 (0) | 2024.01.13 |
VRChat 아바타 업로드 2023 (0) | 2024.01.02 |
이건 개 쓰레기라서 가능하면 쓰면 안 된다
근데 입이 아닌 코등의 다른 부위를 움직여서 하는건 ㄱㅊ
이게 좋음
텍스처 메모리와 성능과의 연관성 (0) | 2024.02.27 |
---|---|
부스 출시전 검토 사항 (0) | 2024.01.13 |
VRChat 아바타 업로드 2023 (0) | 2024.01.02 |
이 방법또한 묻혀져 가는 추세고 요새는 다른 방법이 권장되고 있다
최신 방법은 아래글을 참조
https://wmmu.tistory.com/entry/VRChat-%EC%95%84%EB%B0%94%ED%83%80-%EC%97%85%EB%A1%9C%EB%93%9C-2024
VRChat 아바타 업로드 2024
1. 아바타 업로드하기 더보기 Unity 2022.3.6f1이랑 CC(CreatorCompanion)을 설치할거다 https://unity.com/kr/download 먼저 여기서 유니티 허브를 받자 unityhub://2022.3.6f1/b9e6e7e9fa2d 설치후 이걸 누르면 2022.3.6f1이 설
wmmu.tistory.com
깡수동을 원하는 사람은 아래글을 참조
https://wmmu.tistory.com/entry/VRChat-Avatar-30
VRChat 아바타 업로드 2021
이 글들은 아바타3.0 초창기 시절 깡수동글들이라 현재는 많이 바뀌었다최신 자료는 아래 링크에서 https://wmmu.tistory.com/entry/VRChat-%EC%95%84%EB%B0%94%ED%83%80-%EC%97%85%EB%A1%9C%EB%93%9C-2024 VRChat 아바타 업로
wmmu.tistory.com
1. 아바타 업로드하기
Unity 2022.3.6f1이랑 CC(CreatorCompanion)을 설치할거다
먼저 여기서 유니티 허브를 받자
설치후 이걸 누르면 2022.3.22f1이 설치된다
근데 만약 설치가 안 된다면
https://unity.com/kr/releases/editor/whats-new/2022.3.22
여기서 다운받는다
https://vrchat.com/home/download
그리고 여기서 CC를 다운받는다
키고 프로젝트를 만든다
Open Project
그런데 만약 이창이 뜬다면
다 지우고
새로고침 해준다
만약 씬 만들라는 창 뜨면 이름치고 저장
끝
2. 옷 갈아 입히기
예전과 달리 이제 옷 갈아입히는것도 원터치다
먼저 캐릭터와 전용옷을 준비한다
https://booth.pm/ja/items/1564788
AvatarTools - 黒鳥ケモノ工房 - BOOTH
Avatarの結合に便利なUnity拡張です。 ・AvatarAssembler 同じボーン構造のモデルデータのボーンを結合するツールです。元データを複製して生成するので、元データに対して影響がありません。例
booth.pm
그리고 이곳에서 제일 최선버전을 다운받는다
글 쓸 당시는 v2.2.3이다
옷과 캐릭터를 씬에 드래그 해서 배치한다
가급적이면 kisekae 버전을 추천
없다면 캐릭터를 올린다음 옷을 지운다
프리팹 위치는 제품마다 다르니 조심
상단바에서 AvatarAssembler를 연다
캐릭터와 옷을 배치하고 Assemble을 누른다
마지막으로 Assemble 시킨걸 골라서 업로드 한다
끝
그리고 최근 내가 만든 새로운 아바타툴 홍보함
아바타툴 설치 없이도 아무런 클릭없이도 의상을 입히는 시스템
즉 무설치 제로터치 아바타툴이다
https://www.youtube.com/watch?v=BUgTAp2SMt4
이 툴과 관련된 상품은
https://booth.pm/ja/items?tags%5B%5D=EasyWear
新着商品 - 通販・ダウンロードの同人販売、購入 - BOOTH
BOOTH(ブース)とは、pixivと連携した、創作物の総合マーケットです。無料で簡単にショップを作成でき、商品の保管・発送代行サービスも提供しています!
booth.pm
여기서 볼수 있다
옛날 정보들
https://wmmu.tistory.com/entry/VRChat-Avatar-30
VRChat 아바타 3.0
1. 아바타 업로드하기 더보기 vrchat.com/home/download VRChat VRChat lets you create, publish, and explore virtual worlds with other people from around the world. vrchat.com VRChat홈페이지에 로그인하고 3.0 SDK를 다운로드 하고 유
wmmu.tistory.com
부스 출시전 검토 사항 (0) | 2024.01.13 |
---|---|
Booth 구매 방법 (0) | 2024.01.02 |
VRChat 레이어 (0) | 2023.08.12 |
난 이미 구매이력이 있어서 단순하게 끝났다
첫결제라면 더 많은 절차가 필요하다
VRChat 아바타 업로드 2023 (0) | 2024.01.02 |
---|---|
VRChat 레이어 (0) | 2023.08.12 |
VRChat VCC OpenProjet 안 될때 (0) | 2023.07.09 |
2019/06/02 기준
Booth 구매 방법 (0) | 2024.01.02 |
---|---|
VRChat VCC OpenProjet 안 될때 (0) | 2023.07.09 |
Booth 선물 방법 (0) | 2023.04.14 |
다음처럼 Opening만 뜨고 안 열릴때
UnityHub를 연다
끝
VRChat 레이어 (0) | 2023.08.12 |
---|---|
Booth 선물 방법 (0) | 2023.04.14 |
자주 쓰는 USharp 코드 (0) | 2023.01.22 |
누르고 선물해줄사람에게 링크 주면 된다
그리고 받은 사람은 다시 다운로드 받을려면
이경로로 진입해서 받으면 된다
VRChat VCC OpenProjet 안 될때 (0) | 2023.07.09 |
---|---|
자주 쓰는 USharp 코드 (0) | 2023.01.22 |
VRChat 캐릭터 압착되는 문제 (0) | 2023.01.01 |
자주 쓰는 U# 코드들이다
핸들이 손에 잡힌 상태인지
GetComponent<VRC_Pickup>().IsHeld
//주의: GetComponent<VRC_Pickup>().currentHand != VRC_Pickup.PickupHand.None는 오작동하므로 쓰면 안됨
왼손으로 잡혀있는지
GetComponent<VRC_Pickup>().currentHand == VRC_Pickup.PickupHand.Left
변수동기화
[UdonSynced]
int state = 0;
매뉴얼 동기화 예제
이 코드는 종각역 만들때 썼다
using UdonSharp;
using UnityEngine;
using UnityEngine.UI;
using VRC.SDKBase;
using VRC.Udon;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class StageText : UdonSharpBehaviour
{
[UdonSynced]
[Multiline]
public string syncText;
public Text textUI;
public void UpdateText(string text)
{
Networking.SetOwner(Networking.LocalPlayer, gameObject);
syncText = text;
RequestSerialization();
}
void Update()
{
textUI.text = syncText;
}
}
텔레포트
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class Teleport : UdonSharpBehaviour
{
public Transform teleportTarget;
public override void Interact()
{
Networking.LocalPlayer.TeleportTo(teleportTarget.position, teleportTarget.rotation);
}
}
스크립트 LOD
기본 LOD도 훌륭하지만 이걸 쓰는 이유는 라이팅이나 스크립트 On Off도 용이하기 때문이다
몰론 그렇다고 이거만 쓰진 말고 기본 LOD와 병행해서 쓰자
https://ahzkwid.booth.pm/items/5892835
https://gist.github.com/ahzkwid/6647d3aec625afe96c54bb38b2671c72
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class ScriptLOD : UdonSharpBehaviour
{
public float radius = 20;
public GameObject[] hqObjects;
public GameObject[] lqObjects;
#if UNITY_EDITOR
void OnDrawGizmos()
{
Gizmos.DrawWireSphere(transform.position, radius);
}
#endif
void Update()
{
var active = Vector3.Distance(Networking.LocalPlayer.GetPosition(), transform.position) < radius;
foreach (var obj in hqObjects)
{
obj.SetActive(active);
}
foreach (var obj in lqObjects)
{
obj.SetActive(!active);
}
}
}
글로벌 토글 스위치
https://gist.github.com/ahzkwid/4ee36e9fb9678b6c07522f4fbd1b931d
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
public class GlobalSwitch : UdonSharpBehaviour
{
public GameObject[] targets;
[UdonSynced]
public bool targetsEnabled=false;
public override void Interact()
{
Networking.SetOwner(Networking.LocalPlayer,gameObject);
targetsEnabled = !targetsEnabled;
}
public void Update()
{
foreach (var target in targets)
{
target.SetActive(targetEnabled);
}
}
}
플레이어가 Trigger 콜라이더 내부인지 체크
콜라이더 레이어는 가급적 Default로 해두자
https://gist.github.com/ahzkwid/2c6a020d9c33af2456239baed64726fb
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
public class PlayerInsideCheck : UdonSharpBehaviour
{
public GameObject[] gameObjects;
private void Start()
{
foreach (var gameObject in gameObjects)
{
gameObject.SetActive(false);
}
}
public override void OnPlayerTriggerEnter(VRCPlayerApi player)
{
if (player.isLocal)
{
foreach (var gameObject in gameObjects)
{
gameObject.SetActive(true);
}
}
}
public override void OnPlayerTriggerExit(VRCPlayerApi player)
{
if (player.isLocal)
{
foreach (var gameObject in gameObjects)
{
gameObject.SetActive(false);
}
}
}
}
유저출입기록
https://ahzkwid.booth.pm/items/6791634
https://gist.github.com/ahzkwid/4fab060b1d493188b10f545f626ab979
using System;
using UdonSharp;
using UnityEngine;
using UnityEngine.UI;
using VRC.SDKBase;
public class UserAccessLog : UdonSharpBehaviour
{
public Text log;
public Scrollbar scrollbar;
public Text userCount;
public Color joinColor=Color.green;
public Color leaveColor = Color.red;
int logCount = 0;
public int logCountMax = 20;
public void Start()
{
log.text = "";
}
public override void OnPlayerJoined(VRCPlayerApi player)
{
if (Time.time<5)
{
if (player.isLocal==false)
{
//return;
}
}
Log(true, player);
UpdateUserCount();
}
public void UpdateUserCount()
{
userCount.text = VRCPlayerApi.GetPlayerCount().ToString();
}
public override void OnPlayerLeft(VRCPlayerApi player)
{
Log(false, player);
SendCustomEventDelayedSeconds(nameof(UpdateUserCount), 1f);
}
string ToHtmlStringRGB(Color c)
{
int r = (int)(c.r * 255f);
int g = (int)(c.g * 255f);
int b = (int)(c.b * 255f);
return $"#{r:X2}{g:X2}{b:X2}";
}
public void Log(bool isJoin,VRCPlayerApi player)
{
var color = joinColor;
var joinText = "Join";
if (isJoin==false)
{
color = leaveColor;
joinText = "Left";
}
var time = $"{DateTime.Now.ToString("HH:mm:ss")}";
//var webColor = $"#{ColorUtility.ToHtmlStringRGB(color)}";
var webColor = ToHtmlStringRGB(color);
var text = $"{time} <color={webColor}>{joinText}</color> {player.displayName}";
if (string.IsNullOrWhiteSpace(log.text)==false)
{
text = $"\n{text}";
}
if (logCount>= logCountMax)
{
int index = log.text.IndexOf('\n');
log.text = log.text.Substring(index + 1);
}
log.text += text;
scrollbar.value=0;
logCount++;
}
}
자동사이즈의자
https://ahzkwid.booth.pm/items/6795564
https://gist.github.com/ahzkwid/3b847810eff472ee2198a05b94abcadd
using System.Linq;
using UdonSharp;
using Unity.Mathematics;
using UnityEngine;
using VRC.SDKBase;
[UdonBehaviourSyncMode(BehaviourSyncMode.Manual)]
public class AutoScaleChair : UdonSharpBehaviour
{
public GameObject VRCChair;
float defaultHeight = 1.5f;
Vector3 smallChairOffset = new Vector3(-0.27f, 0.2125f, 0);
float smallChairScale = 0.5f;
//[UdonSynced]
float scale = 1;
float avatarHeightPre = 1.5f;
bool isOwner = false;
// Custom Animation Character (local)
public bool bonePositionCheck=true;
public Transform kneeIntersection;
float sittingTime = 0f;
//HumanBodyBones[] heightBones = new HumanBodyBones[] { HumanBodyBones.Hips, HumanBodyBones.LeftUpperLeg, HumanBodyBones.RightUpperLeg };
//HumanBodyBones[] fowardBones = new HumanBodyBones[] { HumanBodyBones.LeftUpperLeg, HumanBodyBones.RightUpperLeg, HumanBodyBones.LeftLowerLeg, HumanBodyBones.RightLowerLeg };
VRCPlayerApi seatedPlayer = null;
float lastCheckTime = 0;
void Update()
{
/*
if (isOwner)
{
var height = Networking.LocalPlayer.GetAvatarEyeHeightAsMeters();
if (avatarHeightPre != height)
{
scale = GetScale(Networking.LocalPlayer);
avatarHeightPre = height;
//RequestSerialization();
}
}
*/
var time = Time.time;
if (time<lastCheckTime+0.1f)
{
return;
}
lastCheckTime = time;
UpdateScaleChair();
UpdateOffset();
}
void UpdateOffset()
{
if (bonePositionCheck==false)
{
transform.localPosition = Vector3.zero;
}
if (sittingTime + 3f > Time.time)
{
return;
}
if (seatedPlayer == null)
{
return;
}
var player = seatedPlayer;
/*
var positions = System.Array.ConvertAll(heightBones, bone =>
{
var globalPosition = player.GetBonePosition(bone);
var localPosition = Quaternion.Inverse(transform.rotation) * (globalPosition - transform.position);
return localPosition;
});
*/
var positions = new Vector3[3];
for (int i = 0; i < positions.Length; i++)
{
//var bone = heightBones[i];
var bone = HumanBodyBones.Hips;
switch (i)
{
case 1:
bone = HumanBodyBones.LeftUpperLeg;
break;
case 2:
bone = HumanBodyBones.RightUpperLeg;
break;
}
var globalPosition = player.GetBonePosition(bone);
var localPosition = Quaternion.Inverse(transform.rotation) * (globalPosition - transform.position);
positions[i] = localPosition;
}
var kneeIntersectionLocalPosition = Quaternion.Inverse(transform.rotation) * (kneeIntersection.position - transform.position);
//var yMin = positions.Min(position => position.y);
var yMin = float.MaxValue;
for (int i = 0; i < positions.Length; i++)
{
yMin = Mathf.Min(yMin, positions[i].y);
}
var yOffset = yMin - kneeIntersectionLocalPosition.y;
/*
if (Mathf.Abs(yOffset)<0.1f)
{
//snap
yOffset = 0;
}
*/
{
var localPosition = VRCChair.transform.localPosition;
//localPosition.y = Mathf.Lerp(localPosition.y, -yOffset + scale * 0.05f, 0.1f);
localPosition.y = Mathf.Lerp(localPosition.y, -yOffset + 0.1f, 0.1f);
VRCChair.transform.localPosition = localPosition;
}
}
float GetScale(VRCPlayerApi player)
{
//var player = Networking.LocalPlayer;
var height = player.GetAvatarEyeHeightAsMeters();
var scale = height / defaultHeight;
scale = Mathf.Clamp(scale, 0.2f, 5f);
return scale;
}
void UpdateScaleChair(float scale)
{
VRCChair.transform.localScale = Vector3.one * scale;
VRCChair.transform.localPosition = smallChairOffset / smallChairScale * (1f - scale);
}
void UpdateScaleChair()
{
if (seatedPlayer == null)
{
scale = 1;
}
else
{
scale = GetScale(seatedPlayer);
if (seatedPlayer.GetAvatarEyeHeightAsMeters() == 0)
{
VRCChair.GetComponent<VRCStation>().ExitStation(seatedPlayer);
seatedPlayer = null;
scale = 1;
}
}
UpdateScaleChair(scale);
}
public override void Interact()
{
Networking.LocalPlayer.UseAttachedStation();
/*
//Networking.SetOwner(Networking.LocalPlayer, gameObject);
scale = GetScale(Networking.LocalPlayer);
//RequestSerialization();
avatarHeightPre = Networking.LocalPlayer.GetAvatarEyeHeightAsMeters();
isOwner = true;
*/
sittingTime = Time.time;
}
/*
public void UpdateSeatedPlayer()
{
seatedPlayer = null;
}
*/
public override void OnPlayerLeft(VRCPlayerApi player)
{
if (seatedPlayer == player)
{
seatedPlayer = null;
//SendCustomEventDelayedSeconds(nameof(UpdateSeatedPlayer), 1f);
}
}
public override void OnStationEntered(VRCPlayerApi player)
{
seatedPlayer = player;
UpdateScaleChair();
UpdateOffset();
}
public override void OnStationExited(VRCPlayerApi player)
{
/*
if (isOwner)
{
scale = 1;
//RequestSerialization();
}
isOwner = false;
*/
seatedPlayer = null;
}
}
Booth 선물 방법 (0) | 2023.04.14 |
---|---|
VRChat 캐릭터 압착되는 문제 (0) | 2023.01.01 |
VRChat OSC (0) | 2022.02.19 |