problem with tga textures with alpha transparency

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
stevend
Posts: 114
Joined: Sat Mar 01, 2008 7:18 pm

problem with tga textures with alpha transparency

Post by stevend »

i was wondeirng if this was a bug.

i have been hunting down what seemed like memory corruption in my game. i ended up recoding the whole thing,

to find out that when i load a tga file and use transparency on my 3ds meshes (i got the for free from the internet somewhere) my games memory would become corrupt or something. textures would be on the wrong models, making everything looks crazy.

i made a new map in my game added some objects and stuff, a whole bunch, no corruption. add any vegetations using the tga format with transparency and the memory would get all cracked out.

just wondering may be something on my part but now it doesnt seem like it.
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

what's the dimension of your texture?

they should be in the following sizes:

1) 32x32
2) 64x64
3) 128x128
4) 256x256
5) 512x512
6) 1024x1024
Image
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Textures need not be squared, nor would NPOT textures corrupt the memory...
Anyway, I never saw any problems with alpha channel textures, and these are also used in the examples. So I don't think it's a general bug.
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

he said:

"textures would be on the wrong models, making everything looks crazy."

that's sound pretty weird, why would a texture be placed on a different model, hmmm.
Image
stevend
Posts: 114
Joined: Sat Mar 01, 2008 7:18 pm

Post by stevend »

i know it does sound weird. but i have been adding more complexity to my engine and more classes every day. aslong as i stay away from those models using tga textures with alpha transparency.. it seems to be fine..

ill post a screenie when i get some hosting around. sometime, it looks rather psycadelic :P

as you can see below where the white arrows mark it, is corruption.

that grass is NOT supposed to be red (color of my logo) and those little squares are supposed to be little plants but they say New Game (:P it is usingt he texture of my new game gui element)

Image

to cause this all i did was add a free model of some small plants to the game. it is 3ds, using tga and transparency. i edited the original PNG texture and made transprant back ground in GIMP and i use that. maybe thats the issue?
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

did you scale and rotate the model, coz i get those in mine as well. but it doesn't happen all the time.
Image
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

I suppose the TGA files could have some strange or conflicting information in the header or something similar, can you post one for further investigation?

edit: Also, can you cause the problem to happen in one of the examples? That would make things a lot easier to debug.

edit 2: Finally, what format is the model in, and can you share it?
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
stevend
Posts: 114
Joined: Sat Mar 01, 2008 7:18 pm

Post by stevend »

dlangdev: yes actually, while using the editor, the scene node is attached to the irrNewt physics body by pointer, and i move objects around often in the editor.

bitplane: as for 1 and 3 i can share them. i will try to reproduce the probelm and upload a copy asap.

flowers_low.rar
Post Reply