FootPrint with maxscript from Ishak Suryo L on Vimeo.
This is my latest R&D in 3dsmax with Maxscript. It's still prototype, and that's why i have not release yet this script. I did this for colling down and fun after finishing a few project last month. The idea of this is actually how to make mesh deformed after colliding with other object. The collider can be rigid or even organic object. Initially there are some method i would like to try. But for some reason i choose using animatevertex feature in editable mesh to save the animation and deformation data.
This is the step by step process:
- Define the Collider and ground object
- Save the initial vertex position of the ground (so we can reset later)
- Collecting list of the vertex that hit by the collider (so we don't have to calculate the whole vertex on the ground object)
- Set the maximum depth ( this value will be used as starting point to firing ray on the Z coordinate)
- Run Calculation every frame trough the animation and chek using intersectRay from ground vertex to collider mesh.
- if the ray was hit to the collider then update the vertex Z position using the Hit(ray) Z position.
- set key to the vertex if there are no intersection on it.
After finished we can check the result. if we want apply the result for editable_poly object then we can use the advantages of point_chace modifier. as long the source object is same( has same vertex ID) it won't be a problem at all. Dont forget to add turbosmooth or relax modifier if you get sharp edges. There is another check before doing calculation are to check the animation speed. If the collider object moving too fast sometime it will jump in some area. This is the reason we should adjusting subframe sample for calculation to get nice result.
See the image below for better understanding.
Later we can try to add or combine with some particle or bump effects to enhanced the realism.