| View previous topic :: View next topic |
| Author |
Message |
AnonymousTipster
Joined: 01 Jul 2005 Posts: 197
|
Posted: Mon Oct 17, 2005 10:51 pm Post subject: MipMap distance |
|
|
| With mip mapping, is there a way to set the distance away a texel has to be to change to the next mipmap? At the moment the texture is getting too blurry too soon, so I'd like to push the distance back. |
|
| Back to top |
|
 |
chp
Joined: 23 Jun 2004 Posts: 313
|
Posted: Tue Oct 18, 2005 4:45 am Post subject: |
|
|
Try and play with sceGuTexLevelMode(), that could perhaps help with the issue. _________________ GE Dominator |
|
| Back to top |
|
 |
AnonymousTipster
Joined: 01 Jul 2005 Posts: 197
|
Posted: Tue Oct 18, 2005 6:55 pm Post subject: |
|
|
| Thanks chp, I've got it. |
|
| Back to top |
|
 |
av
Joined: 01 Jan 2006 Posts: 7
|
Posted: Sun Jan 01, 2006 11:22 am Post subject: |
|
|
Hi,
I've been beating my head over the usage of sceGuTexLevelMode(int, float). Does anyone have any tips on what those two arguments are? I'm having a similar problem with the lower mip levels getting too blurry.
My initial guess was that the int was to specify a mip level and the float some mip bias. But then I looked at some of the ge register list at http://wiki.ps2dev.org/psp:ge_register_list and saw that there is only one 16 bit value stored for each of the two arguments. Should they really be int and float? Seems suspect to me.
Since there is only one set of 16-bit values stored, I'm assuming that this isn't set per mip level but instead strored globally.
Any ideas on how to set these values sanely? What is the default?
Thanks! |
|
| Back to top |
|
 |
AnonymousTipster
Joined: 01 Jul 2005 Posts: 197
|
Posted: Sun Jan 01, 2006 8:19 pm Post subject: |
|
|
I got some sort of mipmapping working for my ODE port : http://forums.ps2dev.org/viewtopic.php?t=3944
but I didn't use sceGuTexLevelMode(), because it would either make it too far away or too near.
I'm pretty sure that the int is for the index to the mipmap, and the float is the weighting that it gives it. What you may want to try is binding the values to buttons, so X and O change the int and [] and ^ change the float value. This way you can test out every value and see which one works best. |
|
| Back to top |
|
 |
Jim

Joined: 02 Jul 2005 Posts: 487 Location: Sydney
|
Posted: Mon Jan 02, 2006 8:30 pm Post subject: |
|
|
The correct mipmap level to use is based on the size of the triangle you are rendering and the number of pixels it uses from the texturemap.
Say your triangle covers 30 screen pixels, then ideally it will use 30 texture pixels too.
You can use the 2d cross product to find out these areas.
Alternatively, as many people do, base the mipmap level on the z of the triangle.
Jim _________________ http://www.dbfinteractive.com |
|
| Back to top |
|
 |
av
Joined: 01 Jan 2006 Posts: 7
|
Posted: Tue Jan 03, 2006 9:47 am Post subject: |
|
|
Thanks for the replies...but I'm still a bit lost on how those values are used. I played with binding the variables to the joystick before and it really makes no sense.
Another confusing thing is that when you call sceGuTexScale (float, float); with anything other than sceGuTexScale (1.0f, 1.0f); the mip bias is very different and blurrier in the lower mip levels. Very strange.
Thanks. |
|
| Back to top |
|
 |
av
Joined: 01 Jan 2006 Posts: 7
|
Posted: Tue Jan 03, 2006 9:49 am Post subject: |
|
|
Sorry, just to clarify, my tests show that the float argument to sceGuTexLevelMode(int, float) seems to be a very simple mip bias, but the int argument makes no sense at all.
Thanks. |
|
| Back to top |
|
 |
jsgf
Joined: 12 Jul 2005 Posts: 254
|
Posted: Tue Jan 03, 2006 11:40 am Post subject: |
|
|
| Is it a mode which affects how the bias is interpreted? |
|
| Back to top |
|
 |
|