We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello all,
I am trying to use free 3D obj models from here
but I always get this Unsupported formate: name.obj
please help...
Chrisir
PShape s1;
void setup() {
size (900, 900);
println (displayWidth);
println (displayHeight);
s1 = loadShape( "ShuttleNew2.obj" );
}
void draw() {
shape (s1, 333, 333);
}
Error I get:
1600
900
Unsupported format: ShuttleNew2.obj
Answers
Your link points to a list of mostly
.blend
Blender files. There is no file namedShuttleNew2.obj
listed in the site search.Could you please give a specific example of a file that is causing you problems? No way to guess based on your link or code.
I haven't tried blender, only obj
ok, I tried about 5 different obj
https://opengameart.org/content/shuttle-2
https://opengameart.org/content/hextraction-base-player-pod
https://opengameart.org/content/low-poly-biplane
new approach
in fact instead of
loadShape
I tried saitoloader now but I haven't managed to apply the texture.I used this:
https://opengameart.org/content/low-poly-biplane
Hmm. The first line of your example obj file is
...that links to a materials file that doesn't exist, and doesn't seem to be part of the download you linked. If you comment out that line then the shape loads fine, although it is gray.
Oh, see this old recent discussion about mtl loading being broken in 3.x -- might be relevant:
Edit: ...although I just noticed that post is for Android Mode
Thank you!
Apart from mtl, how would I apply a color or texture?
Unfortunately I am out of my depth there -- I don't do a lot of work with objs. Perhaps @codeanticode might now?
ah, thanks to you, I am making progress here.
one of the mistakes I had was to use
size()
withoutP3D
.... but the error message didn't show that...https://opengameart.org/content/low-poly-biplane
This model comes now with its texture:
Another model - even more simple:
great!