WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Legion Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=177)
-   -   Blizzard_NamePlates customization/performance (https://www.wowinterface.com/forums/showthread.php?t=53394)

sezz 04-28-16 05:59 PM

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.

p3lim 04-29-16 06:18 AM

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.

sezz 04-29-16 08:08 AM

Quote:

Originally Posted by p3lim (Post 314448)
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.

Quote:

Originally Posted by p3lim (Post 314448)
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 :)

sezz 04-29-16 10:33 AM

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 ;)


Resike 04-29-16 11:13 AM

Quote:

Originally Posted by sezz (Post 314459)
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.

sezz 04-29-16 01:44 PM

Quote:

Originally Posted by Resike (Post 314462)
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.

Resike 04-29-16 03:11 PM

Quote:

Originally Posted by sezz (Post 314469)
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.

MunkDev 04-29-16 04:26 PM

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.

sezz 05-01-16 05:07 AM

Quote:

Originally Posted by Resike (Post 314471)
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.

Quote:

Originally Posted by MunkDev (Post 314474)
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.

lieandswell 05-14-16 01:49 PM

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.

ObbleYeah 05-14-16 02:08 PM

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)

dssd 05-19-16 09:32 PM

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.

semlar 05-20-16 12:08 AM

Quote:

Originally Posted by dssd (Post 315000)
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.

zork 05-20-16 05:43 AM

You mean someone finally sniffed into one of our threads and fixed it?

Resike 05-20-16 05:54 AM

Quote:

Originally Posted by zork (Post 315013)
You mean someone finally sniffed into one of our threads and fixed it?

Only took them 3 years.

syncrow 05-20-16 06:47 AM

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 =(

zork 05-20-16 08:55 AM

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.

syncrow 05-20-16 09:14 AM

Quote:

Originally Posted by zork (Post 315020)
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!

dssd 05-20-16 09:32 AM

Quote:

Originally Posted by syncrow (Post 315023)
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.

syncrow 05-20-16 09:42 AM

Quote:

Originally Posted by dssd (Post 315024)
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!


All times are GMT -6. The time now is 08:28 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI