Hi All, I managed to use Anisotropic from MiniGL glTexEnv functions :p It look really nicer than before. I wanted to show you some shots about this upcoming new feature in the next release 0.8 of the AmiDARK Engine :
(click on the images to see them in the originals sizes)
Support for Anisotropic filtering added to the AmiDARK Engine :p With a simple function : DESetObjectFilter( ObjectID, FilterMODE ) DESetObjectFilterEx( ObjectID, FilterMODE, ExtraValue ) FilterMODE : 0 = No Filter / 1 = Linear/Nearest / 2 = Linear/Linear / 3 = Anisotropic using Extravalue to define the filter depth.
Thank you for this new add in the Warp3D/MiniGL :p Kindest Regards, AmiDARK
All we have to decide is what to do with the time that is given to us.
Anisotropic filtering is a complicated sounding name for filtering one direction more strongly than another (Anisotropy means being directionally dependent). This results in a sharper image when textures are at an extreme angle relative to the camera. You can see this in the image below taken from the Wikipedia entry on the subject. The left side is trilinear (isotropic) filtered, while the right hand side is anisotropically filtered. There is no contest on which is sharper.
@Freddix
Nice work. It's good to see that you're continuing to make progress with the AmiDark project.
@Antique : Here are some shots showing the changes : Left : no filter Right : Anisotropic filter. The best results are shown in the 3rd picture where there are feather far that show a more accurate display.
I will probably add soonly shots comparing linear filtering & anisotropic filtering to show the differencies too.
Regards, AmiDARK
All we have to decide is what to do with the time that is given to us.
After several test and checkings, these shots don't show the Anisotropic filtering in actions. In fact the latest MiniGL doesnt handle Anisotropic Filtering. That's a true pain. I can turn it on/off using the OpenGL commands for but, they have no impact on render. (that mean that these informations are not sent to Warp3D or not handled this way).
I had to make a workaround that modify the ENV file "on the fly" to turn it on/off and it's a TRUE PAIN! We need MiniGL to be updated with the new Warp3D capabilities :)
Here is a shot truely showing the Anisotropic filtering in action : http://files.amidark-engine.com/Rel0.8/Basic3D_FilteringDemo.png In these case : 1. Top/Left : no filtering + Anisotropic. 2. Top/Right : Linear_Mipmap_Nearest + Anisotropic. 3. Bottom/Left: Linear_MipMap_Linear + Anisotropic. 4. Bottom/Right : same as 3. (my objectives was to have Anisotropic only for the object 4 but it's actually impossible. However, theorically, MiniGL specifications allow to activate Anisotropic Filter "per object" and not "per scene"...
Kindest Regards, AmiDARK
All we have to decide is what to do with the time that is given to us.
freddix wrote: After several test and checkings, these shots don't show the Anisotropic filtering in actions. In fact the latest MiniGL doesnt handle Anisotropic Filtering. That's a true pain. I can turn it on/off using the OpenGL commands for but, they have no impact on render. (that mean that these informations are not sent to Warp3D or not handled this way).
I had to make a workaround that modify the ENV file "on the fly" to turn it on/off and it's a TRUE PAIN! We need MiniGL to be updated with the new Warp3D capabilities :)
Actually, to put this feature under developer control will require an update to the Warp3D API*, not just MiniGL.
*addition of new MinFilter enumeration values for anisotropic filtering *addition of a method to set the degree of anisotropy for a given W3D_Texture
Karlos, Thank you for your answer. And good job concerning Anisotropic filtering :) Keep us informed on evolutions ;)
Concerning MiniGL, There is already the function glTexParameterf that can set the effect on/off and the val GL_TEXTURE_MAX_ANISOTROPY_EXT that is set in the definition files. (.h)
Same for GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT. The value is set in the definition files (.h)
So : float anisotropy;glGetFloatv (GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &anisotropy); and glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, (float)AnisotropicVal );
should be supported(internally to work) in MiniGL to be able to use Anisotropic filtering (per object and not on the full scene) I can already compiles AmiDARK Engine with these 2 lines that does not generate any errors (but do nothing in visual appearance). So, their support may be added. Maybe by Hans ?
If you need tester when improving MiniGL (via Warp3D changes), feel free to ask me ;) It will be a pleasure for me as I start the development of the rest of the 3D engine for the AmiDARK Engine, checking 3D features will be easy as I will add features in the process :p
Kindest Regards, AmiDARK
Edited by freddix on 2013/1/7 15:53:58
All we have to decide is what to do with the time that is given to us.
float anisotropy;glGetFloatv (GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &anisotropy); and glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, (float)AnisotropicVal );
In Warp3D, the anisotropy value will most likely be an enumeration that describes the maximum number of samples, rather than a GL-style floating point value, perhaps something like this:
It will require an API change for Warp3D. I've submitted an RFC for the necessary changes (which includes adding developer support for 16-bit Z buffer selection) and I'm waiting to hear back. I can't just change the API because I feel like it.