TIM file with black as main sprite color
TIM file with black as main sprite color
Hello,
while I think I've a firt grasp on importing TIM files, I still don't undestand if it's possible to convert an image such as the one attached.
I would like to be able to "pierce" and discard the white background and keep the black as main color of the sprite: is it possible? How? I tried various import settings with TIMTOOL (check/uncheck the Semi Transparent options in TIMTOOL, create an alpha mask image, ...) to no avail.
Thanks
while I think I've a firt grasp on importing TIM files, I still don't undestand if it's possible to convert an image such as the one attached.
I would like to be able to "pierce" and discard the white background and keep the black as main color of the sprite: is it possible? How? I tried various import settings with TIMTOOL (check/uncheck the Semi Transparent options in TIMTOOL, create an alpha mask image, ...) to no avail.
Thanks
You do not have the required permissions to view the files attached to this post.
as a 4/8/or 16-bit image?
wait a minute... there are only two colors in your image o_O
For a 2 color B & W image
Dude, just paint it white and use code to change the color into anything u want... really
wait a minute... there are only two colors in your image o_O
For a 2 color B & W image
Dude, just paint it white and use code to change the color into anything u want... really
-
LameGuy64 Verified
- Psy-Q Enthusiast
- Posts: 388
- Joined: Apr 10, 2013
- I am a: Hobbyist Game Developer
- Motto: Commercial or not, play it!
- PlayStation Model: H2000/7000
- Location: Philippines
- Contact:
The PlayStation uses pure black (RGB 0, 0, 0) as the transparent color. So, if you want to put black colors on your texture without making it transparent, make it 12 shades brighter than pure black.
Please don't forget to include my name if you share my work around. Credit where it is due.
Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.
DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.
Dev. Console: SCPH-7000 with SCPH-7501 ROM, MM3, PAL color fix, Direct AV ports, DB-9 port for Serial I/O, and a Xplorer FX with Caetla 0.35.
DTL-H2000 PC: Dell Optiplex GX110, Windows 98SE & Windows XP, Pentium III 933MHz, 384MB SDRAM, ATI Radeon 7000 VE 64MB, Soundblaster Audigy, 40GB Seagate HDD, Hitachi Lite-on CD-RW Drive, ZIP 250 and 3.5" Floppy.
-
Shadow Verified
- Admin / PSXDEV
- Posts: 2670
- Joined: Dec 31, 2012
- PlayStation Model: H2000/5502
- Discord: Shadow^PSXDEV
You can even go as low and make it RGB 1, 1, 1.
The human eye wont even be able to receptor if that's 'true' black or not
The human eye wont even be able to receptor if that's 'true' black or not
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), PSIO Switch Board, DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.
PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.
PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.
-
inc^lightforce Verified
- Psy-Q Enthusiast
- Posts: 248
- Joined: Mar 07, 2013
- I am a: Programmer Windows+PS1, GFX Artist
- PlayStation Model: Black
- Location: Germany
a near black avatar is possible.
how LameGuy64 said: the PSX is setting r0 g0 b0 to full transparent.
that's the rule of PS1 GFX usage made by SONY.
You can also manipulate the colour with code like mine:
this one is taken from my workshop and manipulates the color of the used Font Scroller
in your Case define the avatar as Sprite like this:
try this one:
how LameGuy64 said: the PSX is setting r0 g0 b0 to full transparent.
that's the rule of PS1 GFX usage made by SONY.
You can also manipulate the colour with code like mine:
this one is taken from my workshop and manipulates the color of the used Font Scroller
Code: Select all
sprLetter.r=111; // change the Color of your Font --> 0 is black & 255 is white
sprLetter.g=143; // change the Color of your Font --> 0 is black & 255 is white
sprLetter.b=37; // change the Color of your Font --> 0 is black & 255 is white
Code: Select all
extern char avatar[]; // read external Information of GFX or Sound or what ever
GsSPRITE sprAvatar;
LoadTIMData((u_long*)avatar);
SetSpriteInfo(&sprAvatar,(u_long)avatar,80,119,3);//x,y
sprAvatar.r=14; // change the Color of your Font --> 0 is black & 255 is white
sprAvatar.g=14; // change the Color of your Font --> 0 is black & 255 is white
sprAvatar.b=14; // change the Color of your Font --> 0 is black & 255 is white
try this one:
You do not have the required permissions to view the files attached to this post.
Last edited by inc^lightforce on October 29th, 2013, 11:10 am, edited 1 time in total.
Thanks everyone for your answers.inc^lightforce wrote:near black avatar. LameGuy64 said: the PSX is setting r0 g0 b0 full transparent.
that's the rule of PS1 GFX usage made by SONY
I wanted to be sure that [0,0,0] is a "reserved" color and thus not safe to use.
I also think that is completely useless to create source images as PNG with an alpha channel because it will be discarded anyway once imported into TIM, am I right?
- t0rxe
- C Programming Expert
- Posts: 139
- Joined: Dec 19, 2012
- Motto: /\OX[]
- PlayStation Model: SCPH-5502
- Location: Australia
If I remember correctly, the alpha channel in PNG images once imported get's converted to RGB 0, 0, 0 automatically, thus making it transparent.
You can see I'm using a PNG. JPEG's also work well in some situations, but I prefer BMP over PNG for TIMTOOL.
You can see I'm using a PNG. JPEG's also work well in some situations, but I prefer BMP over PNG for TIMTOOL.
You do not have the required permissions to view the files attached to this post.
"Nostalgia isn't a big enough word to describe the PlayStation from my eyes"
The PSX uses 5 bits per component, so the lowest you can go is 8 (if the scale is 0-255), and yes, you can tell the difference between such a color and black. Atleast if you also have some real black present to compare it to.Shadow wrote:You can even go as low and make it RGB 1, 1, 1.
The single alpha bit is also important. The PSX will only skip texels with A = R = G = B = 0. So unless you use blending, just set the alpha bit and you have real black, it's only when you use blending that you need to set one of the R,G,B components to non-zero to have an opaque "black" color. (When blending is enabled, texels with A = 1 will be blended while texels with A = 0 will be opaque.)jman wrote:I wanted to be sure that [0,0,0] is a "reserved" color and thus not safe to use.
edit: That Tim Tool screenshot actually explains the behaviour quite well
Who is online
Users browsing this forum: No registered users and 3 guests