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



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

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


번호 포토 분류 제목 글쓴이 날짜 조회
1194 언리얼4 언리얼5/후디니 - Explodable Skeletal Meshes 만들기 part2(한글자막) 금별 03:20 15
1193 언리얼4 언리얼5/후디니 - Explodable Skeletal Meshes 만들기 part1(한글자막) 금별 03:20 13
1192 언리얼4 Master Progress Bar UI Widget in UE5 - Dissolve & Distort Material Effects ashif 06.25 23
1191 언리얼4 언리얼5 - 인디 게임 VFX 성능 최적화 몇가지팁(한글자막) 금별 06.24 53
1190 언리얼4 후디니/언리얼5 - Pivot Painter 구현과 파괴 효과 제작과정2/데이터맵 언리얼로 임포(한글자막) 금별 06.24 34
1189 언리얼4 후디니/언리얼5 - Pivot Painter 구현과 파괴 효과 제작과정(한글자막) part1 금별 06.24 28
1188 유니티 유니티 앰플리파이 셰이더 - 스텐실 크랙 간단 제작과정(한글자막) 금별 06.24 46
1187 언리얼4 Master Element Selector UI in Unreal Engine 5: Animated Circular Interface Tutorial ashif 06.23 32
1186 언리얼4 언리얼5 간단팁 - 컨텐츠 브라우저 복제팁(Advanced Copy Here) 금별 06.23 56
1185 언리얼4 Creating Dynamic Mana Drain UI Widget in Unreal Engine 5 | Complete Material Setup ashif 06.20 46
1184 언리얼4 Transform Any Character with Magical Eye FX in Unreal Engine 5 Niagara ashif 06.19 43
1183 언리얼4 린반라이브 - 무엇이든 물어보세요(크래쉬 해결 방법/스태틱메시 뷰모드에서 노멀맵 보기/애셋 삭제 주의사항 등) 금별 06.19 51
1182 언리얼4 언리얼5 - Niagara로 실감나는 핏물 VFX 제작과정(한글자막) 파트1 금별 06.19 70
1181 언리얼4 UI Widget Material Ring Selection Tutorial Unreal Engine 5 ashif 06.18 37
1180 유니티 유니티 - Ground Effect와 검기 기초 제작가이드(한글자막) 금별 06.17 68
1179 유니티 유니티 VFX[검기] : 검기 나비 VFX/Particle System과 Airflow 효과 제작가이드(한글자막) 금별 06.17 70
1178 유니티 유니티 VFX[검기] : 검광과 화염 효과 제작 가이드(한글자막) 금별 06.17 45
1177 유니티 유니티 VFX[검기] : 세 가지 검기(Sword Trail) 제작 기법 가이드(한글자막) 금별 06.17 66
1176 언리얼4 언리얼5 - 마야 프렉쳐 시뮬레이션을 언리얼에서 임포팅(한글자막) 금별 06.16 71
1175 언리얼4 The Ultimate UE5 UI Material Tutorial: Mastering Radial Progress Bars ashif 06.12 338
1174 언리얼4 Step-by-Step: Building a Customizable Slider Material in Unreal Engine ashif 06.11 400
1173 언리얼4 언리얼5 - Sci-fi 격자 지형 균열 VFX 제작과정(한글자막) 금별 05.30 1022

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand