Thread Tools Display Modes
06-06-11, 09:55 PM   #1
Aprikot
A Frostmaul Preserver
 
Aprikot's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 284
Text "effects" using string clones

I'm wondering if anyone has considered or attempted faking text effects by creating multiple replicas of a font string, and layering them over, under, and around the original. A Photoshop mock-up of the idea:



I was thinking of trying an in-game demo/proof of concept mock-up when I have some time. I shouldn't think using this method for a single custom font string would be too difficult.

I'm more interested in programmatically creating, anchoring, positioning, layering, and coloring multiple font string replicas according to specific font objects.

The first examples that come to mind, and probably the best application of the concept, are some of the font objects that overlay the game world (zone & chat text...nameplates & FCT too).

I'm curious if anyone knows of any showstopping obstacles to implementing something like this.
  Reply With Quote
06-07-11, 12:19 AM   #2
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Originally Posted by Aprikot View Post
I'm wondering if anyone has considered or attempted faking text effects by creating multiple replicas of a font string, and layering them over, under, and around the original. A Photoshop mock-up of the idea:



I was thinking of trying an in-game demo/proof of concept mock-up when I have some time. I shouldn't think using this method for a single custom font string would be too difficult.

I'm more interested in programmatically creating, anchoring, positioning, layering, and coloring multiple font string replicas according to specific font objects.

The first examples that come to mind, and probably the best application of the concept, are some of the font objects that overlay the game world (zone & chat text...nameplates & FCT too).

I'm curious if anyone knows of any showstopping obstacles to implementing something like this.

I think this is possible, there is diffrent, layers of things:

"BORDER", "TOOLTIP", "OVERLAY", "HIGH", "LOW", "MEDIUM", "BACKGROUND", "ARTWORK", "HIGHLIGHT",
"FULLSCREEN_DIALOG", "FULLSCREEN", "DIALOG"

http://www.wowwiki.com/Layer

http://www.wowwiki.com/FrameStrata

What i think you need to do is to Create diffrent frames, for each fontstrings.

Like; local LayerOne = CreateFrame("Frame", nil)
LayerOne:SetFrameStrata("LOW")

local FontString1 = LayerOne:CreateFontString(nil)
LayerOne:SetFont(font, fontsize, fontflag)

I think this will work, it should.

Last edited by Aftermathhqt : 06-07-11 at 12:24 AM.
  Reply With Quote
06-07-11, 01:23 AM   #3
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
I'm not sure why you'd want to do this. It's much more efficient if you have 1 font string and use the built-in animation system, or create a ScrollingMessageFrame, etc.

http://wowprogramming.com/docs/widge...AnimationGroup
http://wowprogramming.com/docs/widgets/Animation

http://wowprogramming.com/docs/widge...ngMessageFrame
  Reply With Quote
06-07-11, 09:10 AM   #4
Aprikot
A Frostmaul Preserver
 
Aprikot's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 284
Originally Posted by Game92 View Post
I think this is possible, there is diffrent, layers of things:

"BORDER", "TOOLTIP", "OVERLAY", "HIGH", "LOW", "MEDIUM", "BACKGROUND", "ARTWORK", "HIGHLIGHT",
"FULLSCREEN_DIALOG", "FULLSCREEN", "DIALOG"

http://www.wowwiki.com/Layer

http://www.wowwiki.com/FrameStrata

What i think you need to do is to Create diffrent frames, for each fontstrings.

Like; local LayerOne = CreateFrame("Frame", nil)
LayerOne:SetFrameStrata("LOW")

local FontString1 = LayerOne:CreateFontString(nil)
LayerOne:SetFont(font, fontsize, fontflag)

I think this will work, it should.
I was thinking along these same lines...will give er a try.

Originally Posted by Haleth View Post
I'm not sure why you'd want to do this. It's much more efficient if you have 1 font string and use the built-in animation system, or create a ScrollingMessageFrame, etc.

http://wowprogramming.com/docs/widge...AnimationGroup
http://wowprogramming.com/docs/widgets/Animation

http://wowprogramming.com/docs/widge...ngMessageFrame
I'm not shooting for any over time effects or user interaction...just an enhanced font shadow if you will. I infer from your comment though that static font string ornamentation can be accomplished with the animation system, but the howto isn't readily evident to me in the API documentation.

How would you use animation for this, and why would that be more efficient?
  Reply With Quote
06-07-11, 09:20 AM   #5
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 384
You can set the offset, color and opacity for the shadow so why bother creating similar effects?

What would be cool though is gradiently colored text.
__________________

  Reply With Quote
06-07-11, 10:03 AM   #6
Aprikot
A Frostmaul Preserver
 
Aprikot's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 284
Originally Posted by sacrife View Post
You can set the offset, color and opacity for the shadow so why bother creating similar effects?

What would be cool though is gradiently colored text.
I agree the existing shadow offset functionality is very similar to what I'm suggesting. I'm mainly aiming for a four-sided shadow/highlight.

In the OP's image, the lower left "chat" text has an omnidirectional black glow effect using offset clones with the left, top, and right at ~30% alpha, and the bottom at 100% alpha.

My understanding is that the existing font shadow functionality can only apply to two sides at once (one x, one y), although please correct me if I'm mistaken.
  Reply With Quote
06-07-11, 01:47 PM   #7
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
Originally Posted by Aprikot View Post
My understanding is that the existing font shadow functionality can only apply to two sides at once (one x, one y), although please correct me if I'm mistaken.
That's right.

What you want would indeed require 2 font strings containing the same text. I actually played around with this before, but didn't like how it looked compared to the "effort". WoW's font style handling is really lacking, especially the font size limitation is just annoying.
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Text "effects" using string clones

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off