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

provide option to load models from KMFs directly #429

Open
Trass3r opened this issue Apr 15, 2023 · 1 comment
Open

provide option to load models from KMFs directly #429

Trass3r opened this issue Apr 15, 2023 · 1 comment

Comments

@Trass3r
Copy link
Collaborator

Trass3r commented Apr 15, 2023

#409 (comment)
#409 (comment)

The ModelViewer class already does this when directly given a kmf file:

if (kmfModel != null) {
try {
KmfFile kmf = new KmfFile(kmfModel);
KmfModelLoader loader = new KmfModelLoader();
KmfAssetInfo asset = new KmfAssetInfo(assetManager, new AssetKey(kmfModel.toString()), kmf, false);
Node node = (Node) loader.load(asset);
setupModel(node, false);

But not when loading from the list of models.
Would also be helpful for development to skip the whole conversion process on every iteration.

@Trass3r
Copy link
Collaborator Author

Trass3r commented Nov 23, 2023

@tonihele Maybe it should simply fall back to loading the KMF if the converted model is missing (and the cache is considered to be "up-to-date").
That would allow deleting them locally for faster iteration on the implementation.

One could also allow other model formats like gltf with the same model basename.
That would be more useful for asset replacement than .j3o for the reasons laid out in #409 (comment).
Should probably be combined with a kmf->gltf exporter. The .j3o is not useful in general it seems. Also when it comes to speeding up the loading.

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

No branches or pull requests

1 participant