Marcousik Posted July 26, 2021 Share Posted July 26, 2021 Hi, I need noob help with this: When I download a model with textures, there are often: - WhateverName_Albedo - WhateverName_Normal - WhateverName_Roughness - WhateverName_Metalness - WhateverName_AO How is this supposed to be used with the material Leadwerks functionality? It seems that: Albedo -> Diffuse Normal is easy Normal What is specularity? Can I use the others one? Do anybody know why the names are different? Thx a lot for answers 1 Quote Link to comment Share on other sites More sharing options...
reepblue Posted July 26, 2021 Share Posted July 26, 2021 Leadwerks doesn't support PBR but rather blinn-phong shading. This is what games used to use before PBR technology was adopted. https://help.poliigon.com/en/articles/1712652-what-are-the-different-texture-maps-for Leadwerks supports diffuse, normal specular and roughness maps with the default shaders. If you do some digging there were some PBR imitation shaders posted here awhile back. 3 Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
havenphillip Posted July 26, 2021 Share Posted July 26, 2021 I want to make a PBR shader for these. I've seen some tutorials around. I just haven't gotten to it. I don't know how well Leadwerks would handle it but I do know that the more textures you add to a shader the more it eats at your FPS. Albedo is like a diffuse map where the shadows are all reduced, which is better. You want the lighting and normals to handle the shadows. Not the diffuse. Your specular is probably the roughness, or the inversion of the roughness. PBR stuff looks really cool, though. 1 Quote Link to comment Share on other sites More sharing options...
TWahl Posted July 26, 2021 Share Posted July 26, 2021 Quote the more textures you add to a shader the more it eats at your FPS You can pack the maps into different channels of an image to save texture memory. I believe that this is common in asset workflows for games engines like Unity, Unreal etc. Saves VRAM and makes your graphics card work less hard for better FPS. One 32 bit RGBA texture will take less memory to store than 2 to 4 bespoke 8/16 bit grayscale texture maps. I would not know how to set up a shader to accomodate that though. Shader coding is not my strong suit. *Edited 2 Quote Link to comment Share on other sites More sharing options...
havenphillip Posted July 26, 2021 Share Posted July 26, 2021 Yeah I don't know how to do channels on GIMP but I"ve seen videos on it. But I'm pretty sure that's the set-up. In shader it would just look like this: float col1 = texture(texture0,ex_texcoords0).r; float col2 = texture(texture0,ex_texcoords0).g; float col3 = texture(texture0,ex_texcoords0).b; ...where each of the color channels would be a different noise or whatever. Quote Link to comment Share on other sites More sharing options...
TWahl Posted July 26, 2021 Share Posted July 26, 2021 3 minutes ago, havenphillip said: Yeah I don't know how to do channels on GIMP but I"ve seen videos on it. But I'm pretty sure that's the set-up. In shader it would just look like this: float col1 = texture(texture0,ex_texcoords0).r; float col1 = texture(texture0,ex_texcoords0).g; float col1 = texture(texture0,ex_texcoords0).b; ...where each of the color channels would be a different noise or whatever. You can do it in any program really and it isn't too hard (I believe). Certain texturing softwares like Substance Painter also allow you to export your texture maps pre-packed too. You can use it any map you want to reference really, but I think there is a preference for certain color channels due to their compression. I think the green channel offers the best compression so it is often used for roughness maps in PBR, since it would provide the most clarity. 2 Quote Link to comment Share on other sites More sharing options...
havenphillip Posted July 26, 2021 Share Posted July 26, 2021 Yeah looks pretty straightforward. You use grayscale images. I wonder if you could scroll one of them without moving the others. This would be great for PBR putting the roughness, metalness and ao all in one. I get it. 2 Quote Link to comment Share on other sites More sharing options...
Marcousik Posted July 27, 2021 Author Share Posted July 27, 2021 Thx all for answers So Is it correct to say that the parallax shader uses the "displacement" slot? And I found a diffuse+normal+specular+parallax+roughness.shader -> this should use the 5 first slots of a material, correct? And there is somewhere the shadmar substance for metal, it is top. Quote Link to comment Share on other sites More sharing options...
havenphillip Posted July 27, 2021 Share Posted July 27, 2021 3 hours ago, Marcousik said: So Is it correct to say that the parallax shader uses the "displacement" slot? And I found a diffuse+normal+specular+parallax+roughness.shader -> this should use the 5 first slots of a material, correct? You're probably right. That would be my assumption as well. You can always look in the shader and see which textures are being used for what. If it's the mighty Shadmar he usually wrote in some good notes on which texture was which. 1 Quote Link to comment Share on other sites More sharing options...
havenphillip Posted July 27, 2021 Share Posted July 27, 2021 21 hours ago, TWahl said: Certain texturing softwares like Substance Painter also allow you to export your texture maps pre-packed too. Do you happen to know which channels Substance Painter uses for roughness, metalness, and ao? Quote Link to comment Share on other sites More sharing options...
TWahl Posted July 27, 2021 Share Posted July 27, 2021 23 minutes ago, havenphillip said: Do you happen to know which channels Substance Painter uses for roughness, metalness, and ao? Depends on the export preset you are using and whether or not you created your own. Theres quite a lot of variance in flexibility especially when you take into account the game engine you are exporting to. I went and found the below links on the Polycount Forums/wiki. They mainly pertain to UE4 but are probably helpful. The first one has some info on Substance Painter/Marmoset channel options as well, which might pertain to your question. https://polycount.com/discussion/181922/understanding-texture-channels-between-substance-painter-and-marmoset https://polycount.com/discussion/187786/channel-packing-for-ue4 http://wiki.polycount.com/wiki/ChannelPacking UE4 Export presets from SP for reference: Substance shader API: https://substance3d.adobe.com/documentation/spdoc/shader-api-89686018.html 1 Quote Link to comment Share on other sites More sharing options...
slick29 Posted September 1, 2021 Share Posted September 1, 2021 You can try this http://www.martinkearl.co.uk/2017/05/leadwerks-pbr-2.html 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.