Code Monkey home page Code Monkey logo

Comments (6)

robertlong avatar robertlong commented on June 19, 2024

@zellski are you currently working on this? I'd be interested in contributing to this as it would allow us to export valid .gltf files with external images. The AFrame community is in need of a better way of exporting from Maya and this project is fairly close.

from fbx2gltf.

zellski avatar zellski commented on June 19, 2024

@robertlong I'm planning on doing some cleanup here for sure, sooner rather than later. Can you clarify what exactly you want to do? By external images do you mean, "not literally embedded in the FBX" or do you mean URIs, for something like WebGL deployment?

We have no way of mapping filenames to URIs right now, although that'd be interesting. You could imagine something like FBX2glTF --resource-prefix https://foo.com/assets/textures/

If it's just a bunch of texture files and they're referenced in the FBX, chances are it already works. The current strategy is to take the basename of each texture's filename, and then look for a file with that same basename in the directory where the FBX file is. Thus if the FBX references C:\Work\Birds\Sparrow_diffuse.png, you're doing the conversion on a Mac, and you put a Sparrow_diffuse.png next to the FBX, which can exist anywhere in the filesystem, that should already work right. (In fact, it should match even if you change the suffix to a .jpg).

We handle textures very poorly in non-binary mode at the moment. That's part of what I want to fix.

from fbx2gltf.

robertlong avatar robertlong commented on June 19, 2024

The non-binary support would be nice. Currently it just outputs a uri with textureName.ktx. Instead what is needed is copying the image file into the output directory and setting the proper uri. That would enable .gltf export that references images via uri.

from fbx2gltf.

zellski avatar zellski commented on June 19, 2024

Oh, yes -- that .ktx line is a bizarre holdover from a very early version. I think we agree that leaning on relative paths by simply outputting the basename of the texture's FBX-internal filename should do what you're looking for. We could possibly copy the texture files too.

I'll take a pass at the cleanup in the next day or two, then we can see where we're at; if there is further work you'd like to see at that point, contributions are more than welcome!

from fbx2gltf.

robertlong avatar robertlong commented on June 19, 2024

That would be great, thanks!

from fbx2gltf.

zellski avatar zellski commented on June 19, 2024

@robertlong Take a look at #16 and see what you think.

from fbx2gltf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.