How do I set alpha cutouts?

Here’s a scene below, the blender file is attached. How do I specify the cutout texture so that the flowers will be trimmed away? I have an all-alpha texture (grayscale, with alpha, also my original texture has an alpha channel) but can’t figure out how to make Blender use the alpha. I suspect it’s something easy, “set this raytrace flag”, “set that use alpha flag”, but can’t figure it out and couldn’t find any related posts.

I’m an absolute beginner with Blender; I’m trying to make a little beginner tutorial for my Mineways program (see this link), but it’s the blind leading the blind. The cutout textures I’ve made work fine for previewers like SAP Viewer Complete and G3D, but I can’t figure out the trick to make them work for Blender. I’ve attached the original Wavefront OBJ files I generated and imported into Blender - any advice on how to change these to import to Blender (which is my primary target for rendering, since it’s free) is also massively appreciated.



flowers.blend (509 KB) (109 KB)

See attached blend
For the alpha textures enable the RGB to Intensity checkbox in its texture Influence settings.
For all materials receiving a shadow from a transparent object enable ‘Receive Transparent’ in its Material / Shadow panel so you get correct shadows cast.


flowers.blend (879 KB)

Excellent information, Richard, thanks very much. I’m closer, but still can’t reach your results in your blend file by myself (and I sat loading your file and my file, taking screen shots, trying to figure out the difference - I don’t see it). The problem is my alpha cutouts are now fringed, it looks like the ray hits the surface and if alpha > 0, then it stops and does not pass through. In your version it does pass through and so picks up and blends in the color behind the object.

Two other quick questions: is there any way to set Receive Transparent on all materials/meshes in one go, vs. material by material?
And, how do you get your preview to show textured objects? My preview (i.e., interactive mode) doesn’t show textures, just solid material colors (in this case, white). It’s some mode setting somewhere, I’m sure, but I can’t find it. If I learn this bit, I can get rid of a whole OBJ export mode from my Mineways program, which would be great.

Here’s the side by side, your good alphas vs. my bad ones. I’ve attached my “better, but not there yet” blend file. And, thanks again for your help - I’m now about 80% of the way there.


flowers_better.blend (506 KB)

The problem is my alpha cutouts are now fringed
In the texture panel select the ‘Premultiply’ checkbox

And, how do you get your preview to show textured objects?
Press N for the properties panel. In the Display settings, set the Shading to GLSL. Set the view to Textured from the 3d view header.

Thanks for “N”, that’s a huge plus.

The “premultiply” thing is not working for me, I’ve tried a bunch of variants, scoured your own .blend file (earlier in this thread) looking for the difference between yours and mine (and yours doesn’t set premultiply), and still I get the alpha fringe and you don’t. I’m stumped. Attached is my super-simple “rose” scene (and original OBJ file) which shows fringing for me. Maybe there’s a rendering option you have set by default that I can’t find?

I’m so close to [SOLVED]… I hope you or someone else can help.


Attachments (278 KB)

Last call: can anyone take the rose model I’ve attached and get rid of that gray alpha fringing around the edges? There is some way to do this in Blender, but I can’t figure it out.

Got a pretty good result by setting the diffuse color of the rose to black.

I received an answer, at last:

As for your alpha cutout problem: I have experienced the same issues, and fixed it as follows: In the mesh (in my example Torch) texture settings, disable the D texture (this isn’t necessary I think), and in the Kd texture, enable Alpha (default 1.0) in the Influence part.