Rigging with Ruby - "Sticky Groups" [idea/req]
-
Concept: plugin with ability to group and manipulate objects together, while still sticking to other geometry. Preferably includes ability to define interaction points (e.g. for non-centered rotation)
Haven't been to the forums for over a year and a half (since proposing a 2D drafting plugin) - lots of amazing new stuff out there! Having recently switched jobs, I now have more time to work with SketchUp again, and I've been looking at all the new toys, which are probably all old news to you guys. For instance, new concepts to me include Dynamic Components, FFD, Sketchy Physics 3, Driving Dimensions, Free Scale, etc., just to give you an idea of where my mindset is.
So, perhaps the tools mentioned already include the functionality I'm about to suggest, Free Scale in particular (haven't been able to do more than watch the demos for any of the above), but I don't think any single plugin does quite what I'm envisioning.
Proposal: I would like to be able to create a group of objects (hopefully with a bounding box, maybe in green to differentiate it) that can be manipulated like a group but still stick to other geometry outside the group. I can see lots of applications for this; the one that originally suggested this to me (clear back when I first saw a 3D person component in SUv5) is posing human figures by providing an easy way to bend them at the joints. After reading around the forum a little, I now know this is called rigging; solo demonstrates perfectly what I would be trying to accomplish with this; in fact running across his post is what reminded me of this.
(In an effort to head off helpful advice in the wrong direction: I am aware of monsterzero's rigging hack, which is amazing, but not quite what I'm trying to accomplish. The whole point would be that other entities remain connected, e.g. the skin on a person's elbow or hip. I suppose you could have groups overlap, but then it looks like groups overlapping instead of a connected joint.)
Another possible use may be in situations like this. I think sticky groups may have some advantages over sticky vertices in some situations, but I don't know which would be harder to do.
Approach: It seems like the easiest way might be to assign attributes to a set of entities so that when one is selected, the others are also selected automatically. (I would expect this could be accomplished with something similar to MemorySelection2 - I know there are some planned improvements to it such as recalling selection sets between sessions, which would be vital.) I don't know enough about the internal ruby workings of a group, but could a bounding box be applied to the selection that would allow the move tool perform rotations as on a traditional group? And if so, does the rotation have to be about the centroid of the group or could that be adjusted to a specified point (i.e. the end of a 'bone')? I suppose you could work around the center by adjusting the group axes origin, or including a hidden entity that balances the group so the center is where you want it, but moving the rotation center would be much more convenient, not to mention prettier.
Anyhow, I would like to develop this idea further, but lack the know-how. I'd appreciate any feedback or pointers on how to accomplish this.
[EDIT] It occurs to me that this could be a first step towards a sort of organic animation in SketchUp - adjusting objects as well as moving them. Perhaps in conjunction with SketchyPhysics somehow (don't know how that works well enough to say, maybe it already does this) or with a primitive way of applying rotations/transformations to each group... e.g. assign each StickyGroup a set of position criteria (rotation00, rotation01, rotation02... would this have to be stored in an external file?) and then feed SketchUp the info for frame 1, then get info for frame 2 and adjust each group... am I way off base here? It seems like this wouldn't be too difficult to accomplish with Ruby (here I reveal my ignorance). I'm guessing it's much more complex than I realize or someone would have done it by now. Again, maybe SketchyPhysics does exactly that... I'm going to go play with that now to see what it does.
-
Good point. Will do.
Advertisement