Is it worth it using bilinear filtering for far-away objects?

Started by
6 comments, last by CGameProgrammer 21 years, 10 months ago
In my engine, I currently have it set so that geometry near the camera is drawn with trilinear filtering and objects far away are drawn with bilinear filtering. Of course this sounds like it defeats the purpose of trilinear filtering, but it actually looks good the way I have it set. But I''m wondering if it''s worth it. For most cards that support trilinear filtering, is it noticeably slower using trilinear filtering than bilinear? So, is the penalty of the render state change worth it? Or should I just make everything trilinear? My engine renders large outdoor areas, so most geometry is far away from the camera. ~CGameProgrammer( );

~CGameProgrammer( );Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
Advertisement
Only profiling both on target hardware will tell. I imagine it would depend on the resolution (as well as the gfx card).
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Tri-linear versus Bi-linear shouldn''t make much of a difference.

However, tri-linear implies using MipMaps, they *ARE* good when textures get minified - and do help on most 3D hardware.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

ussually smaller textures are quicker to render then a larger texture assuming the triangle size if constant. so trilinear should be faster then straight bilinear with a full res texture.
Actually I use mipmaps with bilinear filtering. I use them simply because they look better - the full-res textures look bad when viewed from far away. Also, I can''t imagine how mipmaps are rendered more quickly than full-res textures. Are you totally positive mipmaps are faster? Because I''m pretty sure they''re used mainly because there are major artifacts when trying to render a full-res texture in a tiny polygon.

~CGameProgrammer( );

~CGameProgrammer( );Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
quote:Are you totally positive mipmaps are faster?


That''s what all the 3D hardware manufacturers say !!!

The case where it helps the most is in MINIFICATION of textures.

MipMaps help with minification **if all of the chain fits into video memory** because you get far less misses in the on-chip texel cache when texturing the polygon.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

Yeah it''s been my experience using mipmaps does help performance, if only slightly, but the bigger advantage is the textures look much better because you don''t have so much aliasing of the texture going on. I attributed this to having less texture resources on the card so it doesn''t have to keep going to software to load the textures into the cache. However, you pay the price at load time, by having to create all the mip maps, which is usually pretty damn slow, at least with the D3DXLoadTexture calls.
CGameProgrammer, trilinear filtering blends two mipmaps together. basically it does a bilinear filter then blends the two mipmaps that are surrounding the mipmap level you are at. the only difference between trilinear filetring and using bilinear with mipmaps is that you are using the closet mipmap to the current mipmap level.

its like using point filetring (ie none) with your textures instead of linear (ie bilinear) when using bilinear with mipmaps.

i suggest just adding an option and allow either bilinear or trilinear filtering. there is no point in switching the filtering method midway through a render based on distance since you are defeating the purpose of triliniear filter which is to give a smooth transition between mipmap levels as your distance from the camera increases.

This topic is closed to new replies.

Advertisement