I am working on a project, where it is pretty much just a bunch of experiments that are fairly random. And a piece I am trying to figure out is how to make a section (determined from base model) of an environment field (medium/high poly environment) mold to/from another model- like if I stick a toy car into playdoe, it will leave an imprint. I want to accomplish that, but in both up or down (based on player settings). The area is determined by simply a gun for creating a point of origin- and area is determined by the model width/length (or player choice for affected area).
My current, and only idea, on how to do this is to create a model in blender (a simple 1-sided shape with open button). Then take that and place it over the point of origin (created by gun thingy, height based on player choice), and do physics.raycast from every vertex in the affected area (a sphere raycast aught to do it well enough) to determine the exact location that vertex should be to “mold” to the object (and it can be imprinted by multiplying by the hit face’s reverse normal, so that the imprint can be done in all possible locations).
My question is, is there an easier way to do this. I haven’t gotten to doing it yet, as I have to re-learn how to modify vertex locations (without ruining the original model)- which I don’t think was hard in the first place from memory. But my method seams to be very physics hungry depending on how many vertices are in the affected area- and I want to create something that won’t end up freezing someone’s computer while it processes the effect in for half an hour (which I don’t believe it would even take a whole second). I just want to know if there are any better solutions. My version was the only one I could think of that would compensate for not every vertex lining up and being a simple “x to x, y to y” problem.