Voronoi-based Lava in Unity Shader Graph

Опубликовано: 20 Июнь 2023
на канале: Daniel Ilett
13,443
293

Voronoi diagrams are great for modelling natural shapes like biological cells, and they also excel at creating lava that flows between chunks of rock. Shader Graph's built-in Voronoi node doesn't provide enough information about the edges of the 'cells', so we'll have to write custom code, which I'm basing on Inigo Quilez's great examples. With a custom function node, we can then build a customizable lava effect with different textures, thicknesses, and most importantly, wiggle.

I'm using Unity 2022.3.0f1, although this technique will work in previous (and presumably subsequent) versions of Unity.
------------------------------------------------------------------------
👇 Download the project on GitHub: https://github.com/daniel-ilett/shade...

📰 Read this tutorial in article format instead: https://danielilett.com/2023-06-20-tu...

🌐 Read Inigo's article about Voronoi edges: https://iquilezles.org/articles/voron...
------------------------------------------------------------------------
📚 Get a copy of my shader book here (affiliate): http://www.dpbolvw.net/click-10074214...

✨ Grab my Snapshot Shaders Pro package here (affiliate): https://assetstore.unity.com/packages...

✨ Grab my Hologram Shaders Pro package here (affiliate): https://assetstore.unity.com/packages...
------------------------------------------------------------------------
🌐 AmbientCG Textures: https://ambientcg.com/view?id=Rock028 and https://ambientcg.com/view?id=Lava004
------------------------------------------------------------------------
💬 Join the Discord:   / discord  
💖 Support me on Patreon: https://www.patreon.com/danielilett?f...
☕ Or throw me a one-off coffee on Ko-fi: https://ko-fi.com/danielilett
------------------------------------------------------------------------

00:00 Intro
00:34 The Voronoi Function
02:15 CustomVoronoi.hlsl
04:28 Custom Functions
05:18 Rock Islands
07:11 Lava Wiggle
08:38 Rock Colors
09:37 Lava Colors
10:43 Rock Normals
11:49 Lava Material
12:07 Outro

#gamedev #shaders #madewithunity


На этой странице сайта вы можете посмотреть видео онлайн Voronoi-based Lava in Unity Shader Graph длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Daniel Ilett 20 Июнь 2023, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 13,443 раз и оно понравилось 293 зрителям. Приятного просмотра!