playMaker

Author Topic: scale bunch of vertices  (Read 3148 times)

kiriri

  • Hero Member
  • *****
  • Posts: 506
scale bunch of vertices
« on: June 13, 2012, 07:29:33 AM »
So I'm trying to manually create some very simple shapekeys here. Is there an action that can scale vertices or do I have to manually generate a median point and then calculate the transform as individual add positions, as constrained to the distance vector to the median point?
Is there maybe a way to localize the system to the median point being the 0 - point? Then I'd just have to multiply each position vector by a certain value.

Anyways, I'd take any solution :D As long as it'll scale the specified vertices.
Best,
Sven

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: scale bunch of vertices
« Reply #1 on: June 13, 2012, 11:02:52 AM »
Hi,

 What is a shapekey? sorry, not english:)

 I don't think you can simply scale a bunch a vertices like that. You will need to build a small set of tools to achieve this. For example, storing the vertices position in a list, and maybe reference them from your median point, and then apply a scale factor to them, then inject back them vertices position in the mesh itself.

The tuff part will be for you to get the vertice indexes. I can write a little action that would store the vertice list of a mesh into an array, so that you can then work on it right from within playmaker if you want. maintaining another array of indexes, that is the vertice you want to scale. And then an action to inject back the vertice array into the mesh to apply your changes.


Bye,

 Jean

kiriri

  • Hero Member
  • *****
  • Posts: 506
Re: scale bunch of vertices
« Reply #2 on: June 13, 2012, 11:47:41 AM »
a shapekey is another word for a morphkey or vertex point animation state. I for example have a mesh with a hole in it, and I want the hole to get bigger and thinner, but I can't use a skinned mesh to do it, because I never know beforehand which vertices I want to transform, and which not. So the array approach fits me quite well.
And a vertex to array action would be damn useful anyways :D Oh, and I wanted to note, I started implementing the bounding box function, I'll probably have it done somewhere next week (since I'm slow and the bounding box is actually a bigger thing than I thought :D), just so you know ;D
Best,
Sven

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: scale bunch of vertices
« Reply #3 on: June 13, 2012, 04:00:09 PM »
hi,

 Ok. Get back to me next monday if you don't hear from me then, cheers.

Bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: scale bunch of vertices
« Reply #4 on: June 14, 2012, 02:58:13 AM »
Hi,

 Had some additional thoughts about this. Have you checked MegaFiers? yes, it's "expensive" but it is SO POWERFUL for mesh manipulation that I am pretty sure it has some build systems to do just what you want. I would suggest you check with them your requirements. I am sure a FFD box would work just fine for what you want.

bye,
 
Jean