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

why my image can't loaded?like this,my code,actually display and expected display all show in the blocks #50

Closed
Crise420WMT opened this issue Mar 20, 2017 · 12 comments

Comments

@Crise420WMT
Copy link

display
code
origin

@lilleyse
Copy link
Contributor

Are you able to send the model over?

You can use try running on the major-cleanup branch that is currently in PR #49. It's possible it has been fixed in that branch.

@Crise420WMT
Copy link
Author

image
image
i clone from your tree,then npm install,,,and node bin/obj2gltf.js -i xxx -o xxx,then appear error,and are you sure is correct?

@Crise420WMT
Copy link
Author

i find,when a plane more than 4 vertices,it can't convert,,,did your major clipping-up branch resolved?

@lilleyse
Copy link
Contributor

From above it seems like the npm install may have failed.

Also if you have any problematic models you can upload them to github for me to check.

@Crise420WMT
Copy link
Author

thanks....undering files are the converted gltf file's showing image and the obj file,then you will find,there are some problem.....
Bar Stool 20.zip
toolbar

@lilleyse
Copy link
Contributor

Thanks for sending it over.

I've seen this problem with #33 as well. Right now the code does not support faces that have more than 4 sides.

I'm reopening the issue since it seems like an important thing to consider.

@lilleyse lilleyse reopened this Mar 22, 2017
@Crise420WMT
Copy link
Author

maybe undering link will help you....thanks,waiting for your success
support more than three vertices in one face
[fix this problem] (Fix OBJLoader to support more than three vertices in one face by yqrashawn · Pull Request #10917 · mrdoob/three.js · GitHub)

@Crise420WMT
Copy link
Author

maybe undering link will help you....thanks,waiting for your success
more than 3 vertices

threejs author's answer

@Crise420WMT
Copy link
Author

it is closed? due to my incorrect operation,,, ou my God...how to make it open?

@lilleyse lilleyse reopened this Mar 23, 2017
@lilleyse
Copy link
Contributor

Another thing I noticed about this obj is that the mttllib line looks like:

mtllib Bar Stool 20.mtl

The obj format expects a format like:

mtllib filename1 filename2

So the converter treats each word "Bar", "Stool", and "20.mtl" as separate files to look for. It shouldn't be too hard to detect this case. But this explains why the materials and images aren't working.

@Crise420WMT
Copy link
Author

are you sure another model in correctly obj format has no problem like this?....
the issue about more than 4 vertices is going on,,,,,,i think it almost resolved,but we i devtools,it errors

@lilleyse
Copy link
Contributor

I'm closing this for now and linking to it to a new issue: #55

In the meantime you can use import and export the model from Blender which will turn all faces to triangles or quads.

Also consider fixing the mtl path above: #50 (comment)

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