How to load 3D Model in FireMonkey at run time

999 views Asked by At

I could load 3D model by property meshCollection, just like Importing a 3D Model in a FireMonkey Application .

But it could not load model by Model3D->LoadFromFile("filepath.obj")

I try a lot of time, but it still not work!

Is it a bug for Firemonkey XE4?

2

There are 2 answers

0
Vitaliy On

Did you connect the module FMX.OBJ.Importers? Loading doesn't work without it.

2
Ludo Stroetenga On

for C++ builder you need to include the

#include <FMX.OBJ.Importer.hpp>

for dae and ese you should look for

FMX.DAE.Importer.TDAEModelImporter
FMX.ASE.Importer.TASEModelImporter

see also delphi2010.ru/firemonkey-на-практике-5/ for a example in delphi