There's already many essentials covered by other answers, but I can still add something.
Inserted logo must sit in the background image in several ways:
- same light, plausible glosses and shadows
- same white balance
- same contrast and color saturation
- same noise and general detoriation level
- same viewing perspective, some 3D extrusion can be needed if it's a sign with some thickness.
- geometrical surface form compatibilty (=right bends and bumps)
If the environment is teared and weared, inserted logo cannot be like a new. Of course, If the logo is brand new, one very likely wants to place it onto something as fine. But having something older as one option can help to prove it works also after some time.
Let's stop philosophing and see what we get. Here's a new logo:
The logo placed to an old environmnt:
The logo has reduced contrast and color saturation. Some noise is added. There's an overlay which contains noise, contrast and saturation reducing greyness and darkening due the shadow. All those can be also separate layers and generally should be separate for easy readjustments for different background.
Normal perspective rotation, scaling and distortion are performed. In this case they are not enough. In addition there's
- warping due the bended wall
- displacement map due the non-uniform wall (it's a BW copy of the wall)
- a couple of covering items which hang in front of the logo and prevent the logo to be totally visible; they were cut from the background image
Another example: Someone's shoulder
At first the logo was warped to look out curved.
Light is a desaturated piece of the skin, the brightness range is adjusted with the curves tool to symmetrically around 50% and the contrast was boosted. The blending mode is hard light.
Here only a little of edge fading is added as a detoriation effect. An exactly matching layer mask has got a slight gaussian blur.
A late addition:
One can want to use a shape as a fill pattern. It's easy in illustrator. You can spray shapes or tile them. The simplest way to make a tiling is to drag the shape to the swatches collection and use it as fill color. Here's a pair of curtains which have got a pattern fill + a solid color:
It's quite simple to place these as an overlay in a photo which has already curtains seen straight on the face. A perspective view from other direction needs some warping.
Like in the tattoo case above, one can steal the right shading from the photo with blending modes. It's possible only, if the original curtains have quite light single color without patterns. If there exists no original curtains, only a place for them or the original curtains have complex coloring, the shading must be painted or made with gradients. Shading can be done in the layer mask of a Brightness & Contrast adjustment layer.
Beware: if you cover something from the original image with your own creations, you must also fade the traces. An object with strong color easily colorizes more or less its surroundings. If the object is changed to another, the spred color also must be fixed.
There's one hitch: Textiles have wrinkles, bends and foldings. Flat pattern doesn't look right on them and the situation gets worse if the view isn't straight on the face. One needs complex warps. That case is discussed here:
Creating 3d mock-up texture
The only perfect way to create artificial surface forms is to use 3D software. One good enough for clothes either costs a fortune or is complex to use (Blender, freeware). Hanging curtains with only mild bends are easy case even with manual warping. In CAD software one can create the effect in a minute. The result differs remarkably from the flat view:
The used 3D program (=DesignSpark Mechanical) is entry level freeware. With it you can get only most basic renderings with fixed lights and only in screen resolution. Photorealistic results need more complex software.
The 3D version wasn't made originally to fit into any photo. To place it into a photo one needs light and color matching adjustment layers, a layer mask to clip the curtains and some reflections and shadows. Without them the implant really looks out placed afterwards. Here's an example: