Alpha Image outline
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
-
strayerror
- Regular
- Posts: 154
- Joined: Fri Jan 04, 2019 3:44 pm
- Contact:
Alpha Image outline
Hi, not sure if this is possible but I'd like to be able to put a border around an image similar to how it's possible to do with text. However rather than having the border at the image bounds, I'd like to have it follow the edges of the alpha mask.
I had a quick play trying to use the new Blur manipulator, which works a bit, but not really. Am I just missing something obvious?
I had a quick play trying to use the new Blur manipulator, which works a bit, but not really. Am I just missing something obvious?
- nature1996
- Regular
- Posts: 62
- Joined: Wed Jun 21, 2017 10:35 am
- Contact:
Re: Alpha Image outline
Maybe by putting a slightly bigger blacked-out version of the picture behind it? it might not be elegant, but it might do the job.
Je parle aussi français
-
strayerror
- Regular
- Posts: 154
- Joined: Fri Jan 04, 2019 3:44 pm
- Contact:
Re: Alpha Image outline
Alas, I tried such an approach and while it gives limited success for images with transparency on the outermost edges, it doesn't work well for images where transparency regions are closer to the centre than opaque regions. The result is more that of a shadow cast from a central light source, so any inner edges don't get the benefit of the outline. :(
Appreciate the suggestion though, it may very well work for others that only require the outer edges be outlined!
Appreciate the suggestion though, it may very well work for others that only require the outer edges be outlined!
- nature1996
- Regular
- Posts: 62
- Joined: Wed Jun 21, 2017 10:35 am
- Contact:
Re: Alpha Image outline
For the inside area, adding a smaller image might complete what missing from the bigger one.
Je parle aussi français
-
strayerror
- Regular
- Posts: 154
- Joined: Fri Jan 04, 2019 3:44 pm
- Contact:
Re: Alpha Image outline
Oooh, hadn't thought of that!
Gave it a quick try, but unfortunately because the focal point is the centre, the result gives varying results on edges based on how far from the centre they are. For some smaller images the result is OK as the variance is minimal, but for certain other and especially larger images, not so much. Ideally I'm looking to achieve a uniform outline, to that end I tried using offsets (up down left right) but the results aren't great especially at the corners, I could maybe try diagonal offsets too, but then rendering 9 image (8 offsets + the main one) seems like overkill. :(
Gave it a quick try, but unfortunately because the focal point is the centre, the result gives varying results on edges based on how far from the centre they are. For some smaller images the result is OK as the variance is minimal, but for certain other and especially larger images, not so much. Ideally I'm looking to achieve a uniform outline, to that end I tried using offsets (up down left right) but the results aren't great especially at the corners, I could maybe try diagonal offsets too, but then rendering 9 image (8 offsets + the main one) seems like overkill. :(
Who is online
Users browsing this forum: No registered users