Render image with transparent background

Render image with transparent background

Anonymous
Not applicable
14,698 Views
7 Replies
Message 1 of 8

Render image with transparent background

Anonymous
Not applicable

Hello everyone,

I'm trying to render weapons for an inventory system in Unity, but I don't want to render with black backgrounds. I've visited quite a couple of forums, and the answer was to just remove the black by hand. I'm rendering a transparent glass material, and need to render with no background. How do I do this?

 

Shield.jpgsnipper.jpg

 

 

0 Likes
14,699 Views
7 Replies
Replies (7)
Message 2 of 8

trs_andre
Collaborator
Collaborator

Hi!

If you save your rendered image with alpha (for example in PNG), it has transparent background 😉

André Moreira

Game Developer / Technical Artist

LinkedIn

0 Likes
Message 3 of 8

zewt
Collaborator
Collaborator

Sort of need to say what you're rendering with 🙂

 

If you're using Arnold, that's a bug.  Arnold always renders opaque PNGs.  To get a transparent background you need to render to TIFF or EXR or some other format and then convert manually.  It makes rendering simple transparent sprites and icons way more annoying than it should be.

 

Note that if you're using transmission on that bottle, you're not going to get real transparency there no matter what you do, since transmission can't be done with simple alpha.  If you want transparency there, be sure to only use opacity, not transmission.  For the specular to work properly you'll need a premultiplied format (TIFF will work, make sure "unpremult alpha" is turned off in render options) and it'll only work in software that understands premultiplied alpha.  It's definitely possible to support it in games, I don't know about Unity specifically though.

 

Message 4 of 8

Anonymous
Not applicable

I am using Arnold to render. Should I switch back to the Maya Software? I'll use the real opacity on the clear glass. Thanks for your help!

0 Likes
Message 5 of 8

zewt
Collaborator
Collaborator

I'm not sure there's ever a reason to use Maya Software at all 🙂  Just switching to TIFF instead of PNG might solve your main problem of getting a black background (assuming you were using PNG in the first place).

 

Message 6 of 8

Anonymous
Not applicable

I did render the images as png's

0 Likes
Message 7 of 8

mspeer
Consultant
Consultant

Hi!

Please use "tif" as image format to save a proper alpha channel.

Message 8 of 8

Anonymous
Not applicable

Okay I'll try it!

0 Likes