Previous Thread  Next Thread

chat icon Saving with transparency

miracle

Posted: Sat Nov 09, 2002 11:53 pm
Joined: 09 Nov 2002
Posts: 3
I have a scene using spots with halos and stuff.
Now I'd like to get it into the gimp and put it onto some wallpaper in a way that the spot halos are still a little transparent, and so that the solid objects aren't.
If I put anything behind my scene inside blender (like a horizon blend, using the world buttons for example), the effect is just what I want - only I want to export the image and do the overlay somewhere else, and of course I don't want to import the wallpaper to blender, because then I'd have to think about lighting and perspective.
Is there a way to save an image (TGA/RGBA sounds quite good for a format) such that the transparency information against the non-existent background is just kept as an alpha-channel?
If not: Put this on the wishlist Wink
Reply with quote


Hos

Posted: Fri Nov 15, 2002 7:39 am
Joined: 15 Oct 2002
Posts: 215
miracle wrote:
I have a scene using spots with halos and stuff.
Now I'd like to get it into the gimp and put it onto some wallpaper in a way that the spot halos are still a little transparent, and so that the solid objects aren't.
If I put anything behind my scene inside blender (like a horizon blend, using the world buttons for example), the effect is just what I want - only I want to export the image and do the overlay somewhere else, and of course I don't want to import the wallpaper to blender, because then I'd have to think about lighting and perspective.
Is there a way to save an image (TGA/RGBA sounds quite good for a format) such that the transparency information against the non-existent background is just kept as an alpha-channel?
If not: Put this on the wishlist Wink


There is a bug with the way blender writes it's RGBA targas
(it claims that the 32 bit targa has a 0 bit alpha channel).
This bug will be fixed soon. In the meantime, here is a
perl script that will fix your targas:

http://www.ualberta.ca/~cwant/blender/tgapatch.pl.txt

Regards,
Chris
Reply with quote


Hos

Posted: Fri Nov 15, 2002 10:11 pm
Joined: 15 Oct 2002
Posts: 215
... or patch your own copy of blender:

RCS file: /usr/src/cvsroot/blender/source/blender/imbuf/intern/targa.c,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 targa.c
--- source/blender/imbuf/intern/targa.c 17 Oct 2002 05:40:35 -0000 1.1.1.1
+++ source/blender/imbuf/intern/targa.c 15 Nov 2002 21:03:56 -0000
@@ -284,6 +284,12 @@
buf[15] = ibuf->y >> 8;

if (flags & IB_ttob) buf[17] ^= 0x20;
+ /* Don't forget to indicate that your 32 bit
+ * targa uses 8 bits for the alpha channel!
+ */
+ if (ibuf->depth==32) {
+ buf[17] |= 0x08;
+ }

if (write(file, buf, 18) != 18) return (0);
if (ibuf->cmap){



Chris
Reply with quote


miracle

Posted: Sat Nov 16, 2002 12:57 pm
Joined: 09 Nov 2002
Posts: 3
Beautiful! Thanx a lot!
Reply with quote


basse

Posted: Sun Nov 17, 2002 11:25 pm
Joined: 15 Oct 2002
Posts: 22
wow thanks Hos.. your patch really worked like a dream!

.b
Reply with quote


DreadLORD

Posted: Mon Feb 03, 2003 9:44 pm
Joined: 03 Feb 2003
Posts: 1
Can someone explain to me how to use that patch (if possible)? It would help me out alot! Thanks!

--DreadLORD
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group