texture with alpha on transparent material blender/yafray?

I want a uv texture to show up on a glass cube (rendered in yaf and exported from blender), like a bottle of perfume where you can read the lettering but see through the bottle where it isn’t colored by lettering or decorations. I’m using blender 2.32 & Yaf 0.0.6.

My problem is that the uv mapped texture uses the alpha value from the shader, so it becomes transparent as the rest of the cube does.

The texture works when the cube is solid and the uv map is visible:


Here you can just see its faint outline as it is transparent:


I want the map to show up clearly like in the first picture but I want the cube to be transparent like in the second picture.

Any help would be greatly appreciated!



You can do it from within Blender using the internal raytracer. You need to use UV texture mapping; see my earlier post at Texturing part of a Mesh (rookie UV texturing?).

To create the label you have to create an image with an alpha channel which masks out the area you want to be transparent; areas not masked by the alpha channel (the label) are left opaque. When you import the image, you must select UseAlpha in the texture buttons and map it to the UV coordinates in the materials texture Map Input buttons and select Col and Alpha in the materials texture Map To buttons.

Now when you change the alpha for this material, only the alpha channel of the image is affected. I’ll be posting an example of this (a rotating champagne bottle with label and internal refraction flaws) sometime tomorrow (it’s currently on frame 43 out of 150 and it takes about 8 minutes/frame, so there’s about 13 hours of rendering to go) in the unfinished projects forum for comments. I’ll post the .blend file as well, so you’ll be able to pull it out and see what I did.

Hope this helps.

As I mentioned above, you can see an example of what you’re trying to do (with .blend file) in the posting in Unfinished works entitled Champagne Bottle (edit: link and posted images removed to save space).

Thanks for the reply. I want to use yafray though for the hdri lighting.