마법적 구슬형태 제작



마법적 구슬형태 제작

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


번호 포토 분류 제목 글쓴이 날짜 조회
489 유니티 유니티 앰플리 - 웨이브 디폼 형태의 옷가락 날리는 효과 구현 예제 금별 2023.05.08 3337
488 유니티 유니티 앰플리 - 붕괴 스타레일류 빨려들어가는 트랜지션효과 간단구현 금별 2023.05.08 5593
487 유니티 유니티 - 불,얼음,전기 속성 텍스쳐 구성 팁 금별 2023.05.08 4473
486 유니티 유니티 VFX 그래프 - Six-way lighting workflow new 금별 2023.05.04 3088
485 언리얼4 언리얼5 퀵팁 - VFX 아티스트들이 가장 많이 사용하는 5가지 UV 트릭 금별 2023.05.04 2927
484 언리얼4 언리얼5 퀵팁 - 텍스쳐를 나선형으로 만들기(polar coordinates) 금별 2023.05.04 3527
483 언리얼4 언리얼 - Drawing Locations to a Render Target 금별 2023.05.04 2036
482 2D 포토샵 - 간단한 노이즈 3종 제작방법 금별 2023.05.02 4890
481 2D 포토샵 - 간단한 플레어 텍스쳐 제작방법 금별 2023.05.02 2358
480 2D 포토샵 - 간단한 빔텍스쳐 제작방법 금별 2023.05.02 2419
479 2D 포토샵 - 간단한 소용돌이 형태 텍스쳐 제작방법 금별 2023.05.02 3194
478 2D 포토샵 - 플레임 히트 텍스쳐 제작방법 금별 2023.05.02 2482
477 유니티 유니티 - 패럴랙스 맵핑을 활용한 데칼제작 예제 금별 2023.05.02 3123
476 유니티 유니티 - 간단 번개 제작방법 금별 2023.04.30 3951
475 언리얼4 언리얼 - 수중 커스틱스 효과 제작방법 금별 2023.04.25 2419
474 언리얼4 언리얼5 - 나이아가라 활용 캐릭에 라이트닝 효과 제작방법 금별 2023.04.25 1988
473 언리얼4 언리얼5 - 뎁스감 있는 레이마칭 텍스쳐 활용 예제 금별 2023.04.24 2649
472 언리얼4 언리얼 5.2 - Crystal, Ice, Gemstone 머트리얼 제작 튜토리얼 금별 2023.04.24 2245
471 언리얼4 언리얼 - 간단 폭포 제작 팁 금별 2023.04.22 3269
470 언리얼4 언리얼5 - HLSL 코드 활용 채널 옵셋 효과 예제(RGB 디더링) 금별 2023.04.21 2800
469 2D 스테이블 디퓨전 - 원형 검기 텍스쳐 제작예제 금별 2023.04.18 3245
468 언리얼4 언리얼 - [기초]Create beautifull VFX 금별 2023.04.18 2080

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand