Raise limit on the number of active Highlights

The Problem

As a Roblox developer, the current cap of 31 Highlight adorns active at a time has been very limiting to some of the things I’m trying to accomplish with the feature.

We have a house editor (currently unreleased) for our game that utilizes Highlight to mark multiple objects as selected. In the screenshot above, the floor is made up of tiled objects whose Parts are all in separate Models. I’m doing a floodfill selection of top-surface tiles that are brown and highlighting them as one unit.

Because of the 31 adornee limit, I currently have 3 options for handling this:

  1. Put a Highlight into each individual model
    (This hits the 31 adornee ceiling pretty fast, so obviously can’t do that)

  2. Clone all of the parts I want highlighted into a single container
    (Cloning a bunch of parts on demand like that is not ideal for performance)

  3. Temporarily move all of the parts I want highlighted into a single container
    (Mostly safe as long as the parts aren’t running interaction code, probably lots of risky caveats)

Currently I’m using the 2nd workaround, but it’s really awkward that I have to do this in the first place.


Possible Solutions?

While it’s not my job to offer a solution to this, I’d like to offer a couple potential ones worth considering.

  1. It would be cool if we could programmatically add and remove PVInstance targets onto a single Highlight instance. Maybe an API like this?
		Highlight:AddTarget(target: PVInstance) -> ()
		Highlight:RemoveTarget(target: PVInstance) -> ()
		Highlight:GetTargets() -> {PVInstance}
  1. Highlights that share the same visual properties should be unioned together under the hood to reduce the chances of hitting the 31 ceiling?

Whatever works, I just really hope we can see this addressed soon!

131 Likes

hopefully they just raise the limit to 120 instead of 31.

8 Likes

Why is there even a highlight limit? There isn’t a part limit, or a billboardgui limit, or any limits, really. Roblox states that it’s for “performance,” but it’s dumb to arbitrarily limit developers like this, especially for PC-only “experiences,” where stronger hardware is present.

7 Likes

As far as I understand, this is a deep technical limitation likely related to the number of bits in a number used in some implementation detail for this feature, or else tangentially related. A single outline shader typically requires an input texture with all of the geometry to be outlined rendered to it, so an outline shader that supports multiple outline groups probably requires an input texture with multiple groups rendered to it, so each group in this texture would need to be rendered with separate values (e.g. red channel pixels being 0.1, 0.2, 0.3, etc as a simplified example), but a pixel in a memory-optimized texture only supports so many values + there are other implementation details that can introduce problems. Just speculation of course, but likely a close reason why this is not trivial.

It would likely significantly increase memory footprint just to double the limit (at least on mobile devices, but allowing these to have different limits breaks a lot of developer expectations and is bad), not to mention complicate the programming behind the scenes which also likely comes with a non-negligible performance cost.

If you look at the render passes in renderdoc, you can see that for DX11 the effect is generating an 8-bit red-channel-only stencil texture with all of the outline groups rendered to it with different R values according to depth from the camera, which relates to the speculation above.

11 Likes

The value of 31 (which is 2^5 - 1) is also a hint that this is likely a technical limitation in their graphics pipeline currently and so not necessarily trivial to increase.

8 Likes

YES YES YES.

Sucks to put all my objects in one model under one highlight. Feels like a hacky technique from 2016.

1 Like

I was in the same mind-set when I read about the Highlight limit until I found out that it’s not about the number of objects you put it on, but the number of highlight objects itself that exist. Knowing that, I don’t see a reason to increase the limit since that is basically an unlimited number of objects in 31 different colors if you prefer. I wouldn’t object to the limit being raised, but I don’t see any technical reason why needing more than this number would be useful?

2 Likes

Bump, still waiting for this. We need a higher limit.

2 Likes

I need highlights to indicate that what the player is hovering over is interactable. At any given time, almost all of my Highlights have their transparency values set to 1 to indicate that they are off. I built my game around this instead of Instantiating them Destroying them (as I should have) but it turns out that a lot of people want to use this for X-Ray vision for locating teammates and stuff, which requires as many highlights as there are players.

Hi

Having a higher limit in game would be nice, but since it’s been a while since OP -without any reply- I’m not that hopeful for it.
Any chance the limit can be increased for studio only?
If it’s a (mobile) performance limitation, then it might work for studio where everyone uses a relatively powerful PC?
Looking to use highlights in a plugin. Current workaround would be to dynamically adjust the highlighted parts, which is definitely not ideal for my usecase.

Thanks