Jump to content

Importing multiple glb in a row fails


photo

Recommended Posts

Hi,

I'm trying to import at runtime a bunch of GLB files by calling in a loop the code found in the documentation here https://developer.unigine.com/en/docs/2.16/principles/import_system/:

NodePtr import(const char* path) {
	String filepath_node;
	Unigine::Import::get()->import(path, "../data/imported/", filepath_node);
	return NodeReference::create(filepath_node.get());
}

But strangely all imported meshes are the same, as if only one of them was correctly imported!

Strangely, if I use the RAM Importer code found here https://developer.unigine.com/en/docs/2.16/code/usage/custom_import_plugin/index?rlang=cpp then it works correctly, all GLB are correctly loaded. Downside is, they can't be saved with the world because they are actually not part of the data folder.

Can you explain what I am missing with the loop and import?

Thanks!

Link to comment

Hi Stephane,

Some research is required for sure to understand what's going on. Can you show us your full import code or it's not different from the documentation snippet?

Also we do not recommend to use GLB in production, since the overall GLTF format support is not finished yet. Some files can be imported incorrectly or even cause crashes.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

The trivial import code is exactly as presented above, and the ram importer is a copy-paste of your code, so everything is here already. I can attach a project later today maybe, but really all is here.

About GLB: we don't have much choice here, as the files come from a 3rd party in a encrypted zipped format which is uncompressed at the last moment, right before the import in Unigine. But the GLB itself is really simple, no fancy features (mesh+UV+textures only, no animation).

Side note: it would be great to have a GLTF/GLB importer on the same level as FBX, as all our other tools use preferably this format.

Thanks!

Link to comment

Btw, have you tried to import each file to a separate directory? All the GLTF files have the same 'scene' node inside, so maybe you simply have a naming conflict?

Currently we don't see any big interest in this format from our customers, so it's still in experimental stage.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
3 hours ago, silent said:

import each file to a separate directory

That was the issue! THANKS!

In insight, of course importing all glb to the same folder would have them overwrite each other! duh!

3 hours ago, silent said:

we don't see any big interest in this format from our customers

Well, you have at least one who is interested ;-)

  • Like 1
Link to comment
  • 3 weeks later...
1 hour ago, feheim said:

With us it's at least two :)

Three ;)

The Q is how the format is developing.

In general it is fantastic to have a unified 3d format, which is also 'native' to web.

The endevour to get a 3d standard equal to an image format should be rewarded.

We used it for web GL which worked well, but y not use it as a basic 3d exchange format.

Best.w.

Edited by werner.poetzelberger
Link to comment
×
×
  • Create New...