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



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

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


번호 포토 분류 제목 글쓴이 날짜 조회
1018 언리얼4 언리얼팁 - 다이아몬드 게이지 머트리얼 제작방법 금별 2022.01.29 3263
1017 언리얼4 언리얼4 - 페이크 색수차 효과(facking chromatic aberration) 금별 2022.01.24 3262
1016 유니티 유니티 - 매직 카드제작 트릭팁 금별 2020.08.02 3257
1015 유니티 유니티 - 간단 폭발 만들기(VFX 그래프와 파티클시스템 비교) 금별 2023.06.29 3256
1014 유니티 유니티 쉐이더 그래프 - Remapping Tech Art Toolbox 사진동영상new 금별 2022.03.04 3254
1013 유니티 유니티 이펙트 튜토리얼 - 플라즈마 스피어 만들기 댓글+1 금별 2018.12.19 3251
1012 2D 섭스턴스 디자인/언리얼 - 바닥 크랙 데칼 제작방법 금별 2022.09.14 3232
1011 유니티 유니티 - 홀로그램 행성 쉐이더 댓글+1 금별 2019.07.09 3228
1010 언리얼4 언리얼4 팁 - UNREAL 4 TIPS AND TRICKS 금별 2019.12.29 3224
1009 유니티 유니티 - 다크 토네이도 제작과정 금별 2022.05.19 3222
1008 유니티 유니티 앰플리파이 쉐이더 - 카드 생성 효과 제작방법(중국어) 금별 2022.08.16 3222
1007 언리얼4 언리얼 - 머트리얼 노드 정렬 단축키 팁 금별 2023.07.20 3206
1006 언리얼4 언리얼 - 나이아가라 흡수 효과 제작방법 금별 2022.10.20 3161
1005 언리얼4 언리얼4 머터리얼 튜토리얼 - 수학을 활용한 쉐입형태 제작 금별 2020.02.04 3160
1004 유니티 유니티 쉐이더 그래프 - 빨려들어가는 이펙트 제작 Almighty Vertex 금별 2022.07.07 3155
1003 언리얼4 언리얼 - Smoothstep활용 프로시졀쉐이더 제작(2D 반지형 링) 금별 2023.05.18 3143
1002 언리얼4 지오메트리 맵핑 이펙트 금별 2018.11.29 3141
1001 유니티 유니티 이펙트 튜토리얼 - 툰느낌의 토네이도 제작 영상 금별 2021.05.24 3141
1000 유니티 유니티 쉐이더 그래프 팁 - 꿀렁이는 호수관 만들기 금별 2018.12.19 3134
999 언리얼4 파이어볼 UV 흐름 예제 금별 2020.11.07 3129
998 유니티 유니티 - 나루토 치도리 VFX 제작방법 금별 2022.11.28 3123
열람중 유니티 유니티 버텍스 옵셋 효과 예제 Juane Gray 금별 2019.08.20 3116

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand