<p>I finally arrived at a solution that is not perfect, but seems to be good enough for my application right now.</p>

<p>The pipeline is as follows:</p>

<pre><code>-&gt; grayscale perlin noise with affine transformed (stretched and rotated) coordinate system
-&gt; gaussian blur (sigma 3.0)
-&gt; normalize (range 0.0 to 1.0)
-&gt; pixels = pixels - 0.5
-&gt; pixels = pixels * 2
-&gt; threshold (change everything below 0 to 0)
-&gt; add pixels to original image with an alpha value of 0.7
</code></pre>

<p>Here are some of the results:</p>

<p><a href="https://i.sstatic.net/Sygqn.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Sygqn.jpg" alt="enter image description here"></a>
<a href="https://i.sstatic.net/7BQSL.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/7BQSL.jpg" alt="enter image description here"></a>
<a href="https://i.sstatic.net/oFSyv.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/oFSyv.jpg" alt="enter image description here"></a>
<a href="https://i.sstatic.net/Bime8.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Bime8.jpg" alt="enter image description here"></a>
<a href="https://i.sstatic.net/yY1Ds.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/yY1Ds.jpg" alt="enter image description here"></a></p>

CC BY-SA 3.0
2017-08-02T08:13:34.223Z
2017-08-03T07:51:12.020Z
2017-08-03T07:51:12.020Z
Tobias Hermann
<p>I'm looking for a way to procedurally create a realistically looking texture overlay simulating the object being shrink wrapped.</p>

<p>It is only used to be added to single images, so it does not need to behave correctly in an animation with changes of position or angle of the object, camera or light source(s).</p>

<p>I already tried by implementing a grayscale <a href="https://en.wikipedia.org/wiki/Plasma_effect" rel="nofollow noreferrer">plasma effect</a>. It looks nice but not real:</p>

<p><a href="https://i.sstatic.net/J6Kzf.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/J6Kzf.jpg" alt="enter image description here"></a></p>

<p>Below you can find some examples of what I am hoping to achieve.</p>

<p>Do you have any suggestions on how something like this could be generated? I'm looking to produce thousands of unique textures, so there should be some variation/randomness involved.</p>

<p><a href="https://i.sstatic.net/7Omsl.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/7Omsl.jpg" alt="enter image description here"></a>
<a href="https://i.sstatic.net/go88a.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/go88a.jpg" alt="enter image description here"></a>
<a href="https://i.sstatic.net/0pslh.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/0pslh.jpg" alt="enter image description here"></a>
<a href="https://i.sstatic.net/OlfMd.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/OlfMd.jpg" alt="enter image description here"></a>
<a href="https://i.sstatic.net/XYHIx.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/XYHIx.png" alt="enter image description here"></a></p>

CC BY-SA 3.0
2017-07-06T08:48:18.147Z
Does it have to be a procedural texture? A photo of a shrink-wrapped black box would be the obvious solution.
Dan Hulme
CC BY-SA 3.0
2017-07-06T08:51:28.177Z
Yes, because I would like to generate thousands of unique textures. Thanks for the remark, I updated my question accordingly.
Tobias Hermann
CC BY-SA 3.0
2017-07-06T09:24:07.760Z
You'll want to generate a bump map/normal and use that for the reflective highlights. Getting the tension streaks to look realistic on the geometry is going to be challenging though.
ratchet freak
CC BY-SA 3.0
2017-07-07T01:19:34.250Z
I wonder if you took something like your original plasma texture and stretched it along a random axis and used the result as ratchet freak suggests above, if that would look decent?
user1118321
CC BY-SA 3.0
2017-07-10T03:23:30.473Z
I would suggest using the "ridged" version of FBM/Perlin noise to mimic the crests and branchiness you get with cling film. This can do done using something like 1-abs(FBM). visualisation of ridge FBM here :  http://accidentalintricacy.blogspot.hk/2009/04/base-landmass.html
PaulHK
<texture><procedural-generation>
procedurally generating a texture overlay simulating shrink wrap
Tobias Hermann
# procedurally generating a texture overlay simulating shrink wrap

(Asked by: username_0 on 2017-07-06)

I'm looking for a way to procedurally create a realistically looking texture overlay simulating the object being shrink wrapped.

It is only used to be added to single images, so it does not need to behave correctly in an animation with changes of position or angle of the object, camera or light source(s).

I already tried by implementing a grayscale [plasma effect](https://en.wikipedia.org/wiki/Plasma_effect). It looks nice but not real:

[![enter image description here](https://i.sstatic.net/J6Kzf.jpg)](https://i.sstatic.net/J6Kzf.jpg)

Below you can find some examples of what I am hoping to achieve.

Do you have any suggestions on how something like this could be generated? I'm looking to produce thousands of unique textures, so there should be some variation/randomness involved.

[![enter image description here](https://i.sstatic.net/7Omsl.jpg)](https://i.sstatic.net/7Omsl.jpg)
[![enter image description here](https://i.sstatic.net/go88a.jpg)](https://i.sstatic.net/go88a.jpg)
[![enter image description here](https://i.sstatic.net/0pslh.jpg)](https://i.sstatic.net/0pslh.jpg)
[![enter image description here](https://i.sstatic.net/OlfMd.jpg)](https://i.sstatic.net/OlfMd.jpg)
[![enter image description here](https://i.sstatic.net/XYHIx.png)](https://i.sstatic.net/XYHIx.png)

**Tags:** texture, procedural-generation

> **Comments:**
> **username_1**: Does it have to be a procedural texture? A photo of a shrink-wrapped black box would be the obvious solution.  
> **username_0**: Yes, because I would like to generate thousands of unique textures. Thanks for the remark, I updated my question accordingly.  
> **username_2**: You'll want to generate a bump map/normal and use that for the reflective highlights. Getting the tension streaks to look realistic on the geometry is going to be challenging though.  
> **username_3**: I wonder if you took something like your original plasma texture and stretched it along a random axis and used the result as username_2 suggests above, if that would look decent?  
> **username_4**: I would suggest using the "ridged" version of FBM/Perlin noise to mimic the crests and branchiness you get with cling film. This can do done using something like 1-abs(FBM). visualisation of ridge FBM here :  http://accidentalintricacy.blogspot.hk/2009/04/base-landmass.html  

---

## 1 answers

### Answer by username_0 on 2017-08-02. Score: 1 | Accepted answer

I finally arrived at a solution that is not perfect, but seems to be good enough for my application right now.

The pipeline is as follows:

```
-> grayscale perlin noise with affine transformed (stretched and rotated) coordinate system
-> gaussian blur (sigma 3.0)
-> normalize (range 0.0 to 1.0)
-> pixels = pixels - 0.5
-> pixels = pixels * 2
-> threshold (change everything below 0 to 0)
-> add pixels to original image with an alpha value of 0.7

```

Here are some of the results:

[![enter image description here](https://i.sstatic.net/Sygqn.jpg)](https://i.sstatic.net/Sygqn.jpg)
[![enter image description here](https://i.sstatic.net/7BQSL.jpg)](https://i.sstatic.net/7BQSL.jpg)
[![enter image description here](https://i.sstatic.net/oFSyv.jpg)](https://i.sstatic.net/oFSyv.jpg)
[![enter image description here](https://i.sstatic.net/Bime8.jpg)](https://i.sstatic.net/Bime8.jpg)
[![enter image description here](https://i.sstatic.net/yY1Ds.jpg)](https://i.sstatic.net/yY1Ds.jpg)


---

