개요
MPC를 사용하여 머티리얼에서 분기를 치고 싶을 때 (조건따라 작동),
bool값을 사용하지 못하는 문제가 있다.
가끔 가장 효율적인 방법을 까먹어서 시간 낭비를 할 때가 있다.
해결하는 방법을 소개한다.
방법
- step과 lerp를 조합한다.
아래처럼 구성시,
0이면 Lerp의 A 값이 사용되고, 1이면 Lerp의 B값이 사용된다.
참고로 MPC에서는 scalar 아니면 vector 값만 넣을 수 있으므로 scalar로 받아오게 구성한 것이다.

참고링크
controlling a StaticSwitch with a Float/Scalar/Constant 1 in a Material
Hey Guys, i want to control a StaticSwitch with a Float… currently iam trying to do this with a IF Node. but i get an errors Error [SM5] (Node If) Attempting to perform arithmetic on non-numeric types: static bool static bool Error [SM5] (Node If) Cannot
forums.unrealengine.com
- bool 값을 사용하는 switch 노드는 왜 사용 못하는가?
머티리얼 에디터에서 Switch는 "Static Switch"로 작동하며, 런타임 동작이 아니라 컴파일 타임 조건 분기다.
따라서 Material Parameter Collection이나 Dynamic Parameter로 실시간 제어하고 싶다면 Static Bool이나 Switch는 쓸 수 없다.
'이펙트 (FX) > 이펙트 팁 : Unreal' 카테고리의 다른 글
[Unreal] 시퀀서에서 블루프린트 이벤트 발생시키기 (0) | 2025.06.10 |
---|---|
[Unreal] 독립 반투명 알파란? (Separate Translucency Alpha) (0) | 2025.05.14 |
[Unreal] Fab 플러그인 설치법 (0) | 2025.05.10 |
[Unreal/Material] 셀 셰이딩 관련 자료 추천 (UE 첨부파일 포함) (0) | 2025.04.25 |
[Unreal/Houdini] 다양한 구름 제작법 관련 자료 추천 (Volumetric, Cloud) (0) | 2025.04.17 |
댓글