Button3D: Questions About Appearance + Performance

Hi all! I’ve been toying around a bit with 3D buttons but have noticed some unexpected things while tinkering with them.

In this PG (https://playground.babylonjs.com/#2YZFA0#118), I’ve set the text that is attached to the button with color = “black”, but that causes the text to disappear entirely. Many other colors work. Is there a reason why black wouldn’t work? Also, the color I’m trying to set on the button itself is a much more sky blue than the color that appears. I imagine this has to do with the built in material/texture/shader on these buttons, but just wanted to know if there was any way to tweak things to get the color I would expect.

But overall, I’m thinking the Button3D may not be intended to be customized too much in this way, so perhaps just using a 2D Gui Button makes more sense.

This led to another question about performance. I assume that because Button3D has 3D geometry, that many of them would be more taxing on performance than many 2D Gui buttons with advanceddynamictextures, etc. Is that a safe assumption or am I off base?

Any help on any of the above would be greatly appreciated!

I tried just setting it to a specific color and I also could not get black to work. :confused:

Will try to take a look at what’s going on.

1 Like

Got some help from the wonderful @Deltakosh @Evgeni_Popov :wink:

This is really helpful, thanks @msDestiny14!

Any thoughts on the question about performance? Grateful for your help!

Hmm… :thinking: I would think the same logic but I’m more curious what your design reasoning for choosing one over the other. For example, a single 3D button even multiple is not going to be super taxing.

So my question to you is what are you trying to accomplish?

That makes sense @msDestiny14! We typically have scenes that will require ~50 of these buttons, so that’s sort of the territory we are looking at when we weight whether one approach will be more performant than the other. For design purposes, we do like the nice out of the box push effect / 3D look of the 3d gui button, but if that comes at a performance hit then we are also happy to stick with 2d gui elements or any other approach you would recommend. Does that help at all?

If you have standard button models I dont see that being the bottle neck of your application :thinking: I saw give it a go :smiley: