I work for a textiles company that is exploring BabylonJS. Our use case is: we are given a number of models (say, of chairs, sofas, etc). We would like to import a model into BabylonJS and use Babylon on the website so a user can swap different textile offerings onto the model. The materials have set repeat dimensions. The problem I am running into is maintaining those dimensions & tiling of the materials on the model. The material always seems to stretch on whatever face it’s on instead of maintaining dimension & tiling. The main issue is that we want to be able to do this without having to manually analyze each model.
Basically, I want to preserve the dimensions of the material irregardless of the model. If a material is 3x15, I want it to be 3x15 on all meshes - cut off if the mesh is smaller, repeated if it’s bigger.
My understanding of uScale and vScale of a texture (from More Materials | Babylon.js Documentation) is that they set the number of tiles in each direction, which is irrelevant to me. It doesn’t matter how many tiles goes onto the mesh, just that it tiles according to the image dimensions.
Is this possible? Thanks.