Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: postjudice on October 16, 2014, 11:12:17 AM
-
I've been trying to export vertex constraints from Maya with no avail, now I'm trying to get vertex position then set position an empty game object so that it follows the constraint as I displace the mesh. Thoughts?
-
almost like a boat floating on water, but on a spherical ocean with many objects
-
I made a get vertex positions into array (with array maker) action - I think it is included in the package, give that ago.
-
could you be a little more specific? There isn't much documentation on arraymaker.
I need to dump the vertex indices into an array list first? Then I set position based on the indices?
-
On sale today only is this package on the asset store https://www.assetstore.unity3d.com/en/#!/content/16318
Otherwise there is a 'get vertex position action' if you know the Vertex ID
-
yea that's nice, but I'm pretty sure playmaker should be able to get me there.
Say for instance, I know my vertex ID is 10,
Do I add a FSM GetVertexPosition index 10? I store this in a global variable?
Can I just apply FSM to object, then SetPosition to the global variable?
-
It works partially, I'm able to parent the game object to a vertex, but it doesn't update at runtime so the object stays static, and doesn't ride the displacement.
-
If you're are getting and setting with both set to everyframe it should follow :S
-
this may be a bug?
-
would the fact that the shader is displacing the mesh make a difference? It behaves correctly when translating the parent.
-
So I might need to drive displacement through a geometry shader not vertex shader, does this make sense
-
Still wondering,
Can someone illustrate the process of storing an array of mesh vertices and parenting an object to one of the ID's?
Thanks!!
-
Hi,
what custom actions are you using for this?
I have a set of actions for this within ArrayMaker, you can get positions, and then modify them, to then set positions, and it works.
ArrayListGetVertexPositions
ArrayListSetVertexPositions
https://hutonggames.fogbugz.com/default.asp?W715
Bye,
Jean
-
I'm using arrayListGetVertexPositions, but failing to see how to set up the fsm and proxy game object, given that the example file isn't quite what i'm looking for.
I'll keep trying
-
I'm also not sure how arrayListSetVertexPositions is helpful in this instance, since I want to just set an object's position on a vertex every frame.
And just to re-iterate, I'm displacing with a procedural texture, and I suspect that somehow this is not a allowing the mesh indices to update in world space.
-
Update, it appears you can't access the gpu vertex calculations, so some other method is required to duplicate the calculation....
-
Hi,
If vertex is not modified by the shader, then you can use arrayListGetVertexPositions and then get the position of a given vertex and set the position of gameobject to be that.
that would work ( outside your issue with gpu vertex calculation)
Bye,
Jean
-
thanks, but if anyone has any experience with accessing mesh level vertices and duplicating the shader calculation, that would be marvelous.
Regards
-
BUMp! 8)
-
Hi,
You will have more chance to get an answer on Unity's forum or UA, I personally have no experience with shaders.
Bye,
Jean