I played around with the shaders in UPBGE and after a day of frustration and surprise successes, I managed to come up with a node-based system that fakes PBR materials.
The way it works:
- The main shader (basically a small principled shader) takes in 6 materials:
- 3 metal materials (glossy, blurry, rough)
- 3 dialetric materials (glossy, blurry, rough)
- By mixing them together with the inputs from the main node, you can create a variety of materials
It’s not perfect yet, but I started using the PBR Machine in my workflow and so far I had no problems and an amazing increase in speed and quality.
Though I wouldn’t exactly encourage you to use it, for I have not tested the performance impact thoroughly enough, it would certainly be a good thing if people tested it and played around with it a bit.
I don’t own the textures in this file, I just used some to play around with, so don’t use them in projects!
If you give me HDRIs, I can give you Cubemaps and expand the repository
Download (Please credit me should you use it - “Leopold Auersperg-Castell”)
How to use:
- Create a folder somewhere in your game directory and place the .blend there
- Append the “PBR_Base_dialetric” and “PBR_Base_metallic” from the .blend
- (they actually both do the same, they are just presets)
- Assign one of the PBRs to the Object of desire and make a Single User Copy
- Remember to make Single User Copies of the Texture Set Node and the Textures as well for new materials
- Edit the PBR
Now uses Fresnel more accurately
Has correct roughness calculation (no more spec-meddling)
Fixed a normal map issue
added Ambient Occlusion input
tested with substance painter maps -> works
Video Tutorial Link:
Hope this is of use to someone
Now blend something