Attaching text to 3d Objects

I’m working on a 3d scene that will have museum-like sections and there will be text displayed on the walls. I wanted to know what the ideal solution would be for something like this? I know how to create the UI using an “advanced dynamic texture” but that only works for 2D UI as far as I know.

The 3D UI examples seem to all utilize a Button3D for attaching text to them. I suppose I could disable the button functionality and remove the background, although this seems like a lot of unnecessary work just to get the text to appear on the 3D object. So for the 3D UI is there a simpler way of using text within a 3D UI system? Is there a better way to approach this? Thanks.

Hello! You can connect the texture to a plane on the 3D space, like this playground example:
Texture mode Babylon.GUI | Babylon.js Playground (babylonjs.com)

This doesn’t require a button, you can use a TextBlock to only display text, as example: The Babylon GUI | Babylon.js Documentation (babylonjs.com)

Here’s the first playground, but using the TextBlock: Texture mode Babylon.GUI | Babylon.js Playground (babylonjs.com)

Thank you! I figured it was relatively simple I just wasn’t aware of the process, much appreciated. Marking solution.

1 Like