Ok, I think I need to start again from scratch. I went deeper in understanding various how Texture Streaming has been implemented by now and I really need to understand *what* do you want to be implemented in the OGRE engine.
I assume you'd like something like this:
http://www.youtube.com/watch?v=i78RQPg7dzE , watch at 00:27 .
If this is what you can see in the video, I think memory management is something I have to think a lot. As I can understand by now, this is the most challenging point. Having to load/unload lots of textures may be very stressing for the system. Many strategies could be used:
- Loading all the lowest details MIPS of the scene to have something ready to display, and load dynamically the higher mips basing the decision on the distance from the camera and what is on/off screen
- Load the lowest detail MIPS, and then replace them all with the higher detail mipmaps asap, disregarding of whether these MIPS are actually needed or not
I assume that we choose the first options; this causes memory management problem, basically on about *what* texture do we have to load and *when* can we unload a texture. The problems are:
- Do we always have to keep the lower MIPS in memory, or do we have do discard it when they're no more needed?
- What is the priority of loading the higher level mips? I think that the on-screen objects should have priority, even if the "texture popping" is annoying
- When can I delete a MIP? More specifically: do I have to discard it as soon it no more needed to minimize memory occupation, or do I have to keep a "garbage collector" of the recently used MIPS and reuse them if needed, in order to minimize disk access?
I think that we need to keep the lower MIPS and, I will hate this words if I have to implement it, an efficient garbage collector has to be implemented. Wasting a texture that could be requested 10 ms later is no sense - a good garbage collector is a must to do texture streaming the right way. So, I think that this could be the most difficult part of the feature - making
quick garbage collection is not easy, and selecting which MIPS are to be deleted first doesn't seem very easy too.
About the OGRE Resource system questions, I think I have to think more. Let me analyse the OGRE code and documentation deeper and I can give you an answer.
I personally think that texture must be displayed on screen ASAP, prioritizing texture inside the camera view to give the user the better detail possible; "texture popping", as some user describes it, may be annoying if is present all throughout a game, but I think if it's limited to the first 10-15 second of the game experience it is acceptable. Popping could be made less annoying using shaders or fading to make the changes less evident to the eye of the user.
Last but not least, I asked my 3D graphics professor for support for my eventual Google Summer Of Code and he said he can help me, on whatever I need. He already known well the OGRE3D engine and he seemed interested to the whole thing.
Can I ask you another thing: How do I have to make my proposal to OGRE3d? Can I see some document from older GSoCs to see how things went in the past years? I've already read the old threads but I always hope to see something more
Thanks,
Red