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



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

금별 0 1,651 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


번호 포토 분류 제목 글쓴이 날짜 조회
827 언리얼4 Portal to the Dark World in UE5.4 Niagara | For Patreon ashif 19:24 4
826 언리얼4 언리얼 - 프로시졀(절차적) Light spot 머트리얼함수 제작과정(한글자막) 금별 05.03 15
825 언리얼4 언리얼 - 포토샵을 활용한 경로 그라데이션 효과 제작과정(한글자막) 금별 05.03 15
824 언리얼4 언리얼 - 메카봇 파괴 효과 간단 제작과정 금별 05.03 26
823 언리얼4 언리얼5 - 나이아가라 리본을 활용한 단순한 거미줄 효과 제작과정(한글자막) 금별 05.03 20
822 언리얼4 언리얼5 - 쉴드에 의한 다중 발사체 임팩트 효과 제작과정(한글자막) 금별 04.29 58
821 언리얼4 언리얼5.4 - 신기능 텍스쳐 그래프 기본적인 설명(한글자막) 금별 04.29 64
820 언리얼4 언리얼5 - 나이아가라 스파크 제작과정(한글자막) 금별 04.29 43
819 언리얼4 언리얼5- 나이아가라 연기 임팩트 효과 제작과정(한글자막) 금별 04.29 37
818 언리얼4 언리얼5 - Sci-Fi Barrier 제작과정(한글자막) 금별 04.29 37
817 유니티 유니티 셰이더/렌더링 에센스 - 첫 URP 작성해보기 금별 04.29 38
816 유니티 유니티 셰이더/렌더링 에센스 - 유니티 셰이더 컴파일 & 셰이더 컴파일레이션(retr0) 금별 04.29 33
815 언리얼4 언리얼/유니티/고돗엔진 - 셰이더 최적화 간단팁(한글자막) 금별 04.26 67
814 유니티 유니티 앰플리파이 셰이더 - HotWater셰이더 GUI 및 자료사용 예제 영상 금별 04.26 57
813 유니티 유니티 - 쿠파 취업 클래스 [실강의 맛보기 - 얼음스킬제작과정] 금별 04.26 51
812 3D 이펙트의 모든것! 게임직 TA 김용남 인터뷰_01 금별 04.24 70
811 언리얼4 언리얼5 - HLSL을 활용한 이미지 블러 효과 제작과정(한글자막) 금별 04.24 78
810 언리얼4 언리얼5 - 아티스트를 위한 흥나는 프로파일링!: RenderDoc 금별 04.24 69
809 3D 메쉬 UV패닝을 활용한 곡선 트레일 제작짧은팁 금별 04.22 88
808 언리얼4 언리얼5 - 포스트 프로세스 활용한 글리치 효과 노드(다운로드가능) 금별 04.21 72
807 언리얼4 언리얼5/후디니 - 상호작용 VFX 시스템/VAT효과 제작과정(정교한 한글자막) 금별 04.21 67
806 언리얼4 언리얼5 - 텍스처가 없는 포스트트로세스와 같은 CRT효과 제작노드(다운로드가능) 금별 04.21 55

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand