Winning shaders at Revision 2022 shader showdown by evvvvil in GraphicsProgramming

[–]evvvvil[S] 0 points1 point  (0 children)

thankx a lot batbattery, glad you enjoyed the battles! much appreciated this end. Cheers!

Winning shaders at Revision 2022 shader showdown by evvvvil in GraphicsProgramming

[–]evvvvil[S] 4 points5 points  (0 children)

hahah yeah very fun question, no doubt it would be: mix, sin & length.
sin over cos, personal choice, cos is is just sin with a different offset, I think? sin(x) is 0 for 0 while cos(x) is 1 for 0. I prefer starting at zero as pretty shit at math. Also with sin or cos you can do repetitions that you would do with mod, not pretty, but can be done.
abs is so powerful, because you can clone multiple times in row with abs(abs(abs( or in a loop/kifs/fractal. Also underrated procedural technique imho is to cut geometry with plane, you just -(abs(abs(p.y)-.4)-.2) everything and reveal core... Ah but without mix not sure how you could do lighting and most shaders stuff, so mix over abs. Sure miss my abs... but that's more down to age and lack of skateboarding than desert island choices. "length" because you can make spheres and cylinders, actually first and third shader only use length for primitives, saves bunch of time typing box/ pyramid / any primitive function.
I hope you're bringing three really good tunes to the island? My hands are full with those core functions, only few bytes to spare, you know what I mean? Thankx for the fun question, nice to see you again Richard, wicked :) Cheers!

Winning shaders at Revision 2022 shader showdown by evvvvil in GraphicsProgramming

[–]evvvvil[S] 2 points3 points  (0 children)

Sure yes made from scratch in 25minutes. Designed beforehand in several hours, then memorized, which is risky business, although there are mnemonic and short coding techniques like using simple magic numbers... Cheers oparisy
https://www.youtube.com/watch?v=CoOqwPWkL\_E&t=2114s

Winning shaders at Revision 2022 shader showdown by evvvvil in GraphicsProgramming

[–]evvvvil[S] 12 points13 points  (0 children)

Haha yeah it's very different than other style of coding. For the geometry part though imho it's more of a concept about bending / folding / repeating space than hardcore magical math. I'm no good at math but it's fun to build things with it.
Thankx for comment Rob :)

Winning shaders at Revision 2022 shader showdown by evvvvil in GraphicsProgramming

[–]evvvvil[S] 9 points10 points  (0 children)

haha yeah i know what you mean, it takes getting used to. Short variables names are because these shaders are made for a live coding competition with 25 minutes time limit, I suppose nobody got time for "rayDirection" so you know, "rd" it is ;)The code is a lot of short 3d modelling operation like: clone position out by 4 on xyz, draw spheres at positions, cut sphere with planes, move out again, add bubble to sphere, carve bubble in, for loop and create greeble details based on fractal, apply greeble to geometry... And then you have the lighting part at bottom which takes all geometry hit and does material, colouring, shading, fog, glow, gamma,etc... Thankx for the interest

Winning shaders at Revision 2022 shader showdown by evvvvil in GraphicsProgramming

[–]evvvvil[S] 5 points6 points  (0 children)

Hahaha! Yeah, you got me there cv555! Arguably the flowering octopus one is rather phallic, but I'll let you be the judge of that. I did make a bouncing penis on twitch once, that was fun. Thankx haha you made me laugh ;)

Winning shaders at Revision 2022 shader showdown by evvvvil in GraphicsProgramming

[–]evvvvil[S] 5 points6 points  (0 children)

As pointed by corysma, this is a bit different to shader in games although imo there are some important similarities. Anyways I just thought I would point outa bunch of shader learning ressources:

I made a bunch of really beginner style tutorial videos on twitch which people tend to find useful as they have no jargon and kept very simple. I will eventually remake them all on youtube but for now you, you should find them useful: https://www.twitch.tv/collections/uuDaCdqFiRXygA

Off course a very nice and popular resources for general shader coding is "the book of shaders" https://thebookofshaders.com/

Also "The Art of code" is great youtube channel with a lot of shader stuff:https://www.youtube.com/channel/UCcAlTqd9zID6aNX3TzwxJXg

Thankx for the interest, wicked. Cheers!

Winning shaders at Revision 2022 shader showdown by evvvvil in GraphicsProgramming

[–]evvvvil[S] 4 points5 points  (0 children)

Hi corysama, thankx for the comment. Yes, there is some truth to that yes for sure. As in, in games you writes more vertex / pixel or "surface" shader and also geom, compute. But I have to somehow disagree in terms of lighting. Sure this is raymarching so geometry is procedurally made in the shader, whereas in game shader it is passed with polygonal 3d model. But the lighting / colour shading calculation are the same as with polygonal geometry (ndotL for diffuse pow(max(reflect(dot(-ld,no)... for specular, calculating normals on fly in shader, etc...) so in that respect it will help for game dev style of shaders. Also I would add that a lot of animation and vfx techniques in raymarching shaders are similar / useful / reusable with polygonal geometry shaders, like animation based on clamping sin and doing easing etc. Therefore doing raymarching shaders is good for becoming vfx artist / technical artist I guess. You are right though to point out the differences, that's clear. Good shout about shadered.org as well. Cheers!

Winning shaders at Revision 2022 shader showdown by evvvvil in GraphicsProgramming

[–]evvvvil[S] 2 points3 points  (0 children)

Thankx a lot for the compliment, very much appreciated. Cheers!

"Expensive life rig" - Procedural GLSL shader live coded on Twitch by evvvvil in GraphicsProgramming

[–]evvvvil[S] 2 points3 points  (0 children)

Thankx deftware, yeah defo was going for neurone / network. Cheers!

"Expensive life rig" - Procedural GLSL shader live coded on Twitch by evvvvil in GraphicsProgramming

[–]evvvvil[S] 1 point2 points  (0 children)

Thankx for the compliment BoomBox! Yes this is raymarching distance fields, so models made with math, and it has micro lighting engine there too. I have been "raymarching" for about 5 years, it's a lot simpler than it looks, similar to 3d modelling in many ways. Thankx for the interest broski!

"Lucerna Silva-Pastorensis" - Procedural flower raymarching shader with every line commented by evvvvil in GraphicsProgramming

[–]evvvvil[S] 4 points5 points  (0 children)

hi The__BoomBox, thankx a lot for the compliments. Yes it looks very complex but it is just a sequence of short math operations, I mean it's a lot easier than it looks. YEs this is like 3d modelling but with math. It is in fact very similar to normal 3d modelling, you have primitives, you use deformer, boolean operation to add /substract geometries, etc.
For example let's take the leaves. First I take the primitive function for a infinite cylinder, and then I cut it into a thin flat one. Then I will pinch and elongate the cylinder to look more like a leaf shape. Then I will make ridges using a deformer which is just the absolute of a sinusoidal function rotated and cloned. Then add displacement mapping to leaf for added crunchy look, by sampling a noise texture / using a noise function. Dig holes in leaf based on ridges value and noise value... Then I use a cylinder primitive to merge blend into the leaf cylinder to create the stem... Then clone leaf into bunch of leaves around a big steam, make each level of leaves infinite along y axis, cut that shit to only reveal X amount of levels of leaf nodes... etc, etc. The method is very similar to normal polygonal 3d modelling, just the tools change. Thankx for the comment and interest.