why not support png format in BitmapFromFile?
it small, nice format with alpha layer...
BitmapFromFile -> png
Moderator: Moderators
Png-format is supported in Delphi 2010. I thought it was included automatically but it turned out I had to add one line of code for it to work. It will be in next beta update. Note however that the size of the source file does not affect the size of the data after it is imported in ZGE, it is imported to a generic non-compressed format and then it is up to Upx to compress it.
transparency in model not work... is this a bug?
- Attachments
-
- psivit.zgeproj
- (167.67 KiB) Downloaded 609 times
Hi Valerious,
The transparency actually works, but you've got your Render order wrong. Instead of rendering your background in the App.OnRender Event, create a Model for your background and spawn it before your Hero.
Also, you shouldn't use a separate Bitmap and Material for each frame of a character. Try using a sprite-sheet instead, you can find a example ( Zero.zip ) of this approach here.
K
The transparency actually works, but you've got your Render order wrong. Instead of rendering your background in the App.OnRender Event, create a Model for your background and spawn it before your Hero.
Also, you shouldn't use a separate Bitmap and Material for each frame of a character. Try using a sprite-sheet instead, you can find a example ( Zero.zip ) of this approach here.
K