In this tutorial, we want to create an effect by using the MCG tool of the 3dsMax program, that when one object approaches another object, the meshes will shrink and rotate a bit, and also their material ID will change so that we can give them a new material.
Let's go to the general information of the program and the nodes used. First, we designed a node that takes each polygon, scales and rotates it, and gives us the output as a separate node. Then we used this node for individual polygons.
After creating this node, it is enough to divide the mesh into pieces. This node is used to divide the mesh into polygons:
And this node is for the distance of the center of each polygon from the center of the selected object. If the distance from the selected object is greater than the desired number, the number will be 1, and if it is smaller, this number will tend to zero.
Finally, the Scale operation must be applied to each polygon
The overall node looks busy and the reason is the interface control and error control nodes
Some of the nodes used in this modifier are as follows (download the source codes by purchasing a subscription)
pass through mesh - mesh center of mass - local to world matrix - matrix translation component - scenenode world position - add - distance - constant - limit float - lerp float - if - is greater than - ignore first - for each - mesh set material ids - split mesh into polygons - exit if - attach all meshes - translation matrix - mesh in tool space - rotation scaling matrix - vector - quaterion from yaw pitch roll