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



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

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


번호 포토 분류 제목 글쓴이 날짜 조회
804 언리얼4 언리얼5 - 파라곤 이펙트를 나이아가라로 리마스터링(한글자막) 금별 04.19 32
803 유니티 유니티 셰이더그래프 - 반응형 파티클 제작과정(한글자막) 금별 04.19 28
802 유니티 유니티 - 앰플리파이셰이더 활용한 극좌표 소용돌이 형태 제작과정(한글자막) 금별 04.18 28
801 유니티 유니티 - 셰이더그래프 활용한 UI에 적용동 스크롤버튼 제작과정(한글자막) 금별 04.18 27
800 언리얼4 린반 언리얼 이펙트 사소한 라이브(4.17일자) - 루멘/나이아가라 파티클라이트 외 금별 04.17 32
799 유니티 유니티 - Stylized 물속성 검기 VFX 제작과정(중국어/AI한글자막) 금별 04.16 61
798 언리얼4 언리얼 - 사인파 왜곡 머트리얼 예제 금별 04.16 58
797 3D 3DsMax - 임팩트 메쉬 제작 간단과정 금별 04.16 39
796 2D 애프터이펙트 - 2D 카툰스타일 불 제작과정 금별 04.16 36
795 2D 애프터이펙트 - 한국어_2D 카툰스타일 스파크/라이트닝 제작과정 금별 04.16 37
794 유니티 유니티 - Stylized 회오리 VFX 스킬 제작과정 금별 04.16 40
793 유니티 유니티 - Stylzied 검기 제작과정(중국어/AI한글자막) 금별 04.16 31
792 유니티 유니티 - 흐르듯 사라지는 2D 카드 이펙트/트레일 제작과정 금별 04.10 126
791 언리얼4 린반라이브 - 초급 최신 리뉴얼 정보 및 QNA / 사소한 라이브 금별 04.09 96
790 언리얼4 언리얼5 - 값싸고 유동적인 폭포제작과정(한글자막) 금별 04.07 124
789 언리얼4 린반 언리얼 이펙트 라이브(3.27일자) - Texcoord 여러가지 설명 외 금별 04.03 98
788 언리얼4 언리얼5 - 나이아가라의 실용적인 최적화와 확장성【CEDEC2023】 금별 04.03 109
787 언리얼4 언리얼/유니티 - 파티클 이미터 기본사이즈 설명(영어자막) 금별 04.01 92
786 언리얼4 언리얼/유니티 - 파티클 빌보드 시스템 소개(영어자막) 금별 04.01 68
785 2D 픽셀 컴포저 - 노드 기반 픽셀 이미지,플립북 제작 금별 04.01 73
784 언리얼4 언리얼 - 엠버젠활용한 볼륨의 랜덤 회전 생성 적용 간단팁 금별 04.01 75
783 2D 애프터이펙트 - Water Escape 제작방법(한글자막) 금별 03.28 123

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand