Anyone tested alpha shadows with the new test build yet? Can’t get it to work.
Something was broken with it, but Moguri fixed it. Download an SVN build from the buildbot or Graphicall.
Oh great. I’m sorry if I this was already mentioned before.
It wasn’t - he just fixed it yesterday, actually. Big thanks to him - this is a really cool feature. Note that for the shadows to show up, the casting mesh has to be using Alpha Blend for transparency, not Clip Alpha.
This is really cool indeed. Thanks Moguri!
Holy Hell, we have alpha shadows now?:eek: In the game engine? Awesomeness.
But wait, no support for clip alpha? Does that mean these are actual transparent shadows? Well, either way, I hope clip alpha support is somewhere on Moguri’s radar.
what kind of framerate with a decent size scene?
Here’s the deal with clip alpha, we have two conflicting optimizations:
For alpha shadows, you need to run the material’s shader witih texture data and everything to make sure you’re drawing the correct thing into the shadow buffer so it has it’s alpha texture. This slows things down, so only materials marked as needing alpha send the extra data since they need it for alpha shadows.
Clip alpha does not require alpha blending (since it’s just on/off alpha) therefor it doesn’t need to be rendered as a more expensive alpha polygon and gets put in a non-alpha (solid) material bucket.
Since the clip alpha isn’t marked as needing alpha, it gets ignored for alpha shadows. This shouldn’t be too hard to fix, but it might take a little thinking in design to make sure we don’t implement some nasty hack to get it working.
Also note that this only works for simple shadow maps. The variance shadow maps need a custom shader to write depth information and can’t simply make use of Blender’s shaders to draw the alpha textured polygon. There is code in Harmony that should make alpha shadows easier to implement for variance shadow maps, so I’m waiting for that to get further along before tackling alpha VSMs.
Thanks Moguri! You’re awesome. So, can this shadow method handle partially transparent textures, or does it look like clip alpha in that regard?
Laser Blaster: I’m not Moguri, but I can at least tell you from my testing that it’s currently either fully opaque or fully transparent.
I can also say that the shadows cast from a standard black&white texture is pretty low quality as of now, there’s no aliasing and even the slightest compression artifacts to keep texture sized down will show up. The latter issue could be solved somewhat by allowing one to raise the threshold for what’s considered transparent by the lamp. The aliasing issue may have to wait until the VSM alpha shadows make it in.
This shadows are so complex,and in the same time slow…I hate shadows as much as i love them.
That’s some good news. This will gain on the performance for sure. Thanks for all the effort you put into this. With this new feature another door of opportunities opens.
Ok, what about copying the object, flattening it out, with scale, and then using the outside edge to make the shadow?
Here is a example of a flattened out model from 8 angles
LodBlend.blend (806 KB)
Here is a .blend that is a little like what I mean,
Shadow.blend (629 KB)
@ BluePrintRandom: This thread deals with Alpha Shadows. They work just fine, so no reason to search for other solutions. Also, when looking at your blend, it looks like you didn’t understand what Alpha Shadows actually do. No need to discuss this further, just wanted to point out that we should think before we post. I’m also speaking for myself, because I also fail sometimes to make sense with my posts.
this is for pre making a shadow sprite, and writing an algorythm todoit before the game is ever even fired up (pre-baking)
by mixing the different sprites as alpha mapped shadows… you could have real time low cpu shadow
I make sense…if you listen
Alpha shadows are slow, and terrible @ the moment…
Alpha Shadows are shadows that are cast from objects with alpha transparency. The shadow sprites you presented are only dealing with shadows of objects with no alpha transparency. That’s why it looks like you didn’t understand what Alpha Shadows actually do.
Using sprites for shadows are a bad idea for so many obvious reasons. Alpha Shadows aren’t slow at all. But the mode ‘Blend’ is much slower as ‘Clip Alpha’. It will only be a matter of time until Alpha Shadows will be compatible with Clip Alpha, so problem solved.
I’m sorry, but to me you don’t make sense. Or maybe you are right after all and I’m not a good listener.
these “sprites” could be done as brushes… the brushes could then be applied in real time,
Base map<—does not change
Damage map <----changes
Lighting layer<-------“Brush” shadows
apply every X frame…
The alpha shadows are preliminary - they’re not done yet. The feature will be improved or optimized, at least to work with variance shadow maps, or someone can ask Moguri or other developers to prioritize it. As users, we should be grateful for any development at all. Nothing is lightning-fast at first.
I am also having trouble understanding your solution. How would it help with alpha shadows? Your proposed blend file contains just flattened versions of the original meshes. If you mean altering a light texture for a mesh (i.e. a room) and updating it each frame (or even every so often), I think it would run too slowly for a real-time or game application. You could probably afford to do it only when you move a shadow-casting object, though. However, it’d probably be best to just go with a textured plane that is a shadow that just follows the object around. If you did go with the texture-updating route, it would probably be best to do it all with code, or using a texture, rather than a polygonal mesh in Blender.