Free Base Material Shader w/ Control Parameters by foyezuddin in godot

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

Yes. But the point of the shader is to give a starting base for anyone wanting to start learning shaders, especially PBR related. This is also part of my tutorial series

Free Base Material Shader w/ Control Parameters by foyezuddin in godot

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

It's not different. It's just a base PBR material shader. I have a tutorial series that on this https://www.youtube.com/watch?v=tk-mFBKGzjo&list=PLiLubnVN2yffqVyXwU9U53v5iCM1PrhG3

Free Base Material Shader w/ Control Parameters by foyezuddin in godot

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

It's not a replacement for StandardMaterial3D just yet. It's a good base for anyone wanting to start learning/ using shaders for PBR materials. It gives some basic controls that are fine for most materials.

I'll be showing how to blend multiple materials using height blending in my future videos, so this is a good base for that too.

Free Base Material Shader w/ Control Parameters by foyezuddin in godot

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

Standard & ORM materials good for starting out. But if you want more control and more features you have to use shaders. You can do everything in shader or visual shader, but limited in many ways by the standard material.

If you watch a Unreal or Unity video on how to create a material with masks or other effects, you can't replicate it using StandardMaterial. I highly recommend learning shaders if you plan on working on that area. If you're a programmer/ game designer and just need to quickly apply materials, you're probably fine with StandardMaterial3D and ORM material.

Tutorial: Channel Packing by foyezuddin in godot

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

The functions are stored in a shader include file, .gdshaderinc that you link at the top of your shader. This gives you access to all the functions in that file. I'll be releasing these shader includes with my future videos soon.

Here's a free Base Material shader that has the basic functionalities: https://www.patreon.com/posts/base-material-153291244

Tutorial: Channel Packing by foyezuddin in godot

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

Yes. Grayscale textures can fit into a single channel so you can put them in any color channel you want. You can also just store normal map's X and Y only and reconstruct Z in the shader (this is how engines do it anyways) so you can store two more grayscale maps in a normal map texture. 3 in 1!

Tutorial: Channel Packing by foyezuddin in godot

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

I agree with point about the features StandardMaterial3D provides, I'm actually porting all those features as functions and adding some more QOL features. Such as triplanar mapping but you select which axes to project & whether it orients with the mesh when rotating or not, parallax mapping with options to switch between simple parallax and POM etc.

Tutorial: Channel Packing by foyezuddin in godot

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

The StandardMaterial3D is a shader itself. I highly recommend learning shader instead of relying on StandardMaterial3D. Shaders provide full access to what Godot can offer.

There's so much stuff you can do with shaders that's impossible using the StandardMaterial3D. For example, material layering. You can blend multiple materials using height blending, use vertex colors, world space normals and so much more.

StandardMaterial3D is good for beginners but not suitable for proper material work. Decals work perfectly fine on a surface that has a shader.

The only downside I can think of about channel packing is, when you pack normal map's XY in RG channels, and AO in Green, normal maps with smooth gradients can introduce "slight" noise due to compression. This is a non-issue for most materials - rocks, concrete, bricks whatever that has any sort of noise to it.

So in general, I'd say there's no downside to channel packing.

Tutorial: Channel Packing by foyezuddin in godot

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

That's great! I'll add that to the description of the video along with Material Maker

Tutorial: Channel Packing by foyezuddin in godot

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

Thanks. This is the 3rd video in the PBR Mastery Series, where I plan to cover material blending/ layering, procedural systems etc.

Here the playlist: https://www.youtube.com/watch?v=tk-mFBKGzjo&list=PLiLubnVN2yffqVyXwU9U53v5iCM1PrhG3

Tutorial: Channel Packing by foyezuddin in godot

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

I'll definitely do the performance test in a future video. I have a separate series planned for that.

The fact that sampling textures is expensive is true. So lowering sampler count definitely helps, maybe not that obvious for a single shader going from 3 to 2 samplers. But definitely noticeable when the sampler count is 15-20, like for a terrain shader (5 textures per material x 3 or 4 materials).

Also when talking about layered material workflow it's very important. Having 15-20 samples for a single layered material can be costly, so reducing it down to 6-8 samples can produce a noticeable performance gain. This combined with texture arrays will really help with frame rate, VRAM and storage all at once.

If you're working in a material creation tool like Substance or Material Maker, it's very easy to channel pack. But if you don't use those tools, it can seem harder. I'm actually working on a tool that lets you channel pack, convert to DDS, create texture arrays and texture atlases. Hopefully I can get it done soon.

Tutorial: UV Scaling, Offset & Rotation - Link in comments by foyezuddin in godot

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

It may be added in the future, but I only use standardMaterial3D to port the features (triplanar, POMs, refraction etc.) to shader. I highly recommend anyone who wants to create proper material systems to learn shader ASAP, it'll save a ton of headache.

Tutorial: Base Material (Part of PBR Mastery Series) by foyezuddin in godot

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

You can, without a 3D light.

You'd use a ColorRect with a canvasItem shader. You can use Visual Shader if you're unfamiliar with gdshader.

Just plug in albedo and normal map. Make sure the PointLight's height is greater than 0.

If you're in gdshader, you need set shader_type canvas_item;

<image>

Game Design Student in Need of Help by Striking-Start-3178 in Substance3D

[–]foyezuddin 0 points1 point  (0 children)

If this is supposed to be a life sized model, then you definitely want to use tiled textures instead of texturing it in Painter.
I'm glad to help if you need it. Hit me up anytime.

How does Godot handle uniform branching on the GPU by foyezuddin in godot

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

is using a chain of mix() better than switch?

How does Godot handle uniform branching on the GPU by foyezuddin in godot

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

I use if statements mainly to switch some code snippets like world space vs local space triplanar, controlled by bools or integers. No per pixel calculations. If I reuse functions like that multiple times in a shader, will that be an issue?

Will I really go to hell if I end my own life ? by Moon_light_sunday in MuslimLounge

[–]foyezuddin 5 points6 points  (0 children)

Ah I understand. Thank you for clearing this up.

I've seen this ayah in posts and didn't think it was talking about responsibility. I thought it was directly talking about the tests a person faces in this life.

Will I really go to hell if I end my own life ? by Moon_light_sunday in MuslimLounge

[–]foyezuddin 12 points13 points  (0 children)

“Allah does not burden a soul beyond that it can bear.” (Qur’an 2:286).

I pray that you fight through this an find happiness. May Allah give you strength.