ZBrushCentral

Zscript : XYZ Adjust (rev B) ****** updated the 14th of June 2004

************ Updated the 14th of June 2004 ************
XYZAdjust2.zip

XYZ Adjust allows you to edit the X, Y and Z resolutions of Zspheres. Normally it is only possible to set the XYZ resolution before a Zsphere is created. With this script you can change the resolution after a zsphere is added. Also Membrane values can be set for individual zspheres.

Key features:

               :white_small_square:  Hotkey activated. Interface appears below the cursor.
               :white_small_square:  Adjusting of XYZ resolution while in preview mode.
               :white_small_square:  Symmetrical editing of XYZ resolutions. 
               :white_small_square:  Select child/parent Zsphere from within Interface.

Basic operation:

               :white_small_square:  Hover the cursor over a zsphere and press 'k' on the keyboard to bring up the interface.
               :white_small_square:  Adjust seperate X, Y and Z resolutions using the -/+ buttons.
               :white_small_square:  Set all axis' to the same value using the <b>XYZ to</b> buttons.
               :white_small_square:  Select the child/parent of the current zsphere by pressing the <b>&lt;&lt;&lt;&lt;</b> and <b>&gt;&gt;&gt;&gt;</b> buttons.
               :white_small_square:  Click the MBR bar to set a Membrane value for the selected Zsphere.
               :white_small_square:  Click the MBR title to reset the Membrane value to 0.
               :white_small_square:  Press the <b>XYZ adjust</b> title to toggle preview mode.
               :white_small_square:  When finished press the Spacebar or Return to close the interface.

Tips :

               :white_small_square:  As long as a zsphere is selected (one of the zspheres is colored red) you can press the hotkey 'k' while the cursor is outside the canvas. This brings up the interface so it does not cover your model. Useful if you use the <b>&lt;&lt;&lt;&lt;</b> and <b>&gt;&gt;&gt;&gt;</b> buttons a lot. 
               :white_small_square:  The XYZ resolution overrides the Ires setting.
               :white_small_square: It is not possible to set an axis resolution of (0,1,0). 0 and 1 are effectively treated the same. However the skinning of a (0,0,0) zsphere is different to the skinning of a (1,1,1) zsphere. 
               :white_small_square:  If you adjust an axis of a (0,0,0) zsphere the other axis' automatically change to 1. This is not a bug but how zspheres work. 

To install :

               :white_small_square:  Simply unzip into your <b>/Zscripts</b> directory and load the script using Ctrl+Shift+L. The script is accessed by pressing 'k' on the keyboard (see above).
               :white_small_square:  Until more info on zscripts is given  it is necessary to load <b>XYZ adjust</b> once every Zbrush session.

Suggestions are most welcome. Enjoy.

Thanks for this TVeyes! I like to alter my zsphere XYZ resolution, but more often than not I find I need to alter it after I’ve made a whole chain of zspheres. Now I won’t have to redo the entire chain.

Thanks a bunch!

oh this is very useful ! is it for z1.55b too ?

Thank you, Thank you, Thank you, Thank you, Thank you

I really wanted this.

One of this days I’m gonna get off my but and learn zscripting.

Thanks, glad you like it. This script is basically the replacement for Zif Edit. I wanted to make a not to complicated script to try out some of the new scripting abilities of Zbrush 2.

Kokoro, XYZ adjust is a Zbrush 2 only script. Zif Edit has some issues in Zbrush 2.0 but works fine in 1.55b. Use that instead.

As you can see I removed the Membrane and Twist settings (compared to Zif Edit). If anyone has a need for those settings let me know and I’ll try to include it in a future update.

Btw, for any zscripters out there, I will post some info later on how to create a floating panel like in this script and how to add animated buttons. Of course you can also PM me.

Stupid me, I uploaded an earlier version. If you have downloaded previously please replace with the file at the top of this thread.

Dooooh :o

TV,

Wow, very nice implementation… and I confess I’m curious about the interface and buttons. well done.

Sven

Very nice and intuitive script! You have opened my eyes to the possibilities with xyz resolution editing. Now I can add Y res instead of inserting loops. Real cool. Thanks!

Hi TV,
This is a wonderful script for the reason that is is very well implemented .
What i’m dreaming of is a Customizable right click menue. Which can hold zscripts menues and buttons and also that can be changed quickly during work with short cuts or buttons which already exist in the right click menue…or better still a right click menue which updates dynamically based on what your doing…depandant on some conditions … which exist within zbrush.

Again I want to stress my gratitude for the time you’ve dedicated to this useful script.

Thanks from
Kircho

Nice! I’ll be using this script alot!

The only thing I found that would be nice is if we could still rotate the model around when the interface is open, but that’s really just a minor thing.

Can’t wait for symetrical editing, a visual cue for child/parent selection, and XYZres editing from preview mode!

Just minor things! Can’t wait for the next version!!! :+1:

Thanks TVeyes,(Mark?), for this update! I used Zifedit a lot under 1.55b and I’m glad
it’s back. It would be very nice if you could
add Membrane function too. It worked like a
charm.
I like the graphic on the script too! Very
cool! :+1:

Thanks again for the kind comments.

Matvara : I have just been playing around and realised the Membrane setting is still very useful. Especially if Tool : Adaptive Skin : Minimal Skin to Child is enabled. I will add it to the next update though it will be a little tricky as there is no way to add a slider to the note interface I am using. I’ll figure something out. Thanks for the comments.

Hey TVeyes,

Intresting sounding script. I’m so new to Zbrush I don’t know how it will aid me. Could you possibly post example images of what you use your feature for?

This goes out to all the fine brains that code plug-ins. I see a lot of script tools out there, but have no idea what I’d use them for.

If you can include a visual example of how the script is used and why, inexperienced retards like me could harness your genius.

Thanks sincerly,

-Tully

Generous and smart!!

Missed your original Zif Edit post, thanks for posting a link to that.

The complexities of zspheres tie me in knots but one day like those monkeys on typewriters, I’ll get lucky.

Your a star

:+1:

Just thinking about the possibility of implementing this as a plug-in, and then it can become a part of the permanent interface, like Projection Master. Hmmmm…

One thing that I just remembered that I was wanting to do when I tried your script…: Tab to the correct child of the parent sphere selected. Not really a big deal, but if it’s not too hard to impliment… :smiley:
By the way, nice interface design!

thanks tveyes ! i missed zifedit-thread somehow … thanks again for sharing this useful skript, as this is really what drived me crazy when i had to delete and redo lots spheres after noticing i should have changed x or y resolution :slight_smile:

Thanks for the interest.

Added the updated version of XYZ adjust to the start of this thread.

  • Symmetrical editing added. Use the Transform : X, Y and Z buttons to control symmetry. Shortcuts are the default ‘x’, ‘y’ and ‘z’ keys.

  • You can now select and adjust zspheres from preview mode.

  • Visual cue added to preview mode editing. When in preview mode the script tries its best to show the area affected. However in a few cases the preview mesh does not show the polygons created by a given zsphere (seems to occur with Tool: Adaptive Skin : Minimal Skin to Child enabled ).

  • Membrane setting added. There is no value displayed, just click the slider until you like what you see. It is possible to get more extreme membrane curvatures than with Tool : Adaptive Skine : Membrane Curvature which goes from 0-100 and is applied to all zspheres. The script uses values from 0 to 200.

As before, if you have any suggestions I would like to hear them.

Curious: I’ll try to put together some pictures showing situations where the script can be useful.

FineDay: The Parent/Child button work as advertised. If there are many children to a parent the Child button selects the same child zsphere everytime. The buttons are not intended for full navigation through all zspheres but for quickly selecting the previous/next zsphere on say an arm. You can now start the script from preview mode so just hit the spacebar and select another zsphere with the cursor.

DreamWalker: I might make a version of the script that resides in the zscript window. That would allow you to freely rotate while editing.

Thanks again for the comments.

Hi TV,

Thanks for the update, I’ll be testing it later today.

Two comments:

First, if you drop the XYZAdjust files into the \ZBrush2\ZData\ZPlugs sub-directory it will install as part of the ZPlugin Palette and autoload unaided (with all the other scripts) ready to be invoked with the K-key!

Second, while I admire your interface,(It’s terrific and I’m curious about how it functions - especially the way you do updates on the entered values…) perhaps it might be more efficient if it worked as a persistent interface down in the lower ZScript window. Why?

First because, down there, it would never obscure the ZSphere/adaptive skin during creation and manupulation - it helps to be able to always see the effect of the adjustment, unobstructed. Also, if the interface were to stay open it would be easier to let the user press the K button over multiple ZSphere-joints during the construction of the ZSphere model.

Just a thought… :slight_smile:

Sven

Thanks for the suggestions Sven. Always appreciated.

Adding compiled zscripts (.zsc) to the Zplugs folder is not advised. I have added a couple before and everything runs fine. But according to Aurick we should not modify the contents of that folder. See here **** The ZData Folder – Do NOT Customize! ****. The zscripts I have added run fine but I do not want to add to any bug reports by telling people to unpack the script there :slight_smile:

I am not sure what exactly is needed to write a zscript suitable for Zplugin status. Unique memory block identifiers is a must but I am not sure if normal variable declarations could mess things up?

Try press Ctrl to get info on the Projection Master button. Maybe a specific filename or some variable definition is needed to compile and add a zscript.

Regarding the interface, yes, I was trying to show off :wink: It is not the best interface for this kind of zscript. But you can still work with an unobstructed view. If a zsphere is in focus, colored red, you can press ‘k’ while the cursor is outside the canvas. The interface will appear there.

Thanks again.