Closed mokargas closed 7 years ago
You are right, this is not working by design. At the moment, it is not possible to pass a texture scale for glTF 2.0.
Also, it is not possible to create a custom node tree linking into the textures. As soon as all documentation is finished, it will be more obvious why.
Let me have a look at your scene - maybe it can be solved differently.
@UX3D-nopper Sure thing, do you want me to send it to you?
No need to send, here is the solution:
For the metal roughness texture, I have plugged a UV map as input. This is "allowed": https://github.com/KhronosGroup/glTF-Blender-Exporter/blob/master/docs/user.md
So, if your model has several texture coordinates, you can choose, which one has to be used. But you need to take care, as at the moment, only two texture coordinate sets have to be supported by a glTF 2.0 viewer.
If this is a hobby project, your approach is okay. But if you want to be more productive, I strongly recommend a professional tool like Substance Painter to apply materials directly on a 3D object.
But please post your final rendering, as soon as you are finished!
@UX3D-nopper Thanks for the direction. I'll give this a try and take a look at Substance Painter.
Currently this is a hobby. Previously I baked all textures with export to GLTF 1.0 and didn't bother with PBR, so right now I'm just trying to tease out a workflow I can re-use.
@UX3D-nopper Substance Painter is not the solution to this issue (how do you texture 2kms of grass with no tiling, no shaders and not using a massive texture?), and there can be different reasons some studio or hobbyist don't want or cannot use it.
I hit with this issue today. I made a tileable texture with substance painter, and I wanted it repeated many times along the floor, and after some tries I realized there was no support for texture mapping transformations. The solution was to scale up the UVs of the floor. And I will use another UVmap for the lightmap.
Agree, and maybe this could be a new extension, where a texture matrix can be stored somewhere.
But as far as I understand, this is a problem with the current features of glTF 2.0, right?
Even we would apply the Mapping into the UV map in Blender, you would still need a separate one for the lightmap.
Indeed! It is a spec thing, not an actual issue of the exporter.
Okay, got it. Let's define a spec for texture coordinates. I put it on the list, what the guys want to discuss at SIGGRAPH.
Here we go: https://github.com/KhronosGroup/glTF/issues/1044
Related: https://github.com/KhronosGroup/glTF/pull/1015 ... @feiss please also leave feedback there if you have suggestions on the proposal! 🙂
Currently I have an issue where exporting using the GLTF Metal Roughness PBR together with Mapping nodes: - the Mapping node scaling and rotation will be ignored:
Blender:
Three.JS/A-Frame:
The reason why this is a problem: my project doesn't use textures which are all the same size and rotation which seems to be an underlying assumption in the export.
Not sure if this is by design, if so, are there any workflow workarounds?