- Home /
3d Cloud Morphingng
Hello:
I would like to know how to do cloud morphing. For example, morph the cloud from a random type into some shape such as pen or dog.
Don't know how to search this properly using keyboards. Would appreciate if anyone can guide me some directions.
Thanks
Answer by loopyllama · Mar 26, 2011 at 06:58 AM
You will have to animate vertices via script.
Here is a c sharp version from the community: http://www.unifycommunity.com/wiki/index.php?title=MorphTargets
Here is a javascript version from the community: http://www.unifycommunity.com/wiki/index.php?title=MeshMorpher
For your example you would need a cloud with a known number of vertices, let's say it has 542 vertices. If you would like to morph the cloud mesh to, let's say, a pen mesh, then pen mesh would have to have the same number of vertices as the cloud, since you are moving all the vertices from one object into the position of the vertices of another mesh. You will have to average your normals on import because the vertice count will increase in order to store hard-edged normals. I haven't used these scripts but I suspect if your shapes are wildly different you will run into a lot of problems. For instance a sphere will not morph into the eiffel tower or into a car. The triangles will stretch and normals will be flipped. On the other end of the spectrum a cube will morph very well into a rectangular box.
In my opinion, simple morphing clouds into various shapes will prove cumbersome, error-prone, and the results will most likely be lackluster.
That said, you will find great success doing simple model swaps. Make a cloud object. Make a separate pen object. Enable the cloud in unity and disable the pen. At the time of "morphing", set the position and rotation of the pen to the position and rotation of the cloud, then disable the cloud and enable the pen. You can even play a sound and spawn some particles to easy the visual switch on the eye. You could even add a cute little scaling animation on the pen, like it is bouncing into existence.
Good luck!
I have tried the $$anonymous$$esh$$anonymous$$orpher approach. The problem with that is the source and destination should have the same vertex count!! I am not a 3d modeler so I don't know how to do that in 3d max or maya. $$anonymous$$aybe we can use script to subdivide the vertex?
Take your cloud mesh and move the verts around in max, then export. With smoothed normals it will have the same vertex count. I hate to be blunt, but if you cannot get 2 models with the same vertex count in 3ds max, this problem is too big for you too handle.
Answer by SrBilyon · Mar 26, 2011 at 12:55 AM
Nice question. I'm doing a game using 3D clouds. I had to animate my clouds in my 3D package and then import them into Unity. There may be another way, but as far as I know, you will have to animate them your self.
Answer by SpookyCat · Jun 06, 2011 at 06:17 PM
The MegaFiers system for Unity has good morphing support, as well as a whole load of other mesh animation systems built in. http://forum.unity3d.com/threads/89750-Mega-Fiers.-A-mesh-deformation-system-RELEASE
Your answer
Follow this Question
Related Questions
Using the MorphTargets script with a SkinnedMeshRenderer? 2 Answers
Is a way to Morph similar object and record it? 1 Answer
Unisky weird clouds 0 Answers
Character Body & Attaching Head that has Morphs 1 Answer
Deformation Maps Possible? 0 Answers