Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
135 stars 2 forks source link

GLTF files cannot be imported from a URL #1439

Open mpmxyz opened 7 months ago

mpmxyz commented 7 months ago

Describe the bug?

The import fails with the exception:

System.IO.FileNotFoundException: Filename was null or could not be found
File name: 'https://url.to/yourmodel.gltf'
  at Assimp.AssimpContext.ImportFile (System.String file, Assimp.PostProcessSteps postProcessFlags) [0x00038] in <7e53397f07634bd4a82045a52af1df86>:0 
  at FrooxEngine.ModelImporter+<ImportModel>d__6.MoveNext () [0x006fe] in <4293c2ca5df04ad4996124d8e04cd024>:0

To Reproduce

  1. Paste URL to gltf file into Resonite
  2. Try to import it as a 3D model (fails with exception)
  3. Download the model
  4. Paste file into Resonite
  5. Import it as a 3D model (works)

Expected behavior

Import from URL should also work.

Screenshots

No response

Resonite Version Number

2024.3.1.1178

What Platforms does this occur on?

Windows

What headset if any do you use?

Desktop

Log Files

ANONYM - 2024.3.1.1178 - 2024-03-03 16_16_26.log

Additional Context

I have not tried to load other formats this way. So it may not be limited to GLTF.

Reporters

No response

shiftyscales commented 7 months ago

This seems like it may be expected behaviour- I'm fairly certain assimp is operating on the assumption that you provide it a local file/directory rather than something web-based.

I did a quick test and found that it will throw up the import prompt even if the directory is nonsense. E.g. pasting https://www.google.com/gltf.gltf into Resonite will also bring up the import dialog.

Using a local directory when pasting from the clipboard will work as intended.

So it seems that we'd either need one of the following:

Seeking feedback from @ProbablePrime or @Frooxius.

Frooxius commented 7 months ago

We just need to add mechanism to handle this and either download and proxy the file access.

It might take a bit, because often there can be multiple files that might be discovered as the import happens.

shiftyscales commented 7 months ago

Re-categorizing the issue accordingly, thanks.