Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

Exporting ignores Cycle Mapping node in Blender #35

Closed
mokargas opened this issue Jul 8, 2017 · 11 comments
Closed

Exporting ignores Cycle Mapping node in Blender #35

mokargas opened this issue Jul 8, 2017 · 11 comments

Comments

@mokargas
Copy link

mokargas commented Jul 8, 2017

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:
image

Three.JS/A-Frame:
image

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?

@UX3D-nopper
Copy link
Contributor

UX3D-nopper commented Jul 8, 2017

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.

@mokargas
Copy link
Author

mokargas commented Jul 8, 2017

@UX3D-nopper Sure thing, do you want me to send it to you?

@UX3D-nopper
Copy link
Contributor

No need to send, here is the solution:

  • glTF 2.0 allows several texture coordinates and also the Blender exporter does export them:

grafik

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.

@UX3D-nopper
Copy link
Contributor

But please post your final rendering, as soon as you are finished!

@mokargas
Copy link
Author

mokargas commented Jul 8, 2017

@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.

@feiss
Copy link

feiss commented Jul 19, 2017

@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.

@UX3D-nopper
Copy link
Contributor

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.

@feiss
Copy link

feiss commented Jul 19, 2017

Indeed! It is a spec thing, not an actual issue of the exporter.

@UX3D-nopper
Copy link
Contributor

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.

@UX3D-nopper
Copy link
Contributor

Here we go:
KhronosGroup/glTF#1044

@donmccurdy
Copy link
Contributor

Related: KhronosGroup/glTF#1015 ... @feiss please also leave feedback there if you have suggestions on the proposal! 🙂

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

No branches or pull requests

4 participants