solution to this common problem

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
dtx
Posts: 3
Joined: Fri Jan 05, 2007 2:14 am

solution to this common problem

Post by dtx »

Hello

I'm having some problems with irrlicht. I did a little test with an image with a few letters on it (800x600), looks perfect outside irrlitch and even on other engines but when I try to Draw the image using irrlitch it looks all blurry, also when I try to switch to different devices like software2 the image gets bigger and darker, and the timer messes up (it gets slower, like slow motion, this doesn't happens when using OGL or DIRECTX).

I also though the problem was due to lack texture filtering (using nearest instead of bilinear) but I didn't find any options for changing the filtering of a 2d image.

I searched the forums for answers but all I found were hacks like not using 800x600 or using a different resolution for the image, also I didn't find any functions for dealing with 2d graphics like stretching etc.

I'm trying irrlicht mainly because I heard it was stable, and because of the software device otherwise let me know so I can switch.

PS: I've tried all devices (DX,OGL;SWF;SWF2) all resolutions, bpps, etc. And I'm drawing the image using draw2DImage. Also I've tried different formats, pngs, tgas, bmps....
Grey Lantern
Posts: 34
Joined: Sat Jul 30, 2005 9:45 am
Contact:

Post by Grey Lantern »

Don't know if this is of any help but I do this as a matter of course before loading 2D stuff:

Code: Select all

// do this before loading 2D textures
gDriver->setTextureCreationFlag(ETCF_CREATE_MIP_MAPS, false);

Also is your texture correct power of 2 combination? (64/128/256/512/1024 x etc) ?


And finally, I added a lot of 2D scaling stuff from various bits of code (and some of my own) that shows irrlicht can handle very nice 2D stuff with fades, animations, scaling, rotating all as smooth as any other engine.
dtx
Posts: 3
Joined: Fri Jan 05, 2007 2:14 am

Thanks

Post by dtx »

Thanks Paul, it did help. The problem was the image, I found out (as you said) irrlicht needs all images in powers of two. Which is a bit weird as I've been using other libraries and I don't get the same problem.

Btw is that custom code you're talking about well integrated with irrlicht ?, if so can you post it somewhere (maybe a zip)? By the way I've read that irrlicht timer isn't that good, what do people think about that ?
3ddev
Posts: 169
Joined: Tue Sep 19, 2006 6:51 am
Contact:

Post by 3ddev »

Mip-mapping is great for textures on models, but generally degrades the quality of images. Disabling Mip-Mapping will probably slow down your FPS, but will display both images and textures with no modifications(i.e. the same as you see in Paint, GIMP or Photoshop). Here is a great article all about Mip-Mapping :arrow: http://en.wikipedia.org/wiki/Mip_map :wink:
dtx
Posts: 3
Joined: Fri Jan 05, 2007 2:14 am

Thanks

Post by dtx »

3ddev, thanks for the info. I implemented my software renderer back then with mipmapping and all sorts of filters for textures. But for normal 2d mode I was doing fast memory blittings so I thought irrlicht used a similar approach (at least when using software rendering mode) and for 2d in OGL/DX I thought irrlicht used textured quads for things like sprites, backgrounds, etc along with an ortho projection.
Post Reply