forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

MipMap distance

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
AnonymousTipster



Joined: 01 Jul 2005
Posts: 197

PostPosted: Mon Oct 17, 2005 10:51 pm    Post subject: MipMap distance Reply with quote

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
View user's profile Send private message
chp



Joined: 23 Jun 2004
Posts: 313

PostPosted: Tue Oct 18, 2005 4:45 am    Post subject: Reply with quote

Try and play with sceGuTexLevelMode(), that could perhaps help with the issue.
_________________
GE Dominator
Back to top
View user's profile Send private message
AnonymousTipster



Joined: 01 Jul 2005
Posts: 197

PostPosted: Tue Oct 18, 2005 6:55 pm    Post subject: Reply with quote

Thanks chp, I've got it.
Back to top
View user's profile Send private message
av



Joined: 01 Jan 2006
Posts: 7

PostPosted: Sun Jan 01, 2006 11:22 am    Post subject: Reply with quote

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
View user's profile Send private message
AnonymousTipster



Joined: 01 Jul 2005
Posts: 197

PostPosted: Sun Jan 01, 2006 8:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Mon Jan 02, 2006 8:30 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
av



Joined: 01 Jan 2006
Posts: 7

PostPosted: Tue Jan 03, 2006 9:47 am    Post subject: Reply with quote

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
View user's profile Send private message
av



Joined: 01 Jan 2006
Posts: 7

PostPosted: Tue Jan 03, 2006 9:49 am    Post subject: Reply with quote

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
View user's profile Send private message
jsgf



Joined: 12 Jul 2005
Posts: 254

PostPosted: Tue Jan 03, 2006 11:40 am    Post subject: Reply with quote

Is it a mode which affects how the bias is interpreted?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group