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



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

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


번호 포토 분류 제목 글쓴이 날짜 조회
1248 언리얼4 Create a Simple, Beautiful Magical Orb VFX in Unreal Engine 5 Niagara ????✨???? ashif 11.01 65
1247 언리얼4 언리얼/3Ds Max - 우주 느낌의 하트 제작_2 머트리얼 적용과정 금별 10.28 139
1246 언리얼4 언리얼/3Ds Max - 우주 느낌의 하트 제작_1 모델링/UV 제작과정 금별 10.28 98
1245 언리얼4 후디니/언리얼 - 후디니 활용 절차적(프로시졀) 검기 메시,텍스쳐 VFX 제작 기법(한글자막) 금별 10.28 107
1244 언리얼4 언리얼5 - 음파 VFX 제작: Niagara Particle과 기본 Scene 제작 금별 10.28 105
1243 언리얼4 언리얼5 - 음파 VFX 제작: Material 연결과 원리 분석 금별 10.28 95
1242 언리얼4 언리얼5 - 음파 VFX 제작: 모델링과 텍스처 기초 금별 10.28 81
1241 언리얼4 Photoshop to UE5 Material: Creating Custom Stylized Noise Textures for Energy Orb VFX! ????????✨ ashif 10.25 103
1240 언리얼4 언리얼5 - 디지털 트랜지션 생성 및 파티클 픽셀화 제작과정(한글자막) 금별 10.22 138
1239 언리얼4 언리얼 - 데몬슬레이어 아카자 스킬 VFX 분석 금별 10.22 145
1238 언리얼4 언리얼5 - 테크노 스타일 매직 어레이/포스트 프로세싱 그리드 링 흐름 효과 제작과정(한글자막) 금별 10.20 124
1237 언리얼4 언리얼5 - 오클루전 활용한 지면 균열 머트리얼 생성과정(한글자막) 금별 10.20 118
1236 언리얼4 언리얼 - Lightmap UV 제거를 위한 에디터 유틸리티 제작 금별 10.17 141
1235 언리얼4 언리얼 - 텍스처 패킹 자동화: 기술 아티스트를 위한 시간 절약 도구 금별 10.17 124
1234 언리얼4 언리얼 - 폴라 UV는 타일링 텍스처 간단 활용 금별 10.17 114
1233 언리얼4 언리얼5 - 원형 링 마법진 왜곡 효과 구현 팁 금별 10.15 201
1232 언리얼4 언리얼5 - 물결 패턴 Normal Map 블렌딩 & 질감 교체 가이드 금별 10.15 183
1231 언리얼4 언리얼5 VFX 프로젝트 조직화 가이드: 폴더부터 명명 규칙까지(한글자막) 금별 10.14 166
1230 유니티 유니티 - Stylized 마법구 발사체 효과 제작과정 금별 10.14 185
1229 언리얼4 언리얼5 - 행성 흡수 제작과정 : Spline과 Blueprint 활용 part2 금별 10.12 176
1228 언리얼4 언리얼5 - 행성 흡수 제작과정 : Spline과 Blueprint 활용 part1 금별 10.12 157
1227 언리얼4 언리얼5 - WorldPositionBehindTranslucency로 만드는 간단 커스텀 데칼 UV 금별 10.11 150

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand