Author Topic: D3DPreloadTextures  (Read 1429 times)

0 Members and 1 Guest are viewing this topic.

In FS2_retail, there was a registry tweak (SOFTWARE\Volition\Freespace2\D3DPreloadTextures - DWORD - 1) you could add manually and enable that forced FS2_retail to load as many textures as possible into _VRAM_ during the loading screen of each mission.  This increased loading times but if you had enough video memory the game performance increased.


Now, I just tried using this registry tweak and it doesn't seem like it does anything anymore.


The question is: could preloading the textures into video memory reduce or get rid of the stutters that occur when new objects appear on screen?

I've noticed that everytime the stutter occurs, the texture memory free drops a little.  It seems to me that the textures are being loaded on the fly.

 

Offline Liberator

  • Poe's Law In Action
  • 210
Don't see why it wouldn't.  I don't remember suggesting this and I'll wait to flesh it out, but I don't see why the game couldn't just scan the mission file and preload the textures for all the ships in the mission.  It might stop the stuttering problem altogether.
So as through a glass, and darkly
The age long strife I see
Where I fought in many guises,
Many names, but always me.

There are only 10 types of people in the world , those that understand binary and those that don't.

 
From this link  I found on google




Quote
>It stutters because the engine is loading the textures into vram...the only
>way to avoid this is to preload all your textures into memory first, so that
>they are available for streaming straight away IMO.

Dave is right. One way of accomplishing this is to show all the
textures of the scene in front of the camera when the 3D sprite appears
on the stage (it might be covered with an "initializing..." overlay or
being 1x1 pixel so the user doesn´t notice the trick). That way, the
textures get loaded into VRAM.





So I'm wondering, is it possible to put all the textures found in a level on a giant plane, place it deep enough so the entire thing is visible and then remove it at the beginning of each level before anything else is drawn and before mission time begins?

And if this were possible, it would even better to not have to see this (screen is blanked until it's removed)?


This thread seems interesting too.

I know your coders probably know about these things and already considered them, but I'd feel better if someone came out and said "Nope, already tried it, it doesn't work because of xyz".
« Last Edit: March 26, 2004, 12:25:42 pm by 998 »

 

Offline Sticks

  • 29
Well, I'm not absolutely sure on the details, but it would seem to me that most users would run out of video memory pretty quick.
"Napalm is good as a quickfire solution, literally..." -- cngn

"Shh... [Kazan's] schizophrenia allows him to multitask." -- Goober5000

Why am I still coding at 12:35am?

SCP: Templum sanctus ingeniosus

 
Well, make it an option like it was in FS2_retail.

For me (with a 128MB video card) I never use up all my video memory even at the end of missions, so I'd enable.  Meanwhile, someone with a GF2mx 32MB would turn it off.

 

Offline Liberator

  • Poe's Law In Action
  • 210
Maybe we could just preload textures above a certain size like 128x128 and up.  Everything below that shouldn't take long enough to load to cause a stutter.
So as through a glass, and darkly
The age long strife I see
Where I fought in many guises,
Many names, but always me.

There are only 10 types of people in the world , those that understand binary and those that don't.

 

Offline RandomTiger

  • Senior Member
  • 211
This reg entry has no effect in fs2_open.
I believe the problem you are talking about has been fixed.

 
Really?  When will a test build be up?

 

Offline RandomTiger

  • Senior Member
  • 211
Try my sig version

 
Sorry to say, the sig speech build stutters just as much the 3-23-04 build does. :(


Oh and the bug where the background of a video isn't blanked out?  The resolved one.  Well, if you have an AA mode on, the background isn't blanked out :D :lol:

  

Offline RandomTiger

  • Senior Member
  • 211
OK, Im sorry your stutters arent fixed, I know Bob fixed *a* stutter problem. This must be something else. But I wouldnt waste your time trying to fix it from the outside with reg entries that are dead and gone.

The video problem hasnt been marked resolved, Im well aware of the problem. Its the tradeoff I made to not have the windows switching. Hopefully I will get that fixed up at some point.