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

Export to .glb with embedded images. #553

Merged
merged 3 commits into from
Aug 22, 2018
Merged

Export to .glb with embedded images. #553

merged 3 commits into from
Aug 22, 2018

Conversation

donmccurdy
Copy link
Member

@fernandojsg I believe this PR fixes #547 and fixes #551, but due to #552 I am not sure how to test this locally.

@fernandojsg
Copy link
Member

@donmccurdy after a quick pass I've just tried it and it "works" but the .glb file contains just [object Object]. I'll check the code to see what is going wrong.

But I don't get any error because of #552 I can't reproduce it /cc @dmarcos @ngokevin any idea what could be causing it?

@fernandojsg
Copy link
Member

@donmccurdy I believe one of the needed steps is to update GLTFExporter.js with an updated version from three.js that supports binary: true :D

@donmccurdy
Copy link
Member Author

Ok, I think this is working now — updated GLTFExporter, marked inspector helpers (see #523 (comment)), and filtered them out while exporting.

@arpu
Copy link

arpu commented Aug 22, 2018

i had some time to test this! and it works fine

@fernandojsg
Copy link
Member

Yeah, thanks for remind me I forgot about this one! Thanks @donmccurdy and @arpu

@fernandojsg fernandojsg merged commit c28ac93 into aframevr:master Aug 22, 2018
@donmccurdy donmccurdy deleted the feat-export-glb branch August 22, 2018 14:32
@arpu
Copy link

arpu commented Aug 30, 2018

@donmccurdy if i use
map.wrapS = THREE.RepeatWrapping;
map.wrapT = THREE.RepeatWrapping;
map.repeat.x = 20;
map.repeat.y = 20;
and export the generated gltf model this is not applied to the exported model
is this a known problem ?

@donmccurdy
Copy link
Member Author

donmccurdy commented Aug 30, 2018

Texture repeat, rotation, and offset are not part of the core glTF spec, but require a very recent extension. The THREE.GLTFLoader implementation has not been merged yet (mrdoob/three.js#13831), and no PR for THREE.GLTFExporter exists yet.

EDIT: The wrapS / wrapT part should already be supported, though: https://github.com/mrdoob/three.js/blob/dev/examples/js/exporters/GLTFExporter.js#L740-L741

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