www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: great_apple_day on May 05, 2012, 11:28:28 am

Title: Dynamic object loading
Post by: great_apple_day on May 05, 2012, 11:28:28 am
Hey guys,

I've got a couple of MD2 files with simple animation. All I want to do is to load the models based on the
AR marker. For instance if the AR tracks an apple picture I want to load the "Apple.md2" and if it changes
to banana picture the model needs to be changed to "Banana.md2".

AFAIK loading all the model at the beginning seems impractical. What is the best approach to load models 
dynamically at runtime?

Should I load all of them at once and try changing the visibility on the fly?

Thanks in advance
Best,
Title: Re: Dynamic object loading
Post by: EgonOlsen on May 06, 2012, 12:55:01 am
Should I load all of them at once and try changing the visibility on the fly?
If the memory permits this, it might be the best solution.
Title: Re: Dynamic object loading
Post by: great_apple_day on July 25, 2012, 07:53:17 pm
Thanks. Unfortunately there are too many models so I have to load them on the fly.
Title: Re: Dynamic object loading
Post by: EgonOlsen on July 26, 2012, 07:19:04 am
Then load them in another thread. Just make sure that you don't add them to the world in that thread but in the render thread.