2D images getting distorted depending on camera position

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
Clash
Posts: 80
Joined: Thu Apr 19, 2007 4:20 pm

2D images getting distorted depending on camera position

Post by Clash »

Hello!
Below is an image zoomed in 1200% to exemplify what I mean
Image
The character above is actually made of 4 sprites (head, body, arms and legs), the images are all power of 2 with a bunch of sprites but then I use translation and size to adjust to the exact part I want to show, this part usually does not have power of 2 dimensions, but this should only matter to the original image size, correct?
The image is being rendered with a custom scene node with a couple properties so it can correctly display as 2D

Code: Select all

    Material.TextureLayer[0].TextureWrap = ETC_CLAMP;
    Material.TextureLayer[0].BilinearFilter = false;
    this->setMaterialFlag(video::EMF_LIGHTING, false);
    Material.MaterialTypeParam = 0.5; //! Needed as of 1.5
    this->setAutomaticCulling(EAC_OFF); //! Temporary solution

Code: Select all

driver->setTextureCreationFlag(ETCF_CREATE_MIP_MAPS, false);
Any idea why this distortion is happening? It happens when I move the camera, everytime I move it I get a new distortion
Thanks in advance! If any information is missing please tell me
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

I don't know, but it could be a mipmap problem...
did you try to disable mipmap creation ??? ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Clash
Posts: 80
Joined: Thu Apr 19, 2007 4:20 pm

Post by Clash »

Thanks Acki, I have actually
I went to IRC and bitplane pointed out that this was a bug with the direct3d driver of irrlicht, but hybrid said he has corrected it in the SVN
Thanks
Post Reply