[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/3/ - 3DCG

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


Janitor applications are now being accepted. Click here to apply.


[Advertise on 4chan]


File: images (5).png (2 KB, 256x256)
2 KB
2 KB PNG
a thread for discussion about shaders. show off, post exaples from others,your own node setups,code,tips,questions,etc.
>>
Cris
>>
File: text.png (230 KB, 1172x909)
230 KB
230 KB PNG
>>1004856
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.
>>
>>1004862
Cris
>>
File: goldsrc chrome.png (318 KB, 990x665)
318 KB
318 KB PNG
>>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.
>>
File: shader.png (627 KB, 1502x1226)
627 KB
627 KB PNG
something I made a few months ago, very simple but very effective for my needs
>>
the thing about shaders is that you have to and should write them in the text editor.
>>
>>1004879
This, idk what's this gay drag and drop stuff is all about
>>
>>1004879
shaders are the only type of thing nodes are suitable for, honestly. and it works great.
>>
>>1004879
Slower
>>1004902
Quicker
>>
>>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.
>>
>>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?
>>
>>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.
>>
>>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?
>>
>>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
>>
File: mirror ball.png (582 KB, 772x602)
582 KB
582 KB PNG
>>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.
>>
File: SDF test 07.mp4 (1.18 MB, 562x860)
1.18 MB
1.18 MB MP4
>>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.
>>
>>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.
>>
>>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.
>>
File: 1712755652657262.webm (1.21 MB, 1920x1080)
1.21 MB
1.21 MB WEBM
>>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
>>
File: sdf sphere nodes.png (343 KB, 1579x878)
343 KB
343 KB PNG
>>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.
>>
>>1005065
SDF is built in to maya. Has been for several years now.
>>
>>1005067
it also works a lot better than what you showed here >>1005055
>>
>>1005054
nice
>>
>>1005014
>a lot of situations
for .0001% of users
>>
>>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
>>
>>1005109
for .0001% of long haul users
>>
good thread
bump
>>
File: file.png (820 KB, 1233x909)
820 KB
820 KB PNG
Did this grainy look in eevee.
>>
bump
>>
>>1007292
I like the aesthetic
>>
>>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.
>>
>>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.
>>
>>1005058
The chicken mcnugget paste simulation, pots more anon
>>
>>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.
>>
>see shader thread
>”oh it must be full of cool glsl/hlsl/slang code”
>it’s just blender nodes
poo
>>
>>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
>>
>>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?
>>
File: ezgif-8b719717d4918a.gif (2.11 MB, 800x761)
2.11 MB
2.11 MB GIF
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
>>
File: Untitled.png (252 KB, 1764x897)
252 KB
252 KB PNG
>>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)
>>
>>1011281
wow there's even two whole nodes I left in that didn't get used at all
>>
>>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
>>
File: ezgif-6ad0fe1408c717.gif (2.47 MB, 718x558)
2.47 MB
2.47 MB GIF
>>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
>>
i think you shader programming nerds are very cute
keep up the great work
>>
>>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.
>>
>>1005058
Literally pic
>>
>>1011272
Why don't you post some of your own OC instead of just complaining. Nobody is going to be impressed by your deep knowledge of shader code if you don't post anything. Faggot.
>>
>>1004856
Is there any extensive documentation like the archwiki or gentoowiki, but for shaders? Can even be for programming shaders and not just the node system. Don't mind either way. I am targeting specifically NPR shading, but so long as the documentation is robust and covers all the working parts, it's good.
>>
>>1011301
Thank you! ^^
>>
File: hsr.jpg (414 KB, 2160x1920)
414 KB
414 KB JPG
(You): writes shader for a nice effect
YouTroobers:
>dissects model
>fucks up shading
>here's a replication of the effect
>rib cage reveal lol
>>
File: pbrshit.png (522 KB, 2374x891)
522 KB
522 KB PNG
cables
>>
how do you make procedural textures on purpose? most of the time I can fuck around with nodes and get something decent but it's basically RNG
>>
>>1018695
cable guy here.
take any noise >> colorramp it >> mask it with a different noise.
thats pretty much it
>>
What even are materials? Is there a standard definition? Or it can be anything that contributes to how something looks?
Wtf is specular/ambient/glossiness parameters? What they are replaced by PBR? But the specular/glossiness workflow of PBR looks exactly like the traditional system except you use textures for everything?
>>
>>1018698
Materials define the visual appearance of objects. They're composed of a function that defines how the material combines and processes scene inputs (usually called a shader) and parameters for that function and for combining the result with the rendered scene. Ambient, diffuse, specular and so on are all parameters that find their origin in an empirical model of light response called Phong reflection, that's been the basis for just about any shader. They're pretty intuitive parameters so they've been kept around for basically all future lighting models, although their meaning has changed over the ages.

PBR is a general term for one such shader, the Disney principled BSDF, that's been all the rage in recent years because it's more physically accurate unlike Phong's equation. The details of how aren't all that interesting but the takeaway is it's a broad and flexible model that it'll cover most material needs and look "real", and it's battle-tested, so to speak, in many movies and games. You can directly source parameters from photos or scans of a real material and it'll look good.

Because a lot of applications have adopted it as a standard, you can share materials from one to the other and it'll look the same, unlike more customized shaders where you'd have to reimplement it in each program.
>>
>>1018699
So PBR has more to do with the rendering equation used to shade an object than the material definition itself.
>you can share materials from one to the other and it'll look the same
Is this why most Unreal games look alike these days?
>>
>>1018700
The material definition is the equation plus parameters. Same parameters with a different equation would result in a different material.

As for UE, not quite. Pre-PBR UE versions, or id tech versions or gamebryo or whatever, already had distinctive looks. You'd recognize am UE3 game from miles away usually, or a quake 2 engine game and so on. It's got more to do with the nature of a middleware engine, the goal of which is to provide a ready made toolbox. If you want it to look distinctive, ljke say Guilty Gear Xrd that looks unlike any other UE3 game, you're gonna have to put some elbow grease into it, and it might be pretty expensive.
>>
>>1004856
OP looks gorgeous, how do you get it?
>>
Complete shader retard here, can I replicate this using flat materials in unreal or do I need to use vertex colors?
>>
>>1018727
https://wabbaboy.dev/Blog/FlyKnight-Shaders.html

forgot link ;)



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.