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



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

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


번호 포토 분류 제목 글쓴이 날짜 조회
1241 언리얼4 Photoshop to UE5 Material: Creating Custom Stylized Noise Textures for Energy Orb VFX! ????????✨ ashif 10.25 23
1240 언리얼4 언리얼5 - 디지털 트랜지션 생성 및 파티클 픽셀화 제작과정(한글자막) 금별 10.22 61
1239 언리얼4 언리얼 - 데몬슬레이어 아카자 스킬 VFX 분석 금별 10.22 60
1238 언리얼4 언리얼5 - 테크노 스타일 매직 어레이/포스트 프로세싱 그리드 링 흐름 효과 제작과정(한글자막) 금별 10.20 75
1237 언리얼4 언리얼5 - 오클루전 활용한 지면 균열 머트리얼 생성과정(한글자막) 금별 10.20 68
1236 언리얼4 언리얼 - Lightmap UV 제거를 위한 에디터 유틸리티 제작 금별 10.17 92
1235 언리얼4 언리얼 - 텍스처 패킹 자동화: 기술 아티스트를 위한 시간 절약 도구 금별 10.17 79
1234 언리얼4 언리얼 - 폴라 UV는 타일링 텍스처 간단 활용 금별 10.17 79
1233 언리얼4 언리얼5 - 원형 링 마법진 왜곡 효과 구현 팁 금별 10.15 155
1232 언리얼4 언리얼5 - 물결 패턴 Normal Map 블렌딩 & 질감 교체 가이드 금별 10.15 132
1231 언리얼4 언리얼5 VFX 프로젝트 조직화 가이드: 폴더부터 명명 규칙까지(한글자막) 금별 10.14 124
1230 유니티 유니티 - Stylized 마법구 발사체 효과 제작과정 금별 10.14 135
1229 언리얼4 언리얼5 - 행성 흡수 제작과정 : Spline과 Blueprint 활용 part2 금별 10.12 144
1228 언리얼4 언리얼5 - 행성 흡수 제작과정 : Spline과 Blueprint 활용 part1 금별 10.12 117
1227 언리얼4 언리얼5 - WorldPositionBehindTranslucency로 만드는 간단 커스텀 데칼 UV 금별 10.11 108
1226 언리얼4 언리얼5 - 나이아가라(Niagara) 스폰 그룹 활용 퀵팁 금별 10.11 119
1225 언리얼4 언리얼 - '작은(Tiny) 지오메트리' 병합을 통한 카오스 최적화 팁 금별 10.11 119
1224 언리얼4 언리얼5 - 사실적인 횃불 VFX: Houdini와 Embergen 활용 금별 10.11 123
1223 언리얼4 언리얼5 - WorldPositionBehindTranslucency로 만드는 간단 커스텀 데칼 UV 금별 10.11 97
1222 유니티 유니티 - 망치 타격 효과 연출 part2(한글자막) 금별 10.11 110
1221 유니티 유니티 - 망치 타격 효과 연출 part1(한글자막) 금별 10.11 121
1220 언리얼4 Create an Epic Rings Burst AOE FX in UE5 Niagara! (Full Tutorial) ashif 09.25 205

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand