Realtime transparent glass

How would I go about making a realtime transparent, yet specular glass in blender? When I use an alpha transparency I can see the wires as well, which kills the effect. The transparency is controlled by an alpha map.

you could just make a gray or white plane and enable ztrans on the material

How would you get the transparent to have a higher spec value though? It would be really nice to have highlights on a fully transparent face.

You can only see the wires in the realtime preview- when the game is running, they aren’t there. I think the wires are rendered on transparent objects so if it’s too see through you can still find the faces.

The specular you can do through nodes- add an extended material node, plug the alpha into all threee slots of an RGB combine node, and plug the RGB into the top slot of a mix node set to add- and the specular value from teh material node goes into the bottom slot (also, set Fac to 1)- now you can plug the color channelof the mix node into the alpha output.

Basically, this adds the strength of the specular back into the alpha. Easy beans.

Doesn’t quite work. The best I can get with the transparency is this. I’d ideally like to see the brown spot and eyebrow, along with a strong specular shine over the area.


Have you tried looking at it ingame? alpha behaves very oddly in the preview, including not showing objects behind it and other problems that will go away if you just hit “p” while your cursor is over the viewport.

I fixed the transparency somewhat, but there are nasty jaggies on it. In Marmoset I can adjust them with a slider for alpha threshold. Can this be done in blender?

P causes a lot of my model to become inverted looking and you can save out renders from it.


But “P” starts the game in the game engine - shows a preview of what it would look like ingame.

I can’t quite describe this. But this is when I hit P when GLSL shading is on.


You have the entire model set to alpha, and the alpha face-sorting in blender is not great (it’s optimized for speed rather than accuracy)- in teh face settings (in edit mode) select all the faces you want to be solid, and make sure they’re set to Opaque, and also make sure the material for those faces doesn’t have ztransp on (if you want some faces to be see through, give them a separate material)

If you’re intending on using the model in an external engine (EG marmoset) then you’d be best off exporting it into that to see how it looks- remember, the blender preview is just a preview to give you an idea of what the model will probably look like, and a different program will use entirely different algorithms and generally look very different, with its own advantages and problems.

That said, the jagged edges look like either you have a sharp transition in your alpha map (in which case, smooth it out!) or you’re using clip alpha- this is good for intricate but flat things (EG leaves) that can be made with an alpha image on a plane rather than many polygons, but since it’s either totally clear or solid, it’s not good for glass and the like. Go with regular alpha.