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



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

금별 0 3,095 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


번호 포토 분류 제목 글쓴이 날짜 조회
558 유니티 유니티 셰이더 그래프 UI - RT(렌더 텍스쳐)를 사용하여 UI 전용 포스트 효과 만들기 금별 2024.07.26 1856
557 언리얼4 린반의 언리얼 이펙트 강의 가이드 V 1 금별 2023.01.28 1858
556 언리얼4 언리얼 - 횡으로 생성되는 헥사곤 타일 연출예제(노드포함) 금별 2022.10.14 1861
555 언리얼4 언리얼 - Hit 플레어 간단 제작과정 금별 2022.12.11 1864
554 언리얼4 언리얼5 - 스파크 라이트닝 제작과정 금별 2023.03.01 1864
553 언리얼4 언리얼 - Value erosion_Normalized 금별 2023.02.02 1864
552 언리얼4 언리얼 - 오브젝트 글리치(Technology Failure Diagram) 효과 제작과정 금별 2023.11.22 1864
551 언리얼4 언리얼 Material Texcoord 사용법[한국어 라이브 특강] 금별 2023.08.12 1866
550 유니티 유니티 - Stylzied 검기 제작과정(중국어/AI한글자막) 금별 2024.04.16 1867
549 언리얼4 언리얼 - FFT Ocean Flipbook : Blender 및 UE를 사용하여 생성 및 샘플링하는 방법 금별 2023.03.20 1868
548 2D [텍스쳐 페인터]Flame Painter 10주년 할인(10달러) 금별 2022.10.24 1872
547 유니티 유니티 앰플리파이 쉐이더 - 쉐이더 활용 레이더 제작과정 금별 2023.05.25 1875
546 언리얼4 언리얼 5.1 - Creating cinematic VFX from scratch 금별 2023.03.14 1876
545 언리얼4 언리얼 - VFExtra TextureMaker Demo 금별 2022.12.29 1878
544 유니티 유니티 - 카툰 폭파 이펙트 제작과정 금별 2024.01.11 1879
543 언리얼4 언리얼 머터리얼 테크니컬 오버뷰 - tharlevfx(한국어 자동번역됨) 금별 2022.04.18 1881
542 언리얼4 언리얼5 - 메시를 다른 메시로 디졸브하는 방법 금별 2023.03.31 1882
541 2D 섭스턴스디자인/언리얼적용 - 분화구형 크랙 텍스쳐 제작과정(한글자막) 금별 2024.03.21 1884
540 2D 애프터이펙트 - 2D 물회오리 형태 아우라 모이는 효과 제작방법(한글자막) 금별 2024.03.14 1890
539 언리얼4 언리얼5 나이아가라-촉수 제작 튜토리얼 금별 2023.02.01 1894
538 2D 섭스턴스디자인 - VFX 텍스쳐 제작방법 및 언리얼 적용영상 금별 2022.11.30 1898
537 유니티 유니티 셰이더 그래프 - 가까운 거리에 따른 오퍼시티 변화 셰이더효과 제작과정(한글자막) 금별 2024.02.28 1898

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand