irregular shaped images as planes

In my animation I have a window looking onto a street scene. I want to move a car past the window. I have an image (jpg) of a car, but of course it is in a rectangle. Now I can create a GIMP that has an alpha channel and the background removed, but Blender doesn’t like .gif files, right? So I can make a .png file, and Add Plane as Mesh but blender render still does not consider the background transparent.

In GIMP, I export the file with
Interlacing (Adam) OFF
Save background color OFF
Save gamma OFF
Save layer offset OFF
Save resolution ON
Save creation time ON
Save comment dim
Save color values form transparent pixels OFF
Compression level 9

If that’s right, (and IRFANVIEW seems to think so), do I need to do something in Blender to make this work?

What do you mean add plane as mesh??? The addon you need to use is under the add menu, mesh > images as planes.

It brings the image in on a plane of the right size. But you still have to setup the alpha like this:


I hope that’s clear without any annotation.

It’s a really functional and useful little script but there’s room for an improved v. 2.0 that gives you the option (in the operator panel) of using the alpha as transparency for formats that have an alpha channel, the degree of transparency and the option to invert alpha.

You’re right (of course) I described the import wrong, and thanks for the tip. I have only touched the surface of Blender, I know, and blush to say I have never used the Compositing functions. Now I guess I will have to read up on this. Perhaps naively, I thought I could juggle the properties screen to get what I wanted. was this impossible before Compositing?

I must say I am at a loss here. I can’t even use the Node editor to get a window to open with “Image Texture” on it…

Tel

This is not about compositing but materials. The node editor needs to be set to ‘material nodes’ at the top of the screen. Unless your header is at the bottom.

All of these controls are available in the material properties and texture properties but it’s much easier to work in the node editor. Picture =1000 words.

are we both using 2.69. I cant see how to set ‘material nodes’ anywhere.


Looks like you’re already in Material nodes mode (it’s the ball button next to the button with two pictures that is next to the button witht he checkerboard). You just need to hook up the alpha channel.

It’s worth pointing out though, that you are using Blender Internal, and DruBan’s example was using Cycles.

yes blender internal is different in how materials are set up. you need to go into the textures panel and under influence tick the alpha checkbox. in the materials panel you need to tick the transparency check box and set the alpha to 0.
this may not work as expected using images as planes addon in 2.69, i was having some trouble with it the other day. i ended up just adding a new plane and unwrapping and mapping the image manually

Here is a visual for the alpha settings. It’s not highlighted but also drag the specular alpha slider to 0 in the material transparency settings. Otherwise those transparent areas would still show specular highlights.


oops sorry about that.

Thanks to all, but especially to JA12. That works for me except that your version is different from my 2.69 . Under Texture/Image I don’t have the premultiply options.
i am sorry I could not get the Node Editir version to work. It looks interesting.
Tel

Yeah, it’s an old screenshot and not even mine.
Image section, check use alpha and choose premultiplied instead of straight. I know it’s stupid because in the next section there is image sampling which has alpha: use, and that is checked by default. Still, premultiplying alpha to RGB channels prevents some white border issues in some cases.

I used to think this too! Now the opposite seems to be true JA12 check this screenshot out and tell me what you think…



Don’t mean to hijack the thread I hope it’s not too offtopic.

I don’t know how Blender alpha handling in image textures has changed. What I do know is that when comparing the alpha channel, you need to know which way the alpha was produced when put on some other color. Can’t rely on just what Blender shows in the UV/image editor.

In this I know the rendered alpha is premultiplied. Putting it over another color produces expected result since the background color can mix in with the original RGB channels. Trying to use the same image with a straight alpha doesn’t work, as expected.


One tip for others: if you are moving in front of another plane, perhaps used as a backdrop as in my example, don’t forget to turn off Receive Shadow in the background plane. Or stop your plane from casting shadows by turning off Traceable on your moving plane.