Understanding babylon for e-commerce with decals

Does someone have an idea how this can be done?
or something like that with the same functionality of placing and moving decals.

I am not sure that decals are the best choice here. One can do it with dynamicTexture. It may also depend on how your model is prepared.
You’ll find a lot of info with this search - Search results for 't-shirt' - Babylon.js

Will dynamicTexture find the face and normal by it’s own?
I have a model to put images on so if you change it’s position without face it will be streched. But if dynamicTexture can do that It will solve my problem.

There are a number of ways to achieve that. And I tend to agree with @labris that decals might not be the best approach. Yes, a dynamic and in case a procedural texture will do the job. Since it’s based on the model, it will have all normals/UVs from the original mesh. If you want to limit the customizable area, you can also 1) create a mask or 2) clone this part of the mesh only. And then, yes, there are already a number of projects around this, so making a bit of a search before choosing the approach and method most suitable for your scenario might be a good start.
I guess the goal is to actually produce this t-shirt design, is it? So, I guess the productivity workflow should be considered here (and not just the visual representation). Working with decals or any texture actually would need to be easily translated into a 2D workable design to apply the design on the object and, ideally, in a format ready for production.

1 Like

The main problem I have is that the decals that I want to move will not find their face by default.
I add properties position, face, size, angle in the object of the decal, then when I clone it I get it by it’s name and use these properties as values for new one but with new property which user changed.
When I change decals position but leave previous face value, decal will strech.
I hope you understand what I want to do, I have this repo here so you can see what I am trying to do.
I tried to implement ray but I behaves the same.
I have differente geometries on the mesh which will limit the image. I cannot see where am I supposed to provide the geometries name where is my image going to be placed.