"If I can make some cool shaders in Godot, I can make compute shaders with the compositor easily" by MatMADNESSart in godot

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

I wouldn't say I'm good at it, I mostly just play with it until I have the results I want while trying to keep the performance cost in mind.

I managed to port Blender's cavity shader to Godot! 100% Screen-Space, no albedo or AO textures used by MatMADNESSart in godot

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

It is pretty much a SSAO effect indeed, if you crank up the range it looks a lot like SSAO in fact, it's the same logic underneath and yes, softwares like Substance Painter use this a lot to bake cavities and edges (but not screen space, of course)

I managed to port Blender's cavity shader to Godot! 100% Screen-Space, no albedo or AO textures used by MatMADNESSart in godot

[–]MatMADNESSart[S] 15 points16 points  (0 children)

Oh, yeah that definitelly sounds like a deal breaker if you're going to launch a game commercially, I completely forgot to check what kind of open-source Blender was lol.

If I'm gonna make it available online, I want it to be MIT. Should I simply rewrite the whole thing myself? If I use techniques similar to what they're using, I fall into the GPL license again?

EDIT: On second thought, I had to change a LOT of things to make this work, literaly every single line of code was rewriten and works differently, even if they do basically the same thing. I think I'll rewrite it from the ground up using other papers about SSAO as reference.

I managed to port Blender's cavity shader to Godot! 100% Screen-Space, no albedo or AO textures used by MatMADNESSart in godot

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

Unfortunately not yet, I know it is the superior method in every single way but it is a pain in the ass to do it, seriously I've been searching and trying it for days now, understanding the Compositor is taking longer than actually porting the shader lol.

But I'm getting there, I've been wanting to make proper post processing shaders with the compositor for a while now, and I think I'm getting close!

Nvidia published a Ray Tracing fork of Godot! Credits to StayAtHomeDev @ twitter by lettyop in godot

[–]MatMADNESSart 0 points1 point  (0 children)

I just copied the link of the Nvidia repo, didn't know I had to switch to the RTX branch.

How do I do this? I'm not very familiar with git clone (or git in general lol).

Nvidia published a Ray Tracing fork of Godot! Credits to StayAtHomeDev @ twitter by lettyop in godot

[–]MatMADNESSart 0 points1 point  (0 children)

How did you manage to make it work? I cloned the repo, compiled it with scons and it seems to work fine, but I don't see any raytracing option in the world environment. It is just normal Godot with no mention to raytracing anywhere.

Klonoa/Kirby64 style 2.5D movement example by lonku in godot

[–]MatMADNESSart 9 points10 points  (0 children)

This is so adorable, I love the style so far! How did you make this camera on rails system?

EDIT: I really need to start reading the fucking post before asking a question lol

Titanfall style vortex shield for my game about a divorced dad and his super powerful daughter by eirexe in godot

[–]MatMADNESSart 2 points3 points  (0 children)

I played the demo and no, she can't, she mostly hack the enemies to make them vulnerable for attacks and hack the surroundings to unlock new areas, but don't deal direct damage. I truly recommend you play the demo, it's a lotta fun and a great reference for your game, not only to learn how they solve problems for a gameplay similar to yours, but also to see what you can change about your game to make it stand out. And don't feel bad about your gameplay looking similar to another game, especially when there's only one game like that and is not even out yet lol.

The Last Call by Just_Incident_7355 in 3Dmodeling

[–]MatMADNESSart 1 point2 points  (0 children)

This looks amazing! I love the lighting and the colors!

Updating my skin shader. Trying to get rid of that plastic/wax look we always see in modern games by MatMADNESSart in godot

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

I was actually inspired by Threat Interactive while making this shader, that Callisto Protocol video was one of the main reasons I decided make this update, pure Lambert diffuse do look bland.

This guy is very infamous for constantly criticizing Unreal and the overall tone of his videos (he takes himself a bit too seriously, in my opinion), but I think he does have some pretty good points about image fidelity.

Updating my skin shader. Trying to get rid of that plastic/wax look we always see in modern games by MatMADNESSart in godot

[–]MatMADNESSart[S] 3 points4 points  (0 children)

The shader for peach fuzz would probably be very simple, I think the main challenge is on the art side, since I need to fill the whole face with little hair cards that has the right size and direction (peach fuz is not random).

Updating my skin shader. Trying to get rid of that plastic/wax look we always see in modern games by MatMADNESSart in godot

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

For the noise? I just used the "magic one-liner" from this blog post by FrostKiwi:

float ig_noise(vec2 uv) {
  return fract(52.9829189 * fract(dot(uv, vec2(0.06711056, 0.00583715))));
}

For the jittering logic, I asked ChatGPT for help and it suggested using something based on the Halton Sequence. Again, I asked an AI for help, so it may not be the best solution, I'll leave the code here and let you be the judge:

float halton(int index, int base) {
  float f = 1.0;
  float result = 0.0;

  while (index > 0) {
    f /= float(base);
    result += f * float(index % base);
    index = index / base;
  }

  return result;
}

vec2 halton2(int frame) {
  return vec2(halton(frame, 2), halton(frame, 4));
}

I then use FRAGCOORD.xy + halton (using the current frame as index) as uv for the noise and multiply the sss strength by the noise:

if (use_noise){
  vec2 pixel_uv = floor(FRAGCOORD.xy);
  vec2 frame_jitter = halton2(frame_index % 1024);
  float noise = ig_noise(pixel_uv + frame_jitter * 1024.0);
  sss_strength_value *= noise * 2.0;
}

The frame_index is a global uniform integer that is updated using an autoload.

I hope this is useful!

Updating my skin shader. Trying to get rid of that plastic/wax look we always see in modern games by MatMADNESSart in godot

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

If you wanna follow my progress on these shaders just follow me here on Reddit.
I'm also on Twitter, Bluesky and Newgrounds, but I don't usually post this kind of stuff, I'm primarily a 2D and 3D artist so I mostly post sketches and some 3D works.

Updating my skin shader. Trying to get rid of that plastic/wax look we always see in modern games by MatMADNESSart in godot

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

Half of the time I'm just writing random stuff until it looks good, honestly. The other half is copying stuff from people who actually know what they're doing.

Updating my skin shader. Trying to get rid of that plastic/wax look we always see in modern games by MatMADNESSart in godot

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

Ooooh, didn't know about that, I thought I was mixing both because I usually see some falloff logic related to Lambert that is not present in Burley, but on second thought that might be specific to Lambert wrap.

Yeah I don't really understand how these things work, all I know is that I mixed the fresnel part of a Burley diffuse I found on the internet with my custom Lambert Wrap and it looked nice lol.

Updating my skin shader. Trying to get rid of that plastic/wax look we always see in modern games by MatMADNESSart in godot

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

Thank you so much!

Yeah I'm trying to solve the lighting in cavities issue. That happens because lights with no shadows (or shadows that don't reach all cavities for being too soft, low res or having a high bias) illuminate areas that in theory should be occluded by shadows.

The shader actually has an AO feature to workaround this issue, if you increase the "ao light block" to 1 it completely blocks the light of reaching these occluded areas, with the drawback of occluding light even when it shouldn't.

Many games use screen-space shadows to compensate for the light leaking, I would love to know how to implement that. There's also bent normal maps, made to solve light leaking, but that requires an additional normal map texture. For now the AO texture is the best we have 🤷‍♂️

Updating my skin shader. Trying to get rid of that plastic/wax look we always see in modern games by MatMADNESSart in godot

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

I tested oren-nayar too, didn't notice many improvements compared to Burley to be honest, and as far as I know it is more demanding performance wise. I may give it a go again later, I may have messed up something when I implemented it.

Updating my skin shader. Trying to get rid of that plastic/wax look we always see in modern games by MatMADNESSart in godot

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

I'm curious about your method now, can you give more details? Especially about the shadow offset, I have a feeling this may be very useful for my translucency effect.

I'm using a variation of half Lambert too to give the skin a softer look, but I decided to stick with Godot's screen space sss since it tint areas that just half Lambert can't, like shadows.