renpy / renpy

The Ren'Py Visual Novel Engine
http://www.renpy.org/
5.01k stars 704 forks source link

More options for outlines or separate functionality for drop shadows #5666

Open Charmareian opened 2 months ago

Charmareian commented 2 months ago

Currently you can set the thickness, color and the x/y offset for outlines. This seems to be the recommended way to do drop shadows, by layering outlines like so:

define gui.text_outlines = [ (8, "#101010", 4, 4), # Drop shadow (4, "#101010", 0, 0) # Main outline ]

Though this doesn't make a very good looking drop shadow. There's no transparency or bluring options to really sell the effect.

I noticed there was drop shadow functionality, but this seems undocumented and is only mentioned on a decade old forum post: style.default.drop_shadow = (1, 1)

This seems to do the exact same thing as adding another outline layer, but with less options. So it seems like a deprecated feature?

It would be nice to have more polished drop shadows, be it through more outline options or new functionality

renpytom commented 2 months ago

Transparency is supported, you can use a transparent color for each of the outlines. You can also make a pseudo-blur by stacking multiple text outlines of different sizes.

I'm not saying this is ideal, but it is doable until I can look into this further, perhaps using shader-based blurs.

Charmareian commented 2 months ago

How would you do a semi-transparent color for the outline? Say I wanted half transparency for black. Seems like you should be able to do something like #80000000, but it seems fully transparent like this.

renpytom commented 2 months ago
It's at the end - "#00000080". (You can write half the digits sometimes - "#0008" is equal to "#00000088"). 
Noriverwater commented 2 months ago

The text glowing effect mentioned in comment #896 is one application of this feature.

Charmareian commented 2 months ago

Screenshot_6

It's definitely achievable with semi-transparent stacked outlines as renpytom mentioned. You could think this is a direct screenshot of Higurashi with 07th mod installed. The code is simple, just took a lot of tweaking.

Screenshot_7

This many outlines could potentially be bad for performance(?) and it's not ideal. I'm sure a simple and more fleshed out text shadow system would be desirable for many developers.