The main idea is to render on-demand pictures of products with different fabrics &/ customization options.
How to achieve this
Here i've listed the 4 effects this app combines to achieve a good looking render.
Stretching and scaling the fabric
If we apply fabric pictures directly over the product, It will look too flat and most likely will have the wrong overal scale.
So we need to find a way to, Cut, Fold, And stretch the fabric image in order to achieve a closer pattern coverage to the actual product
Solution
To resolve this problem app has 2 shapes for each grid, 1st to indicate the cut of the fabric, 2nd to indicate folding and stretching of the fabric. We'll also enter fabric pattern dimensions into the app at the time of upload, And the app will take the fabric pattern size into it's calculations while rendering.
Adding shadows
If we just cut and paste the fabric image on top of the product image, It will look unrealisticly shaded. We need to apply shadows in order to deal with this problem.
Shadows need to be applied differently on each fabric, Because some fabrics pick slightly less shadows than others. This is another problem to solve
Solution
In the designer app, There is a slider which indicated the amount of shadow to be picked up by the fabric. Higher the amount, more the shadow. We usually set this to highest for most fabrics.
Adding highlights
Some fabrics (Specially velvet fabrics) reflect more light at an angle. Those fabrics look more matte when photographed directly than when photographed on a product. We have a solution to deal with this problem.
Solution
In the designer app, There is a slider control that sets the amount of extra light to be reflected by the fabric.
We usually set this to around 5% for matte fabrics, 30% for velvet fabrics, and up to 40% for more reflective fabrics.
Ambient light
Some fabrics pick up more of the environment light and less of direct light than other farbrics. In Computer graphics it's called ambient light.
If a fabric is photographed and color corrected using less light than the product is photographed with (Which is most cases.), It'll look more saturated and darker in render than the real product.
Solution
Usually when you use 100% opacity, fabrics appear more saturated and darker in the final render than the actual product. We can't fix the saturation and darkness problems both at the same time by reducing the opacity. However in most cases we can fix one of those two problems and make the other one better just by reducing the opacity of that fabric. If the final render looks significantly off after adjusting all fabric parameters, The fabric image needs to be color corrected and reuploaded.