The following situation occurs with MeshBuilder.CreateDecal. What do I need to do?

Uploading: image.png…

decimalMaterial.diffuseTexture. The sticker material is stretched

Can you duplicate it in a PG?

Edit: if needed, perhaps use a texture from the assets library.

Edit again: make sure your specified normal is the actual normal of the surface you are placing the decal on.

Your image is not uploaded and it has been 20 minutes since your post.

Sorry, I didn’t put the PG out the first time, the problem was in this PG

Problem Reproduction operation: When I click the mouse close to the edge of the mesh, the excess part of the map is rendered to the other side and stretched. I don’t know why I tried to modify normal, but it didn’t work

The decal will look unstreched when viewed along the normal applied. However, it will follow the contour of the surface so if viewed from a different angle than applied, you’ll see it following the contours. I think it’s behaving as designed. Is that what you’re seeing?

I want the effect to be that when I click on the edge of the face that the camera is facing towards and the render to my side it can’t be stretched so that it renders normally but now this map is stretched and that’s not what I want


The problem is that when the picture is pasted, it is stretched. This is not the effect I want. Is there any solution? thank you

This post from 2017 on another forum seems to describe the issue. Decals are contour following. DynamicTexture may be what you’re looking for? They wrap rather than stretch.

Yes, that’s how decals work. What you could do is split your mesh into different parts/meshes. That way, when you apply a decal on a part, it won’t “leak” on the other parts. In the cube case, you would create 6 different planes and apply the decal on the right plane, depending on the mouse click.

1 Like