유니티 버텍스 옵셋 효과 예제 Juane Gray



유니티 버텍스 옵셋 효과 예제 Juane Gray

금별 0 3,918 2019.08.20 23:22

 

So, here I am again my goal is to make guts fall from a zombie character I have laying around, and with it comes some squash and stretch guts and organs that fall out of it.

How am I going to do it? I have no clue. I guess you and me will find out!

Update -1

 

 

So to start off I watched a bunch of videos, messed around with a lot of shader things (rotate about axis) (could not get it to work) so I tried another method. this time I started from scratch.

So I came up with the idea to pass the collision point of the object into a space local to the object.

 

 

Something like this or similar, and I wanted to get the result of this

 

 

Which I somehow of a miracle made happen:

 

 

and with that comes the shader: although I could not get rotation to work it’s definitely a step in the right direction!

 

 

So today I managed to get rotation working, by simply changing two inputs and converting to world/object space! I am so blind!

 

 

Here is what the shader looks like now:

 

 

 

Code related:

private void Start()
{
    rend = GetComponent<Renderer>();
    RB = GetComponent<Rigidbody>();
}

private void Update()
{
    rend.material.SetVector("_ContactPos", toPoint);
    if (!colliding && collisionPoint != Vector3.zero)
    {
        spring2 = 0f;
        spring += Time.deltaTime;
        toPoint = Vector3.Lerp(collisionPoint, Vector3.zero, spring);
    }

    if (colliding)
    {
        spring2 += Time.deltaTime;
        toPoint = Vector3.Lerp(toPoint, collisionPoint, spring2);
        if (toPoint == collisionPoint) { spring2 = 0f; }
    }
}


public void OnCollisionStay(Collision collision)
{
    colliding = true;
    ContactPoint contact = collision.GetContact(0);
    point.position = contact.point;
    collisionPoint = -point.gameObject.transform.localPosition;
    Vector3 dir = transform.position - collisionPoint;
    directionPoint = dir.magnitude;
}

public void OnCollisionExit(Collision collision)
{
    spring = 0;
    colliding = false;
}
}

Comments


번호 포토 분류 제목 글쓴이 날짜 조회
1261 유니티 유니티 - (퀵팁) 간단한 파티클 orbit 움직임제어팁 금별 02:27 3
1260 언리얼4 Create a Multi-Layer Ribbon Trail VFX in UE5 Niagara! (Advanced Color & Edge Material) ????〰️✨ ashif 11.18 28
1259 언리얼4 언리얼5.7기준 - 나이아가라의 확장성 및 모범 사례 금별 11.17 79
1258 언리얼4 언리얼 - Niagara로 스플라인을 따라 발사되는 파티클 제작하기 금별 11.17 72
1257 언리얼4 언리얼5 - 오브젝트를 풍경에 혼합하기: 런타임 가상 텍스처 사용법 금별 11.17 67
1256 언리얼4 언리얼5 - 동적 SubUV 데칼(Decal) 제작하기 금별 11.17 68
1255 언리얼4 언리얼 - 리본 VFX 설명_색상·너비·왜곡 커스텀 제작과정(한글자막) 금별 11.15 89
1254 언리얼4 언리얼5 Material 업데이트 요약 (UE 5.6 ~ 5.7 및 미래 전망) 금별 11.11 174
1253 유니티 유니티 - ASE 활용 Stylized 폭발 과정(한글자막) 금별 11.11 159
1252 유니티 유니티 - Stylized 불꽃 픽셀화 간단 제작과정(한글자막) 금별 11.11 162
1251 3D 마법진 눈알 움직임 연출 예제 금별 11.11 151
1250 언리얼4 언리얼5 - 커스텀 노드: UV 스케일 및 이동(Scale & Translate) 직접 만들기 금별 11.11 136
1249 유니티 유니티 - ASE로 UV Flow + Noise 흔들림 기본 VFX 셰이더 제작과정(한글자막) part3 금별 11.05 164
1248 유니티 유니티 - ASE로 UV Flow + Noise 흔들림 기본 VFX 셰이더 제작과정(한글자막) part2 금별 11.05 127
1247 유니티 유니티 - ASE로 UV Flow + Noise 흔들림 기본 VFX 셰이더 제작과정(한글자막) part1 금별 11.05 135
1246 언리얼4 언리얼/3Ds Max - 우주 느낌의 하트 제작_2 머트리얼 적용과정 금별 10.28 263
1245 언리얼4 언리얼/3Ds Max - 우주 느낌의 하트 제작_1 모델링/UV 제작과정 금별 10.28 181
1244 언리얼4 후디니/언리얼 - 후디니 활용 절차적(프로시졀) 검기 메시,텍스쳐 VFX 제작 기법(한글자막) 금별 10.28 191
1243 언리얼4 언리얼5 - 음파 VFX 제작: Niagara Particle과 기본 Scene 제작 금별 10.28 204
1242 언리얼4 언리얼5 - 음파 VFX 제작: Material 연결과 원리 분석 금별 10.28 163
1241 언리얼4 언리얼5 - 음파 VFX 제작: 모델링과 텍스처 기초 금별 10.28 170
1240 언리얼4 언리얼5 - 디지털 트랜지션 생성 및 파티클 픽셀화 제작과정(한글자막) 금별 10.22 224

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand