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



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

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


번호 포토 분류 제목 글쓴이 날짜 조회
824 언리얼4 ORB in UE5.4 Niagara | For Patreon ashif 05.01 13
823 언리얼4 Rocks Impact FX in UE5.4 Niagara | For Patreon ashif 04.30 22
822 언리얼4 언리얼5 - 쉴드에 의한 다중 발사체 임팩트 효과 제작과정(한글자막) 금별 04.29 41
821 언리얼4 언리얼5.4 - 신기능 텍스쳐 그래프 기본적인 설명(한글자막) 금별 04.29 41
820 언리얼4 언리얼5 - 나이아가라 스파크 제작과정(한글자막) 금별 04.29 32
819 언리얼4 언리얼5- 나이아가라 연기 임팩트 효과 제작과정(한글자막) 금별 04.29 26
818 언리얼4 언리얼5 - Sci-Fi Barrier 제작과정(한글자막) 금별 04.29 29
817 유니티 유니티 셰이더/렌더링 에센스 - 첫 URP 작성해보기 금별 04.29 27
816 유니티 유니티 셰이더/렌더링 에센스 - 유니티 셰이더 컴파일 & 셰이더 컴파일레이션(retr0) 금별 04.29 26
815 언리얼4 언리얼/유니티/고돗엔진 - 셰이더 최적화 간단팁(한글자막) 금별 04.26 61
814 유니티 유니티 앰플리파이 셰이더 - HotWater셰이더 GUI 및 자료사용 예제 영상 금별 04.26 51
813 유니티 유니티 - 쿠파 취업 클래스 [실강의 맛보기 - 얼음스킬제작과정] 금별 04.26 45
812 3D 이펙트의 모든것! 게임직 TA 김용남 인터뷰_01 금별 04.24 64
811 언리얼4 언리얼5 - HLSL을 활용한 이미지 블러 효과 제작과정(한글자막) 금별 04.24 70
810 언리얼4 언리얼5 - 아티스트를 위한 흥나는 프로파일링!: RenderDoc 금별 04.24 67
809 3D 메쉬 UV패닝을 활용한 곡선 트레일 제작짧은팁 금별 04.22 80
808 언리얼4 언리얼5 - 포스트 프로세스 활용한 글리치 효과 노드(다운로드가능) 금별 04.21 65
807 언리얼4 언리얼5/후디니 - 상호작용 VFX 시스템/VAT효과 제작과정(정교한 한글자막) 금별 04.21 59
806 언리얼4 언리얼5 - 텍스처가 없는 포스트트로세스와 같은 CRT효과 제작노드(다운로드가능) 금별 04.21 46
805 언리얼4 언리얼/유니티 - 특수효과 최적화 간단팁들 금별 04.20 61
804 언리얼4 언리얼5 - 파라곤 이펙트를 나이아가라로 리마스터링(한글자막) 금별 04.19 67
803 유니티 유니티 셰이더그래프 - 반응형 파티클 제작과정(한글자막) 금별 04.19 71

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand