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



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

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


번호 포토 분류 제목 글쓴이 날짜 조회
1214 언리얼4 린반 게임이펙트 라이브 - (취업준비편)포트폴리오 구성/주의사항/면접관련 각종팁들 금별 00:08 4
1213 언리얼4 Unreal Engine 5 Energy Dome Aurora Material Tutorial for beginner ashif 09.18 6
1212 언리얼4 How to make Summon FX in Unreal Engine 5 Niagara ashif 09.12 65
1211 언리얼4 언리얼5 - Niagara로 번개와 표면 상호작용 VFX 만들기 금별 09.03 170
1210 언리얼4 언리얼5 - 간단한 바닥 아우라 색수차 효과를 추가 제작팁 금별 09.03 217
1209 언리얼4 언리얼5 - Rotate Around Point 활용 궤도 애니메이션 연출 간단팁 금별 09.03 121
1208 언리얼4 언리얼5 - halftone post-process 제작 예제 금별 09.03 461
1207 언리얼4 언리얼5 - 흡수 및 폭발 효과 간단 제작과정(한글자막) 금별 09.02 464
1206 언리얼4 언리얼5 - 회피 텔레포트 효과 간단제작과정(한글자막) 금별 09.02 157
1205 언리얼4 언리얼5 - Stylized 화속성 검기 간단 제작 분석(한글자막) 금별 09.02 193
1204 언리얼4 언리얼5 - 메시 조각 흡수 간단 제작과정(한글자막) 금별 09.02 392
1203 언리얼4 유니티 - 고드름 형태 프리즈 셰이더 제작과정(한글자막) 금별 09.02 212
1202 언리얼4 언리얼5 - Stylized 라이트닝 메쉬 제작과정(한글자막) 금별 08.22 239
1201 언리얼4 언리얼/C4D로 만드는 모션그래픽 스타일 VFX 제작과정(한글자막) 금별 08.22 155
1200 언리얼4 후디니/언리얼5 - 가벼운 VFX: Pivot Painter 제작과정(한글자막) 금별 08.22 194
1199 언리얼4 언리얼5 - 자연스러운 바닥 얼음생성 효과 제작과정(한글자막) 금별 08.22 191
1198 언리얼4 언리얼5 - 간단한 바닥 아우라 색수차 효과를 추가 제작팁 금별 08.22 138
1197 언리얼4 언리얼5 - 셰이더 토이로 만든 블랙홀을 언리얼에서 구현하는과정 금별 07.27 332
1196 언리얼4 언리얼5 - 나이아가라 활용한 라이트닝 감전효과 제작과정(한글자막) 금별 07.27 336
1195 언리얼4 언리얼5 - 고품질 반사 효과 만들기: Reflection Vector 활용법 금별 07.25 325
1194 언리얼4 언리얼5 - EasyMap으로 구현하는 무작위 텍스처 타일링 기법 금별 07.25 332
1193 언리얼4 How to Create EPIC Toon Smoke Trail FX in Unreal Engine 5 ashif 07.22 238

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand