How I Made AI Hang Curtains in Someone's Real Window
By Ergini, Software & AI Developer
TL;DR
DreamCurtains AI, the curtain visualizer I built, first produced lovely rooms with fabrics no shop sells, patterns at the wrong scale and curtains hanging over radiators. The fix was a split: the customer marks the window and enters its width, code places the real fabric scan at its true repeat in perspective, the model only adds folds and light inside a mask, and a check measures the pattern afterwards. A conversational assistant recommends only catalog fabrics, prices come from the shop's calculator, and every render is labeled as a visualization.
A beautiful curtain that nobody sells
The first version of DreamCurtains AI did what every demo does. A customer uploaded a photo of their living room, typed "linen curtains, something warm", and got back an image that looked like a page from an interiors magazine. Soft folds, afternoon light, a curtain that made the whole room feel expensive.
It was also useless. The fabric in the picture did not exist in any catalog. The model had invented a lovely oatmeal weave with a subtle slub, which nobody could order. When I tried it with a real fabric, a bold botanical print with a large repeat, the render shrank the leaves to a quarter of their size and scattered them like wallpaper. And in one test photo, the new curtains fell straight over a radiator that sat under the window, which in a real home would have been the first thing anyone mentioned.
I had built something that made rooms look good. What a shop needs is something that makes its own products look true. Those turn out to be different programs.
Why the model cannot be trusted with the fabric
A generative model treats a room photo as an invitation to repaint. Give it a fabric reference and it understands roughly what the fabric is, then paints its own version, at whatever scale looks pleasant in the composition. It has no idea that the repeat on that botanical print is 64 centimetres, or that the window is 180 centimetres wide, so the pattern should appear about three times across it, not twelve.
For a made-to-measure product that is fatal. Pattern scale is half of how a printed curtain looks in a room, and it is exactly the thing customers cannot judge from a swatch. If the visualizer gets it wrong, it sells a curtain that will disappoint on the day it goes up.
So I split the job. The parts that are geometry went to code. The parts that are light and softness stayed with the model, and the model lost the right to touch the pattern at all.
Geometry for code, light for the model
The new flow starts with the customer, not the model. After they upload the photo, they confirm where the window is by dragging four corners, and they type one number: the width of the window. That is the only measurement that matters for the picture, and it is one people can take with a tape in thirty seconds.
From those corners, code works out the perspective of the wall, where the rod sits and how far the drop falls. The fabric comes from a flat scan in the shop's library, stored with its real repeat and width. Code tiles it at true scale across the entered width, adds the fullness a curtain needs, and warps it into the window's perspective. Only then does the model get involved, inside a mask it cannot paint outside of: it adds the folds, the shading, the way daylight glows through a sheer and dies behind a blackout lining.
Afterwards, code checks the model's work. It measures the pattern in the finished image and compares the number of repeats across the width with what the geometry says there should be. If the model has smeared or resized the print, the render is thrown away and made again, and the customer never sees the failed one.
| Step | Who does it | Why there |
|---|---|---|
| Mark the window, enter its width | The customer | The one fact a photo cannot give reliably |
| Perspective, rod, drop, true pattern scale | Code | Geometry must come out the same every time |
| Folds, shading, light through the fabric | The model, inside a mask | This is what models are genuinely good at |
| Pattern repeat check | Code | Catches a smeared or resized print before anyone sees it |
| Price and quote | The shop's own calculator | A price is never something a model should guess |
| Final measurements and order | A person at the shop | Made to measure means someone confirms the numbers |
The conversation that replaced the filter menu
The second half of DreamCurtains is a conversation. People rarely know the name of the fabric they want. They know the room: north facing, a bit dark, small children, a sofa in dusty green. So instead of a filter menu, the assistant asks a few questions and maps the answers to what the library actually knows about each fabric: color family, opacity, weight, washability, pattern size.
It then shows three options side by side, each rendered in the customer's own window. The rule I held it to is that it can only recommend fabrics that exist in the catalog, and it never states a price. Prices come from the shop's calculator, because a quote for made-to-measure curtains depends on width, drop, fullness and lining, and a model that improvises one creates a promise the shop has to honour or retract.
What real rooms taught me
Test photos from real homes are humbling. Bay windows are three windows pretending to be one, so the visualizer treats each pane as its own plane, or falls back to a straight render with a note when the angles are too strong to fit. Photos taken at dusk come in dark and yellow, so exposure is normalized before anything is rendered, and the result is still labeled as a visualization, because a phone screen will never show a fabric's exact color. That is also why the button under every render orders a physical sample. The render sells the idea; the swatch confirms the color.
Room photos are private in a way product photos are not. They show family pictures, children, sometimes a letter on a table. So location data is stripped on upload, faces are blurred, and the photos are deleted on a schedule unless the customer has an open quote. Payment runs through Stripe, and nobody's living room needs to be kept a day longer than the order that needed it.
Making it yours
The lesson I took from DreamCurtains applies well beyond curtains: an AI visualizer is only as honest as the part of it that is not AI. The model makes the image feel real. The geometry, the fabric library and the checks make it true.
If you sell curtains, blinds, wallpaper or anything else made to measure, the full design is in the blueprint for a room visualizer for home decor, including the fabric library it depends on and how renders hand off to a quote. It is usually a contained AI integration into the store you already run.
Frequently asked questions
Can AI show my own fabrics in a customer's room photo?
Yes, if the fabric is placed by code and the model only adds light and folds. Left alone, a generative model redraws the pattern and invents its scale. A visualizer built to sell uses a flat scan of each fabric, tiles it at its real repeat across the width the customer enters, fits it to the window in perspective, and checks the result before showing it.
How accurate is an AI curtain visualizer?
Accurate on placement and pattern scale when the customer confirms the window and enters its width, and approximate on color, because phone cameras and screens vary. That is why every render should be labeled as a visualization, with a way to order a physical sample next to it. Measurements for a made-to-measure order should be confirmed by a person, never read from a photo.
What happens to the room photos customers upload?
They are personal data and should be treated that way: location metadata stripped on upload, faces blurred, images sent to model providers only under a data processing agreement that rules out training, and photos deleted on a schedule unless a quote is open. People photograph their homes for this, so the privacy rules are part of the product.