Hello polycounters. Here's a situation I'm not sure how to deal with,
I have a tube that I'd like rigged to a lot of bones so that it's nice and flexible, and I want it to have a sheath around it that uses a blendshape to scrunch down along the tube's length, but I'm unsure of how to get the sheath blending along with the tube. I tried using a skin wrap modifier above the morpher, it works nicely for the bendiness but it nullifies the morpher entirely
Any ideas?
Note: I'd like the tube to be part of a larger mesh that's got a regular skin modifier, I don't want any fuxery to get in the way of that
(Before you ask, yes, this represents a penis)
Replies
Assuming this is for game export I think you're going to need to ditch the blendshape and use a load of bones to deform it.
You'll probably want to arrange them in a series of rings and constrain their movement to a spline driven by the shape the shaft bones take.
You should at least be able to bake animation out that way - I'm not sure if ue4/unity will support that sort of thing as a procedural animation.
Steps:
- Skin base sheath
- Skin each sheath blend target, (need lots of intermediates but that's fine, I was planning lots anyway)
- Add a morpher to the base sheath and pop in the blend targets
Friggin awesome:I feel a little dirty after doing this.
Here's a zip file in case it helps, Max 2018.
I'm slightly surprised Eric's fix works - it probably won't if you make explicit vert to bone assignments (now I think about it, that's why the skin wrap doesn't) but I can see how it would if you use envelopes.
I've never skinned to a spline before, seems like a simpler way to get a smooth shape than a bunch of bones, but as a drawback of having less control (I can't see any obvious way to affect the twist like with a path deform modifier has?)
I don't know why I'm so amused at your pr0n, Eric.
For a morpher channel that uses more than a single target, the second-onwards use the current scene playhead's frame for evaluating their skin, regardless of which frame is currently being rendered. So if the playhead is at frame 5 and we're rendering frame 30, the base mesh and first morph target are deformed to wherever frame 30's bones are, but the second morph target onwards uses wherever the bones were at frame 5.
This makes rendering an animation using this technique somewhat.... difficult...
Here's a nice gif of the rendered output (viewport gif is earlier in the thread):
As you can see, the skin from the base mesh and the first morph target in the list work absolutely perfectly, but the second target in the list onwards (my real-world case has a dozen, this example case has three) evaluate frame 0's position.
Since the viewport and the render disagree I can only assume it's a bug
Anyone got any ideas how I can work around this?
NinjaEdit: Using a Point Cache modifier does not work, the cache is the same as the render
Alright, alright, alright I'll help out.
Eric is right it's an order of operations issue. Morphers should go under skin, that's how it's always worked. Since the beginning of time... forever... ever ever ever... (echo echo echo)
What do your morphers look like? They shouldn't bend or wobble side to side, they just goes up and down, squash and stretch. Any bending or lateral movement will push the verts past the skin deformation and off the model.
It sounds like what you might want to use are joint angle deformers, they are part of the skin modifier, under the Gizmos rollout.
They blend specific morphs based on the angle of the joints so you get specific morphs turning on only when specific joints bend a certain way. Typically they are used as "corrective shapes" around problematic areas like shoulders, hips, elbows and knees, to give shape to those joints in extreme poses where the skinning can't do everything you need it to to hold the shape. They can also be used to drive muscles flexing and clothing wrinkles either through a dense mesh or, if you pair it with a wrinkle map blend. They even get used for some secondary giggle motion.
https://www.youtube.com/watch?v=5rX8i-ZKdsQ
Also, engines like Unreal support morphs/blendshapes and while the tools are still relatively new and in need of some work they do a lot of impressive work.
"725 blendshapes across 10 meshes"
https://youtu.be/_OuCrbwEJW4?t=40m19s
The verts move so far in the morph that a skin above can't do nice deformation. The verts get separated from their original bone by a long way. I need a situation where the skinning updates as the morph does
Giving every morph target a skin, and putting the morpher above the base's skin means all of the morphs are moving with the bones all the time, then sing 'Automatically reload targets' the morpher is always blending between correctly positioned morph targets.
The only part of this that doesn't work is evaluation when rendering a sequence. Because I can render any single frame correctly, I feel like the solution I'm looking for maybe uses MaxScript to force evaluation to update between frames. Or perhaps caches the mesh deformation prior to rendering.
(This arm motion feels oddly appropriate for this thread...)
They've royally screwed up bones in newer versions of 3dsmax, at least 2017 and 2018. It does the same thing you guys are running into.
EDIT: I just tried it out in 2019 and it works with bones. Upgrade to the latest version.
EDIT2: It's not working...
Or... wildly inconsistent. It's weird, on some shapes like "fat" it plays along fine, but then on others it pops to an odd shape as soon as it hits 100 or slides off over time. If I recreate it, I get weird results. The problems seem to amplify if I mess with the shapes after they've been added to the morpher.
I usually didn't move the verts around this much, especially not past a joint onto another. Usually they just get nudged around a little.
Thank goodness i use Maya to animate, this stuff isn't broken in Maya, of course it's broken in a bunch of other ways... Blender and Modo are looking pretty attractive now, because Autodesk charges insane prices for broken buggy software.
You might be able to do something with a FFD cage? But that seems, janky.
I was giving this some thought and I don't think I would handle this with just a single set of bones and morphs. You would probably have to rig the outter tube and inner separately to their own bone structures and constrain or pathdeform them to a driver object, something like a spline with splineIK might work or the bones of the inner tube.
You animate the driver which controls both of the tubes, and then you animate the position of the outer tube to slip up and down the driver object.
I've been looking into MaxScript to force correct evaluation and this seems to work.
I can set everything up using the normal render settings dialogue and instead of pressing render there, I run this script. It'll run the range specified in render settings. There's no nice time estimate window, but I'm sure if I really wanted I could figure that out
There may be a solution in splitting the multi-target morph channel into multiple single target channels and wiring them up to a single spinner with some math, but honestly replacing my render button with that script is simpler.
Glad you got it sorted. I did set up a test myself using CAT, but I pretty much got the same results as everyone else.
EDIT: Ok, so since it's only the 2nd morph and beyond, I separated out the 3 targets into 3 channels and that allows the whole system to work. It more than triples the animation work required though so I'll write some MaxScript when I'm not so tired that will put all the separate channels back into one spinner
You can use a wire parameter to each channel so that it works similar to a progressive morph. I have to do that often because game engines don't support progressive morphing.
Aaaand it's still not really an effective solution. (modifiers above the morpher were causing issues this time)
But I did finally find something that's working nicely. Point Cache modifiers were, like renders and fluid sims, only using the current frame's data. But by creating a point cache for every frame individually with a script, then doing a quick edit to the XML I was able to get the point cache modifier working exactly as it ought to. I like this solution because it means I can just animate to what I see in the viewport, then when it's all done, cache it out and forget all this struggle ever happened.