TSprite copy and EntityAlpha/EntityOrder

BlitzMax Forums/MiniB3D Module/TSprite copy and EntityAlpha/EntityOrder

ima747(Posted 2009) [#1]
After loading a TSprite I make a copy with copy entity and then alter the copy's alpha with EntityAlpha. This alter's the origonal's alpha as well, It's not exactly inverted but as the copy fades in the origonal fades out, untill the copy is solid then the origonal pops back to solid as well.

If I set the entity order of the copy to 1 the alpha works properly, but it also sets the draworder of the origonal to 1...

It looks like something about the TSprite is grabing values from it's entity container sometimes...


ima747(Posted 2009) [#2]
Sorry to bump my own post but I've got a related problem with sprites with texture alpha. If I load a PNG for a sprite with translucent/transparent parts it fills the transparent parts with the PNG's clear color (usually white). If I set the entity alpha to 0.99 instead of 1, it displays properly, however it then seems to have a depth related issue, when the center point of 1 sprite gets behind another's center the whole sprite gets drawn behind it (this is with spriteviewmode for both set to 2, and fullbright turned on if it matters...). this doesn't happen if the alpha is 1, but again, I get no transparency then... dunno if they're related problems but either way something isn't quite right, either no alpha sprites or I lose depth control...


_Skully(Posted 2009) [#3]
It probably works the same way as B3D's copyentity command...

http://www.blitzbasic.com/b3ddocs/command.php?name=copyentity&ref=goto

maybe look at...
http://www.blitzbasic.com/b3ddocs/command.php?name=CopyMesh&ref=3d_cat


ima747(Posted 2009) [#4]
that would explain the sprite copy issues, I've since overcome the order problems by using a second camera which I had to do for other reasons anyway.

but with the texture alpha/popping issues none of those sprites are copies so I'm still at a loss there...