Jump to content
  • Advertisement
Sign in to follow this  

Photoshop 6.0 help with tga files !

This topic is 3967 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I use photosphop to put a green (R:0, G:255, B:0) background on images. In my game the green disappear and becomes transparent, just like movies special effects. I use the eraser tool with photoshop to turn parts of the image into green, and I save as a .tga file. Simple. But in my game there is a black border (1 pixel) around everything that was green in photoshop. Of course this border doesn't show up in photoshop. Annoying. I managed to have one tga file that don't have that black border in the game, but don't know how I did it back then. If someone can help me... please !

Share this post


Link to post
Share on other sites
Advertisement
Are you sure it's not OpenGL or D3D adding the border? Perhaps paste the source you use to create the texture.

Share this post


Link to post
Share on other sites
Quote:
Original post by taby
Are you sure it's not OpenGL or D3D adding the border? Photoshop doesn't automagically add things to your images.

yeah, i was going to ask the samething, but figured i'd take a look at his texture first.

Share this post


Link to post
Share on other sites
I emailed you all the stuff...

and I use D3D and here is the code :

Enable transparency :

pDevice->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATER );
pDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE);


Texture creation code :

rslt=D3DXCreateTextureFromFileEx(pDevice, imageFile, D3DX_DEFAULT, D3DX_DEFAULT,
D3DX_DEFAULT, 0, D3DFMT_UNKNOWN, D3DPOOL_MANAGED,
D3DX_DEFAULT, D3DX_DEFAULT, D3DCOLOR_XRGB(0,255,0), &in, NULL, &texture);


Pretty basic..

Share this post


Link to post
Share on other sites
there is a slight white outline around everything in the ccc.tga file that is non-existant in the zombie62.tga. however other than that there is no reason for the blackoutline, i'd imagien it would be something in your code that is causing the black outline to appear. try cleaning up the white outline and see if it gives you the black outline.

Share this post


Link to post
Share on other sites
I'll check this withe outline after work and give you some feedback.
Thanks for taking some of your time to check my files !

Share this post


Link to post
Share on other sites
Quote:
Original post by Juksosah
I'll check this withe outline after work and give you some feedback.
Thanks for taking some of your time to check my files !

np, and i could even cleanup the white outline for you, i just took a few minutes glance at it because i was getting ready for work, but once i get home i wouldn't mind cleanign ti up for you.

Share this post


Link to post
Share on other sites
Go ahead if you want to remove the white border. I see it in the upper part the image, but I can't see this border around the left arm, where I put some green color too.

And by the way, could you add some green spots on it (ccc.tga) ?

Just in case I messed with photoshop's configuration.

Thanks again.

Edit : I suspect the alpha channel when saving in .tga .. I'll continue to experiment.

[Edited by - Juksosah on July 9, 2007 9:19:32 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!