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



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

금별 0 2,718 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


번호 포토 분류 제목 글쓴이 날짜 조회
658 유니티 유니티 앰플리파이 셰이더 - 패럴렉스 활용 페이크 뎁스 제작과정 금별 2023.11.30 1586
657 언리얼4 언리얼 - 단계가 뚜렷한 카툰 불 머트리얼 노드(uasset파일포함) 금별 2023.11.30 1152
656 언리얼4 언리얼 - 매트릭스 느낌의 스크롤링 머트리얼 제작노드(uasset파일포함) 금별 2023.11.30 1152
655 유니티 유니티 - 스크립트를 활용한 레이저 빔 효과 제작과정 금별 2023.11.29 2147
654 3D GODOT VFX - Easy Explosions Effect Tutorial 금별 2023.11.29 1595
653 언리얼4 언리얼5 - 카메라 오클루전 마스킹 제작팁 금별 2023.11.29 1037
652 유니티 유니티 앰플리파이 셰이더 - 크리스탈 소재 제작과정 금별 2023.11.25 1216
651 언리얼4 후디니와 섭페활용 언리얼로의 아이스스파이크 버텍스 애니메이션 프로세스 설명(얼음 hip파일포함) 금별 2023.11.25 1240
650 언리얼4 언리얼 - 머터리얼 움직임에따른 잔상번짐 해결방법 금별 2023.11.25 3189
649 언리얼4 언리얼 - Tentacle Monster Effect 금별 2023.11.23 1376
648 유니티 유니티 VFX 그래프 - 연기 포탈 샘플 제작과정 금별 2023.11.23 1368
647 언리얼4 언리얼 - 오브젝트 글리치(Technology Failure Diagram) 효과 제작과정 금별 2023.11.22 1532
646 언리얼4 언리얼5 - 월드 에서 로컬 재질 UV [한국어 팁] 금별 2023.11.19 1297
645 언리얼4 언리얼 - 에너지 아우라 이펙트 제작과정 금별 2023.11.19 1429
644 언리얼4 언리얼 - 자연스런 그을린 그라운드 데칼 제작과정 댓글+1 금별 2023.11.16 1834
643 유니티 유니티 VFX 그래프 - 모델 엣지에서 생성되는 파티클 제작과정 금별 2023.11.15 1262
642 언리얼4 언리얼 - 흐물거리는 황금 양타자형 발사체 제작과정 금별 2023.11.14 1182
641 언리얼4 언리얼 나이아가라 - 유도 미사일 효과 제작과정 금별 2023.11.12 1319
640 언리얼4 11. 11일 카페 공인스터디 이펙트102 발표내용 일부 영상(네오도쿄챌린지/무기디졸브) 금별 2023.11.12 1188
639 언리얼4 언리얼5 - 머트리얼로 제어하는 책넘김 효과 예제 및 튜토리얼 링크 금별 2023.11.09 1885
638 언리얼4 언리얼5/후디니/섭디 - 불 발사체 제작과정 part2[후디니로 메쉬제작/섭디로 WPO텍스쳐] 금별 2023.11.08 1236
637 언리얼4 [게임 이펙트 소개 02] 쌤~ 게임이펙트 쉽나요? 취업 되나요? 금별 2023.11.08 1208

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand