PDA

View Full Version : Zscript: ZIF edit rev B (December 1st 2003)


TVeyes
11-28-03, 08:16 PM
http://www2.zbrushcentral.com/uploaded_from_zbc/200311/user_image-1070235294zqw.jpg
ZIF edit Rev B (http://www2.zbrushcentral.com/uploaded_from_zbc/200402/user_file-1070239061wcy.zip)

Simply unzip into your Zscripts/Utilities folder and load using Ctrl+Shift+l or your favourite launcher.

Inspired by Digits ZifWidget I have just finished this small Zscript. It was made purely to satisfy my own needs when modeling Zspheres. It's basic function is to give us access to Zsphere settings that are normally hidden/disabled if we only use the Zbrush interface.

*** Description updated December 1st 2003 ***

The three functions it focuses on is to edit the XYZ resolution, Membrane Curvature and Twist Angle of a single Zsphere child/node. This Membrane Curvature is not the same as the Tool ::Inventory ::Membrane Curvature which acts on a global basis.

Apart from those three functions it contains a couple of useful shortcuts when modeling a Zsphere tool and it remembers the Draw Size of your brush when switching between the preview mode and the standard Zsphere modeling mode.


Basic usage:

:b2: Select a Zsphere child/node using the 'd' key.

:b2: Change the XYZ resolution and set the membrane Curvature and/or Twist Angle.

:b2: Press 'a' to preview results

:b2: Color Zsphere children/nodes for easy reference using '1-5'. Good for remembering ideal rotational Zsphere children/nodes.

:b4: You can continue editing XYZ resolution, Membrane Curvature and Twist Angle while in Preview mode as long as a Zsphere child/node is selected. It will simply switch Preview mode off, make the changes and turn Preview mode on again.

:b4: If the XYZ resolution of a Zsphere child/node and its neighbours is set to 0, then Membrane Curvature will only have an effect if the selected child/node is connected to at least three Zspheres.

:b4: If you apply Membrane Curvature to a Zsphere with a higher or lower XYZ resolution than its neighbours, it will effectively smooth out the resolution difference. i.e it will have an effect even if not connected to at least 3 Zsphere children/nodes.

:b4: You can effectively close off, or "cap", the Root Zsphere by changing its XYZ resolution post creation. I.e you do not need an additional Zsphere to "close the hole".

:b4: When pressing 'd' while the cursor hovers over a grey linking Zsphere you will get a fractional Zsphere # (Zif #). This might be useful in estimating were to add another Zsphere. Based on experience you might find a certain shape is generated by adding a zsphere at about 8/10 the way between two zspheres. Increasing Tool ::Modifiers ::Density increases the accuracy of the displayed Zif #.

:b4: When turning on/off deformation axis while in preview mode, the displayed values for XYZ resolution, Membrane Curvature and Twist angle are set to 0. It is only the Displayed values that are changed, your current Zsphere child/node is the same as before. It would require more work to get around this so just try and live with it for now :)

The Shortcuts:

'd' :: Selects the Zsphere Child/Node currently under the cursor.

'a' :: Switches between Zsphere edit mode and Preview edit mode while remembering the Draw Size of the Preview mode. Zsphere Edit mode draw size is fixed at 1.

'c' :: Decreases the X, Y and Z resolution setting by 1 for the selected Zsphere child/node.

'v' :: Increases the X, Y and Z resolution setting by 1 for the selected Zsphere child/node.

'i' :: Inverses the Selection Mask.

'o' :: Clears the selection Mask.

'p' :: Masks everything.

'1-5' :: Selects and colors the Zsphere child/node currently under the cursor. The colors are 1: Red, 2: Green, 3: Blue, 4: Dark Grey, 5: White.

alt+'1-5' :: Takes the currently selected Zsphere child/node and copies its XYZ resolution, Membrane Curvature and Twist Angle to all Zspheres with the corresponding color. 1: Red, 2: Green, 3: Blue, 4: Dark Grey, 5: White. Using masking also limits which Zsphere children/nodes are copied to.


Thats it. Thanks again to Digits for opening my eyes to the "new" Zsphere editing commands in Zscript :tu: I am pretty sure that the first thing I'll do when the next version is released, will be to click Zscript ::Export Commands ;)

Digits ZifWidget is available here (http://www.pixolator.com/zbc-bin/ultimatebb.cgi?ubb=get_topic&f=1&t=010409) if you crave ultimate control over your Zspheres. The documentation for said program can be found here (http://www.cyber-webs.com/zbrush/scripts/zifwidget1.htm).

The source code for ZIF Edit rev B (http://www2.zbrushcentral.com/uploaded_from_zbc/200402/user_file-1070413753fss.zip).

Jaycephus
11-28-03, 09:17 PM
:tu:

Nice, clean interface.

Ctrl-Z
11-29-03, 01:11 AM
Wow, this is very nice.

I had, frankly, given up on ever figuring out Digit's ZIF Widget. You've reduced it down to just the functions I need, and made those easy to control and understand.

One question, though:

When I press 'A' to switch to my adaptive ZSphere mesh and use the normal drawing tools to refine the model further, is there a quick and easy way to make the 'S' key go back to resizing my brush? (I can live without the keyboard shortcut until I hit this point, but then I really need it back...)

edit:
issue resolved in Revision B

Bonecradle
11-29-03, 01:45 AM
Thanks TVeyes :tu: .

I use Digits zifwidget virtually every time I work with zspheres, but I will download your script for the ability to change the membrane curvature of individual zspheres alone.

I remember asking if this could be done when zspheres first came out - it should prove very useful.

Being able to cap the root might be handy too - does anyone else notice that generally the root zsphere, even when the same size as the other spheres, causes a pinch in the adaptive skin?

matvara
11-29-03, 02:12 AM
Thanks a lot Tveyes. These functions you have
covered in your script are the most needed
when working with zspheres. I will try it out
later on today and I actually looking forward
to gain more control over zspheres and of
course the membrance factor.
Thanks a lot for this great contribution!
:tu: :tu:

sirquadalot
11-29-03, 07:21 AM
Thank you. :tu:

bine
11-29-03, 10:46 AM
thank you tveyes!

you´ve made a very helpfull script.

cu bine

manitu
11-29-03, 10:54 PM
big thanks to you!! :) :tu: :tu:

TVeyes
11-30-03, 04:13 PM
Thanks for the comments :tu:, glad you like it.

Ctrl+Z: I've changed the select node shortcut to 'd'. Silly me, I never gave it a thought since I don't use that shortcut.

Added a couple of more things; Deformation sliders, Zsphere node coloring, Copying the values from 1 Zsphere to others and a lot of tweaking to close certain holes. My code looked beautiful to begin with and now it is a complete mess :( :) Btw, if anyone wants the code then just give me a shout.

Gary Komar
11-30-03, 04:26 PM
TVeyes,
i sat and tried your zif edit and i must say
that i have tried to model an adaptive posable model,and until i tried this i couldnt come close.also some funny things
happen when use the model in texture m. nothing bad,actually cool like perspective to certain groups in mesh(when hit perspective and preveiw.and sometimes the models created with your script will only preveiw with your script loaded not a problem,and save many copys as i did and glad too cause changing textures i lost any editing. will try the update for sure cool.

TVeyes
11-30-03, 04:40 PM
Hi Gary, If you downloaded within the last couple of minuttes or so, then download again. I caught and fixed a little bug.

Northstarr
11-30-03, 04:48 PM
hey, thanks! I am sure this will help out with some issues I have been having with zspheres... Cool!
What would we do without folks like you who are able to come up with such helpful additions to ZBrush!
:D :tu: :tu: :tu:

Gary Komar
11-30-03, 05:05 PM
zif edit reloaded ;) ,care to brake down a little whats going on in the script cause
its the coolest thing since sliced :D

Svengali
11-30-03, 10:33 PM
Hi TV,

Very interesting! But...

I DLed your utility version B... when I load it in ZBrush only the background art seems to be display, no buttons or sliders. I wonder what I might be doing wrong?

I'm more than a little curious how you coded the interface, so if you don't mind could you post the TXT file? I am working on a script of my own that I might try to spiff up before posting and any insights might prove useful. Thanks!

Sven

TVeyes
12-01-03, 12:17 AM
Svengali: First of all make sure you are running Zbrush with a screen resolution of 1024*768 or higher. If your screen resolution is 1024*768 make sure that Zbrush is Maximized. If the above does not work for you, maybe you are using an Apple. If you are using an Apple computer you can collapse either the left or right divider and the Zscript will display properly.

The problem with the buttons not showing has to do with the width of the Zscript window. If that window is not wide enough the background graphic will not fit and is shifted down one line. As a result all the other Zscript items are shifted out of place.

So, if you are using a screen size of at least 1024*768 and Zbrush is maximized then let me know if you are using an Apple computer and I will fix the zscript (or rather, reduce the width of the background graphics).

I'll post the Source code tomorrow.

Gary: I'll post some examples tomorrow. I won't have time today as I just found out today is my 10th year anniversary at work :eek: Time to "celebrate" in the traditional legless Scandinavian manner.

Jaycephus
12-01-03, 02:44 AM
Congrats, TVeyes. I just recently passed my 10-year anniversary at my job as well. What in the world is 'legless Scandanavian celebration'? :)

cameyo
12-01-03, 04:44 AM
Congratulations, but i hope you'll have 10 years of holidays :)

Good script.

cameyo

Svengali
12-01-03, 05:50 AM
TV,

Thank you for the tip... that was it, I was running 1024x768, but had the screen less than maximized so I could see the taskbar at the bottom.

I bumped my res up to 1280x1024 and all is well! Now to try out ZIF Edit.

Sven

matvara
12-01-03, 06:59 AM
Thanks a lot TVeyes for the new revision!
You madde an already terrific zscript to an
excellent one. Very handy and essentail when
Zsphereing! :tu:

NOITAMINANIMATION
12-01-03, 07:38 AM
Very, very useful script. I just did a mechanical hover bike in about 10 minutes, with just enough curves to be tasteful.

Washington
12-01-03, 02:16 PM
Great tool!!! Thank you for sharing your valuable script with us!!!

wchamlet
12-01-03, 08:32 PM
This is great. Thank you for sharing this, I had a time trying to get the widget's tool to work right, and for some reason the interface kept changing to text. Now, all the features I was wanting from the Widget tool is right here. And it works. Awesome!

WoOT

Washington
12-02-03, 02:59 AM
I need little help.

I can't select "-" or "+" buttons for xyz resoution in TVeyes's script. What did I miss something before I am supposed to use the script for xyz res to work with my zSphere modeling?

wchamlet
12-02-03, 04:03 AM
When you have your cursor hovering over the zsphere you want to edit, just hit the D key and you will have those options available to you. Just make sure you don't select, or draw another zsphere with the curser.

Have fun.

Digits
12-02-03, 05:59 AM
Great script and explanation about the controls. I never really figured out exactly how the functions worked, now I can make membranes like no tomarrow.

Also thanks for the kudos, I tend to throw in the kitchen sink, it would be nice to see some other scripts out there for people to use.

Frenchy Pilou
12-02-03, 06:49 AM
Hi TVeyes
Can you just post some examples of the script can make ?
Pilou
Ps I have read your explanation text but some images will seem maybe more explicite :)

Washington
12-02-03, 08:52 AM
I have a problem with the zScript is the size of my Tablet PC display that disappeared all buttons and numbers. Is there a way I can resize for Tablet PC version?

BTW I love this script!!!

Jaycephus
12-02-03, 10:12 AM
Ohhh, yes, Frenchy.

The only thing left to do is make a tutorial script and link it to a button on the interface.

TVeyes
12-02-03, 05:08 PM
Thanks again for the comments, much appreciated :tu:

I have posted the rev B Source code at the beginning of this thread.

Unfortunately I have had absolutely no time today to do anything with Zbrush. So I am sorry to say you will have to wait for a more in depth explanation, maybe tomorrow or the next.

But until then take a look at some tips in this (http://www.pixolator.com/zbc-bin/ultimatebb.cgi?ubb=get_topic&f=1&t=012048) thread regarding XYZ resolution. If anybody knows of other threads that discuss this topic then please post a link.

Jaycephus/Cameyo: Thanks :tu: It came as a bit of a shock. I thought I had been there 7-8 years max :D "legless Scandinavian manner" = Loud, ugly, in your face, red hot credit card, 'please tell me where I live','WHAT did we do yesterday?'. Of course when I say Scandinavian I mean those Norwegians, Swedes and Fins. Eh Matvara? ;)

Bonecradle: The root Zsphere does have a different influence than other Zspheres: It seems to act like a Zsphere with a XYZ resolution of 1.

Washington: In order to display this Zscript properly Zbrush must run with a screen resolution of at least 1024*768 and in a maximized state. If your tablet PC can't handle that try collapsing either the left or right menu divide, or both.

Frenchy/Jaycephus: I would love to make a zscript tutorial button, but that would take a great deal more effort than simply recording a normal Zscript. The Zbrush functions used to change the XYZ resolution etc, are not interface functions and as such do not record. It would take a fair amount of editing to make such an in-script tutorial. And with the next version just around the corner, I am not even sure if it is worthwhile. I would like to wait and see and describe the functions with pictures.

andreseloy
12-04-03, 03:43 AM
Hi TVeyes i want to thanks for this helpful tool as always from you¡¡
I will try with it and then sure need your help and guide¡
Thanks very much friend¡
Andreseloy

matvara
12-04-03, 06:38 AM
<BLOCKQUOTE>quote:</font><HR> Loud, ugly, in your face, red hot credit card, 'please tell me where I live','WHAT did we do yesterday?' <HR></BLOCKQUOTE>

Absolutely TVeyes! ;)
As my city is on the dark side of the earth
right now, (two monthes complete dark, no sun), I will spend most of my free time
chasing northern lights! I did the same
yesterday! ;)

Luminous Anubis
12-08-05, 02:46 AM
Awesome script, I can't wait to use this!

Thanks!:D

remcv8
12-11-05, 02:08 PM
I wonder if people look at the dates on the posts before they reply?

Luminous Anubis
12-11-05, 03:11 PM
I didn't!

Haha

mestela
12-14-05, 12:07 AM
it might be pretty old, but i still prefer zif edit B to the other zsphere scripts, primarily because it doesn't stop everything else while its running, and it stays out of the way in a docked window vs a floating toolbar.

the only thing you have to remember is to turn if off once you start moving between subdiv levels, as it overrides the 'd' hotkey. Fastest way I found is to click 'zscripts->next'.

if one of the newer scripts could also become non-blocking, I might think about upgrading... :)

TVeyes
12-15-05, 01:26 PM
Thanks Luminous Anubis, hope you can use it.

remcv8, if everybody checked the thread dates, kept up with zscript news and changed underwear everyday then I would not get anymore nice messages like the one from Luminous Anubis. And most importantly, I would definitely be out of underwear ;)

Mestela: I promise there will be a new Zif Edit/XYZ adjust script soon. I am already clocking in at over 50 hours this week and have to work saturday & sunday as well. I hope to finish many plugins when I have time off before and after Christmas. Remember there is also Digits' Zif Widget 2, which this zscript is inspired by.

marcus_civis
12-15-05, 02:07 PM
if everybody checked the thread dates, kept up with zscript news and changed underwear everyday then I would not get anymore nice messages like the one from Luminous Anubis. And most importantly, I would definitely be out of underwear.

Hi TVeyes,
I'm puzzled as to why you should be out of underwear because everybody else changes theirs every day... but never mind, I'm sorry to hear you are having to work so hard and I do hope that you get time over the holidays to do a bit of scripting. It's time we had another plugin from you. :)

And remcv8,
I meant to reply to your earlier post in this thread a week ago but you know how it is, pressure of work, finding apresent for my wife, etc. etc...

BWayneO
03-15-06, 11:22 PM
I really find this script usefull as well, however I had trouble figuring out why I couldn't get Zif Edit to copy attributes across ZSpheres of the same color(Alt + #) correctly.

I just discovered that if you select the last ZSphere to be created and set the XYZ, then hit Alt+#, it will correctly copy attributes from first ZSphere to the second to last. The last one get's reset to 0,0,0...

Is this problem unique to me or has anyone else noticed this??

womball
06-23-07, 02:10 PM
Would this script work for zbrush 3?

aminuts
06-23-07, 09:58 PM
hey womball....


i think marcus has mentioned that their is some funkiness going on with zspheres and zscripts so am thinking that this is one of the scripts that might need some time before it can be updated.

-WOODY-
06-25-07, 05:04 PM
This had always been one my favorite and most USEFULL Zscripts I've ever used.

I wonder why Pixologic didn't build this into their regular program in version 3?

frenzyfol
09-17-07, 05:22 AM
Anyone know if theres a way of doing this in zb3?