- Home /
Best way to transition one mesh to another with the option to change the target mesh
I can't think of a better way to word it but I understand that the title may be confusing. What I am looking for is a program that will take the mesh of, for example, a cube and begin to transform it into the mesh of a sphere over a set period of time. I also want the ability to change the target mesh, so if halfway through the spherical transformation the user wished to turn the current mesh into a pyramid, the half sphere half cube would then start to transition into the pyramid. I had an idea of simply increasing and decreasing the number of triangles on the current shape and then moving the vertices of the shape toward the direction of the new vertices but I feel like that could result in issues, and I am fairly new to the mesh class. I really just want to make sure that my method is not going to be horribly slow or just plain wrong. I hope that I have provided enough information and thank you for you time. <3
Sadly, this is all about procedurally changing a mesh at runtime with geometrical calculations. I'm sure there's plenty of things out there for it, all except for the part where you want it to happen over time. You may just end up doing what you are thinking of doing. Otherwise you'll have to create vertex animated models that do this themselves. The only issue is for a cube to become a sphere without adding vertices, it would have to be a high-vertice cube to start with.
yes that makes sense, likely what I'll do is just have all my models that transition sitting at the same vertex count regardless of how many they need and then simply move the vertices around
Your answer
![](https://koobas.hobune.stream/wayback/20220612194619im_/https://answers.unity.com/themes/thub/images/avi.jpg)