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



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

금별 0 4,625 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


번호 포토 분류 제목 글쓴이 날짜 조회
1331 언리얼4 Head Burst FX in Unreal Engine 5 Niagara ashif 05.02 10
1330 언리얼4 Glitch Aura in Unreal Engine 5 Niagara ashif 05.02 15
1329 언리얼4 언리얼 - 유성우 효과 제작과정(한글자막) part3 금별 05.02 16
1328 언리얼4 언리얼 - 유성우 효과 제작과정(한글자막) part2 금별 05.02 14
1327 언리얼4 언리얼 - 유성우 효과 제작과정(한글자막) part1 금별 05.02 16
1326 언리얼4 언리얼 - 나이아가라 파티클 패스 애니메이션 제작팁 금별 04.29 79
1325 언리얼4 【UE5+Houdini】리듬 댄스 이페트 제작과정 파트 2 금별 04.29 63
1324 언리얼4 【UE5+Houdini】리듬 댄스 이페트 제작과정 파트 1 금별 04.29 62
1323 언리얼4 Gilded Aura FX in Unreal Engine 5 Niagara ashif 04.28 63
1322 언리얼4 Floating Rocks FX in Unreal Engine 5 Niagara ashif 04.26 81
1321 언리얼4 【UE5】거품 재질 만드는 법 금별 04.25 172
1320 언리얼4 【UE5】래디얼 블러를 구현하자! -Niagara 편- 금별 04.25 152
1319 언리얼4 【UE5】래디얼 블러를 적용해 보자! -Sequencer 편- 금별 04.25 134
1318 언리얼4 【UE5】래디얼 블러를 만들어 보자! -준비 편- 금별 04.25 149
1317 언리얼4 언리얼 - Stylized 검기 효과 구현 방법/범용쉐이더 구조 분석(한글자막) 금별 04.19 181
1316 언리얼4 언리얼 - UI 테두리 흐름 쉐이더 제작과정(한글자막) 금별 04.19 153
1315 언리얼4 【UE5+후디니】UV 커스텀 무기 디졸브 기반 빠른 모델 제작_파트 2 금별 04.09 238
1314 언리얼4 【UE5+후디니】UV 커스텀 무기 디졸브 기반 빠른 모델 제작_파트 1 금별 04.09 194
1313 언리얼4 【UE5+후디니】루빅 큐브형태 애니메이션 연출 생성과정(한글자막) 금별 04.09 189
1312 언리얼4 【UE5+후디니】Stylized형태 검기을 생성 제작과정(한글자막) 금별 04.09 197
1311 언리얼4 【UE5+후디니】 동적 디졸브 구쉴드 생성 과정(한글자막) 금별 04.09 187
1310 언리얼4 Arcane Magic Lightning Eruption FX in Unreal Engine 5 Niagara ashif 04.05 191

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand