마법적 구슬형태 제작



마법적 구슬형태 제작

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


번호 포토 분류 제목 글쓴이 날짜 조회
514 3D 3dsMax - 토네이도 메시 제작과정(중국어/AI한글자막) 금별 2023.12.27 1955
513 2D 포토샵 - 플레임 히트 텍스쳐 제작방법 금별 2023.05.02 1956
512 3D 블랜더를 활용한 매직 오브 제작과정(머트리얼메이커) 금별 2024.03.19 1956
511 언리얼4 언리얼 - Stylized 연기효과 제작과정(한글자막) 금별 2024.03.13 1958
510 언리얼4 언리얼4 - 암석 스파이크 제작 과정(중국어) 동영상new 금별 2021.11.30 1959
509 유니티 유니티 앰플리파이 셰이더 - 색수차 활용 글리치 효과 제작튜토리얼 금별 2024.01.03 1961
508 언리얼4 언리얼 - 머티리얼로 히트 포인트 배열 전달법 금별 2022.06.06 1964
507 유니티 유니티 - How to upgrade materials to URP in Unity 2021.2.2 금별 2022.10.09 1966
506 유니티 유니티 - 빙속성 화살 스킬 제작과정 금별 2023.08.11 1968
505 유니티 유니티 - 간단한 시퀀스 보간 블랜드 제작과정 금별 2023.03.09 1968
504 언리얼4 언리얼 간단팁 - 원형 UV 심 밉맵 모드변경으로 수정하는팁 금별 2022.10.13 1973
503 언리얼4 언리얼 - HLSL & Scratch Pad의 사용방법 소개영상 금별 2023.10.09 1973
502 언리얼4 언리얼 팁 - 라운드 텍스처에 대한 방사형 디스토션 생성 방법 동영상new 댓글+1 금별 2022.07.30 1979
501 언리얼4 언리얼 나이아가라 - 액터 홀로그래픽 FX 제작방법 금별 2022.10.13 1980
500 유니티 유니티 - 트랜스폼 형태 포털 제작방법 금별 2022.09.14 1982
499 유니티 유니티 앰플리파이 셰이더 - 토네이도 이펙트 간단 제작과정 금별 2023.10.24 1985
498 언리얼4 언리얼5 나이아가라-물고기떼 제작 튜토리얼 금별 2023.02.01 1988
497 언리얼4 언리얼 - 구체 노면에 따라 흐르는 웨이브 제작과정 금별 2023.08.10 1989
496 언리얼4 언리얼5.2 - 체크무늬 바닥재질 만들기 금별 2023.06.09 1990
495 언리얼4 언리얼5 - UV 맵에 따라 파티클을 방출(중국어/AI자막) 금별 2024.01.20 1992
494 유니티 유니티 - 레거시 쉐이더를 쉐이더 그래프에서 커스텀 함수로 포팅 제작과정 금별 2023.03.15 1993
493 언리얼4 언리얼 - 그레이스케일 그라디언트/텍스처를 시각화하는 간단한 방법 사진링크new 금별 2024.03.21 1995

 

Banner
 
Facebook Twitter GooglePlus KakaoStory NaverBand