Author Topic: Dynamic object loading  (Read 2131 times)

Offline great_apple_day

  • byte
  • *
  • Posts: 10
    • View Profile
Dynamic object loading
« 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,

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12297
    • View Profile
    • http://www.jpct.net
Re: Dynamic object loading
« Reply #1 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.

Offline great_apple_day

  • byte
  • *
  • Posts: 10
    • View Profile
Re: Dynamic object loading
« Reply #2 on: July 25, 2012, 07:53:17 pm »
Thanks. Unfortunately there are too many models so I have to load them on the fly.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12297
    • View Profile
    • http://www.jpct.net
Re: Dynamic object loading
« Reply #3 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.