Author Topic: How can I generate overlapping alphas like a pile of coins?  (Read 878 times)



In the image:
Red - overlapping of alphas
Green - paintover to the result I want.

I'm wondering if there's an easy way to overlap similar to overlapping objects while preserving the alpha.  An example of this would be a pile of coins, rocks, or even blades of grass.

The only way I've been able to work around this was to generate many individual maps, adjusting each map that has an overlap, and blend them all together but that way makes it difficult to adjust since I'd have to look at each map and check if there are overlaps as well as create masks so there won't be any overlapping in the final blended map.

One way you could reduce the effect is by multiplying a gradient over the coin to make it slanted, then randomize rotation when scattering.

Another, less desirable way (looks bad on edges of the coins?) is to use colour nodes for tiling instead of greyscale, as they seem to treat the shapes better when overlapping; as in the image below

I take it back about colour nodes not being desirable, I had a play and I managed to get decent results from it. Sbs attached if you wanna see what I did with my messy graph
Last Edit: October 12, 2017, 10:34:53 pm

Thanks for the reply Matty.  I actually have done something similar to this but I stopped when I wasn't happy with the results.  To me the objects looked like they were cut into each other (in yellow) and then concluded that it wouldn't be able to work with larger shapes.

Attached is a modified version of what i worked on (I replaced my alpha with yours, and changed colors of stuff)


Well that's kind of what they are doing I guess, cutting into each other. Height information is normally what deals with 'what's on top of the other' and there's always going to be overlapping of the height on the object is varied enough. Say a flat coin for example you'd probably get away with making it look like they are piled.

You could do what you suggested in the first place, make a bunch of tile nodes and vary the height per node then merge them all together, save it as a graph and stick it in your library to save you from having to do it every time. You may still get the issue with larger objects regardless.

I wish there was a way to set a mask per object that would clip other objects so that you could have the mask slightly smaller than the object, allowing two to intersect then cut off at a certain point (where you can't see the cutting). It's a hard one to explain... Probably even harder to achieve.

I wish there was a way to set a mask per object that would clip other objects so that you could have the mask slightly smaller than the object, allowing two to intersect then cut off at a certain point (where you can't see the cutting). It's a hard one to explain... Probably even harder to achieve.

That's kind of how I got the idea to merge them, but doing it that way creates too much work if you want it to work with different alphas of different shapes and sizes. :(