Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate PBR maps #1307

Open
jackjt8 opened this issue Jun 12, 2022 · 2 comments
Open

Generate PBR maps #1307

jackjt8 opened this issue Jun 12, 2022 · 2 comments

Comments

@jackjt8
Copy link
Member

jackjt8 commented Jun 12, 2022

Re: #751 - One of the issues blocking PR #1276 from being merged is what to do in the event a certain block surface doesn't have a PBR map. Or, in the event that no PBR resource pack is loaded can we still somehow implement PBR features.

Generating PBR maps may prove useful.

  • Emittance Maps - Multiply the emittance by the perceived brightness of the albedo and have a customisable threshold slider.
  • Normal Maps - Treat texture as "grayscale" heightmap. ie if the pixel is brighter than the one to its left the normal will point to the left (same thing for up down and right). FYI - Complementary Shaders use the length function = sqrt(R² + G² + B²) so it's not exactly grayscale.

PBR maps that it may not be possible to generate:

  • Perceptual Smoothness
  • Reflectance (F0)/Metalness
  • Porosity/Subsurface scattering
  • Material AO
  • Height Map
@leMaik
Copy link
Member

leMaik commented Jun 12, 2022

As discussed on Discord, implementing this does not help with the pbr map issues. To fix those, we need a way for a ray to know the previously hit material and whether that had PBR maps. PBR maps are per texture, material properties are per block.

Ideally, we would change this so that material properties are per material (~ texutre) of a block. Then we can check if the material has pbr maps and if not, just don't multiply them.

As an intermediate solution with less effort, we could make a ray remember the texture it hit and use that to check for pbr maps.

@jackjt8
Copy link
Member Author

jackjt8 commented Jun 13, 2022

CC0 - Minecraft PBR Texture Generator (.blend)

This tool converts a normal Minecraft texture (or really any texture, but it hasnt been tested on normal textures yet.) into a PBR texture with 8 maps! This tool needs Blender to work, make sure to install it if your going to use this tool.

Given the tool is CC0 it may be worthwhile to port the functionally to Chunky. That way, if any PBR map is missing we could fallback onto a generated map.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants