editing mesh inside unity via bones

hello, I'm not sure myself exactly what I'm talking about, I know little about animation.

Basically what I'm thinking about doing is: say I have cylinder or box. now ordinary box has 4 vertexes or points that make its side, a Polygon.

now say I have box with 3 rows of such vertexes, and I want to be able to say move middle vertexes and make upside down V. I move some object or handle in unity and those 4 poly-s follow.

now lets say I have box with 200 rows of such vertexes and handles, and I want to make road within unity by moving handles and altering the mesh.

is there any way to accomplish thing like this? I know vertexes can be assigned to some object (or is it only bones?) in 3d applications and when you move this objects vertexes follow. but will this kind of thing work in unity ?

I'm pretty sure this won't work, but if its possible this would help me a lot, eliminating need to export road 3244223 times from 3d software.

I guess it would be possible to write an editor script that lets you select vertices and move them around to modify your mesh. I haven't tried this, but you do have access to the vertices inside a mesh, and it should be possible to select a certain vertex of a mesh using raycasts, so it would be possible.

You could also take a look at AngryAnt's Sketch. http://angryant.com/ I haven't tinkered with it (yet), but from the description it looks very much like what you need.

Yes, it will work. There are several things you need to do in your 3D modelling software:

First, create Bones - Unity imports Bones as a Transform object, which you can manipulate in the Editor. Unity does not support certain other types of animation, such as lattice or mesh-based deforms.

Second, attach your Vertices to the Bones - depending on your software, there are several ways, such as vertex-painting, vertex groups, etc. Make sure every Vertex is attached to a Bone, or you get weirdness.

Then either export a .FBX file yourself, or use Unity to do it. The model will have a Transform object for each Bone, which you just move as desired. Minor warning - when you import a new model Asset, the Scale is set to 0.01, which might make it nearly invisible. Change the Scale larger.

Here are some links that might help:

3D Tools FAQ and Importing Blender Animations

Although the second link is about Blender, some of the issues are generic to all 3D software (such as the need to attach all Vertices to a Bone).