Best way to display a 2D image on a 3D scene

Hi all,

I’m hoping to display an imported 2D image (from file) on top of my 3D scene, using it as a logo/watermark. I’m currently attempting to do this by using a CreateImageButton but is there a simpler way?

Thanks

I would recommend using a simple layer: https://www.babylonjs-playground.com/#08A2BS#1

2 Likes

Hi DK… Hi Matt. DK beat me to it. Deltakosh is a “quick draw” helper, lately… FAST. :slight_smile:

I was messing with isBackground = false (last param in line 112) here

And then… I was/am trying to make the texture… almost completely transparent… but not fully so.

Failing, so far, but I’m out-of-practice.

Using a spotlight as an image projector is cool, too.

3 Likes

Thank you both for your suggestions! Is it possible to size the layer and move to front? I’m hoping for the logo to overlay my 3D model. This is what I had working using CreateImageButton, to give a better picture of what I’m trying to achieve.

Just change the 4th parameter of the layer constructor to false to make a front layer:

https://www.babylonjs-playground.com/#08A2BS#44

1 Like