I propose a way of using ICE to split symmetrical shape halves. Here it is in action:
(Download here and read more about it below.)
The classical way of doing symmetrical shapekeys (a.k.a. “blendshapes” if you’re in Maya or morphs if you’re in Max) is to make a symmetrical one then add it twice and paint off its influence with two weight maps, one for each half. In Maya you’d use the Paint Blend Shape Weights tool, but it’s basically the same deal.
In ICE, shapekeys have a .positions ICEattribute in them. This is an array of positions (vectors) representing the relative offset from the original mesh. In other words, it means you need to add them to the existing point positions to make said shape occur. That said, we won’t be using .positions in this post but full PointPosition’s instead.
Here’s what we’re gonna be working with in my example:
Normally you would make the 2 weightmaps, select one then Shape->Modulate Shape Key with Weight Map. The map looks kinda like this:
This involves making sure you have 100% of one half and 50% of the middle. You want 50% because you want to be able to add the shapes for both sides and get 100% of the deformation in the middle, else you’d get 200% and that’s no good.
Let’s see how we can use ICE to skip that step altogether by only deforming points in one half instead of relying on a map to define it, as pictured at the beginning of this post.
So as you can see we read the PointPosition, split out to scalars with the “3D Vector to Scalar“, then feed the X to different nodes to see if it’s bigger or equal to / bigger / smaller or equal to / smaller than zero. With the “Select Case” we use the correct one as defined from our dropdown menu input attribute “Type“. (If you didn’t know: to define a dropdown menu for an attribute in a compound just rightclick it and go to Properties, then fill in “Combo string” and “Combo value” then click “Add combo” as desired.)
The If node before the Linear Interpolate makes sure that if we’re not dealing with the correct half, we just let the positions pass through untouched. Otherwise, we check if the “Type” (mode) is set to one that includes the middle line, and if X is 0 it means we have a point in the perfect middle of the mesh, in which case we only affect it by 50%, else we let it go through. At the end we do one more Linear Interpolate between the affected result and the original mesh, so we can blend it gradually with a slider.
Lastly, if anyone’s curious what the word “Epsilon” means in regards to an “Equals” node, it’s basically the margin of error permitted in the comparison since vector values aren’t exact numbers most of the time in 3D. Thus an epsilon of 0.001 in this case means that a vector’s posX can be off from 0 by 0.001, so it could anywhere between -0.001 and 0.001 and still be considered to equal 0. You can increase the epsilon if you need to.
Long story short, you can download the compound right here. I find it has greatly sped up my workflow when generating shape halves. Hope it helps you too. 😉