유니티 - 2d Raymarched Smoke



유니티 - 2d Raymarched Smoke

금별 5 3,626 2019.10.26 09:49

2d Raymarched Smoke

Start with a texture as opacity. Here I'm using a flat splat texture to better show the offset layering.

Take a copy of this, offset it by the LightDir in tangent space by adding to the UVs. Do this again with an increased offset and then layer them together. This is the shadow side. 

Now take another two copies of the texture, again offset by the LightDir in tangent space, this time by subtracting from the UVs instead of adding. Increase the offset and layer those together.

This is the lit side.

We can use the Dot Product of the ViewDir and LightDir to Lerp blend between the negated shadow side and the lit side.

Perhaps use a smoothstep to ease the transition.

Now just chuck out that flat shaded splat texture, and pop in a soft smoky texture with faded sides.  

Multiply it by the Light Colour, and if you’re feeling extra fancy, use the Dot Product of the ViewDir and LightDir to add in some fake SubsurfaceScattering as the light travels behind the smoke.  

 

Comments

커피맥주 2020.02.14 19:09
링크 깨졌네요 흑흑
금별 2020.02.16 19:20
이런 ㅠㅠ
금별 2020.02.16 20:16
수정했습니다.
커피맥주 2020.02.18 12:45
커피맥주 2020.09.15 02:57
오랜만에 다시 보러 왔더니 또 링크가 깨졌네요 ㅠㅠ

번호 포토 분류 제목 글쓴이 날짜 조회
1348 언리얼4 Rock Shield FX in Unreal Engine 5 Niagara ashif 05.27 33
1347 언리얼4 Rift Portal Stylized in Unreal Engine 5 Niagara ashif 05.25 42
1346 언리얼4 Recall FX in Unreal Engine 5 Niagara ashif 05.20 78
1345 언리얼4 Poison Spell AOE in Unreal Engine 5 Niagara ashif 05.17 93
1344 언리얼4 언리얼 - Niagara에서 정적 메시를 사용하여 사용자 지정 파티클 모양 만들기 금별 05.17 130
1343 언리얼4 언리얼 - 포스트 프로세스 2D 페이지 넘김 효과 머트리얼 예제 금별 05.17 103
1342 언리얼4 언리얼 - AI 활용 블랙홀 셰이더를 업그레이드(한글자더빙) 금별 05.17 103
1341 언리얼4 Poison AOE FX in Unreal Engine 5 Niagara ashif 05.16 102
1340 언리얼4 Lightning Trap FX in Unreal Engine 5 Niagara ashif 05.13 117
1339 유니티 유니티 - 호박(Amber) 셰이더 제작과정(한글자막) 금별 05.12 139
1338 언리얼4 언리얼 - HLSL 심층 설명 4_레이마칭 활용 평면정사각형 메시 3D 구체로 변형 금별 05.12 144
1337 언리얼4 언리얼 - HLSL 심층 설명 4 -UV 좌표를 레이어로 반복 쌓아 깊이감 있는 오목볼록 효과 구현(한글자막) 금별 05.06 227
1336 언리얼4 언리얼 - HLSL 심층 설명 3 -큰 원의 궤적을 따라 작은 원 배치효과(한글자막) 금별 05.06 200
1335 언리얼4 언리얼 - HLSL 심층 설명 2 -원형(Circle) 기반 쉐이더를 구현(한글자막) 금별 05.06 186
1334 언리얼4 언리얼 - HLSL 심층 설명 1 - 그라데이션 변화 도구 구현(한글자막) 금별 05.06 214
1333 언리얼4 언리얼 - 03 나이아가라 트레일 매직 매트릭스_1단계 - 스트립 방출 금별 05.04 225
1332 언리얼4 언리얼 - 02 나이아가라 트레일 매직 매트릭스_2단계 -스트립 트리거 매트릭스 금별 05.04 171
1331 언리얼4 언리얼 - 02 나이아가라 트레일 매직 매트릭스_1단계 - 스트립 방출 금별 05.04 192
1330 언리얼4 언리얼 - 01 나이아가라 트레일 매직 매트릭스_2단계 - 스트립 트리거 매트릭스 금별 05.04 178
1329 언리얼4 언리얼 - 01 나이아가라 트레일 매직 매트릭스_1단계 - 스트립 방출 금별 05.04 171
1328 언리얼4 언리얼 - 00 나이아가라 트레일 매직 매트릭스 효과: 초보자를 위한 속성 금별 05.04 245
1327 언리얼4 언리얼 - 유성우 효과 제작과정(한글자막) part3 금별 05.02 253

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand