My Alpha Maps Aren't Alpha Mapping

Okay, so I’m making this thing, right? It’s a fancy thing that’s kinda neat. What I’m doing is building and UVing it in Modo, and arranging it into a scene in Blender. Exporting it as a Collada file seems to work perfectly as far as porting the model from one editor to another with as little as fuss as possible goes, save for one thing.

I can’t get my alpha maps to work.

To give you an example, this is what it looks like in Modo:


…and this is what it looks like in Blender:

Click 2

I believe I’ve set all the important bits required to get it to display the alphas. I’ve switched to GLSL rendering, set the edtior to Blender Game, and activated the alpha channel in the material tab (you can see all that on the right hand side). If there’s a step I’m missing, I have no idea what it could be.

So, got any advice to help me out here?

edit: also, is it possible to get the renderer to cast shadows off the alphas?

You need to enable transparency for the material. Go into material settings, at the very bottom you’ll see Transparency panel. Tick to enable, choose Z Transparency and slide Alpha all the way to 0 (since your texture controls alpha now).

As for shadows, can’t say for sure, but probably not.

Beautiful! Thank you.

The only downside is it doesn’t cast shadows through the alpha mask properly, and setting the material not to cast any shadows makes everything look too plain. It did make a slight change though, so maybe there’s a way I can somehow set it to do what I want.

under materials_>shadow_>receive transparent_> turn it on for all the mesh in the scene !

Didn’t make a difference. : \

…do you think it might have something to do with the materials being set in Modo and ported over?

edit: one other thing I should add is that while I’ve got the leaves set to cast buffer shadows, it’ll produce this odd gashed line effect on some of the underlying materials. Like so…

It almost looks like z fighting, but it doesn’t shift and change with the angle. I’m thinking I might need to approach my alphas a little differently than I do in Modo, cuz something’s obviously weird with them.

Upload the .blend

I kinda feel weird posting my stuff up, but eh. I’m sure it’s piddly enough and in such an unfinished state no one will want to plagiarize it. :stuck_out_tongue:

27 meg download

Also, any critiques are more than welcome. If you’ve got any suggestions or tips on what I can do better, feel free to hit me with them.

you have to turn on receive transparent for the house…i cant download your file…i am having problem !

Receive transparent is on for all my materials. I’ve gone through and triple checked them all just to be sure.

As for the file, I just tested it out while logged out of Dropbox to make sure the link wasn’t tied to a password, and it downloaded fine. Does your browser have a problem accessing https sites?

nope…but rar files always comes corrupted when i download from dropbox…! can’t help you MAN then…if everything is inside the same layer…it should work !

Hmm. Dunno. Dropbox has always been pretty smooth for me.

Appreciate the help anyway, though. I’m sure I’ve got something goofy going on, it’s just a matter of finding it and fixing it.

@isyedcg: First of all it’s zip and secondly it downloads ok for me. I’d advise you to check your connection or check for viruses :slight_smile:

@Renzatic: Those are pretty decent models and textures. Now for myself you can have my word I woulnd’t copyrape them or something, but in the future when uploading you might include a license in your .blend’s text block.

Now for the matter itself, some googling showed that BGE does not support buffer shadows from alpha-maps. In fact, after simple checking, I see that BI doesn’t render them either (raytraced shadows work fine, of course, but those are not for BGE).

Thank you. I’ve been a bit concerned about going overboard with the textures. 9 1024-2048x UV sheets for one building and a few throwaway details seemed a little overkill to me, specially considering I’m intending to use this in a realtime environment.

…but, since you didn’t mention anything about it specifically, I’m assuming I’m alright. :stuck_out_tongue:

As for the copyrights and all that good stuff, I think you’re all pretty alright, and I doubt anyone here will blatantly steal it from me. This seems like a pretty on the level, tight knit community. Not much to worry about, other than people seeing my project long before it’s done.

Though by “including a license in your .blend’s text block”, I assume you mean open up the blend file with a text editor and slap a paragraph or two deep inside it, right?

Now for the matter itself, some googling showed that BGE does not support buffer shadows from alpha-maps. In fact, after simple checking, I see that BI doesn’t render them either (raytraced shadows work fine, of course, but those are not for BGE).

Yeah, I did some checking and came to the same conclusion. Kinda sucks, since it would’ve been pretty cool looking, but I can always make a stencil map, and bake AO onto the texture sheets inside of Modo (or Blender, if I ever get around to learning how to do that there). The only thing I’ll miss out on there is the layered shadow effect on the leaves themselves. Since all the leaves don’t have their own unique UV space, I can’t use AO on them. The only thing I could do there is to maybe set the buffer shadows so they’re less distinct. Maybe round them off, make them a little more hazy. Just have enough in there to suggest some depth.

…which it looks like I can do, I just gotta learn how.

edit: oh, and the gashed line effect. Do you have any idea what’s causing that? I figured it was an issue with the buffer shadows, but turning them on and off doesn’t get rid of it.

I wish I had an answer for you, but in fact I’m having the same problem, except that everything is constructed right there in Blender. I made a mini-blend file (Blender 2.66a) with just the specific part that’s causing a problem and stuck it in a .zip on Depositfiles :

What I have here is the chest plate of a Nazi super-robot, which is supposed to have a big ol’ eagle as a decal on the chest (and the Blender procedural shaders replaced by more texture mapping, but I hate doing UV mapped textures and keep putting that off in favor of more geometry) but my transparent decal image doesn’t actually show up transparent when rendered. Now, I’m not actually going to be using this in BGE (game project is in Irrlicht) so it probably wouldn’t matter in the end, but I’d like to be able to render some cinematics and preview stills, and if nothing else it’s driving me crazy that it doesn’t work. Help me, Obi-wan Kenobi!


Lat’s see if the damn forum will recognise my carriage returns now…

Anyway… I forgot to include or pack up the image file involved - here it is on Imageshack

This needs to be in a folder named “texpng” beside the .blend file - and probably needs to be re-intercapped to NaziEagle256.png in order to work. Bloody imageshack.




Yeah, I’m in a mood. Thanks to this.

Edit2: As a bonus, if you look at the previous few images in my IS gallery you’ll see the transforming P-38 the player gets to use to demolish said Nazi super-robots. 'Cause surveys show that shooting nazis is good wholesome fun for the whole family!

I think your problem is your texture doesn’t have an alpha. Transparencies for .png files like what you’ve got are…I think…only good for icon and whazzits like that. For a texture, you need a specific alpha channel so the editor will know what’s transparent and what’s opaque. It’ll only see the clear sections on that .png file as either black or white.

Let me goof around with it for five seconds and see what I can do.

edit: actually, I just fired up GLSL rendering, and it came right up as is. That should be all you have to do. Hit N to open up the side menu, go down to display, open it up, and where you see “multitexture”, change it to GLSL.

Though I gotta say, you’re doing things the hard way.

Where does my mouse need to be when I hit N, and why am I doing things the hard way?

Edit: Derp, okay, found the GLSL option. Still, what am I doing the hard way, ands what"s the easy way? I like easy.

@dialNforNinja : lol :D@Renzatic : ask kupoman or moguri about your problem.They’re BGE developers at #blendercoders

You lol, but the problem is I’m used to doing things the 2.4x way, and get annoyed that the side menu replaced the litle floating numerical properties palette at all let alone playing with all the fancypants new buttons and knobs. Well, that and that I’m still working up from the “edit by triangles, slap a diffuse color on there, and if your really feeling fancy adjust the specular or add some emit. And vextor blur node on EVERYTHING, baby!” level. Making complex transforming character models that sit around 5000 triangles is my specialty, actually doing anything with them is the aim of my current project to make a mecha game, since I have some programming BG, hopefully enough to hammer the necessary components together, and more stubborness than sense to keep hacking at it long after I should have learned that I suck.

Of course, as a wise plumber once said, the key to success is to just keep sucking until you empty the cess!

@Renzatic, I’ve seen several games that use .pngs with transparency - I think you’re thinking of .gifs, which only have a solid or transparent bit rather than a channel… And GLSL view does let me see the texture maps in the workspace, which is nice, but it doesn’t do anything for the actual problem of not getting the transparency transparent…

Actually, I was thinking of .pngs. All this time, I assumed a texture had to have an alpha channel to display transparencies in an editor or game. I never knew you could throw a .png into Blender and have it work without a defined mask.

Hey. I learned something new :smiley:

As for your problem, yeah…you’ll have to ask someone else, cuz I’m not exactly sure what you need. If you’re trying to make a game, if it’s transparent in the viewport, it should be transparent in the game, as they’re more or less one and the same.

And the easy way? Just UV map it and paint all your textures and decals on your diffuse. From what it sounds like, you’re trying to float all your texture details on top of your mesh, and to me at least, that just makes things needlessly complicated.

The reason for that is that the main unit texture will be tintable for varied user color schemes, but decals need to stay the way they are, and hence not be part of the same texture as the general skin. But, see, whatever you did to fix it didn’t work when I turned on GLSL shaders… All I get is a big black opaque square in the viewport, just like with the render engine. So… I’m not sure what’s going on.