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

Path issue #112

Closed
octopoulos opened this issue Nov 9, 2021 · 7 comments
Closed

Path issue #112

octopoulos opened this issue Nov 9, 2021 · 7 comments

Comments

@octopoulos
Copy link

The Example1 doesn't work:

            model.SaveAsWavefront("mesh.obj");
            model.SaveGLB("mesh.glb");
            model.SaveGLTF("mesh.gltf");

The SaveAsWavefront method doesn't check for folder names the same way as SaveGLB and SaveGLTF, and actually it saves the obj file just fine, but the glb and gltf are not saved because the folder names becomes "" which triggers an exception with an invalid path.

So, what works here is to use "./mesh.glb" and "./mesh.gltf":

            model.SaveAsWavefront("mesh.obj");
            model.SaveGLB("./mesh.glb");
            model.SaveGLTF("./mesh.gltf");

I just thought I should let you know that there is an inconsistency here between obj and glb/gltf.

Also, for Example1, I couldn't use the default .NET Core 2.2 because it's not longer available for download, so you might want to change that default value too.

@vpenades
Copy link
Owner

vpenades commented Nov 9, 2021

Hmm... which version of the library are you using? NetCore2.2 was removed from the sources a while ago.

Regarding the paths.... I guess you're refering to the Example1 project? I've just run it as is and it worked just fine, so I would need more information: again, which version of the library are you using, which exception throws, at which line.

@octopoulos
Copy link
Author

Strange.
I just downloaded the master source code as a zip file, shall I do it differently?

Here, I'm using the glb without the ./ and it triggers this exception:
image

@vpenades
Copy link
Owner

vpenades commented Nov 9, 2021

It should not be different downloading as a zip or cloning.

It's failing in the Guard.DirectoryPathMustExist(...) which is weird. Could you log the system.Environment.CurrentDirectory ?

@octopoulos
Copy link
Author

octopoulos commented Nov 9, 2021

Okay I found the issue. You can close this issue.

I did a git clone and it worked fine, and then I downloaded the zip again and it worked fine.
And then I checked my downloaded files and I guess I downloaded the wrong version the first time, it's because I found about this project through a forum post, and that post linked to a specific version, which is probably quite old (2020-04-14).

Sorry for this.

@vpenades
Copy link
Owner

vpenades commented Nov 9, 2021

Good to know

Out of curiosity, could you point me to that forum link?

@octopoulos
Copy link
Author

Sorry, I can't find the forum link anymore, but it linked to this issue: #43, which links to the version from 2020-04-14, and from there, I clicked on "Code" and then download zip, but if I try now, it points to "master" so I'm not sure what I did!

My goal was to find a 3d format that allows to have a binary file with interleaved vertex attributes, because I work with such objects and sometimes I'd like to export them for debugging purposes, so I was looking at GLTF for that, and it seems like this format can handle it.

@vpenades
Copy link
Owner

vpenades commented Nov 9, 2021

Yeah, although it seems lately most people preffers non interleaved vertex formats, glTF does support it and so does SharpGLTF.

@vpenades vpenades closed this as completed Nov 9, 2021
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

2 participants