{"action":"created","issue":{"url":"https://api.github.com/repos/pissang/clay-viewer/issues/35","repository_url":"https://api.github.com/repos/pissang/clay-viewer","labels_url":"https://api.github.com/repos/pissang/clay-viewer/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/pissang/clay-viewer/issues/35/comments","events_url":"https://api.github.com/repos/pissang/clay-viewer/issues/35/events","html_url":"https://github.com/pissang/clay-viewer/issues/35","id":296789906,"number":35,"title":"Textures issue","user":{"login":"nickkraakman","id":9694264,"avatar_url":"https://avatars0.githubusercontent.com/u/9694264?v=4","gravatar_id":"","url":"https://api.github.com/users/nickkraakman","html_url":"https://github.com/nickkraakman","followers_url":"https://api.github.com/users/nickkraakman/followers","following_url":"https://api.github.com/users/nickkraakman/following{/other_user}","gists_url":"https://api.github.com/users/nickkraakman/gists{/gist_id}","starred_url":"https://api.github.com/users/nickkraakman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickkraakman/subscriptions","organizations_url":"https://api.github.com/users/nickkraakman/orgs","repos_url":"https://api.github.com/users/nickkraakman/repos","events_url":"https://api.github.com/users/nickkraakman/events{/privacy}","received_events_url":"https://api.github.com/users/nickkraakman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-02-13T16:00:01Z","updated_at":"2018-02-27T14:12:57Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nWhile using your converter, we ran into a significant bug where textures are not correctly included in the GLB or not correctly referenced in the glTF, depending on your output settings.\r\n\r\n**The problem**\r\nThe default behavior of the converter is to output a .gltf and .bin file _in the same directory as the input file_. So if your folder structure is:\r\n\r\ntest.fbx\r\ntextures/texture.png\r\n\r\nYou end up with a .gltf file which correctly references the `textures/texture.png` file. _However_, problems arise when...\r\n\r\n1. You use the `-o` option to output to a different directory, since the .gltf still references `textures/texture.png`, but these files are still located in the original directory, not in the output directory you specified, and so loading the .gltf file in a viewer results in a \"can't find textures\" error.\r\n2. You use the `-b` option to output a GLB file, since the textures are not properly included in the GLB, as you can see in this example: [test.glb.zip](https://github.com/pissang/clay-viewer/files/1720546/test.glb.zip). If you open this GLB in ClayGL viewer, it has materials, but no textures. If you check the file size (1.9MB), you see that it does not include (all) textures, since that should result in a file around 3MB. If you try to open this GLB in Paint3D, it says the file can't be opened at all, suggesting something is wrong with the file.\r\n3. You use a .zip file as input, which contains both an FBX and a /textures folder, resulting in a \"Can't find texture file in the folder\" error, because the Autodesk FBX SDK does not unzip the textures in the same folder as the zip file, but instead it unzips them to a temp folder, which is why the `FindFileinDir()` function can't find the textures.\r\n\r\nTo replicate this issue you could download our example FBX model: [test.zip](https://github.com/pissang/clay-viewer/files/1720477/test.zip)\r\n\r\nPlease let me know if you need more info to resolve this issue.\r\n\r\nThanks in advance for your help!\r\n\r\nNick"},"comment":{"url":"https://api.github.com/repos/pissang/clay-viewer/issues/comments/368890647","html_url":"https://github.com/pissang/clay-viewer/issues/35#issuecomment-368890647","issue_url":"https://api.github.com/repos/pissang/clay-viewer/issues/35","id":368890647,"user":{"login":"pissang","id":841551,"avatar_url":"https://avatars1.githubusercontent.com/u/841551?v=4","gravatar_id":"","url":"https://api.github.com/users/pissang","html_url":"https://github.com/pissang","followers_url":"https://api.github.com/users/pissang/followers","following_url":"https://api.github.com/users/pissang/following{/other_user}","gists_url":"https://api.github.com/users/pissang/gists{/gist_id}","starred_url":"https://api.github.com/users/pissang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pissang/subscriptions","organizations_url":"https://api.github.com/users/pissang/orgs","repos_url":"https://api.github.com/users/pissang/repos","events_url":"https://api.github.com/users/pissang/events{/privacy}","received_events_url":"https://api.github.com/users/pissang/received_events","type":"User","site_admin":false},"created_at":"2018-02-27T14:12:56Z","updated_at":"2018-02-27T14:12:56Z","author_association":"OWNER","body":"Hi @nickkraakman . Sorry about this. It's in the plan, but not in high priority. So it will be great if you can make a pull request about this issue :)"}}
{"actor":{"display_login":"pissang"}}