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



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

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


번호 포토 분류 제목 글쓴이 날짜 조회
380 3D 후디니 - Lightning Weapon Slash Mesh 제작방법 금별 2022.12.06 2161
379 언리얼4 언리얼 5.1- 지오메트리 스크립트 : Snow and Icicles 금별 2022.12.05 1577
378 언리얼4 언리얼5 - 사운드 리플 효과 제작방법 금별 2022.12.05 1722
377 2D 게임 텍스쳐 뷰어 무료판 금별 2022.12.05 1837
376 언리얼4 언리얼5를 활용한 모션그래픽 적용 튜토리얼 채널(머트리얼+블루프린트) 금별 2022.12.05 2309
375 2D 섭스턴스디자인 - VFX 텍스쳐 제작방법 및 언리얼 적용영상 금별 2022.11.30 1906
374 유니티 유니티 VFX 그래프 - 캐릭터 파티클로 분해 효과 예제 제작방법 new 금별 2022.11.30 2066
373 유니티 유니티 - 나루토 치도리 VFX 제작방법 금별 2022.11.28 3122
372 유니티 유니티 쉐이더 - 반응형 눈 쉐이더 제작방법(움푹패이는) 금별 2022.11.28 2548
371 유니티 유니티 - 라이트닝 파티클 제작방법(오브젝트 근처에서 튀기는) 금별 2022.11.28 3662
370 언리얼4 언리얼 머트리얼 - 다양한 UV 샘플링 모양 제작방법 금별 2022.11.23 2155
369 언리얼4 언리얼 - 간단한 UV disturbance 생성예제 금별 2022.11.23 1717
368 2D 섭스턴스 디자인 - 섭디에서 시퀀스 이미지 제작방법 금별 2022.11.23 2582
367 유니티 유니티 VFX 그래프 - 문자의 파티클화(수집/변형/분해) 제작방법 금별 2022.11.23 1692
366 유니티 유니티 VFX 그래프 - 특정 캐릭이미지를 생성하는 불꽃놀이 제작방법 금별 2022.11.23 2814
365 언리얼4 언리얼 - 원신 느낌의 동결효과 제작과정 금별 2022.11.21 2208
364 언리얼4 언리얼 나이아가라 - 매직 포털 이펙트 제작방법 금별 2022.11.19 1647
363 유니티 유니티 쉐이더 그래프 - 사인파동 형태로 퍼지는 레이더 쉐이더 제작과정 금별 2022.11.17 3089
362 유니티 유니티 쉐이더 그래프 - 쉐이더를 사용한 돌돌말리는 효과 제작과정(롤 쉐이더) 금별 2022.11.17 2326
361 유니티 유니티 쉐이더 그래프 - 반응형 물표면 느낌 금별 2022.11.17 2480
360 유니티 유니티 - 사스케 치도리(뇌절) 간단제작방법 금별 2022.11.15 2232
359 언리얼4 언리얼4 나이아가라 - 매직 포털 이펙트 제작방법 금별 2022.11.14 1668

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand