POSSIBLE bug?

BlitzMax Forums/BlitzMax Programming/POSSIBLE bug?

Robert Cummings(Posted 2006) [#1]
Hi,

I'm using LoadANIMImage with these flags: MIPMAPPEDIMAGE|FILTEREDIMAGE

Here's the problem. On my main PC, it rotates just fine, you can't notice any issues. However on the test pc (400mhz with tnt) when you rotate, it becomes ULTRA-BLURRY around any 45 degree mark.

It's utterely fine rotating smoothly around until you get NEAR 45, 135 , 225 etc... doesn't need to be exactly those values, just near enough and bang, really blurry!

This doesn't happen on my main machine with a radeon.

Your thoughts?


Robert Cummings(Posted 2006) [#2]
ok I confirmed it.


ImaginaryHuman(Posted 2006) [#3]
Confirmed what?

It might be your graphics cards specific way of doing filtering.


Grey Alien(Posted 2006) [#4]
Obviosuly the old card has a crappy filter/rotation mechanism that's all. But worth knowing (I suppose ;-))


Dreamora(Posted 2006) [#5]
Definitely a card problem. The "intelligent" filtering shemes were implemented on GeForce 2 or even 3 ... the ones before were very incapable, but enough to what games that day needed: At least some filtering to prevent the massive problems you get without it.

Around GF2, the new perspective filtering shemes came in (first screenshots showing them were CounterStrike pics if I remember correctly) that prevent the problem you describe: bad results on k*90 + 45 angles.


Robert Cummings(Posted 2006) [#6]
Really? funny how it works fine with Blitz3D if I rotate a sprite.

And plays Quake3 just cool... its a DX7 card though?


TartanTangerine (was Indiepath)(Posted 2006) [#7]
I'm looking for a way to force the mipmap level that is rendered rather than have it done automatically. I need it for the render2texture module to create even faster Bloom style effects. I'll let you know if I figure it out.


Robert Cummings(Posted 2006) [#8]
Yeah thats a good idea.


Grey Alien(Posted 2006) [#9]
funny how it works fine with Blitz3D if I rotate a sprite.
Aha that's interesting extra information.


Robert Cummings(Posted 2006) [#10]
Yep, remember though, this bug does not occur if I don't use mipmap flag. So the hardware is perfectly capable of rotating textured quads with great clarity. Just switches to a lower mipmap level at certain angles.

This speaks to me of a funny little engine quirk coz you're not supposed to be mip mapping by angle at all in this engine - only by scale.


ImaginaryHuman(Posted 2006) [#11]
I don't think you can force the mipmap level, it's supposed to be handled internally based on the perspective projection and all that matrix stuff of figuring out how close/far away it is and the filtering used to select pixels from various levels. Note that, if I understand it correctly, it doesn't use `one or another mipmap level unless you are doing 2d - in 3d it blends between multiple mipmaps all in the same polygon. Unless thats the anisotropic filtering.

I think the only way to use a specific mipmap level is to have your polygon be a certain size.


TartanTangerine (was Indiepath)(Posted 2006) [#12]
Re: MipMaps (From Docs) - After your application selects the mipmap texture set, it must assign values from the D3DTEXTUREMIPFILTER enumerated type to the D3DTSS_MIPFILTER texture stage state. Direct3D will then automatically perform mipmap texture filtering.

Your application can also manually traverse a chain of mipmap surfaces by using the IDirectDrawSurface7::GetAttachedSurface method and specifying the DDSCAPS_MIPMAP and DDSCAPS_TEXTURE flags in the DDSCAPS2 structure.