Mipmap issues?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Queeble
Posts: 3
Joined: Thu May 05, 2005 7:10 pm

Mipmap issues?

Post by Queeble »

Hey, I'm a new user (new to Irrlicht, been programming for a while), and so far, finding Irrlicht to be rather nice :D

I'm currently in the process of creating a FPS game, going back to the early FP games (2D sprites for characters, with 3D environments, choppy animation, etc). I've only started a few days ago, using some code from the various tutorials on this site.

However, I am finding one thing rather odd, and am hoping there might be some way to fix it. The mipmaps being generated seem to go to lower detail versions very close to my camera, so that I have to essentially be standing directly against a wall to see any real detail. I'm wondering if maybe there's some way to maybe lower the number of mipmaps being created? or make them not take effect until further away from the camera?

Also, I have one sprite so far, using a TGA with Alpha channel for transparency. If I enable mipmaps when loading the image into my game, and I stand away from it so that a lower detail level shows up, the transparency gets messed up, and everything that's not supposed to show is drawn, and the stuff that should be there isn't. So, I'm stuck disabling mipmaps when I load my sprite, but that doesn't really look very nice.

Any thoughts on how to fix these issues would be greatly appreciated.

Queeble.
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

The first problem can be fixed using the OverrideLODDistance function to override the distance thresholds which are used to determine LOD based on the distances from the camera.

The second problem I think has something to do with Zbuffers or the order in which things are rendered, haven't played with that much.
Image
Queeble
Posts: 3
Joined: Thu May 05, 2005 7:10 pm

Post by Queeble »

hmmm... looked up OverrideLODDistance and I see that's for Terrain Nodes... guess I wasn't very clear on what I had going right now... my level is the Q3 level from Tutorial #2 or whichever one it is, so I'm not using an ITerrainSceneNode object for it, thus, no OverrideLODDistance :(

what I meant by detail levels and stuff was the textures used to texture the walls and floor and such, so I would think maybe there's some function in video::ITexture or something to do that... I see there's a regenerateMipMapLevels(), but no way that I can see to set how many levels to create...

Queeble.
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

Oh! Yeah, the info I gave you was about the Terrain Scene Node, sorry, can't help you with your other problems :(
Image
aigam
Posts: 17
Joined: Fri May 06, 2005 3:17 pm

Post by aigam »

The problem of transparencies is a problem of ordering the transparencies...

I supose that you must especify that the node has transparencies...
Queeble
Posts: 3
Joined: Thu May 05, 2005 7:10 pm

Post by Queeble »

Alright, I got the transparency thing fixed. I just forced the texture to use 32-bit, and so that's all good... now just have to look into this mipmap thing...
Post Reply