Preloading Objects

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
Chillfaktor
Gnoblar
Posts: 1
Joined: Wed Feb 27, 2019 4:46 pm

Preloading Objects

Post by Chillfaktor »

Hi Folks! :D

I'm actively developing a small Game with the Ogre Engine, with the "Managed"-Ogre (MOgre) Library to be exact.

In my Case, I want to generate a "Level", basically containing 50x50 Tiles of Levelspace. Thats mathematically seen 2500 Wall-Objects at its Maximum, minor the Pathways. In addition to that, we have a Blanket and a Floor Tile on each Spot with no wall, so that once the Level is loaded - we have about 3000-3500 Objects in Scene. I don't wanna get into the details about Spawning Items, Enemies, etc. - but you can guess that a completely Loaded Scene has about 5k-7k Objects in the end. :shock:

Well, to get to the Point I want to mention and ask for, is the waiting time of about 2-3 Minutes to get all of this Objects into the Scene. Everyone playing a game up and once knows - thats pretty much too long to "play a round".
I in fact do preload the meshes and stuff by regularly initialize the Ogre ResourceManager. I know that Ogre has the Objects in its memory, due to the fact that I am able to delete the Assets after initializing, and anyway I'm able to load more Objects into the Scene after deleting them. ("So what's taking so long!?") :?
I read some stuff about that. Two steps have to be done to get Objects into the scene they said - first it has to be loaded from the Harddisk - well, done. The Initialisation of the ResourceManager takes like nothing. The second step is to get the Object into the Videocards-memory - I'm not sure about that point, where this happens. It's some interesting information, but nothing of this helps me here in the first place.

I tried to achieve my goal by using another approach: I'm currently creating about 500 Walls and 100 Blankets/Floors into the scene right after starting the Program - and use them as a base for each level by just reposition them - but to be honest, that takes really nearly the same time, so that I'm at a point where I'm generally confused if I'm doing something wrong in general... :roll:

Perhaps anyone could give me a hint of another approach, or post some kind of Thread-Link where I can read some other stuff about that - that would be fine!? :mrgreen:

EDIT:
I just read something about Ogre v1 and Ogre v2 - I didn't know about that. The days I downloaded the MOgre Library was before that. In the of the Versions it is written, that the Ogre v1 Engine (wich MOgre was build up on I guess) just supports up to 1000 Objects with good Performance. That should explain the circumstances... Nevertheless - I don't find a NET Wrapper for the v2 Version. In case of "not existing" some ideas to make this realizable would be nice. In case of an existing wrapper - where the hell do I download the library!? :cry: :mrgreen:

Chillfaktor
rpgplayerrobin
Gnoll
Posts: 619
Joined: Wed Mar 18, 2009 3:03 am
x 353

Re: Preloading Objects

Post by rpgplayerrobin »

You can take a look at my game, I can load a map of 1000+ objects within 2 seconds, and I have not really optimized it that much (many of those objects even has ragdoll using their skeleton, which is also set up).

What kind of 3D models are you using? Do you have 3000 different mesh objects, or just 3000 objects using like 20 different mesh objects?

2-3 minutes sounds REALLY off. Something is clearly wrong with your creation step.
If you want to fix it, I could probably help, but I would need your creation code that takes 2-3 minutes as you mentioned.
Post Reply