Asset Streaming
-
- Goblin
- Posts: 253
- Joined: Sat Sep 28, 2013 3:46 pm
- x 10
Asset Streaming
I' ve talked about a level splitting system in an earlier thread:
http://www.ogre3d.org/forums/viewtopic.php?f=1&t=79605
Now i have come to the point of asset streaming. So I have to implement some sort of dynamicly destroy and load models, textures, moterials.
Heres the theroy again:
The mplayer can move from zone to zone. when he enters a zone, all of its neighbouring zones and their neghbours are loaded. All others are unloaded. Each zone contains objects (Entitys) that have a mesh, that needs to be destroyed or loaded.
All the Zones objects and ressource lists will be present in the momry at all time. So their positions and properties remain the same.
So whats the best way to go about this.
Here are all the necessary features:
How can I load Ressources in the background while the game is running, and get a callback as soon as its done?
How do i remove assets from the memory?
How do i remove materials from the memory?
Is Ogre actually completely threadsave for that? (I know it has threadsave loading, but does destroying also work?)
And just to make sure:
Did someone already try something like that and could he borrow me the code?
http://www.ogre3d.org/forums/viewtopic.php?f=1&t=79605
Now i have come to the point of asset streaming. So I have to implement some sort of dynamicly destroy and load models, textures, moterials.
Heres the theroy again:
The mplayer can move from zone to zone. when he enters a zone, all of its neighbouring zones and their neghbours are loaded. All others are unloaded. Each zone contains objects (Entitys) that have a mesh, that needs to be destroyed or loaded.
All the Zones objects and ressource lists will be present in the momry at all time. So their positions and properties remain the same.
So whats the best way to go about this.
Here are all the necessary features:
How can I load Ressources in the background while the game is running, and get a callback as soon as its done?
How do i remove assets from the memory?
How do i remove materials from the memory?
Is Ogre actually completely threadsave for that? (I know it has threadsave loading, but does destroying also work?)
And just to make sure:
Did someone already try something like that and could he borrow me the code?
- c6burns
- Beholder
- Posts: 1512
- Joined: Fri Feb 22, 2013 4:44 am
- Location: Deep behind enemy lines
- x 138
Re: Asset Streaming
There's a paging component specifically for this purpose. I believe it's used in conjunction with terrain in the endless world sample.
-
- Goblin
- Posts: 253
- Joined: Sat Sep 28, 2013 3:46 pm
- x 10
Re: Asset Streaming
I actually don't plan to use any sort of terrain. (At least mot now)
I just wanted to make sure that Ogre supports asset streaming and if something like was already done.
But thanks anyway, maybe i change my mind about terrain.
I just wanted to make sure that Ogre supports asset streaming and if something like was already done.
But thanks anyway, maybe i change my mind about terrain.
- c6burns
- Beholder
- Posts: 1512
- Joined: Fri Feb 22, 2013 4:44 am
- Location: Deep behind enemy lines
- x 138
Re: Asset Streaming
The paging component is independent of the terrain component and supports 2d and 3d strategies. You can also find a (much less robust ... 2d only) paging system in the PagedGeometry addon.
-
- Goblin
- Posts: 253
- Joined: Sat Sep 28, 2013 3:46 pm
- x 10
Re: Asset Streaming
OK, i'll have a look at it.
- tod
- Troll
- Posts: 1394
- Joined: Wed Aug 02, 2006 9:41 am
- Location: Bucharest
- x 94
- Contact:
Re: Asset Streaming
Paged Geometry is a different concept to Ogre paging I think.
Paged geometry batches together entities and only renders the ones close to the camera. The ones far away can be rendered as billboards, but I got nowhere with them, as most of the time they are positioned wrong. It is only good for immovable objects, and it is designed for large, but not infinite worlds.
Ogre paging, afaik, lets you load and unload pages of entities, or game object, or whatever, as it is just a framework.
Paged geometry batches together entities and only renders the ones close to the camera. The ones far away can be rendered as billboards, but I got nowhere with them, as most of the time they are positioned wrong. It is only good for immovable objects, and it is designed for large, but not infinite worlds.
Ogre paging, afaik, lets you load and unload pages of entities, or game object, or whatever, as it is just a framework.
-
- Goblin
- Posts: 253
- Joined: Sat Sep 28, 2013 3:46 pm
- x 10
Re: Asset Streaming
Can you give me a link?
I only found terrain stuff.
I only found terrain stuff.
- tod
- Troll
- Posts: 1394
- Joined: Wed Aug 02, 2006 9:41 am
- Location: Bucharest
- x 94
- Contact:
- c6burns
- Beholder
- Posts: 1512
- Joined: Fri Feb 22, 2013 4:44 am
- Location: Deep behind enemy lines
- x 138
Re: Asset Streaming
Totally different, I just mean it has an implementation of 2d grid paging within it. The paging component is better.tod wrote:Paged Geometry is a different concept to Ogre paging I think.