-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
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
Improving art pipeline through assimp2json #3565
Comments
Sounds good to me! Anyone up for writing a loader? |
Hi, I'm one of the assimp developers and I'm also the guy who wrote Assimp outputs a whole scene (with hierarchy, transformations, animations etc). From what I've seen, the Three.js mesh format only supports meshes? Is there any official way of storing scenes or is that only possible at runtime? If such a format exists, I could, instead of going json2json (or writing a runtime loader for assimp2json's format), simply write a dedicated assimp2whatever tool that does it directly. I've been doing some experimenting with efficiently storing mesh data for use with WebGl lately (for my own 3D framework https://github.com/acgessler/medea.js), and I think moving away from pure JSON and using a mixed, streamable representation (JSON to put parts together, binary files to efficiently store 3D data chunks) could also be an option - is there any interest in pursuing that with Three.js and assimp as converter? |
I've been working on such format (easiest way to see the output is to File/Export Scene in the editor), but I've yet to figure out animation, bones and so on... I think writing a runtime loader for assimp2json's format is the best bet right now.
I think that's what also the way glTF is going. |
Ok, then I'll put together a runtime loader. I didn't know about glTF - it seems very interesting and very related, I am just a bit worried that it will become as over-specified as Collada has become. |
Added PR for this. |
So we'll have a universal asset import system soon? Sounds awesome. How many formats does this cover? |
The ones listed here: https://github.com/assimp/assimp Assimp2json is not quite "there" yet though - in a long term run, I'm thinking about adding some content processing system that also collects textures, sanitizes texture paths and file names, re-scales them to be square, generates LOD versions of them ... but this is a first step, doing only the raw whatever-to-json conversion. Assimp itself was always built to fit the needs of game engines and game editors: importing 3D data, cleaning it up, generating utility data ... preprocessing models for use on the web is a topic we haven't been exposed to yet, so I guess there's lots of things we can improve on :-) |
should this be closed as http://threejs.org/examples/#webgl_loader_assimp2json is there? the gltf-like binary optimized things are different but i suppose good to discuss separately exactly for that reason, or? can be continued here of course too, just figured to note in case this had just been forgotten open after the loader was made etc. |
Ah yeah, I think it can be closed :) |
Actually, now that I look at it. It could be nice to add some metadata to the json so we can figure out it's a assimp2json file at load time. |
yes metadata is good. also, i've found file extensions useful. .. am currently calling my assimp2json file .. tada, myfile.assimp2json :) also the gltf folks accepted my proposal to change the file extension from .json to .gltf (I had trouble separating three json and gltf json in our loader system otherwise, was easy like that), KhronosGroup/glTF#260 |
nice! I also like that it's now in one file. |
Yes, I think it'll be good to have a dedicated extension for assimp2json also. I can update assimp2json itself as well as the three.js sample. |
On a somewhat related note: @mrdoob is there an official extension being considered for |
I think having metadata in the json is more important though (reasoning below)...
The reason behind using I've been using this kind of extensions for another project: |
OK, thanks for the clarity on that one. Everyone I turned on to |
@acgessler :) i'm not sure yet, mrdoob's points are good too, was thinking of those back then also when discussed with the gltf folks. however the parallel to collada-xml being
|
I would suggest |
afaik the additional complexity here is that assimp has some other json format (assimp json or so), and this format is just assimp2json project's own json format for assimp's internal structure - right? |
Oh! Why not just load that other assimp json format instead? |
No worries - there is only one assimp JSON format as far as I know. I wrote assimp2json before we added an export API to assimp itself. It is on the mid-term plan to make the JSON exporter a part of the core library, though.
|
That's why I was suggesting the metadata bit. Something like this...? {
"metadata": {
"format": "assimp"
}, |
oh ok good, i was misinformed earlier about there being another assimp json besides this. as said i'm all for the metadata but suspect that unique file extensions are still useful too. at least our current loading code (in WebTundra) depends on the extensions to pass to different loaders. don't know if we could sensibly refactor that to peek in the file instead. seems nicer to be able to choose the loader before opening the file, no? is afaik useful with images similarily -- three.js separates e.g. btw the so i don't know what a good extension to assimp2json would be (if not just |
As an update, I've updated assimp2json to use I'll follow-up with a PR to update the threejs sample. |
Nice! |
ok, i figure will rename my files when touch those the next time :) .. and that probably is fine for supporting in our asset loader which depends on the extensions to pass the data to handlers. so thanks for providing a unique one! |
I just stumbled upon assimp2json that dumps Assimp's datastructure of a 3d asset to a JSON-file. Considering how complicated it was for me for a university project to get animations properly exported and how often questions related to the blender exporter pop up, I thought it would be worth suggesting a (assimp)json2json converter to ease up the export pipeline.
The text was updated successfully, but these errors were encountered: