Planar Mapping Distortion
Genome allows the same modifications to the vertices of all 100 Mapping channels as to the mesh vertices. Thus, it is possible to implement all sorts of mapping deformation modifiers, like for example a Noise modifier.
In the following example, we will take a Plane with its default TextureCoord (Mapping Channel 1) UV coordinates and will apply a noise function to them to distort the assigned texture map using those coordinates.
- Create a Plane primitive with Length of 120.0 and Width of 160.0 units (this is to accommodate a 640x480 pixels texture map without changing the aspect - YMMV depending on your texture map).
- Set the Width and Length Segments to 100.
- Assign a Standard Material with a Diffuse Map set to a Bitmap Texture of your choice. In the following example, a stock image of Hong-Kong shipping as background with 3ds Max will be used.
- Enable the Show Map In Viewport icon in the Material Editor to see the image and indirectly the mapping coordinates in the viewport.
- Add a Genome modifier to the Plane and switch it to "Face Corners" Iteration mode.
- Open the Magma editor and press Ctrl+[O] to add a new Output node. Set it to TextureCoord channel.
- Select the Output node and press SHIFT+[M] to create a TextureCoord InputChannel node ("M" stands for "Mapping").
- With the TextureCoord InputChannel node selected, press the [Ins] key one to switch from [INSERT 1] to [CONNECT 1] mode.
- Press [F] and then [V] to connect a VecNoise function operator as a new branch.
- Select the TextureCoord InputChannel node again and press [+] to insert an Add operator.
- Connect the output socket of the VecNoise to the second second input socket of the Add operator.
- Select the VecNoise node and press [*] to insert a Multiply operator.
- Press Ctrl+ to connect a Float InputValue. Change it to 0.2, rename it to "Scale" and check the "Exposed" option.
- Select the wire connecting the TextureCoord InputChannel to the VecNoise node and press [*] to insert another Multiply operator.
- Press Ctrl+ to connect a Float InputValue to the Multiply operator.
- Press [C] and then [V] to insert a Convert > ToVector operator.
- Press Ctrl+ again to connect a second Float InputValue to the ToVector.
- Set the first Float to 30.0, rename it to "U Distortion" and check "Exposed".
- Rename the second Float to "V Distortion" and check "Exposed".
- Select the wire connecting the TextureCoord channel and the Multiply node again and press [+] to insert another Add operator.
- Press SHIFT+ to insert a Vector InputValue of [1,0,0]. This can be used to tweak the Phase of the noise by shifting the input of the VecNoise.
RESULT: The panar mapping coordinates (left image) will be distorted 30 times more along the U and the V (right image):
Modifying the U and V Distortion values to 10.0 and 10.0 will produce a larger noise pattern (left image), while setting both to 50.0 will produce a very fine, frosted-glass-like pattern (right image):