Closed TemperanceTempy closed 1 month ago
Just to elaborate on how terrain blending works from my own understanding. Terrain materials can have samplers for Color0, Color1, Specular0, Specular1, Normal0 and Normal. The alpha value of the vertex color is a blend value between the 0 and 1 textures respectively. Example (only did diffuse here)
Currently there are limitations with the complexity of shaders under KHR_materials_pbrSpecularGlossiness since it only supports a single texture for each of these channels.
It may be possible to create a gltf extension and a corresponding blender plugin, but may also be possible to create a standalone blender plugin which uses the values meddle will export in custom properties to remake the correct shaders.
ah thats really interesting! I sadly dont know how to code, so i can't program an extension myself. The sharp cuts of textures have always bothered me in map exports/ports, so maybe its about time i learn how to code LOL. There may also be a workaround as well via color mixing, so ill start experimenting.
Just an update on this, it is being worked on via a blender addon, there are some edge-cases to tackle related to vertex painting still however
https://github.com/user-attachments/assets/b8547ad6-c383-42dd-9fc3-ff1c8da8f951
Is your feature request related to a problem? Please describe. I've been working and testing the map exporting features of Meddle for a little bit (mostly through importing the result through blender), and i noticed something. The GLTF/GLB version of the files do not preserve the vertex colors/vertex alphas present in the games map (though the framework for it is still present). I made sure to verify that this was not an issue with blender beforehand. (Framework for a vertex color map is there in areas that are relevant, but is pure white/empty as pictured below with a viewer designed for vertex color viewing)
Describe the solution you'd like As there is framework for the vertex color data to be there, it should be possible to preserve/export the vertex color/vertex alpha data into the gltf/glb format, though I'm unsure of how exactly (I'm not really good at the coding side of things sadly)
Describe alternatives you've considered Currently godbert was the only program capable of preserving the vertex colors/vertex alphas, but as of dawntrail godbert is currently unusable for the forseeable future
Additional context Vertex alphas specifically are what allow these terrain transitions to appear smooth, rather than sharp compared to how it looks in blender