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



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

금별 0 2,349 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


번호 포토 분류 제목 글쓴이 날짜 조회
1128 언리얼4 Pixelated Portal in Unreal Engine 5 Niagara Tutorial ashif 02.21 33
1127 유니티 유니티 UI 앰플리파이 셰이더 - 패턴에 빛 스와핑 효과 제작예제 금별 02.21 51
1126 언리얼4 언리얼 UMG - 비디오 올리고 비디오 스타일 처리수행과정 금별 02.21 49
1125 언리얼4 언리얼5 - 허공에 찢어지며 생기는 포털 제작과정(한글자막) 금별 02.21 51
1124 언리얼4 언리얼 - 그래디언트를 매끄럽게 혼합해 텍스쳐 변형하는 간단팁 금별 02.21 45
1123 3D 3D - 방사형 충격파 간단제작과정 금별 02.21 43
1122 언리얼4 언리얼 - 흡수성 머트리얼 간단제작과정 금별 02.21 45
1121 유니티 유니티 - 볼류메트릭 메쉬 VFX 모델링 머드번 활용예제 금별 02.21 43
1120 언리얼4 언리얼 - 카메라 연출관련 플러그인 Black Eye Cameras Overview 튜토리얼(한글자막) 금별 02.21 39
1119 언리얼4 언리얼5 - 스켈레탈 메시에 대한 Interactive Wetness Mask & Dripping Effects 제작과정(한글자막) 금별 02.21 42
1118 3D 후디니 - 피어나는 꽃봉오리 제작과정(한글자막) 금별 02.21 41
1117 언리얼4 언리얼 - 나이아가라 간단한 촉수효과 제작과정(한글자막) 금별 02.21 38
1116 언리얼4 Burst into Dust FX in Unreal Engine 5 Niagara | Download Files ashif 02.20 42
1115 언리얼4 게임이펙트의 모든것! 졸업생 "김연아" 인터뷰_01 금별 02.19 88
1114 언리얼4 언리얼5 - 푸른 아우라 폭발 레이어별 제작간단예제 금별 02.15 131
1113 언리얼4 언리얼5 - 카오스 시스템 시작 가이드(한글자막) 금별 02.15 111
1112 언리얼4 린반Live - 언리얼 이펙트 클래식 리뷰하기1 금별 02.15 97
1111 언리얼4 언리얼5 - 시네마틱을 위한 총 머즐플래시 이펙트 제작과정(한글자막) 금별 02.15 95
1110 언리얼4 언리얼 - UV활용 가짜 구형(스피어) 벌지 셰이더 노드예제 금별 02.15 92
1109 언리얼4 언리얼5 나이아가라 - 커스텀 네온 텍스트 스크롤링 효과 제작과정(한글자막) 금별 02.15 90
1108 언리얼4 언리얼 - 표면에 스프라이트를 뎁스 마스크 활용 예제 금별 02.15 89
1107 언리얼4 언리얼5/후디니 - 후디니에서 UE5로 ID정보 내보내기(한글자막) 금별 02.15 85

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand