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



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

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


번호 포토 분류 제목 글쓴이 날짜 조회
276 유니티 유니티 쉐이더그래프 - 물방울 쉐이더제작 튜토리얼 링크new 금별 2021.04.22 3338
275 유니티 유니티 - VFX 및 게임 개발에 유용한 5가지 셰이더 그래프 [유니티, 셰이더 그래프] 금별 2022.10.06 3337
274 유니티 유니티 - 크리처 소환 이펙트 제작과정 금별 2023.03.08 3310
273 유니티 [유니티 비주얼 이펙트 그래프 팁]타임라인과 호환성문제 금별 2018.11.21 3306
272 유니티 유니티 쉐이더 그래프 - Weaving Ring Tutorial 1 댓글+1 금별 2019.08.12 3275
271 유니티 유니티 - 간단 폭발 만들기(VFX 그래프와 파티클시스템 비교) 금별 2023.06.29 3268
270 유니티 유니티 - 매직 카드제작 트릭팁 금별 2020.08.02 3263
269 유니티 유니티 쉐이더 그래프 - Remapping Tech Art Toolbox 사진동영상new 금별 2022.03.04 3259
268 유니티 유니티 이펙트 튜토리얼 - 플라즈마 스피어 만들기 댓글+1 금별 2018.12.19 3256
267 유니티 유니티 - 다크 토네이도 제작과정 금별 2022.05.19 3238
266 유니티 유니티 - 홀로그램 행성 쉐이더 댓글+1 금별 2019.07.09 3232
265 유니티 유니티 앰플리파이 쉐이더 - 카드 생성 효과 제작방법(중국어) 금별 2022.08.16 3227
264 유니티 유니티 쉐이더 그래프 - 빨려들어가는 이펙트 제작 Almighty Vertex 금별 2022.07.07 3161
263 유니티 유니티 이펙트 튜토리얼 - 툰느낌의 토네이도 제작 영상 금별 2021.05.24 3143
262 유니티 유니티 쉐이더 그래프 팁 - 꿀렁이는 호수관 만들기 금별 2018.12.19 3140
열람중 유니티 유니티 버텍스 옵셋 효과 예제 Juane Gray 금별 2019.08.20 3131
260 유니티 유니티 - 나루토 치도리 VFX 제작방법 금별 2022.11.28 3130
259 유니티 마법적 구슬형태 제작 금별 2019.08.30 3128
258 유니티 유니티 쉐이더 그래프 - 사인파동 형태로 퍼지는 레이더 쉐이더 제작과정 금별 2022.11.17 3103
257 유니티 유니티 - 카툰 느낌의 불/폭발효과 제작방법(중국어) 금별 2022.06.15 3097
256 유니티 유니티 쉐이더 그래프(LA 유나이트) - Best practices for Shader Graph 금별 2018.12.19 3095
255 유니티 유니티 쉐이더 - 정점 쉐이더 애니메이션 입문 [일본자료 번역] 금별 2019.03.12 3083

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand