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



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

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


번호 포토 분류 제목 글쓴이 날짜 조회
688 언리얼4 언리얼 - 파라곤 캐릭터 조작 설정 금별 2023.12.30 1670
687 언리얼4 언리얼 레벨관련 - 언리얼 배경 설정 (퀵셀 브릿지로 배경 꾸미기) 금별 2023.12.30 1477
686 3D 3dsMax - 토네이도 메시 제작과정(중국어/AI한글자막) 금별 2023.12.27 1940
685 3D 3dsMax - 나선형 아우라 메시 제작 금별 2023.12.27 1624
684 3D 3dsMax - UI 경계에 활용되는 메시 제작과정 금별 2023.12.27 1896
683 3D 3DsMax - 쉴드 메시 모델 제작방법(중국어/AI자막포함) 금별 2023.12.27 1734
682 2D 포토샵 - 게임이펙트 Tornado 에 쓰인 텍스처 그리기 금별 2023.12.26 1482
681 유니티 유니티 앰플리파이 셰이더 - 똥파리 셰이더 옷 제작과정 금별 2023.12.23 1382
680 언리얼4 언리얼 - 절차적 폭포 생성툴 데모 및 기술분석(한글자막) 금별 2023.12.22 1221
679 유니티 유니티 앰플리파이 셰이더 - Hell Rift VFX를 만드는 방법(한국어자막/+후디니,섭디) 금별 2023.12.22 1353
678 언리얼4 언리얼 - 나이아가라 별자리 연결 효과 제작과정(중국어/한글자막) 금별 2023.12.20 1576
677 언리얼4 언리얼 - 젤다 느낌의 폭파 간단제작과정(한글자막) 금별 2023.12.19 1389
676 언리얼4 언리얼5 - 음악효과 시각화방법[커스텀 모듈 간단적용](중국어/한글자막) 금별 2023.12.18 1165
675 언리얼4 언리얼5 - 빗방울 효과와 물튀김 효과 제작과정(중국어/한글자막) 금별 2023.12.18 1495
674 언리얼4 언리얼엔진 시네마틱 다이브 2023 - 시퀀서와 무비 렌더큐 기초(한글자막) 금별 2023.12.18 1321
673 유니티 유니티 - 대쉬 수룡참효과 제작과정(중국어/AI한글자막) 금별 2023.12.16 1946
672 언리얼4 게임 이펙트 개념과 준비[린반 라이브 특강 12.14] 금별 2023.12.14 1315
671 언리얼4 언리얼5 - 나이아가라 Ray/Path Effect(한글자막) 금별 2023.12.14 1603
670 유니티 유니티 VFX 그래프 - 기둥형태 내리꽂는 빔효과 제작과정(한글자막) 금별 2023.12.13 2150
669 언리얼4 언리얼5 - 머트리얼과 나이아가라를 사용하여 오브젝트 크기 조정(한글자막) 금별 2023.12.12 1360
668 언리얼4 언리얼/후디니 활용 검기 메쉬 제작방법(중국어/한글자막) 금별 2023.12.12 1899
667 언리얼4 언리얼5 - 가변값의 셰이딩 이해 금별 2023.12.12 1385

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand