You sir, deserves millions subscribers... thanks so much for transfering your shader knowledge to us.. and thanks for the hard work!
@PatinaGamesАй бұрын
At 8:12 the split and append, if you go inside them the split is just a bunch of mask components and the append is chained append vectors, kinda the same but you can just mask R and mask G from the same reroute pin and them append them to each other in the opposite order. The compiler is probably doing this under the hood but it might eliminate a few instructions. Thanks for the vid!
@BenClowardАй бұрын
Any operations that just move components around (mask, append, split, swizzle, etc) are always free. Math instructions aren't required to do that. So the method used pretty much comes down to how you want to organize things in the graph.
@larrychin12209 ай бұрын
Thanks, i recreated this in UPR shader code and works just fine, but would be nice if you could provide some insights of why this works, im not asking for a another video just for explaining the math details but some keywords or a direction of extra reading materials could help a lot.
@geodraws2 жыл бұрын
Hey Ben! I was the one that asked about this in the previous video and you made a follow up video! Thank you so much! I want to ask more about the reasoning behind doing a cross product with the vertex position in view space, what's the reason behind that?
@欧阳徉4 ай бұрын
metoo, and i don't know why i need exchange R and G channel
@jakubpulka2 жыл бұрын
I remember time when Quest 1 was not yet released nor even announced and company where I worked received dev kit. I wish I knew this trick that time, because we had a lot of issues with performance caused by ice reflections... and without it all looked dull. Your channel is amazing :) Big thanks!
@goldennboy19892 жыл бұрын
Would be nice to see the results on a non-spherical mesh :)
@YASIR.K2 жыл бұрын
Thanks, Ben.
@lianghanli8352 жыл бұрын
Hi Ben, Thanks for your tuorials. Could you please explain a bit more about why the 'Cross Product' you used here could solve this issue?
@magicamecil2 жыл бұрын
Thank you for the help!!
@theman70504 ай бұрын
Absolute legend!!
@aslack6145 Жыл бұрын
yaaaaaaaaaay absolutely gold
@geri43672 жыл бұрын
Phenomenal, thanks for the update :D
@JenAnty_JA2 жыл бұрын
Well done and you're right - it's quite cheap.
@antoniosuarez7881 Жыл бұрын
thanks, grate tutorial
@noisegrindercn Жыл бұрын
Cross product the CameraVector and VertexNormal in world space then convert the result to view space could save some instructions.
@ussdev19882 жыл бұрын
Hey Ben, thanks for your videos helping alot refreshing knowledge :) in this video u have a little node missed. in shader graph u have before the sample texture to add a rotate node set to 180 degrees otherwise are the textures flipped :)
@RoniStudio2 жыл бұрын
Nice Video Sir 👍
@wellweldedgames2 жыл бұрын
But how can we make this mat cap shader take a normal map in count? Do we need a dot product between an absolute world position input and our normal map?
@BenCloward2 жыл бұрын
To use a normal map, instead of using the Normal Vector (Unity) or VertexNormalWS (Unreal) use the normal from the normal map instead and transform it from Tangent Space to View space. Then use that as the second input to the Cross Product node.
@windbt61132 жыл бұрын
Hey Ben, I just try to calculate the coordinate of the view space. In my calculation, the Z axis is target to the object, the X axis is perpendicular to the Z axis to point right, the Y axis is point down, am I right?
@Devorkan3 ай бұрын
Why does that work though? I don't understand what the flipped vector from the cross product represents
@GARIKDoroshchuk2 жыл бұрын
Hi Ben, thx for tutorial. I've a question: Why don't you use Remap node in Unity when you're doing multiply and add operations?
@BenCloward2 жыл бұрын
The remap node is a much more broadly applicable node and, as such, it performs more operations in order to achieve its results. That means it's slightly more expensive than just doing a multiply and an add.
@MarkOfArgyll2 жыл бұрын
I'm guessing Unreals swizzle node doesn't do what you need in this case?
@S-I-T9 ай бұрын
Could I have a flip book of matcaps? Would be a great way of faking a dynamically changing material like a molten metal glow.
@BenCloward9 ай бұрын
Oooh, yes you could. That's a cool idea!
@S-I-T9 ай бұрын
Would be a great way of shading a mesh explosion from hot to cool smoke. Great tutorials. Quality teaching thank you.
@Sukorru2 жыл бұрын
Is there a reason the unreal graph did not multiply the green channel by -1?
@BenCloward2 жыл бұрын
UV coordinates are treated differently between the two engines. One has the UV origin in the lower left and the other has it in the upper left. So the flip is required to make the results consistent between the two.
@snark5672 ай бұрын
For some reason the matcap doesn't display properly, it's devided into 4 images when viewed on the sphere.
@BenCloward2 ай бұрын
I can think of a couple of things that might cause that: 1. The math in the shader is wrong. Double check that what you're doing is the same as what I showed. 2. The MatCap texture is saved in a different configuration. There are lots of different ways of doing MatCap. The texture needs to match the method used in the shader. The shader I'm showing here requires that the MatCap image just be a single sphere, but other software might use MatCap images that have multiple spheres.
@snark5672 ай бұрын
@@BenCloward Thanks for the reply! Yeah it was the math, I forgot to add 0.5 in add. Lack of sleep really gets you sometimes haha
@lilyye93732 жыл бұрын
I use URP instead of HDRP: 10 seems right, 31 seems wrong.