마법적 구슬형태 제작



마법적 구슬형태 제작

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


번호 포토 분류 제목 글쓴이 날짜 조회
502 언리얼4 언리얼4 - 월드 포지션 활용 쉴드 응용 머트리얼 노드 금별 2021.12.11 2082
501 언리얼4 파이어볼 UV 흐름 예제 금별 2020.11.07 2070
500 언리얼4 언리얼4 튜토리얼 - 액터/버텍스옵셋/스플라인메시컴포넌트 및 파티클 용 언리얼 모션 블러사용법 금별 2020.03.12 2068
499 유니티 [유니티 비주얼 이펙트 그래프 팁]타임라인과 호환성문제 금별 2018.11.21 2067
498 유니티 유니티 쉐이더 팁 - 스크린스페이스 맵핑을 객체의 월드포지션에 고정시키는 방법을 찾기 위한 사소한 팁 금별 2019.07.14 2065
497 언리얼4 간단한 글리치 예제 금별 2018.08.26 2055
열람중 유니티 마법적 구슬형태 제작 금별 2019.08.30 2053
495 언리얼4 언리얼5 - DBufferTexture 노드를 이용한 데칼 응답의 수동처리 금별 2022.03.25 2051
494 언리얼4 언리얼4 - 매지컬 쉴드 제작 머트리얼 노드 금별 2021.12.11 2027
493 유니티 유니티 - 후디니를 활용한 중국의 시네마틱 이펙트 연출 제작과정 금별 2021.01.13 2021
492 언리얼4 [언리얼4 이펙트 튜토리얼]빗방울 쉐이더 만들기 금별 2018.11.13 2018
491 유니티 유니티 앰플리 - 붕괴 스타레일류 빨려들어가는 트랜지션효과 간단구현 금별 2023.05.08 2006
490 언리얼4 지오메트리 맵핑 이펙트 금별 2018.11.29 1983
489 언리얼4 [언리얼4]Quick Tips & Shader Tricks: Some editor settings / Easy Search & Base Material setup 금별 2019.01.13 1974
488 언리얼4 언리얼 - distance와 step을 활용한 원 그리기 금별 2022.01.25 1967
487 유니티 유니티 쉐이더 그래프 - 꼬여지는듯한 착각의 쉐이더 금별 2020.03.19 1950
486 유니티 유니티 - 트레일 이펙트 제작 참고영상 금별 2021.11.01 1944
485 언리얼4 언리얼4 나이아가라 - Stylized 리본 쉐이더 제작방법 금별 2022.01.24 1929
484 유니티 유니티 쉐이더 그래프 팁 - 꿀렁이는 호수관 만들기 금별 2018.12.19 1926
483 유니티 유니티 쉐이더 그래프(LA 유나이트) - Best practices for Shader Graph 금별 2018.12.19 1924
482 언리얼4 언리얼팁 - 다이아몬드 게이지 머트리얼 제작방법 금별 2022.01.29 1919
481 유니티 유니티 - 원통형 메쉬에 토네이도형 uv 흐름제어 금별 2019.08.30 1917

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand