Grasshopper

algorithmic modeling for Rhino

Hello

Can anyone here guide me on how to do a definition for blend shape...a function similar to blend shape animator in maya.


thanks
Shankar

Views: 5540

Replies to This Discussion

Hey Shankar,

Here is one that I just wrote for curves. Maybe it'll help you and you can convert it for surfaces or similar...

greetings, oli
Attachments:
Whats the geometry type you are looking for? I remember covering Curves and Surfaces with you guys. Maya's blend explicitly works for Meshes. It can be coded for GH as well, the rules would remain the same as in Maya:

1) number of vertices on the source and target should be identical

2) order of vertices should also be identical -- for this reason, when blending in Maya, one often ends up copying the source shape and modifying it to generate the target shape rather than modelling it from scratch -- just to make sure that order of vertices remains the same.

If you are indeed looking for a definition that works with Meshes, this methodology should work for you:

1) get vertices of source and target (count and order should match)

2) get the vertices for each face of the mesh (identifying the index of vertices that create a face. For Rhino, they will either be 3 or 4)

3) draw lines between source and target vertices.

4) sample one point on every line based on the blend amount. Implying that a 50% value would give you the midpoint on each line, 0 would give the start point, and 100% would give the end point.

5) these new points are the vertices of your desired shape. use the information you generated in step (1) to recreate mesh faces.
Just did a quick definition for the same. Attached.
Attachments:

Thank you for sharing! it´s simple but very effective!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service