FFD 2 Quad
10/31: Added a vertex normal projection option by pressing alt while clicking, fixed some small issues. Hope you find this useful, Happy Halloween everyone
about: the script sets up an 2x2x2_FFD modifier (FFD group button). It lets you automatically build new geometry by cloning and aligning the the orginal object to a quad of an Editable_Poly (place group). It also adds the 'Archetype Holder' modifier which lets you set up simple rules to run the script based on MatID's in an edit_poly.
"BBox2Face" macro does the same thing as above, but automatically builds the group based on whatever object is selected at the time. (also deletes the temp group when finnished)
1) put the script in scripts/startup folder
2) There should now be a new macros "FFD2Quad" and "BBox2Quad" under the "FFD to Quad" catagory in the customize UI menu
3) put the macro ui whereever you want
10/31/2012: I realized, that while the ability to set up very complex groups was neat, I tend to only use the basic FFD type most of the time. So I made a pared down version of the Macro (BBox2Quad ) that is a bit more user-friendly. Now it works like a mouse tool should, select a singular object (should work on anything that will take a FFD mod, noe not just epoly), run the macro, click to place, right click to stop. The placement can be modified by pressign ctrl(delete face), shift(inset), alt (project by vert normal). No need to set up the group ahead of time, just assumes it will work an FFD.
Added vertex normal projection option. Its based on the underlying smoothing group of each vert so if it is acting funny, make sure your smothing groups are set up correctly e.g. in a faceted model using the vert normal projection and face normal projection would give the same result
small fixes: small issue with trying to make groups out of flat objects has been resolved. The FFD Group button is no longer limitted to just epoly. Will also work on groups, but it is still buggy. EZLinkXF should work on splineshapes with multisplines now.
10/08/2012: I've got a fair amount of buttons on the rollout now, I should probaly explain what they do:
FFD Archetype: sets up the basic group for use with the script, (only works on epoly)
Clone+Attach Arch: does the same as the FFD button, except will attach the selected to what ever object is picked after the button is pressed. (Useful if you are trying to keep all the archetypes relative placement referential to echother, I used it in the bungalo example video to keep the individual component peices placements relative to the selected quad. Once the group has been created you can open it up and delete the reference geometry, the ffd_duper makes sure the FFD lattice remains a constant size)
Linked XF Archetype: creates a new group where the corner points control the geometry usign linked xform instead of FFD. (useful for things that need to keep a relative dimension like frames, or walls, etc. I think this type of group builds faster than FFD groups so try to use this when posible, but it gives less consistent results)
Static Archetype: when placed static groups won't change deform any geometry, they simply stick the the new geometry on the face center
Half pnt: creates a point helper that has a scripted controller that keeps the position averaged between whatever objects were selected when the button was pressed. (finally fixed it so it will work rather the point is in a group or not)
Attach $: attaches all currently selected objects into a new editable_poly
Clone Faces: clones selected faces :P (if you have arcetype defintions that involve random components, cloning the face will put multiple random components in the same place, will sometime place the same geometry twice though)
EZ link XF: Cycles through selected Epoly and point helpers to create a linked x-form for each point that controls the vertices closest to the point. (It sounds more complicated than it is. Useful, for things where only some of the dimensions are vaiable. For example a pillar would need the height to be variable but not the length or width. My workflow would be: 1)create a simple FFD archetype group from the pillar 2) explode the group 3) select the top corner point helpers, press 'half pnt' to create a new point in the center of the top helpers, repeat for the bottom points 4)select the newly created points and the orginal geometry, press 'EZ link XF' 5) select everything, in this case should be 10 point helpers and the epoly, create a group. 6)test it out. place the new groupwith the 'Pick Faces button', you'll probably need to press the refresh button for the group to show up in the drop down list
Build Sub-Definitions: if this is checked whenever a face is picked, the created geometry will try to build any of the archetype definitions saved in the 'archetype Holder' modifier of the group you are using.
Further notes: picking faces is a very intensive process in the script, the simpler the geometry is better the script will work. On complex models, it works better (faster) to detach all the faces you plan on picking before hand, hide the rest, and then pick the faces to use. Or set the material ID's and use the Archetype Holder Modifier for creating the geometry.
TODO: I'll try to make a video example of how to use the x-form based groups if people are interested. I'm still working on how to optimize the script. plan to add scale and vertex-normal projection option to the modifier when I get a chance.
9/18/2012-- I sideline the original script for a while, but I finally got around to fixing it up. Changed it over to relying on the FFD modifier instead of linked xforms like it did before
notes: if you run the add a 'archetype holder' modifier inside one of the groups created with the script, the all of the settings from the modifier will be added build queue of any other 'archetype holder' that uses the group. So if a edit_poly has its own group listed in the saved archetype definitions, it will stack its own geometry on top of itself. Use the iterations to controll how many times this can happen. you can set up a rudimentary L-system fractal this way, but unfortunately the script runs too slow to really experiment with this potential.
also, though the script was designed to run using a ffd modifier, the build execution only moves the corner helper points. you can open up the group or continue attaching geometry to it once it is created. any nodes linked to corners helpers should be cloned and moved when the group is called. This can be useful if you want to make something that is positioned relative to a quad without having to deform the geometry (the halfway helper button was supposed to help with this process, but it's still has some kinks to work out <--FIXED)
I'm still trying to find fun ways to use this script if you have any ideas please post them
09/21: fixed the the archetype holder modifier that comes with the script. Added a youTube example on how to use the modifier