/sg/ - shader general - /3/ (#1004856)

Anonymous
1/6/2025, 7:27:49 PM No.1004856
images (5)
images (5)
md5: acea6eccab9fa952743228fe8caf4502๐Ÿ”
a thread for discussion about shaders. show off, post exaples from others,your own node setups,code,tips,questions,etc.
Replies: >>1004862
Anonymous
1/6/2025, 8:32:13 PM No.1004860
Cris
Replies: >>1004862
Anonymous
1/6/2025, 8:58:11 PM No.1004862
text
text
md5: ba2b5ebd3fdfcf7d8a76d71dedf010dd๐Ÿ”
>>1004856 (OP)
this is actually a nice idea for a thread.
I hope something interesting comes off it.
Anyway only noteworthy thing i have to show is this UV stitcher i made a while ago for the models i ripped off a game to change characters' clothes and such. Basically takes coordinates texture and then stretches the clothes over the base "Skin" texture.
It works, but i wonder if there's something i could do better or make it more comfortable to work with. I'd love some kind of UI addon or script that would just let me set the image nodes as interface elements with a preview outside of the shader editor for quick access, like somewhere on the side panel.
>>1004860
I hate Cris just as much as everyone else on this board but i'm thinking you might be mindbroken with this one, mate.
Replies: >>1004868 >>1004870
Anonymous
1/6/2025, 10:17:35 PM No.1004868
>>1004862
Cris
Anonymous
1/7/2025, 1:04:33 AM No.1004870
goldsrc chrome
goldsrc chrome
md5: f70ee14f757dcbd4d2282815e821f65c๐Ÿ”
>>1004862
Thanks, i hope this gains traction as well. Shaders are a very important part of 3dcg and there wasn't anything about it on this board so i figured this place needed this sort of thread.
i don't have much too, but i made this very simple node setup that apes GoldSrc's chrome materials a while back.
Replies: >>1005054 >>1010501
Anonymous
1/7/2025, 2:07:01 AM No.1004878
shader
shader
md5: e29f63a85372f2b782fa747ec40bb288๐Ÿ”
something I made a few months ago, very simple but very effective for my needs
Anonymous
1/7/2025, 2:08:55 AM No.1004879
the thing about shaders is that you have to and should write them in the text editor.
Replies: >>1004902 >>1004993 >>1005006 >>1005037
Anonymous
1/7/2025, 10:53:15 AM No.1004902
>>1004879
This, idk what's this gay drag and drop stuff is all about
Replies: >>1005006
Anonymous
1/8/2025, 7:23:32 AM No.1004993
>>1004879
shaders are the only type of thing nodes are suitable for, honestly. and it works great.
Anonymous
1/8/2025, 11:02:27 AM No.1005006
>>1004879
Slower
>>1004902
Quicker
Replies: >>1005014
Anonymous
1/8/2025, 1:56:46 PM No.1005014
>>1005006
You can't do a lot of stuff with spaghetti graph nodemess. There are a lot of situations where you will never achieve what you can with the text editor, making it not faster at all, but a knowledge check.
Replies: >>1005037 >>1005087
Anonymous
1/9/2025, 12:59:34 AM No.1005037
>>1005014
>>1004879
I'm starting to believe this to be true. The problem is, I have to learn a language in order to make text shaders. That's intimidating.

What do you guys know about SDFs? That's what I'm after. Can you make SDF objects in a text editor?
Replies: >>1005041
Anonymous
1/9/2025, 1:53:10 AM No.1005041
>>1005037
by its own, a raw SDF is limited and semi useless. You can't just use a signed distance field by itself and expect it to work well.
Replies: >>1005045
Anonymous
1/9/2025, 2:11:19 AM No.1005045
>>1005041
Isn't that true about everything? If I make a polygonal cube, does it accomplish anything on its own? Not really. You have to give the cube purpose. So tell me something I don't know.

SDFs can be used to create all kinds of things. But first I need to know how to create the basic shapes. All the resources I've found so far, are for text editors. Can you make any? How far does your knowledge go?
Replies: >>1005046
Anonymous
1/9/2025, 2:20:46 AM No.1005046
>>1005045
i wont expect you to understand this but a SDF has a tendency to collide with itself and merge where you dont want it to while simultaneously expanding out where you also dont want it to. To solve this there is a solution, but, i wont go in to it here.

My knowledge is vast. What I suggest you do however is use the built in SDF function in maya
Replies: >>1005055
Anonymous
1/9/2025, 2:47:52 AM No.1005054
mirror ball
mirror ball
md5: 40af6bef57cfaf175bb15629589b12b1๐Ÿ”
>>1004870
reminds me of the sphere map shader i did a while ago. pretty identical to yours but with a mapping rotation of (90,0,180), scale of (-1,1,1), and an environment texture set to mirror ball rather than an image texture.
Replies: >>1005077
Anonymous
1/9/2025, 2:56:59 AM No.1005055
SDF test 07_thumb.jpg
SDF test 07_thumb.jpg
md5: b606c34b76eb899f488b372861b741d4๐Ÿ”
>>1005046
That's not what I've seen. I've seen SDFs with super precisely defined edges. From what I've gathered, there are two kinds of SDFs. Ones with exacting boundaries, and ones that sort of break boundaries. I'll assess whether or not their limitations are detrimental to what I'm trying to create. But first I need to know how to create.
I'll resort to text before I switch to maya.

This is what I've made in blender so far. The sphere is easy. But the tube is difficult, and my tube lacks perspective. Both ends of the tube share the same distance from the camera. I don't know how to give both ends their proper camera distance and create the tube shape at the same time. It's like I can only get one or the other.

Do you see here, that once the node group is created, it's actually quite compact. All the spaghetti contained.
Replies: >>1005056 >>1005068
Anonymous
1/9/2025, 3:08:11 AM No.1005056
>>1005055
if you use maya you'll be up and running in like 2 minutes. Right now, you don't even know what you are talking about in regards to sdf.
Replies: >>1005057
Anonymous
1/9/2025, 3:13:03 AM No.1005057
>>1005056
ok, whatever man. I'm ignoring you until you post your work. The thread hasn't even been up for 3 days, and you're already dragging it down with crabby /ic/ level banter.
I'm sorry, guys, I gave him too many (You)s as it is. I'll stop now.
Replies: >>1005058
Anonymous
1/9/2025, 3:19:26 AM No.1005058
1712755652657262_thumb.jpg
1712755652657262_thumb.jpg
md5: 369a674e4112df3d66a036c34a79de70๐Ÿ”
>>1005057
>he's a post your work guy

i used SDF extensively for well over 100 tissues and bones in this old work and fed them into the solver
Replies: >>1005065 >>1010426 >>1011276 >>1015121
Anonymous
1/9/2025, 4:04:53 AM No.1005065
sdf sphere nodes
sdf sphere nodes
md5: 1cc1021865b49b1cf8bae4913f278ba4๐Ÿ”
>>1005058
>He's the flesh monster guy
Well you posted something, so here's another (You) I guess. But showing me undulating flesh, doesn't mean you know how to create SDFs. Instead you deflect by saying "use Maya". Which I presume does the work for you, so you never learned how. Now pressed to actually explain how, you can't do it. Sorry, but this thread is for learning how to create shaders. Not software preference. I told you that I'm sticking with Blender, and I might reluctantly get dragged into text editing, if you can assist me in transitioning by showing me how an SDF is made with text. If you can't do either of those things, then what can you do for me?

Here's my SDF sphere setup for scrutiny. Maybe someone knows how to do it better. I'd take that advice.
Replies: >>1005067 >>1010165
Anonymous
1/9/2025, 4:09:51 AM No.1005067
>>1005065
SDF is built in to maya. Has been for several years now.
Replies: >>1005068
Anonymous
1/9/2025, 4:16:01 AM No.1005068
>>1005067
it also works a lot better than what you showed here >>1005055
Anonymous
1/9/2025, 8:24:14 AM No.1005077
>>1005054
nice
Anonymous
1/9/2025, 1:01:08 PM No.1005087
>>1005014
>a lot of situations
for .0001% of users
Replies: >>1005109
Anonymous
1/9/2025, 5:53:03 PM No.1005109
>>1005087
the users who develop any program in a text editor and implement new things are smaller in number than the users who download the software, use it for a week and then never use it again, or worse, keep using it but cant get anything good out of it but drive up the total monthly download numbers
Replies: >>1005131
Anonymous
1/9/2025, 11:10:09 PM No.1005131
>>1005109
for .0001% of long haul users
Anonymous
2/11/2025, 6:46:06 AM No.1007263
good thread
bump
Anonymous
2/11/2025, 2:41:04 PM No.1007292
file
file
md5: 63e7992ca7dda8d7e881ead28e88bed4๐Ÿ”
Did this grainy look in eevee.
Replies: >>1010073
Anonymous
3/25/2025, 8:19:05 AM No.1010068
bump
Anonymous
3/25/2025, 4:09:15 PM No.1010073
>>1007292
I like the aesthetic
Anonymous
3/27/2025, 9:16:42 AM No.1010165
>>1005065
I have no idea what an SDF is and I think the maya anons are schizophrenic.
Is an SDF really necessary for shaders? I've been making shaders for ages and this thread is the first I've heard of them. I've never needed them, personally.
Replies: >>1010172 >>1011278
Anonymous
3/27/2025, 10:33:33 AM No.1010172
>>1010165
>Is an SDF really necessary for shaders?
Not at all. SDFs are sort of an offshoot to shaders. You don't have to know them. I just think they're neat. They're like shadow puppets. If you could somehow give shadow puppets the illusion of 3 dimensions.

I think SDFs hold a lot of potential. But after experimenting with them a lot, I see the limitations they have in Blender's shader nodes. I think to actually unlock the full potential of SDFs, you need to code them. Blender's shader nodes lacks indexing and storing attributes and all that jazz that geometry nodes has. So you can't really manipulate SDFs the same way you can manipulate geometry in blender.
Replies: >>1011278
Anonymous
3/31/2025, 5:36:18 PM No.1010426
>>1005058
The chicken mcnugget paste simulation, pots more anon
Anonymous
4/3/2025, 3:04:02 PM No.1010501
>>1004870
I can't get over how out-of-place the revolver looks compared to the rest of the weapons. It looks more like a primitive TF2 weapon.
Anonymous
4/30/2025, 5:18:39 AM No.1011272
>see shader thread
>โ€oh it must be full of cool glsl/hlsl/slang codeโ€
>itโ€™s just blender nodes
poo
Anonymous
4/30/2025, 9:18:09 AM No.1011276
>>1005058
Tell me anon, might I use the technique you're using here to give my characters some jiggle? Tutorials I see for the most part focus on wiggle bones, or actually modeling all the muscles and skeleton which seems a bit much for my purposes, I kind of feel like there must be a simpler way based on just the mass of the character or thickness of the body at a given spot
Anonymous
4/30/2025, 9:19:26 AM No.1011278
>>1010172
>>1010165
I thought sdfs were like metaball and magnetism simulation stuff that's where I've heard of them what the f is all this?
Replies: >>1011289 >>1011441
Anonymous
4/30/2025, 9:28:25 AM No.1011280
ezgif-8b719717d4918a
ezgif-8b719717d4918a
md5: 2f57e22ad2d9d90b33934bb87076618d๐Ÿ”
I sometimes use shaders for compositing effects, here's one of my more complex recent setups. I'll post node tree in a sec but really, it's messy and for certain not optimized
Replies: >>1011281 >>1011293
Anonymous
4/30/2025, 9:32:40 AM No.1011281
Untitled
Untitled
md5: 8ea00f7af422ad1598218e95c2147c0e๐Ÿ”
>>1011280
I wish blender had a more compositing-friendly setup. The shader tree can do a lot that even Natron can't (without python scripts)
Replies: >>1011282 >>1011293
Anonymous
4/30/2025, 9:33:45 AM No.1011282
>>1011281
wow there's even two whole nodes I left in that didn't get used at all
Anonymous
4/30/2025, 10:47:02 AM No.1011289
>>1011278
Metaballs are the easiest ones to compute so they've been here for decades but they're just one shape, there's a lot more you can do
Anonymous
4/30/2025, 1:07:37 PM No.1011293
ezgif-6ad0fe1408c717
ezgif-6ad0fe1408c717
md5: 758cfaa023a31d63034bfd0d4b6714ad๐Ÿ”
>>1011281
>>1011280
another simple 2D setup with blender and a simple shader from the same scene, I guess this is more geonodes than shaders but generally shaders will do a lot of work for you in 2D
Anonymous
4/30/2025, 4:38:10 PM No.1011301
i think you shader programming nerds are very cute
keep up the great work
Anonymous
5/3/2025, 7:00:05 AM No.1011441
>>1011278
SDFs can work in both geometry and shaders. The math is about the same. What you're doing with SDFs, is defining the distance between points in space in a precise manner. So you can create meatballs using SDF calculations on a mesh. or you can create "meatballs" using SDF calculation in shaders.
Anonymous
7/13/2025, 5:20:25 AM No.1015121
54341732513587415387415396258731
54341732513587415387415396258731
md5: 3943f6b54f943801bac09f72d6f64715๐Ÿ”
>>1005058
Literally pic