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



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

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


번호 포토 분류 제목 글쓴이 날짜 조회
871 언리얼4 Magical Potion Unreal Engine 5.4 Niagara | For Patreon ashif 06.07 11
870 언리얼4 언리얼 - 볼류메트릭 RayMarching 머티리얼 생성과정(한글자막) 금별 06.07 13
869 언리얼4 언리얼 - 나이아가라 활용 나선형 offset 흡수 효과 제작과정(한글자막) 금별 06.07 19
868 2D 섭스턴스디자인 - Hammer Impact Trail Mask[WispySmok] 제작과정(한글자막) 금별 06.05 29
867 2D 섭스턴스디자인 - Hammer Impact Trail Mask[해머 트레일 마스크] 제작과정(한글자막) 금별 06.05 19
866 유니티 유니티 VFX 그래프 - 간단한 파이어볼 발사체 이펙트 제작과정(한글자막) 금별 06.05 26
865 언리얼4 린반의 게임 이펙트 [사소한라이브 기본검기요소 외 - 6.5일자] 금별 06.05 24
864 유니티 유니티 - 무기 VFX 효과 예제 금별 06.04 71
863 언리얼4 언리얼5 - Nanite Displacement 및 Glint가 포함된 사실적 눈셰이더 제작과정(한글자막) 금별 06.04 47
862 언리얼4 언리얼 포트나이트 에디터 개발자문서 - 머티리얼 이펙트 금별 06.04 43
861 언리얼4 언리얼5 - 지형 상호작용 무료 플러그인 금별 05.30 81
860 언리얼4 언리얼 - 커브의 움직임 사용 노드 미리보기 예제 금별 05.30 69
859 언리얼4 언리얼5 - 무한 리플 노드 예제 금별 05.30 92
858 언리얼4 린반의 게임 이펙트 [사소한라이브-빛을 표현할때 중요한것외] 금별 05.30 80
857 언리얼4 언리얼5 - 수직 형태 빔 VFX 제작과정(한글자막) 금별 05.29 101
856 언리얼4 언리얼5 - Power 노드 이해하기(린반의 이펙트제작팁) 금별 05.28 76
855 언리얼4 언리얼 - 매우 간단한 UV 트위스트 제작노드 금별 05.28 78
854 2D 애펙 - 지브리 스타일의 폭포 간단제작과정(레이어별 영상) 금별 05.28 77
853 언리얼4 언리얼 - 5.4 신기능 렌더 그래프 설명(한글자막) 동영상링크new 금별 05.28 86
852 언리얼4 언리얼5 나이아가라 - 기본 웨이브 아우라 효과 제작과정(한글자막) 금별 05.24 140
851 언리얼4 언리얼5 - 플라즈마 에너지 쉴드 제작과정(한글자막) 금별 05.24 112
850 언리얼4 언리얼5/후디니 - 나이아가라를 활용한 연막탄 VFX 제작과정(한글자막) 금별 05.21 125

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand