Quantcast
Blizzard_NamePlates customization/performance - WoWInterface
 
Thread Tools Display Modes
04-28-16, 05:59 PM   #1
sezz
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 121
Question Blizzard_NamePlates customization/performance

I'm sure some of you already customized the new nameplates, just curious how everyone's doing it.

I've hooked:

1. DefaultCompactNamePlateFrameSetupInternal for all my modifications (textures, an additional icon for elite mobs, level text and changing positions/size)
2. NamePlateDriverFrame.UpdateNamePlateOptions for correcting castbar spell icon size and castbar height (this sucks, because all nameplates are updated twice, but replacing the function (instead of hooking it) doesn't change performance at all)

And I also replaced frame.nameChangedCallback with a custom function to set level and show/hide the elite indicator and call the original callback afterwards.

Everything is working fine but I when there's a large amount of namplates on the screen and I move the camera (this doesn't happen when I'm not moving it) the FPS drop from 100 to ~30. Without any modifications they drop to ~40. (I tested this in ICC - when you go to Professor Putricide a massive amount of cockroaches spawn, but it can also be tested in Gundrak right before the first boss or everywhere else where 30 nameplates can be shown at the same time, because that's the cap).

Instead of hooking DefaultCompactNamePlateFrameSetupInternal and replacing NamePlateDriverFrame.UpdateNamePlateOptions I also tried to replace the objects SetSize/Setpoint/etc. with a dummy function - that doesn't seem to impact the performance at all, it only makes the "Larger Nameplates" option unusable.

I can post the code if anyone is interested, but most of it is just replacing textures and moving stuff around, I'm more interested if it's just me having those issues (because I hooked the wrong functions), or if it's currently a common problem with Blizzard's new nameplates.
 
04-29-16, 06:18 AM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,699
Relevant discussion of the past: http://www.wowinterface.com/forums/s...ad.php?t=46740

Basically, when you move an element (SetPoint) constantly it's a big performance drop, which you only ever really see with nameplates (as every other UI element is static).
In that thread we/they concluded that hiding the frame(s) prior to moving it then showing it again when done moving would result in a much better performance, and no visual difference.

Once I have access to the beta, taking a look at the nameplates will definitely be one of my top priorities.

Last edited by p3lim : 04-29-16 at 06:32 AM.
 
04-29-16, 08:08 AM   #3
sezz
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 121
Originally Posted by p3lim View Post
Relevant discussion of the past: http://www.wowinterface.com/forums/s...ad.php?t=46740

Basically, when you move an element (SetPoint) constantly it's a big performance drop, which you only ever really see with nameplates (as every other UI element is static).
In that thread we/they concluded that hiding the frame(s) prior to moving it then showing it again when done moving would result in a much better performance, and no visual difference.
Ah, I completely forgot about this thread, thanks for pointing me to it. I'll do some tests based on that.

Originally Posted by p3lim View Post
Once I have access to the beta, taking a look at the nameplates will definitely be one of my top priorities.
Technically, I'm not in the beta either, but my sister is and she allows me to use her account
 
04-29-16, 10:33 AM   #4
sezz
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 121
Update:
I tracked down the issue to my font - using "OUTLINE" caused the FPS drop for me.
It's hard to read names without it, but atleast the performance issues are gone

 
04-29-16, 11:13 AM   #5
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,289
Originally Posted by sezz View Post
Update:
I tracked down the issue to my font - using "OUTLINE" caused the FPS drop for me.
It's hard to read names without it, but atleast the performance issues are gone

Outline has performace issues since ages. Try to use a SetShadowOffset for a similar effect.
 
04-29-16, 01:44 PM   #6
sezz
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 121
Originally Posted by Resike View Post
Outline has performace issues since ages. Try to use a SetShadowOffset for a similar effect.
I didn't know about this issue - been using a similar namplate style since Ulduar was released, same font and also set to outline, so I didn't expect that it would make any difference. Well, learned something

I also just did a test on live, with 170 visible nameplates and moving my camera around my FPS only go down to ~80 and it doesn't matter if I enable outline or not. Maybe it's related to the animations that are tied to the nameplates now, or they just aren't yet optimized and that's the reason why they are capped at 30.
 
04-29-16, 03:11 PM   #7
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,289
Originally Posted by sezz View Post
I didn't know about this issue - been using a similar namplate style since Ulduar was released, same font and also set to outline, so I didn't expect that it would make any difference. Well, learned something

I also just did a test on live, with 170 visible nameplates and moving my camera around my FPS only go down to ~80 and it doesn't matter if I enable outline or not. Maybe it's related to the animations that are tied to the nameplates now, or they just aren't yet optimized and that's the reason why they are capped at 30.
Since outline's usage strongly depends on the font itself, my bet would be it's caused by the higher resolution fonts used in Legion which makes outline's performace a lot worse too.

Your best bet would be to report the issue ingame.
 
04-29-16, 04:26 PM   #8
MunkDev
A Scalebane Royal Guard
 
MunkDev's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 427
Isn't the reason it's capped at 30 now that nameplates have attributed unit IDs? Someone mentioned this in another thread related to Legion, that you'll be able to get information about a given unit on screen from using nameplate1, nameplate2, .., nameplate30 as the unit token.
__________________
 
05-01-16, 05:07 AM   #9
sezz
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 121
Originally Posted by Resike View Post
Since outline's usage strongly depends on the font itself, my bet would be it's caused by the higher resolution fonts used in Legion which makes outline's performace a lot worse too.

Your best bet would be to report the issue ingame.
I'm still using the same font (replaced FRIZQT__.ttf) - I'll try it again when external fonts are allowed and if performance is still bad I'll report it, maybe it helps.

Originally Posted by MunkDev View Post
Isn't the reason it's capped at 30 now that nameplates have attributed unit IDs? Someone mentioned this in another thread related to Legion, that you'll be able to get information about a given unit on screen from using nameplate1, nameplate2, .., nameplate30 as the unit token.
No idea if that's the reason, but you're right, it's nameplate1 to nameplate30 and nameplates are now CompactUnitFrames.
 
05-14-16, 01:49 PM   #10
lieandswell
A Cyclonian
 
lieandswell's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2007
Posts: 45
There appears to be a bug with the Blizzard nameplates where the buff/debuff icons won't always get updated when the nameplate is recycled. I can see it most clearly when going to the Orgrimmar training dummies (where there are lots of people), turning both friendly and unfriendly nameplates on, loading up a dummy with debuffs, and then running around. Eventually you start seeing your debuff icons on friendly player nameplates. Happens even after relog with no addons.
__________________
1/5 15:55:46.001 UNIT_DIED, 0x0000000000000000, nil, 0x80000000, 0xF130001942161FB7, "Gamon", 0xa28
 
05-14-16, 02:08 PM   #11
ObbleYeah
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 210
ah! good, i was worried my experiments had tainted something.

well not good but... you know what i mean.

having not dug too much into the source I've just been making style adjustments via:

Lua Code:
  1. --
  2.     local style = function(frame, sOptions, fOptions)
  3.         if frame.styled then return end
  4.         -- style stuff
  5.         frame.styled = true
  6.     end
  7.  
  8.     local f = CreateFrame'Frame'
  9.     f:RegisterEvent'NAME_PLATE_CREATED'
  10.     f:SetScript('OnEvent', function(self, event, ...)
  11.         local base = ...
  12.         style(base.UnitFrame)
  13.     end)

Last edited by ObbleYeah : 05-14-16 at 02:37 PM.
 
05-19-16, 09:32 PM   #12
dssd
A Fallenroot Satyr
Join Date: May 2016
Posts: 25
The standard Blizz nameplates seem much better with today's build 21737. My FPS used to drop by 10-15 with around 20 nameplate on screen. I'm losing around 1-3 FPS now.
 
05-20-16, 12:08 AM   #13
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,059
Originally Posted by dssd View Post
The standard Blizz nameplates seem much better with today's build 21737. My FPS used to drop by 10-15 with around 20 nameplate on screen. I'm losing around 1-3 FPS now.
You're right, something has changed with the way they render frames in general. Moving a visible frame seems to have a much smaller effect on framerate than it previously did.
 
05-20-16, 05:43 AM   #14
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,739
You mean someone finally sniffed into one of our threads and fixed it?
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
05-20-16, 05:54 AM   #15
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,289
Originally Posted by zork View Post
You mean someone finally sniffed into one of our threads and fixed it?
Only took them 3 years.
 
05-20-16, 06:47 AM   #16
syncrow
A Flamescale Wyrmkin
 
syncrow's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 149
There is currently an issue with custom fonts, resulting in big fps drops (around 30~) while rendering moving nameplates.

I also tryed to animate the healthbar textures, which looks pretty sick....unfortunately there are also fps drops =(
__________________

Last edited by syncrow : 05-20-16 at 07:08 AM.
 
05-20-16, 08:55 AM   #17
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,739
Have you animated the healthbars like oUF_Smooth?
https://github.com/adampoit/ouf-ambr...nts/Smooth.lua

Imo that is the best thing you can do. Only one OnUpdate handler for all bars you want to smooth.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
 
05-20-16, 09:14 AM   #18
syncrow
A Flamescale Wyrmkin
 
syncrow's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 149
Originally Posted by zork View Post
Have you animated the healthbars like oUF_Smooth?
I meant a living fluid / wavin bar animation - like this:



Edit: bar smoothin' isn't an issue so far!
__________________

Last edited by syncrow : 05-20-16 at 09:21 AM.
 
05-20-16, 09:32 AM   #19
dssd
A Fallenroot Satyr
Join Date: May 2016
Posts: 25
Originally Posted by syncrow View Post
I meant a living fluid / wavin bar animation - like this:



Edit: bar smoothin' isn't an issue so far!
How are you implementing that? A big texture that you set tex coords on to move to the next frame should be fast. I do something similar in one of my addons with a texture sort of like



If you have separate textures and you're doing a bunch of SetTextures it'll be much slower.
 
05-20-16, 09:42 AM   #20
syncrow
A Flamescale Wyrmkin
 
syncrow's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 149
Originally Posted by dssd View Post
How are you implementing that? A big texture that you set tex coords on to move to the next frame should be fast.
Exact that way! But I posted this issue not to help me fixin it, just as an information for others!
__________________

Last edited by syncrow : 05-20-16 at 09:48 AM.
 
 

WoWInterface » Site Forums » Archived Beta Forums » Legion Beta archived threads » Blizzard_NamePlates customization/performance

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