Fit image texture in object

I am trying to create few banners, I found that I could use StandardMaterial to add image as Texture on object, but this way image is not fitting inside.

here is a PG with issue: Babylon.js Playground

I have tried to scale manually (photoshop and u/vScale method):

tvImage.diffuseTexture.vScale = 4;
tvImage.diffuseTexture.uScale = 2;

but its not very efficient, I need some auto-fit solution where image auto stretch on mesh. how can I achieve it?


Hi @Dshah_H
Appears you have some UV issues :slight_smile:

Is it supposed to be on the back of the mesh too?

Thanks for replying @aWeirdo

Yes, I need it on both sides to display the same full image.

with curved edges, 174 uv indexes, this is perhaps best done in your 3d software of choice :slight_smile:

1 Like

you mean to create image in 3d software? This will not work, I want the possibility to change images on mesh dynamically, by providing image URL.


I ment to fix the mesh uvs in your 3d software

ah got it, so the mesh has issue, I am just programming this scene, not very familiar with 3d software so sent to my 3d artist to look into it. Thanks

1 Like