PDA

View Full Version : Blender .obj 3D models to Vizard 5


VirtuallyInsane
10-13-2014, 09:58 AM
Hello everyone,

just ran in to some problem when using my usual routine of loading 3D models into Vizard. I use Blender, export as .obj wavefront (with textures, tried both .png and .jpg format) and load them into Vizard as either .obj or .osgb (via 3DS Max).

This worked like a charm with Vizard 3 and 4, however the textures won't load in Vizard 5 (tried with little test file attached as .zip). The textures won't load both if I load the model with viz.add() in the engine or have a peek using the Inspector.

I'm not quite sure whether there might be some trouble with Blender .objs or I am doing something completely wrong...:D or should I switch to 3DS Max entirely :)

Many thanks and best regards!

Alvin

farshizzo
10-13-2014, 11:10 AM
Thanks for providing a sample model!

I just tried it out, and strangely the texture loaded fine when running the script, but failed to load when opening through Inspector. We'll have a look into this and report back.

farshizzo
10-13-2014, 11:32 AM
I noticed the .mtl file you provided references the texture in a "textures" sub-directory. Try creating a "textures" directory in the same directory as the .obj file and move the textures into the sub-directory. I believe this should fix the issue.

VirtuallyInsane
10-14-2014, 12:36 AM
Thanks a lot for looking into this, and I am happy to hear it works on your Vizard 5 computer!

I still have the problem, irrespective of whether correct relative paths are used for textures in the .mtl file...

I'll activate Vizard 5 (still in Trial Mode) and try on a better computer maybe that helps!