Giter Club home page Giter Club logo

Comments (6)

melfnt avatar melfnt commented on June 2, 2024

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.
screen

So why can't webgl-obj-loader load the first .obj I attached?

from webgl-obj-loader.

frenchtoast747 avatar frenchtoast747 commented on June 2, 2024

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.

frenchtoast747 avatar frenchtoast747 commented on June 2, 2024

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.

melfnt avatar melfnt commented on June 2, 2024

Ok, thank you.
Here is how the scaled robot .obj is shown in blender
blender
And here is how is shown if loaded by webgl-obj-loader
tunnel
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.

frenchtoast747 avatar frenchtoast747 commented on June 2, 2024

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.

melfnt avatar melfnt commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.