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



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

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


번호 포토 분류 제목 글쓴이 날짜 조회
1117 언리얼4 Burst into Dust FX in Unreal Engine 5 Niagara | Download Files ashif 02.20 9
1116 언리얼4 게임이펙트의 모든것! 졸업생 "김연아" 인터뷰_01 금별 02.19 64
1115 언리얼4 Projectile in Unreal Engine 5 Niagara Tutorial ashif 02.18 62
1114 언리얼4 언리얼5 - 푸른 아우라 폭발 레이어별 제작간단예제 금별 02.15 115
1113 언리얼4 언리얼5 - 카오스 시스템 시작 가이드(한글자막) 금별 02.15 89
1112 언리얼4 린반Live - 언리얼 이펙트 클래식 리뷰하기1 금별 02.15 79
1111 언리얼4 언리얼5 - 시네마틱을 위한 총 머즐플래시 이펙트 제작과정(한글자막) 금별 02.15 76
1110 언리얼4 언리얼 - UV활용 가짜 구형(스피어) 벌지 셰이더 노드예제 금별 02.15 71
1109 언리얼4 언리얼5 나이아가라 - 커스텀 네온 텍스트 스크롤링 효과 제작과정(한글자막) 금별 02.15 70
1108 언리얼4 언리얼 - 표면에 스프라이트를 뎁스 마스크 활용 예제 금별 02.15 67
1107 언리얼4 언리얼5/후디니 - 후디니에서 UE5로 ID정보 내보내기(한글자막) 금별 02.15 64
1106 언리얼4 언리얼5 - 로컬스페이스 3D 프로젝션[UV의 공간 텍스쳐 투영](한글자막) 금별 02.15 68
1105 3D 후디니 - 게임을 위한 VDB 압축 | Houdini용 ZibraVDB(알파) 금별 02.15 62
1104 유니티 유니티 - 역동적인 디졸브활용 세계 변화 효과를 만드는 방법(한글자막) 금별 02.15 63
1103 언리얼4 Volumetric Smoke in Unreal Engine 5 Material Tutorial ashif 02.14 59
1102 언리얼4 언리얼5+C4d - 나무 줄기 생성 효과 제작팁(한글자막) 금별 02.06 186
1101 언리얼4 언리얼5 - 패럴랙스 형태 카드 효과 제작과정(한글자막) 금별 02.04 216
1100 유니티 유니티 셰이더 그래프 - 오디오 비주얼 스케일 효과 간단제작과정(한글자막) 금별 02.03 189
1099 언리얼4 언리얼 간단팁 - 웨이브 형태 움직임의 UV 제어방법 금별 02.03 265
1098 언리얼4 언리얼5 - 사용자 정의 LED 텍스트 제작과정(한글자막) 금별 02.03 189
1097 언리얼4 언리얼 - 플루이드 닌자를 활용한 연기느낌 디졸브 제작 금별 02.03 214
1096 언리얼4 언리얼5 - 스크래치 모듈이 작동하는 방식(한글자막) 금별 02.03 200

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand