[Closed] return mesh output from a given modifier
Hi everybody!
I can’t find a function for returning the mesh after a modifier step. For instance if i have this stack:
editpoly
Hair_Generate
hairmesh_Edit
bend
morpher
editable poly
and want the returning mesh after morpher (and before bend). I want to make it as fast as possible and avoid creating new nodes, since my aim is to use the code in a scripted modifier a bit similar to substitute. I would name the modifier something like ‘Revert’ and use it for reverting a mesh to a certain state(modifier index) after for instance the belowlying modifiers have “destroyed” the mesh, like for instance Hairfarm would do:
editpoly
REVERT – has only one parameter: A spinner with a modifier index number from the bottom up. In this case:1 – returning the mesh after the morpher modifier.
Hair_Generate
hairmesh_Edit
bend
morpher
editable poly
Hope it makes sense. This modifier would be useful to avoid using proxyobjects/reference copies and probably be handy in other cases too
If it exists already, I’d be glad to hear it(then i don’t have to do it myself)
Best,
Kresten
Have you looked into the channels utility, you can copy a mesh channel from an object to a channel modifier later on in the stack. Or swap mesh and UV etc.
-Johan
Hi Johan,
Thanks for the reply. That sounds interesting. I read the docs about the channel info utility, and then I tried to figure out how to do what you describe. Then I had a brain-meltdown, so could you perhaps give a little more specific detail?
Best,
Kresten
It’s better to avoid scripted modifiers.
They have ugly limitations, like scripted materials.
The only thing you can do with a scripted modifier is changing existing vertex positions, or changing the UI of an existing modifier. (correct me if I’m wrong).
From what I can read about scripted modifiers, you are right. They can only be used to extend existing modifiers. I guess I might have to do with a substitute modifier, and an instance of the baseobject as target. It’s a bit clumpsy, but the animators will never know it’s there in my case.
Thanks for the inputs!
There’s is simple mod scripted modifier, but it’s true you can only change vertex positions. But there’s not limitation in where to place the verts.
About channel utility, I think it copies the current state from the top of the stack to a channel modifier (it doesn’t pass through animation though!) But you can grab the state with modifier disabled, active the modifiers and do what you want inbetween, then copy the old state back on top. This is a straight geometry replacement!
I can only really show you with a file, but I’m not behind max today. Have a go with it yourself, like copy the UV channel to the geo channel… tons of fun
-Johan