But got the error “vortex index out of range”. I ended up downloading blender, importing the model and exporting it with some changes to try, and now the console does not return any error but it looks like it’s nothing there
It’s just a blank canvas. I tried zooming in and out, and rotating the camara (because i thought maybe it’s there but the camara is not focusing the model) but didn’t work.
Any ideas?
Edit: I tried using another downlaoded model, a plant and it works (just that it renders the object pure white). I noticed a high size difference (16mb the devil model to 94kb the cactus model), could that be the problem? the file is too big to render?
Details about your model and the code that you use to load it would be helpful to help you the easier you make it for someone to check this out, the better the chances are that somebody actually takes the time.
Things like attaching your model file, and neatly posting your relevant code (likely ofApp.h and ofApp.cpp) can help. I see that you show the model, but don’t think i can download the model without an account from sketchfab.
Without your code and the model, it’s harder to guess. “Vertex index out of range” means that your application tries to access a vertex that is not there. Let’s say your model has 10 vertices (points) and your code says “give me vertex with index 11” … It breaks. Actually already index of 10 will break it. Very often it can be confusing for beginners that indices start from 0, and the 10th vertex has an index of 9. Not sure if this is happening here though.
Sidenote: 16MB should not be a problem. If you care about performance though, you could optimise the model in sth like blender.
I share a google drive folder because here i get a prompt that i can’t upload files because its a new account. Both .obj says “vertex index out of range” and the other formats like .ply, .dae and .fbx returns an error
exception Microsoft C++: DeadlyImportError in memory location 0x0019F718.
exception in 0x770274F1 (ntdll.dll) en TP Final - POAM2 - Di Maria_debug.exe: 0xC0000005: Infraction on reading the location 0x0AF5901F.
I used this video as reference to make the imports
EDIT: Hi ! I was able to load the devil 3d object, i ended up importing the model to blender and using a decimate modifier to lower the polygon count to 0.25. However i tried to do the same with the astronaut model which is a mesh of 3 parts (upper body, intestines and lower body) and i get the error OBJ: Invalid number of components. Any tips on that? I uploaded the filed to the drive
Thanks
We just updated the 3D model loading ( via assimp ) in the nightly builds. It adds a lot more formats (FBX / glTF / Blender ) and fixes a lot of issues with existing formats. Can you try the nightly build at the bottom of this page: download | openFrameworks ?
If you run the assimpExample you can drag drop files into the window and it should load them.
If that works then you should be good to go
Hi, I will try to install it and use it. Right now when i’m trying to import the .obj file, i get the error [ error ] ofxAssimpModelLoader: loadModel(): OBJ: Invalid number of components
Edit: I tried using the nightly build. It loads a lot faster. With formats like dae, i bypassed the error
exception Microsoft C++: DeadlyImportError in memory location 0x0019F718.
exception in 0x770274F1 (ntdll.dll) en TP Final - POAM2 - Di Maria_debug.exe: 0xC0000005: Infraction on reading the location 0x0AF5901F.
But keep getting the error invalid number of components
Hi sorry for the late response. I don’t know why after i changed the line and restarted the visual studio, i keep getting 372 errors on assimp64.lib. I even tried creating new blanck proyects, and deleting the nightly build and extracting it again but no response. All errors have code LNK2038. Before i downloaded the nightly build, i had a 2017 open frameworks package, and there i don’t get this errors. However i keep getting the ofxAssimpModelLoader: loadModel(): OBJ: Invalid number of components. I’m trying to find a solution to this. When i get the nightlybuild to work again, i will test the change of line you proposed
I use visual studio 2019, but when i create/update a project with the project generator from openFrameworks, it always says “Platform: Windows (Visual Studio 2017)” and it’s disabled
So in VS2019 does the assimpExample work ( without using the project generator )?
We still use VS2017 templates currently in the nightly builds so when you open an example for the first time it should ask you to covert the project to 142 (VS 2019). But everything should just work with VS2019 apart from that prompt.
If i try to do anything with the nightly build, i get 300+ errors. And i’m already using VS 2019 there, so i don’t know. I’ve been trying things for the last 7 hours
Super glad it worked for you and sorry it was such a slog.
Your model actually got me to fix a bunch of things that I believe will solve a lot of other people’s issues too. So thanks for raising this issue and helping test these new changes.
The Debug fix might take a little bit longer but the import model changes should appear in the nightly builds by Friday.