It seemed like an interesting proposition - turning 3D layers on and off in sequence and recording the effect in a macro or zscript, (think animation). I tried it, but when playing the zscript back, layers are turned on or off at random, not in order forward or backward.
Imagine a macro or zscript that successfully produced this effect and, with each screen update, takes a snapshot, (via the “Movie” palette), producing wonderful, recorded ZBrush 3 animations. The stuff is there, but how to get it to work?
Is this a problem with zscripts in general, or just with the layer palette, do you think?
Been waiting for this functionality -
Will keep on waiting.
How have you scripted this? If you have recorded a zscript then that could easily throw up errors, expecially if you have more than eight layers and have not renamed them. There are only ever Layers 0 - 7, the position of the scroll bar affecting whcih layers those happen to be. Naming the layers should help, though I’ve not tried it. Layers and Subtools are difficult to script! :rolleyes:
I did make a zscript that first created a bunch of layers, (it looked like a lot more than 8), which automatically turns the “eye” on. I, then, started from the last layer created and, one by one, turned off the “eye” icon in reverse order. This is where the result showed random layers turned on, or off. I’ll try first naming and then turning them off and back on again.
I’m sure you can see how this would be great fun if it worked.
Sorry to go off topic. I cant get any scripts to load in zb3. whats going on. I downloaded scripts from this forum and zb3 does not work. I press load and then nothing. Better than crashing but still… Any help?
It’s possible that you are not seeing the zscript buttons after loading. After loading a zscript, to show the zscript/tutorial window press ‘H’ on the keyboard or press the Hide Zscript button [don’t ask ] in the ZScript palette.
thx marcus, got the text to show up it says “press play to view”. but there is no button.
It crashed 10 times while I was trying to get that to work. I’m about to give up.
DivideandRender,
I think there may be a problem with the zscript you are trying to run. If there’s a lot of text in the zscript window then that is certainly the case. If you’d like to send me the zscript, I’ll take a look.
Here is a brief bit of code for the method you’re after. It assumes that all your 3D Layers are switched off to start with and runs from the last layer upwards, switching each on and off with a Movie snapshot while the layer is on. It doesn’t matter if your layers are named or not.
Code removed - see post below
In the zip is a quick test movie I made using the script. The posing is dire but it shows the method works quite well.
I tried viewing the video, and, even though my version of QuickTime is up to date, I am missing a component that is not available on the QuickTime server to allow me to watch it.
I also failed to launch the zscript, whether the dog is preloaded or not, I get an error or a crash.
Thanks for trying to set this up. So, layers are limited to only 8, as of this release, or were you able to do more?
Greg,
I’m sorry the movie and the script gave you problems. The script was only intended as a snippet to get you going, not an example but I see now that it could be confusing for non-scripters so I’ve removed it. Also, under certain circumstances, it would cause an error or crash ZBrush.
You can have more than 8 Layers - the code allows for up to 100. Probably there is an upper limit depending on your system.
The zscript in this post should function ok, and not cause crashes if you should press the button without first setting up layers. I have included, in a separate zip, an example ZTL so you can examine the 3D Layers to see how it all works.
Here’s what you do:
Unzip both zip files to a suitable location.
Load the TalkingHead.ZTL using the Tool Palette Load Tool button. Draw the model on the canvas, enter Edit mode (press ‘T’) and position the model how you want.
Load the LayersToMovie.zsc using the Load button in the ZScript palette.
Press the Layers To Movie button that will appear in the ZScript window.
To play the recorded movie, first set the Movie palette Title Image FadeIn Time and FadeOut Time sliders to 0 - otherwise you won’t see the recording because it will be too short. Then press the Play Movie button.
Note that the zscript doesn’t alter any of the Movie palette settings, so it is likely to be rather slow. Setting the Movie>Modifiers>PlayBack speed to a higher value will speed up playback. You will need to experiment with the settings to get the results you want.
How it works:
The model must have 3D Layers. Each Layer is used to store a pose which are then recorded using the Movie Snapshot feature, starting from the bottom 3D Layer and working upwards. Note that only the current 3D Layer must be visible when posing your model - examine the sample ZTL to see how it is constructed. Only the Layers are snapshot; the ‘base’ model doesn’t appear in the movie.
Mario,
I hope the above explains the method better.
Thanks so much. This version works perfectly and is almost precisely what I was trying to produce, myself. (I’m not a ZScriptor). I was approaching the problem by defining small macros that each do a portion of what I was ultimately trying to achieve, then, with a text editor, trying to “stitch” the various pieces of script together.
One thing that had occurred to me was a macro or zscript that would cycle through the layers, forward and then backward, at will, without actually recording the snapshots - (giving a glimpse for further tweaking of poses or facial shapes before committing to “film”). I’ll look at your script to see which part is doing the cycling, then maybe I can integrate another “button” that does this and lets you specify a frame range for cycling and whether you will cycle forward or backward.
I once made a script that utilized an “onion-skin” feature, (converting, as needed, the material of the viewed object to a gel shader), so that, as you animated, you had a record of a number of previous frames. That script utilized the old “layers” from earlier Zbrush versions. Digits eventually incorporated these functions into his “Widgets”. Now that we are able to pose our models in real time perspective, with real time shadows, things look much more interesting.