마법적 구슬형태 제작



마법적 구슬형태 제작

금별 0 2,144 2019.08.30 06:32

 

I guess this is the first entry to this category, since I never had such a demand for a write-up before. So here goes!

The different between this format and regular “My take on shaders” post is that this is a more direct format, just going through a particular effect that I find too specific to write a complete tutorial about. Also, in some cases, like this one, I won’t be providing the completed code but I will be writing about the general idea and the process behind the specific effect.

In my tweet I mentioned it being a form of “raymarching” though I might be using the term loosely here. While I use a loop to move towards a certain direction, the technique doesn’t really resemble traditional raymarching. So keep that in mind.

 

The core idea

 

I’ve been constantly thinking about how to take advantage of past effects, and in this case I had an idea concerning the “layered parallax” effect that I demonstrated in an older post.

With that technique, you could sample a texture using coordinates that had been offset “inwards” of the object, by using the camera’s view direction in tangent space. The effect is super useful for adding some depth to materials like ice, or tiles or basically anything you want to make it look like “there’s something underneath the surface”. The result looked something like this:

 

 

My thoughts going from this effect were these:

  • Let’s ditch the main texture, don’t need it for now
  • What if in every “layer” of this effect, I performed a “step” function on a 2D noise texture, where the cutoff value ranges from 0 to 1 based on the “index” of the layer?

The “stepping” (that’s what I’ll call “using the “step” function” from now on) was inspired by the concept of using grayscale textures as heightmaps, with their value representing depth. Adjusting the cutoff value of a simple texture with a radial gradient looks like this:

 

As if the texture actually represents a cone and when I’m using “step” I’m cutting slices into it which decrease in size as I get to the top. Basically I’m super-over-explaining SDFs here, but that representation really helped clear things in my head.

So, if I were to assign 1 to the cutoff value of the out-most layer, 0 to the value of the deepest layer and the inbetween values to the inbetween layers, each parallax layer would have a differently sized “slice” of the texture.

If we add that “stepping” to each layer, with the same radial gradient texture, we end up with something like this (the texture is tiled 5 times so just pay attention to the middle one):

 

This uses 10 iterations on the grayscale texture

Turn up the iterations/number of layers (here it’s something 128) and you have smoothness:

 

Add a somewhat more complex texture, like a simple cloud texture and you have this:

 

 

Trying out random textures and noises is super fun with this one btw.

Add the material on a sphere and you have the ORB:

 

 

Add 2 HDR colors, and lerp between them based on the layer “index” instead of just lerping the intensity from 0 to 1 (also some Post-processing for the looks):

 

 

Add some waving displacement when sampling the texture in each layer for some extra variation and *magic*:

 

 

And that’s it! I hope that was helpful and I hope there will be many more write-ups in the future, especially as I’m easing into VFX stuff at the moment of writing. So, I’ll see you in the next one! ????



 

These posts will never go behind a paywall. But if you really really super enjoyed this post, consider buying me a coffee, or becoming my patron to get exciting benefits!

 

Comments


번호 포토 분류 제목 글쓴이 날짜 조회
275 언리얼4 언리얼 - 캐릭이 액체화되는 효과 제작방법 금별 2022.10.06 1583
274 유니티 유니티 이펙트 튜토리얼 - 오브젝트 폭발 이펙트 금별 2022.04.20 1590
273 언리얼4 언리얼 - 게이지 머트리얼 예제 금별 2022.01.25 1603
272 유니티 유니티 이펙트 - 버택스 옵셋, 음악 리듬 머터리얼 만들기(중국어) 동영상new 금별 2021.11.01 1605
271 언리얼4 언리얼 나이아가라 - 캐릭이 불타는 효과 제작방법 금별 2022.10.09 1608
270 유니티 유니티 앰플리파이 쉐이더 - 카드 효과(외곽 반사 효과 예제) 금별 2022.07.14 1612
269 유니티 유니티 셰이더&렌더링 에센스(retr0) 금별 2020.02.16 1623
268 유니티 유니티 VFX 그래프 - Sci-fi 스폰 이펙트 튜토리얼 금별 2022.09.21 1624
267 2D 포토샵 - 비정형 라인 생성방법 금별 2022.09.14 1627
266 유니티 유니티 앰플리파이 쉐이더 - 트라이메쉬형태 방패 스킨 제작방법(중국어) 금별 2022.08.16 1631
265 언리얼4 언리얼 - UV 축을 보여주는 머티리얼 함수 금별 2023.02.19 1632
264 유니티 유니티 - 카툰 느낌의 불/폭발효과 제작방법(중국어) 금별 2022.06.15 1635
263 2D 섭스턴스 디자인/언리얼 - 바닥 크랙 데칼 제작방법 금별 2022.09.14 1637
262 언리얼4 언리얼 나이아가라 - 분해 후 흡수 효과 제작방법 금별 2022.10.06 1637
261 유니티 유니티 - 꿀렁거리는 촉수 쉐이더 제작과정 금별 2021.12.30 1637
260 언리얼4 언리얼 - 머터리얼만을 사용한 양궁판 제작 금별 2022.03.20 1639
259 언리얼4 언리얼 나이아가라 - 디졸브 활용 소환수 공격 제작과정 금별 2023.01.10 1640
258 3D 후디니 - 카툰풍 2D 화염 효과 제작방법 금별 2022.12.18 1643
257 유니티 유니티 URP/HDRP - 스크린 공간·렌즈 플레어로 편하게 반짝 반짝 표현하기 금별 2023.05.08 1645
256 유니티 유니티 앰플리파이 쉐이더 - 카툰느낌 불 소재 제작방법(중국어) 금별 2022.09.08 1665
255 언리얼4 언리얼 - 텍스쳐 없이 UV체커 만들기 금별 2022.03.14 1677
254 유니티 유니티 쉐이더 그래프 - Orthographic 뎁스 금별 2020.03.26 1685

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand