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



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

금별 0 2,724 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


번호 포토 분류 제목 글쓴이 날짜 조회
1157 언리얼4 언리얼 - 나이아가라 캐쉬 간단 사용방법 금별 10:11 2
1156 언리얼4 Unleash the Magic: Crafting Material Spells in UE5 Niagara ashif 05.10 33
1155 언리얼4 Create Stunning Ghost Trails in Unreal Engine 5 with Niagara ashif 05.09 45
1154 언리얼4 Create a Sci-Fi Forcefield Shield in Unreal Engine 5: A Complete Guide ashif 05.08 68
1153 언리얼4 Create Stunning Lightning Orbs in Unreal Engine Niagara: Step-by-Step Tutorial ashif 05.02 130
1152 언리얼4 언리얼5 - UV 조작으로 만드는 동적 그래픽(더빙) 금별 04.29 225
1151 언리얼4 언리얼 - 페이지 넘긴 효과 머트리얼 구현과정 금별 04.29 163
1150 언리얼4 Create Spell in UE5 Niagara Tutorial ashif 04.25 162
1149 언리얼4 언리얼 - 간단한 Procedural Dissolve제작노드 금별 04.25 203
1148 언리얼4 에픽 라이브 - 스타일라이즈드 번개 이펙트 만들기(린반) 금별 04.25 175
1147 3D 블랜더 - 머트리얼만으로 촛불효과 제작노드 금별 04.25 141
1146 언리얼4 언리얼 - 머티리얼/포스트 프로세스 피쉬아이 형태 노드구성 금별 04.25 159
1145 언리얼4 Rays Material MAGIC on Skeletal Mesh in Unreal Engine 5 ashif 04.24 139
1144 언리얼4 언리얼/Houdini로 구현하는 Shatter 효과: 3D 모델링과 애니메이션으로 완성하는 언리얼 워크플로우(자막) 금별 04.22 170
1143 언리얼4 언리얼5 - 머트리얼 디자이너를 활용한 간단한 잔물결 제작과정(더빙) 금별 04.03 286
1142 언리얼4 Magical Shield in Unreal Engine 5 Niagara Tutorial ashif 04.02 220
1141 언리얼4 언리얼5 - 토네이도 효과 제작과정 part2(더빙) 금별 04.02 196
1140 언리얼4 언리얼5 - 토네이도 효과 제작과정 part1(더빙) 금별 04.02 199
1139 언리얼4 Totem Spawn FX in Unreal Engine 5 Niagara Tutorial ashif 03.24 230
1138 언리얼4 언리얼 - 바닥에 Clamp 되는 머티리얼 예제 금별 03.23 313
1137 유니티 유니티 - 컷신 VFX 워크플로우 예제 금별 03.23 343
1136 언리얼4 간단한 Houdini에서 언리얼5 나이아가라로 이펙트 변환 가이드(한국어더빙) 금별 03.23 271

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand