Comments (6)
Update: I opened my .obj in Blender, and it shows up correctly. Then I exported it in .obj and I got this:
bb8_exported.obj.zip
Now, I can see the robot but it's too big, I'll resize it in some way.
So why can't webgl-obj-loader load the first .obj I attached?
from webgl-obj-loader.
I'm not sure why the Blender exported OBJ model appears to be doing better than the 3DS Max exported file. The order in which the "v", "vt", and "vn" lines appear doesn't matter as long as they are grouped with their appropriate "f" section. The only thing that appears different between the two files is the the 3DS Max OBJ file contains a lot more material information; this may somehow be affecting the parser.
from webgl-obj-loader.
I will try to take a look at this as soon as I can, but for now at least you have a workaround of loading the OBJ file into Blender and re-exporting.
from webgl-obj-loader.
Ok, thank you.
Here is how the scaled robot .obj is shown in blender
And here is how is shown if loaded by webgl-obj-loader
The sphere it is sort of roughly approximated by disjoint triangles, is it normal?
And what about the "non well-formed" errors?
from webgl-obj-loader.
Hmm, I know for sure that I saw faces (f) with more than 3 vertices (usually there were 4). The loader currently only supports a maximum of 4, so maybe there are some faces with more than 4?
There is an issue (#25) to support N-gons, but it hasn't been worked yet.
Try exporting the model in Blender again, but this time select the check box for triangulating the faces. This will force the output to have exactly 3 vertices per face.
I will also have to check out the "non well-formed" errors.
Thanks for reporting this and for all of the detailed information!
from webgl-obj-loader.
Ok, thank you: with triangulated faces it show up perfectly. Now I can use it.
The only remaining problem is load the downloaded .obj, but the blender re-exporting workaround works just fine for now.
from webgl-obj-loader.
Related Issues (20)
- Documentation / Example for materials HOT 3
- Add support for calculating tangents and bitangents HOT 1
- development example dosen't work well. HOT 1
- Texture bug HOT 1
- version is undefined and OBJ is undefined HOT 2
- UV layout, error in the code. HOT 2
- Missing TypeScript header file HOT 4
- Add submesh support HOT 2
- Clarify attribute indexing documentation HOT 5
- Update triangulate() to provide a better triangulation algorithm
- error HOT 3
- 'window' is not defined in node.js HOT 4
- I get "" in filename on the sponza HOT 2
- Wrong parsing when faces is quade with uv HOT 2
- Write better tests for triangulation HOT 1
- Layout.SPECULAR_EXPONENT Attribute size
- error TS2307: Cannot find module 'webgl-obj-loader' HOT 5
- DownloadModels() use. HOT 3
- how do I load a model in webgl2 with multiple material/objects?
- Threejs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webgl-obj-loader.