Jump to content
Sign in to follow this  
Pilot53

FSX VAS Testing - Memory Leak Fix Found

Recommended Posts

737_i_Fly.png

 

FSX_1.png

 

FSX_2.png

 

NVI_DX10.png

 

I never posted images before. Here are my settings in DX10. There are more, I do know that. It is just to give you an idea and the picture with the iFly is not for presentation how nice everthing is, but not bad.

Fixer setting is now 8xCSAA.

 

Free VAS is about 1350 MB. I need a longer flight to see how it behaves. I saw it freeing space also. On apron it was about 1450 at AS Mega EHAM.

Share this post


Link to post
Share on other sites

The FSX default B737 file b737_800_1_T.dds is 1366 kb and 2047 by 1024 pixels with 8 mipmaps,. The version without mipmaps is 341 kb and 1024 by 1024 pixels.

 

The mipmapped version is 4 times as large so should need more VAS.

That's not how mipmapping works. Yes, a mipmapped texture file will always be larger than the non-mipmapped texture, because it contains multiple versions of the same texture sheet at multiple resolutions.... BUT, the graphics engine does NOT load the entire texture into working memory - it extracts and uses whatever size texture is most appropriate to render the textured object, depending on how distant the object is at a given moment. The point is to use the smallest texture that will still permit the object to render properly at at its current distance

 

It is kind of like extracting a single file from a zip archive containing multiple files. All unzipping programs can do this, without having to decompress the entire archive first. The graphics engine treats a mipped texture file in similar fashion.


Jim Barrett

Licensed Airframe & Powerplant Mechanic, Avionics, Electrical & Air Data Systems Specialist. Qualified on: Falcon 900, CRJ-200, Dornier 328-100, Hawker 850XP and 1000, Lear 35, 45, 55 and 60, Gulfstream IV and 550, Embraer 135, Beech Premiere and 400A, MD-80.

Share this post


Link to post
Share on other sites

 

 


That's not how mipmapping works. Yes, a mipmapped texture file will always be larger than the non-mipmapped texture, because it contains multiple versions of the same texture sheet at multiple resolutions.... BUT, the graphics engine does NOT load the entire texture into working memory - it extracts and uses whatever size texture is most appropriate to render the textured object, depending on how distant the object is at a given moment. The point is to use the smallest texture that will still permit the object to render properly at at its current distance

It is kind of like extracting a single file from a zip archive containing multiple files. All unzipping programs can do this, without having to decompress the entire archive first. The graphics engine treats a mipped texture file in similar fashion.

 

That's interesting.  I'd pin this info too...very, very useful.


Gregg Seipp

"A good landing is when you can walk away from the airplane.  A great landing is when you can reuse it."
i7-8700 32GB Ram, GTX-1070 8 Gig RAM

Share this post


Link to post
Share on other sites

 

 


That's not how mipmapping works...

 

I was not talking about how the Graphics Engine and how it loads particular mipmaps to display them, but the fact that the file still has to contain the mipmaps.

Share this post


Link to post
Share on other sites

The FSX default B737 file b737_800_1_T.dds is 1366 kb and 2047 by 1024 pixels with 8 mipmaps,. The version without mipmaps is 341 kb and 1024 by 1024 pixels.

 

The mipmapped version is 4 times as large  so should need more VAS.

Not even close to the truth, Gerry.

 

You got the weight correct for the default texture yet the size is 1024x1024 pixels and there are 9 mips.

 

If you remove the mips the file will weigh 1MB.

 

Adding mips adds about 1/3 to the file size, not 4 times.

 

To get that file down to 341kb you are doing something other than just removing the mips.

 

Tell us the whole story, would you?


The best gift you can give your children is your time.

sigbar.gif

Share this post


Link to post
Share on other sites

Thanks Peter. Unfortunately I just noticed that it's got a few random spelling errors that I can't go back and fix.

Copy the 'article' then paste it into notepad. Edit the 'article' then go to the Tutorials section and post it there. You will always have the option to re-edit it as needed.


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

I was not talking about how the Graphics Engine and how it loads particular mipmaps to display them, but the fact that the file still has to contain the mipmaps.

The GPU may load the entire texture file into its own working memory (mips and all) for as long as it is needed - but I don't think that will effect VAS which is a different animal. I will defer this question to someone more knowledgeable about the inner workings of the FSX graphics system.

 

Batch mipmapping a large number of texture files will definitely consume more disk space than before the conversion, as the size of each file will increase - but that has no effect on VAS


Jim Barrett

Licensed Airframe & Powerplant Mechanic, Avionics, Electrical & Air Data Systems Specialist. Qualified on: Falcon 900, CRJ-200, Dornier 328-100, Hawker 850XP and 1000, Lear 35, 45, 55 and 60, Gulfstream IV and 550, Embraer 135, Beech Premiere and 400A, MD-80.

Share this post


Link to post
Share on other sites

Because you can't believe everything you read on the Internet. FSX runs great on Windows 3.1 and the VAS management is superb.

 

Edit: Post #14:

 

http://forum.avsim.net/topic/459932-anyway-to-force-fsx-to-give-up-some-vas/#entry3156152

:lol: Don't forget, it works great too under DOS ;-)

 

Regards,

 

Richard Portier


Richard Portier

MAXIMUS VI FORMULA|Intel® Core i7-4770K Oc@4.50GHz x8|NVIDIA GeForce GTX 1080ti|M16GB DDR3|Windows10 Pro 64|P3Dv5|AFS2|TrackIr5|Saitek ProFlight Yoke + Quadrant + Rudder Pedal|Thrustmaster Warthog A10|

Share this post


Link to post
Share on other sites

Here's the whole story.
 
I opened b737_800-1-T.dds (1366 KB) in Photoshop CS2 using the NVIIDIA dds Format add-on.

I saved it using by add-on by only setting Use Exisiting MIP maps to 1> Yhis gave me b737_800-1_TXXX.dds (342 KB) . This textures a spinning cube.

 

The application ran with both versions of the file and I could not see any difference my my elderly eyes. The relevant code snippet to load the texture is:
 

// Load the texture from file
Result = D3DX11CreateShaderResourceViewFromFile(MyD3DDevice,                
                                                L"b737_800_1_TXXX.dds",        
                                                NULL,                        
                                                NULL,                        
                                                &MyShaderResourceView,        
                                                NULL                        
                                                );	
								    					

Share this post


Link to post
Share on other sites

 

Here's the whole story.

 

I opened b737_800-1-T.dds (1366 KB) in Photoshop CS2 using the NVIIDIA dds Format add-on.

 

I saved it using by add-on by only setting Use Exisiting MIP maps to 1> Yhis gave me b737_800-1_TXXX.dds (342 KB) . This textures a spinning cube.

 

The application ran with both versions of the file and I could not see any difference my my elderly eyes. The relevant code snippet to load the texture is:

 

// Load the texture from file
Result = D3DX11CreateShaderResourceViewFromFile(MyD3DDevice,                
                                                L"b737_800_1_TXXX.dds",        
                                                NULL,                        
                                                NULL,                        
                                                &MyShaderResourceView,        
                                                NULL                        
                                                );	
								    					

Something is amiss, i did the same thing (which is the wrong way to remove mips, BTW) and end up with a file that is 1025kb.

 

Next to the Save button on the nVidia screen is a drop down menu. What option are you using?


The best gift you can give your children is your time.

sigbar.gif

Share this post


Link to post
Share on other sites

 

 


Next to the Save button on the nVidia screen is a drop down menu. What option are you using?

 

The default - "DXT1          RGB   4 bpp | no alpha"

Share this post


Link to post
Share on other sites

The default - "DXT1          RGB   4 bpp | no alpha"

OK, you just eliminated the reflections from your exterior model. Might as well go back to FS2000.

 

The original was DXT5 for a reason.

 

regards,

Joe


The best gift you can give your children is your time.

sigbar.gif

Share this post


Link to post
Share on other sites

 

 

 

 

 

 

NVI_DX10.png

 

I never posted images before. Here are my settings in DX10. There are more, I do know that. It is just to give you an idea and the picture with the iFly is not for presentation how nice everthing is, but not bad.

Fixer setting is now 8xCSAA.

 

Free VAS is about 1350 MB. I need a longer flight to see how it behaves. I saw it freeing space also. On apron it was about 1450 at AS Mega EHAM.

 

Your Anisotropic filtering setting is only x4? It seems on the lower side while your system is capable to run 8xCSAA and 4xSGSS, any special consideratons for that?

 

Thanks,

Dirk.

Share this post


Link to post
Share on other sites

 

 


The original was DXT5 for a reason.

 

I've saved it to DXT5 and the size is now 683 KB. That's still one half ,and no where near the claimed 1MB

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...