ZBrushCentral

ZScript/ZPlug Request "Turnaround ++"

Hi, I love Zbrush 3’s new ability to make turnaround videos of you’re model without having to go to another package first. But it would be even cooler if we could have some other, more complicated motions rather than just a 360 rotate. Something that rotates 1/4 while also panning from bottom to top for example.

I don’t have the slightest clue how to make a ZScript or ZPlugin so I am requesting that someone with those talents may make something like this. -Derek

What you’re asking for is perfectly possible and perhaps somebody will take you up on it. Alternatively, you could learn a bit about zscripting and have a go yourself. It’s not too difficult to get started (and fun). Simply recording a zscript and then examining the resulting text file will give you some idea of how zscripts work. Then there are the various sticky threads at the top of this forum, plus the combined knowledge of those who frequent this forum to answer any questions you might have.

Hi Jettatore.

Just to let you know, recently Ive created a sort of camera Zscript. Very simple to use. You rotate the model to one view from where you wish to start panning/ rotating the camera and press on a ‘Set Camera 1’ button. Then you rotate to change the view to the destination position of the camera and press “Set Camera 2” and then you click a “Apply Camera” button which pans/ rotates the camera from the start view to the final while taking snapshots into the movie, and you can also adjust some settings. If that’s what you want I can upload the zscript it here, but first I would need to clean up the code and interface since this is all very recent and is integrated with the animation Zscript I was attempting. Just let me know.

This is something i was looking for too.
Can you post the camera Zscript, Darukin?
Thanx in advance.

This would be quite handy…the ability to do somewhat more
sophisticated ‘demo’ reel revolves and pans using Zbrush’s
built in goodies, then just edit in AE or Vegas or summin.

The addition of a plug like this would definitely add value for
many, I’d imagine (me too, me too!). :wink:

Hope to see it attempted. :slight_smile:

cheers.

WailingMonkey

Hi Drive2Moon

Sure thing I shall post the Zscript but when it’s fully ready hopefully since it’s still sort of in prototype stage. Unfortunately there is one problem with it so far :confused: , which if fixed should mean it’s complete.

The pan and zoom functions of the camera work perfectly but the rotate has problems, which I think is a problem with Zbrush rather than the Zscript logic. You see, whenever the tool rotates more than 90 degrees along Y axis left or right the tool suddenly flips upside-down for some reason and continues to rotate the other 180 degrees upside down. So rotation works well for first 180 degrees only so far. I’ll try to work it out though and will hopefully post the script here as soon as it’s fixed / ready.

It’s called
Gimbal lock and is a feature of using Euler angles in the rotation algorithm. I’ve not found a reliable solution for interpolated rotations in ZBrush. :frowning:

The simplest way of coping with it is to temporarily change the rotation of the entire object using the Deformation> Rotate slider so that rotation is about the Z axis instead and the problem then won’t appear. Granted this isn’t a particularly attractive solution (especially with subtools) but it is generally the most practical.

Should you find some other solution please post the code. Every zscripter will worship you as a god thereafter. :wink:

This sounds awsome Darukin. Even with the rotation limitation you’ve mentioned it sounds to be perfect for my needs. If you could post it in a beta form, it would be greatly appreciated.

I haven’t tested it very much yet but it looks like the rotation option in the Movie script has solved it, no?

Myself, I’ve often used your solution of temporarily reorienting the object so the Y axis becomes Z, then executing a rotation around Z, and finally rotating the object back so Z axis is again Y. (subtools do complicate that. :stuck_out_tongue: )

Sven

No Problem

I have the Zscript here now. Let’s just say say it’s in beta form right now.

About the subtool problem, all I needed was to place an extra button to prepare the entire tool for the camera, to automate the deformation rotation of the entire tool for all subtools in one click. Though depending on the tool’s deformation this button may need to be clicked more than once though I doubt.

Anyways, here it is, and with the extra button added the limitation I mentioned should be gone.

Oh and this of course is thanks to Marcus Civis, thanks very much for that suggestion it sort of solved the problem even though maybe not the most attractive solution.

ZCamera Quick Instructions:

1: Load the Zscript

2: Load Your tool. With tool selected, press on the: Prepare Tool For Camera Button. You may need to press this button more than once until you get the right rotation deformation so that the camera will rotate correctly so dont panic if you get very strange camera rotations around tool’s y-axis, in that case click the button again till it’s right, but usually should be pressed ONLY ONCE if modeled normally.

  1. Change view of the tool and press on the Set Camera Start button to specify where camera shall start panning / rotating from i.e. the start camera.

  2. Change view of the tool and press on the Set Camera End button to specify where camera shall stop panning / rotating, i.e. the destination camera.

  3. Make sure to apply appropriate settings from Movie Palette within ZBrush.

6: Scroll the Frames Slider appropriately to specify the number of frames to capture, which corresponds to the relative speed of the camera movement

7: Press Preview Camera button, only after the start and end cameras have been specified, to preview the camera movement.

8: Press Render Camera button, again only after the start and end cameras have been specified, to render the scene as the camera is applied.

Finally, Enjoy, I hope it’s helpful.

Dude, thank you so much. I’m going to be playing with this all day tommarow. Good looking out -Derek

:smiley: Hey Darukin,

A lot of vanks from me! The plugin is just beauuuuuuuuuuuuutiful!
Exactly for my needs!
It worked also with a separate subtool!

Now I start dreaming about smth like letting them subtools travel separate routes to later get together into one piece of the mesh, then go apart again…
There is no end to the plans…
Please go on working over this gem! :slight_smile:
Anatom

Thank you so much, Darukin.
The script is working great! :smiley:
It would be really nice if the script offers multiple camera destinations. Just a suggestion. :wink:

Hi all, and you’re welcome!

I’m glad you guys liked it, first of all. :smiley:

Secondly, indeed I said I would consider this a beta :stuck_out_tongue: so maybe for the final I could add multiple cameras and extend the functionality in more than one way, like you suggested drive2moon.

And Anatom, I’m not sure exactly what you meant with subtools taking own routes and merging, if you could be clearer :stuck_out_tongue:

Finally, maybe you guys can show me some of the nice movies you make with this within Zbrush, I would be interested in seing some results. :slight_smile:

This is going to be one of my favorite scripts once finished. As its still beta heres my bug report.

If I try to back up the turntables one after the other, say for example one normal turn follwed by a couple fo turn and moves and zoom ins, it seems to work fine and even previews fine on export. However on play back the turntable is fine for the ‘normal one’ but the framerate apears of for the scripted ones.

Thats to say it goes very slow and jerky. I can upload an example if it helps with the bug. Nice work so far on this one, lots of fun to play with.

Wayne…

Hi Darth Wayne.

Do you mean that the scene plays fine for the Preview Camera, but when you press Render Camera and then play the movie from the movie palette it goes very slow and jerky as a movie? Because if that’s what you mean then it’s not really a bug but all it means is that you must adjust certain settings in the movie palette, like I also stated in the instructions. The default Snap shot time is one second in the movie palette modifiers section, i.e. 1 second per frame which is very slow. What you can do is change that to something like 0.01 and then the rendered movie version will be very fast and fluid, even if the preview version may run slow with very high poly counts.

If that’s not what you meant then i’m not exactly sure what the problem is exactly in which case maybe you can post the example you’re talking about.

In the meantime Im open to all suggestions / features for a final version of the script.

Thanks that was it exactly, so looks like it was a case of RTFM by myself. :slight_smile:

Some sort of constrain to certain axis on rotates would be nice addition. Also it seems to knock the center pivot off on the model I was using if I want to do a normal turntable afterwards.

I think I’ll go and have another play with it lol.

Wayne…

Lol, again there’s a solution to the turntable problem. :wink:

The problem happens due to the preparation of the model which occurs when you press the Prepare Tool For Camera button so that camera can work properly. Essentially it flips the tool completely 90 degrees along x axis so that tool’s y-axis becomes z-axis or something like that.

Because of this, you must change the axis along which turntable rotates model from Y axis to Z axis which you can select / specify from within Movie: Modifiers palette as well. There are many options there which you should check out and adjust to optimize it according to your needs.

Aha that solves that problem for the moment then! :slight_smile: Are you planning to add an option to return the pivot once past beta?

Wayne…

Yea, sure, I guess I’ll apply that too.