OK, in another thread I used this to LOAD an image that was using transparency. It loads the image I made with GIMP just fine with the bottom part of the function below. However, I am wanting to make this same picture with transparency in PNG format, just like my picture below. But I end up creating nothing but black texture every time. It won't grab the yellow filled disc I create, nor will the black around the disc become transparent.
This doesn't matter if I have a camera set up or not. Its the same result every time.
Ideas ?
global sun_texture_num = 5
make_sun()
wait key
end
FUNCTION make_sun()
IF FILE EXIST("sun.png") = 0
create bitmap sun_texture_num, 400, 400, 1
ink rgb(0,0,0),rgb(0,0,0)
cls
sync
FILL CIRCLE 128,128, 100, RGB(255,250,221)
sync
GET IMAGE sun_texture_num, 0, 0, 400, 400, 3
SAVE IMAGE "sun.png", sun_texture_num
set current bitmap 0
delete bitmap sun_texture_num
DELETE IMAGE sun_texture_num
endif
IF FILE EXIST("sun.png") = 1
make object plane sun_texture_num, 200, 200
load image "sun.png", sun_texture_num
texture object sun_texture_num, sun_texture_num
position object sun_texture_num, 0, 0, 0
set object sun_texture_num, 1, 1, 0, 0, 0, 0, 0
set light mapping on sun_texture_num, sun_texture_num
set object emissive sun_texture_num, rgb(250,250,250)
endif
ENDFUNCTION
Here is a working PNG. I am trying to recreate this PNG with DBP and then save it to be called back into the program.
This is what I keep ending up with :
Here is the sun image I made with transparency using GIMP ( which is the yellow disc looking PNG file above ) and so this is what its supposed to look like. But in DBPro, I can't seem to achieve this correctly.