"Glowing" text in Ren'Py? [solved]

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
User avatar
Sapphi
Eileen-Class Veteran
Posts: 1685
Joined: Fri Jun 05, 2009 3:31 am
Completed: Boku no Taisetsu na Yumeko
Projects: Twelve, PAW ★ PRINTS
Organization: Kitsch-soft
Location: Illinois, USA
Contact:

"Glowing" text in Ren'Py? [solved]

#1 Post by Sapphi » Thu Aug 09, 2012 12:05 am

Does Ren'Py support/have a way to implement glowing text?
Once upon a time every kid on the internet loved to abuse CSS to give their text an unreadable glow. Tasteful examples with code: Here and here

So far I've played around with both the "outlines" and "drop_shadow" properties, but I haven't been satisfied. I can make the drop shadow transparent, but it's always crisp and clean. I want it to be blurry like the above example - is there a way to do this?

(It's not the end of the world if there isn't. But it would be pretty cool. :) )
Last edited by Sapphi on Thu Aug 09, 2012 7:53 pm, edited 1 time in total.
"It is [the writer's] privilege to help man endure by lifting his heart,
by reminding him of the courage and honor and hope and pride
and compassion and pity and sacrifice which have been the glory of his past."
— William Faulkner
▬▬▬▬▬▬▬▬▬▬..+X+..▬▬▬▬▬▬▬▬▬▬
Image

User avatar
nyaatrap
Crawling Chaos
Posts: 1823
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: "Glowing" text in Ren'Py?

#2 Post by nyaatrap » Thu Aug 09, 2012 12:34 am

There's no ren'py function which returns blurred displayables. But if you are a python wizard, you can make this function (I thought someone made it somewhere I couldn't remember. Though I rather wish the ATL has blur properties). But it will be applied only displayables not texts.

User avatar
PyTom
Ren'Py Creator
Posts: 15152
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: "Glowing" text in Ren'Py?

#3 Post by PyTom » Thu Aug 09, 2012 12:50 am

The way to do it is to have multiple outlines, with decreasing outline sizes and increasing alphas. Probably something like:

Code: Select all

init python:
    style.default.outlines = [ (3, "#fff4", 0, 0), (2, "#fff8", 0, 0),  (1, "#fffc", 0, 0) ]
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
netravelr
Miko-Class Veteran
Posts: 504
Joined: Thu Jan 28, 2010 2:31 am
Completed: Culina: Hands in the Kitchen, Culina: The Spirit of Cooking, Saving Zoey
Projects: Love at the Laundromat
Organization: Moustachio Studios
Deviantart: netravelr
Location: Singapore
Contact:

Re: "Glowing" text in Ren'Py?

#4 Post by netravelr » Thu Aug 09, 2012 3:25 am

Either that, or making a font that has a blur to it in the image files that are associated with it, but I'd suggest just doing the multiple outlines.
Image
Technical Designer/Programmer
Game Design Portfolio - Project updates on my Twitter
Experienced in: C/C++/C#, Python, Unreal, Unity, and Flash
_________________
"Space can be very lonely. The greatest adventure is having someone share it with you."

User avatar
Sapphi
Eileen-Class Veteran
Posts: 1685
Joined: Fri Jun 05, 2009 3:31 am
Completed: Boku no Taisetsu na Yumeko
Projects: Twelve, PAW ★ PRINTS
Organization: Kitsch-soft
Location: Illinois, USA
Contact:

Re: "Glowing" text in Ren'Py?

#5 Post by Sapphi » Thu Aug 09, 2012 6:21 pm

PyTom wrote:The way to do it is to have multiple outlines, with decreasing outline sizes and increasing alphas.
Ah! Thank you! It works so nicely!
(And it's so obvious I'm embarrassed I didn't realize it...)

But now I have a new problem. To get that nice subtle glow I ended up using twelve 1-pixel outlines. Now, when lines are close together, you can see the outlines before you see the text they belong to. Can I remedy this without spacing the lines farther apart from each other, or is it just a natural consequence of putting a combined 12 pixel-wide outline around my text?
Attachments
screenshot0005.png
"It is [the writer's] privilege to help man endure by lifting his heart,
by reminding him of the courage and honor and hope and pride
and compassion and pity and sacrifice which have been the glory of his past."
— William Faulkner
▬▬▬▬▬▬▬▬▬▬..+X+..▬▬▬▬▬▬▬▬▬▬
Image

User avatar
PyTom
Ren'Py Creator
Posts: 15152
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: "Glowing" text in Ren'Py?

#6 Post by PyTom » Thu Aug 09, 2012 6:45 pm

It's the latter. There isn't a way to fix this currently.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Sapphi
Eileen-Class Veteran
Posts: 1685
Joined: Fri Jun 05, 2009 3:31 am
Completed: Boku no Taisetsu na Yumeko
Projects: Twelve, PAW ★ PRINTS
Organization: Kitsch-soft
Location: Illinois, USA
Contact:

Re: "Glowing" text in Ren'Py?

#7 Post by Sapphi » Thu Aug 09, 2012 7:53 pm

Thanks again. I'll see what I can come up with keeping this constraint in mind.
"It is [the writer's] privilege to help man endure by lifting his heart,
by reminding him of the courage and honor and hope and pride
and compassion and pity and sacrifice which have been the glory of his past."
— William Faulkner
▬▬▬▬▬▬▬▬▬▬..+X+..▬▬▬▬▬▬▬▬▬▬
Image

User avatar
PyTom
Ren'Py Creator
Posts: 15152
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: "Glowing" text in Ren'Py? [solved]

#8 Post by PyTom » Thu Aug 09, 2012 9:03 pm

The one thing you can do is to adjust the split between the rows:

http://www.renpy.org/doc/html/text.html ... t-concerns
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

017Bluefield
Regular
Posts: 49
Joined: Mon Dec 30, 2013 1:55 am
Projects: Project Bluefield - Origins
Organization: Autumn Rain Studio
Deviantart: playerzero17
Contact:

Re: "Glowing" text in Ren'Py? [solved]

#9 Post by 017Bluefield » Fri Jun 15, 2018 12:27 am

So, how does one apply this to one line of text, while leaving the rest without this outline?

kivik
Miko-Class Veteran
Posts: 779
Joined: Fri Jun 24, 2016 5:58 pm
Contact:

Re: "Glowing" text in Ren'Py? [solved]

#10 Post by kivik » Fri Jun 15, 2018 3:00 am

Haven't tried this myself but I think you need to create a text displayable (https://www.renpy.org/doc/html/text.html#Text) and add it to your dialogue. You'd add the outline property to the Text() arguments as PyTom showed above.

You'd then add it with the image tag: https://www.renpy.org/doc/html/text.html#text-tag-image

It'll probably take some experimenting.

017Bluefield
Regular
Posts: 49
Joined: Mon Dec 30, 2013 1:55 am
Projects: Project Bluefield - Origins
Organization: Autumn Rain Studio
Deviantart: playerzero17
Contact:

Re: "Glowing" text in Ren'Py? [solved]

#11 Post by 017Bluefield » Fri Jun 15, 2018 3:24 am

kivik wrote:
Fri Jun 15, 2018 3:00 am
Haven't tried this myself but I think you need to create a text displayable (https://www.renpy.org/doc/html/text.html#Text) and add it to your dialogue. You'd add the outline property to the Text() arguments as PyTom showed above.

You'd then add it with the image tag: https://www.renpy.org/doc/html/text.html#text-tag-image

It'll probably take some experimenting.
Can I not use a custom text tag?

User avatar
Remix
Miko-Class Veteran
Posts: 830
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I cannot draw very well)
Projects: An un-named 3d anime based trainer game
Contact:

Re: "Glowing" text in Ren'Py? [solved]

#12 Post by Remix » Fri Jun 15, 2018 4:45 am

You could likely do it by declaring the outlines as a named style and then using inline style tags around the text:

Code: Select all

# untested
style outlined_text:
    outlines [ ... ]

label ...:
    "{=outlined_text}Some words{/=}"

User avatar
PyTom
Ren'Py Creator
Posts: 15152
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: "Glowing" text in Ren'Py? [solved]

#13 Post by PyTom » Sun Jun 17, 2018 11:05 pm

Due to the way outlines work, they're kind of an all-or-nothing thing. Either every line has them, or none do.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Imperf3kt
Eileen-Class Veteran
Posts: 1595
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: "Glowing" text in Ren'Py? [solved]

#14 Post by Imperf3kt » Sun Jun 17, 2018 11:16 pm

PyTom wrote:
Sun Jun 17, 2018 11:05 pm
Due to the way outlines work, they're kind of an all-or-nothing thing. Either every line has them, or none do.
Is it possible to create multiple outline styles?
One style could be "invisible", so as to hide it, if you can.
Image

Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

User avatar
PyTom
Ren'Py Creator
Posts: 15152
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: "Glowing" text in Ren'Py? [solved]

#15 Post by PyTom » Sun Jun 17, 2018 11:21 pm

There's an outline color tag, that could be used maybe to hide it (or show it, if it's set to transparent by default). The problem is that the outlines change the size of a block of text in its entirety.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

Post Reply

Who is online

Users browsing this forum: Remix