ZBrushCentral

Simple Animation Script?

I’ve been thinking of attempting some simple animation with ZBrush using Transpose and Morph Targets. I could set a morph target on my beginning pose, transpose to my next key pose, and then scroll through the morph slider while exporting a bunch of images. Then if I wanted to continue, I could set my last key pose as my next morph target and repeat the process. It would be a sort of stop-motion with digital sculpture.

I don’t know much about ZScripting, but this strikes me as something that could be easily automated. I imagine setting up my two poses, and then telling a script that I want X # of frames rendered and exported between those two poses.

Any comments? I would be quite indebted to the person who pulls this off.

I wrote a quick script posted here which may interest you:

http://www.zbrushcentral.com/zbc/showpost.php?p=361000&postcount=12

This only runs through Layers, switching them on and off but it’s enough to show what is possible. Using the Layer slider would extend the functionality and make for a smoother operation. It’s not even necessary to use Layers in that the script could simply import any number of sequentially numbered OBJ files, adjusting the slider by preset increments. Things would get complicated if there were subtools, but it’s not impossible. Added to which, it is possible to save positions on the canvas, so one could add in keyframing for model size, position and rotation, interpolating between them. The stage would have to be 2.5D but it could still work well.

As you can see, it’s something that interests me, but whether I ever do anything suitable for release is another matter… :rolleyes:

thanks for the link… I’ll check it out as soon as I can… I’m getting into a project where I need to make alot of brief, simple animations… most of them looping ambient effects… so a decent plug-in like this would be priceless to me

Hi SalmonGod.

I’m glad that I found this post though I’m late, but since I have, I’d like to say that Ive attempted, or I’m attempting, my own sort of animation ZScript myself. I have tried 3D layers and going through the intensity slider while snapshotting images. I have also tried doing the same for morph targets, though 3d layers are a better choice I think because you can have several of them and keep them saved i.e. each 3d layer for animation between 2 keyframes.

I’ve even made a 3d camera system where you can set two cameras and pan through them while animating at the same time (though its actually the entire tool rotating since there’s no 3d space) and have added sliders where you can specify certain settings. In fact Im working on this currently, trying different things out. I also extended the functionality to support animating between keyframes for all the subtools at the same time where each layer index is the index of the keyframes for each subtool (though this makes it slower and so is like rendering animation only which is where it lacks). And it all seemed to be working so well. Until alas I found a fundamental problem.

Take a character and set key frames i.e. layers or morph target and then rotate a limb for instance but at a large angle (so you can see a proper full effect) then animate it and see results. You will see that the animation is very unrealistic and the limb will move in a linear motion towards its keyframe destination rather than in a proper rotational motion and will even change in size and become deformed etc as it is animated. Unfortunately it doesn’t work for character animation using character skeleton/bones rotating etc as it gives unusual unrealistic results though it does work well for animating facial movements and morphing effects etc, very well in fact.

I’m currently looking for a solution to this, as it seems possible, but so far it seems very unlikely with Zscript limitations. I think that Animation for Zbrush should be the next step, shouldn’t be that hard. I mean I did, using the prototype animation zscript I attempted, create very nice and fluid animations with a camera even rotating, with great resolutions and great speed at producing the animation (ie no rigging / displacement rendering etc :P), but unfortunately there were some limitations which prevented completing realistic animation, not to mention a hundred other things it would lack even were it successful here.

The point is, Zbrush has already gone so far, becoming my favorite 3d app/program, and still has even further to go and more surprises too I believe, and animation seems like quite a reasonable next step to me which I would be grateful for and which shouldn’t be THAT hard or unfeasible I think.

If you want I can also upload the zscript that Im talking about though mind you it’s a prototype so the interface currently is very messy and so is the code cos I was just testing things out. :wink:

Darukin,

Have you tried character animating with a ZSphere-rigged character
and your script?

I’ve not yet set up something like this (although there are a few tutorials
floating around…just haven’t got to it yet), but it would seem to be more
suited for the types of larger motions you’re talking about (as opposed to
trying to use the move tool), not to mention it should allow for a more
‘permanent’ and somewhat more traditional rig. So instead of covering
a large distance, you could take smaller and more measured increments
to help fill in the keyframes.

Just a thought… :slight_smile:

cheers.

WailingMonkey

Yep that is a thought too.

In fact I’ve tried that also, but with 3d layers it animates in the same way as transpose.

However you just gave me another thought.

In Zscripting, Zspheres have their own code and commands and maybe with ZSphereGet and ZSphereSet you can find the distance of the Zsphere you wish to animate from its parent Zsphere and keep that constant which is also another idea, and which can’t be done with transpose. In the meantime I have been looking into making a 3d layer / morph target independent animation / keyframe system but it looks tough and probably won’t work :stuck_out_tongue: but Im just giving things a try for fun.

Thanks for the suggestion anyhow, it gave me an idea and I’ll look into it.

Hi Darukin,

I’d love to see what you come up with along those lines.
There’s much to be admired about Z3’s built-in shadows
and the ability to render out higher-res with AA-half on,
so I could see a mini-keyframe renderer as a real nice bonus.

Glad to see you’re having fun with stuff I’m totally out of
my depth in… :smiley:

Kind regards,

WailingMonkey