16

I want to make a scene where someone sees a reflection in mirrored glass but I want the reflections to look like real windows so I don't want to just use a plane. They have to have some distortion. Every piece of glass has a particular imperfection so I don't want a global distortion it has to have a particular distortion for each pane.

How can I procedurally make a wall of windows but each window has a specific reflective imperfection?

enter image description here

Eric Huelin
  • 2,251
  • 7
  • 38
  • 73

4 Answers4

16

If each window is a separate face you can unwrap with the Lightmap Pack method, scale down all the faces in the UV Editor with the Individual Origins Pivot Point selected, then in the Material use the Texture Coordinate UV output and give it a Musgrave Texture as Bump:

enter image description here

moonboots
  • 155,560
  • 7
  • 105
  • 171
13

You can try it with this shader setup:

enter image description here

Just change the noise texture values to change the effect.

You can also try to add seams at the edge of your windows surfaces and then pack UV's with different methods/parameters so it will break the consistency of the "wobble" effect across the whole surface.

Examples:

enter image description here

enter image description here

enter image description here

Chris
  • 59,454
  • 6
  • 30
  • 84
  • 1
    I would probably also try to add seams at the edge of your windows surfaces and then pack UV's with different methotds/parameteres so it would break the consistency of the "wobble" effect across the whole surface - simply, in my opinion, more realistic – Rafal Zera Aug 03 '21 at 17:54
  • 1
    Thank you - i add it to my answer. – Chris Aug 03 '21 at 18:01
  • 1
    This looks terrific and simple! Also, there is the "Facade Glass" material in "Material Library VX" – james_t Aug 03 '21 at 18:36
  • Thank you very much!! – Chris Aug 03 '21 at 18:54
11

A (maybe too elaborate, 'classical') pure-procedural approach might be to split your texture-space into tiles, using a Wrap node:

enter image description here

Below: original UV on the left. Wrapped UV ('Cell UV') in the middle. If you subtract the 'Cell UV' from the original UV, you get an index-per-cell ('idx'). 'Idx' is the coordinate of the origin of each cell's 'Cell UV'.

enter image description here

Once you have a per-cell index, you can use it for per-cell effects. Here it's used to give a random tilt per cell...

enter image description here

.. by looking up a bit of per-cell noise, and adding a multiple of it to the original normal. Below, showing 0, and increasing values in the Scale node:

enter image description here

You can also use the index for a shift of the coordinates of, say, a Musgrave texture, to use in a Bump, to put a wobble into the normals, per cell:

enter image description here

This shows 0 to increasing values in the 'Distance' field of the Bump node

enter image description here

If you combine the effects, you get a tilt-and-wobble per pane of glass:

enter image description here

This .blend includes the cluster for putting the black frame around the panes.

Robin Betts
  • 76,260
  • 8
  • 77
  • 190
  • I've been a bit lazy, saving nodes for illustration. Strictly, the Noise in the 'Tilt' cluster should be shifted to produce negative as well as positive noise values, so the panes tilt down and left as well as up and right. – Robin Betts Aug 04 '21 at 05:40
4

I would look at the window object rather than the window material or Texture, although all might offer an opportunity to introduce imperfections/waviness. For an object, look at the plane or and Wave modifier. Try a wave modifier with a Speed=0 (no animation). If using a Plane for the window, then also consider adding the Solidify modifier.

Here is an example, where I subdivided the plane, added X and Y coord waviness, and also added a Solidify, images are from the 3d View and Cycles Render (shows a building facade reflection), respectively.

enter image description hereenter image description here

Here is the example file.

BTW: Bravo to some of the other solutions involving materials. Those solutions might make for smaller files as there is no sub-division surfacing required.

james_t
  • 5,446
  • 8
  • 29