PDA

View Full Version : ColorPickerUpper Script - (Update 81601)



Digits
08-15-01, 05:18 PM
http://www2.zbrushcentral.com/zbc_uploads0/user_image-998025386tgv.jpg

Welp, I fingered out how to do a gradient so this is the new and improved Color Widget. Basically you pick a starting color and a ending color. Then you set "ColorStep" to equal how many steps you want it to take to get to the ending color. ColorStep is also used by the "Vary Color Random" Button as a +- increment, meaning that the resultant color will be within the ColorStep value RGB.

I have also included Memory storage for 5 colors, take a look at the code and you will see how easy it would be to expand this. I am not finished with this feature because I would like to figure out how to make colored rectangles to represent the stored color to display on the Script area. So, for now you press one of the "L" buttons to display a popup of the stored color.

Example:

I am painting a picture of the inside of my head and I am working with the blues I select a deep blue color and Press "StartColor"
I select a very light blue color and press "EndColor"
I figure that I need 25 varying shades of this blue to capture my lovely brain so I enter 25 in "ColorStep"

I get to painting....
pressing the "Incr Color +" I step up in the Blue gradient
Pressing the "Incr Color -" I step down in the Blue Gradient
If I go beyond the bounds of my "ColorStep" I get a message I could then if I want make the ColorStep larger or choose another "End Color" to broaden
the range of colors available

Pressing the "Vary Color Random" creates a Random color that is Centered on my "StartColor" by that amount

As I am going along I find a couple of Blue colors that I think are just absolutely
wonderful, so much so that I would like to be able to select them again very quickly
So I save them in my Pallette Saver by Pressing one of the S1 - S5 buttons.

I also look for some neat red colors and yellow colors that would look nice on my
brain so I save them too!

Of course I don't have a brain cause it is sitting out there on the canvas and I
can't remember what colors went to what buttons. So I press one of the "L1 - L5"
buttons and a little popup pops up showing me what color it is.

When I want to recall one of these fabulous colors I press one of the "R1 - R5"
buttons

Thats about it, I hope that you will enjoy using my little ColorPickerUpper

Here is the Script:
Edit***
10:15 pm 8/15/01 - Uploaded bugfix so if you have a prior version here is the fix.
10:25 pm 8/16/01 - Updated script in my post down below

upham
08-16-01, 12:51 AM
Digits.
Firstly I'm wondering how much zbrush time is emposing itself in your work-time... Damn, you are just wipping these scripts out!

I've only just read over your expaination above without putting it to practice as yet. But if you are improving your color picker script could you put a satuaration option in there - if possible? I'm constatly going into the SYSTEM PALETTE to make the color I've chosen more lighter or darker! Grovel grovel.. I thought they were going to include a saturation-slider on the floating palette in version 1.23?
I like your color recall pallette! I get sick of going into the system pallette! Aargh!

Am I right in thinking you have to paint a strip of blue - move the colour increasment up, paint another strip, and move the Incr Color up, etc until you you have the whole gradient across your model?

Excuse my ignorance but why do you call it a color "Radius"??? Doesn't a "radius" imply a single point with a circumference around that center point? I thought the term color "STEPS" imply the two start & end points with the gradient inbetween.

We are going to have to ask Pixolator to include an option to auto start a script at ZBrush-bootup!

Is this script going to be in the Digits Widgets ver 2.3 script, or are you going to realese a updated master script that incorporates all your wee scripts?

Anyway, keep up the good work! Marvelous stuff!! I'll be printing this thread out and adding it to the other Digits-Widgits growing mini-manual!
Keep it up. (Just don't let the boss catch you!)
Upham :)

Digits
08-16-01, 06:19 AM
Hi Upham

Thanks again for your feedback, I appreciate it!

I know next to nothing about color. By Saturation you mean just making the color lighter or darker? Or is there a Zbrush control that I am unaware of? If you just mean lighter or darker you could set your "Start Color" for example on a Dark Blue, then the "End Color" on a light blue. Then you would use the "Incr Color + or -" to make the color lighter or darker.

I am incorporating this script and everything that I come up with into the next version of Digits Widgets. Alone this script would be very tedious to make a gradient, as you say you would have to draw a line, step up the color, draw another line etc.... But I have incorporated or will incorporate the gradient feature into the rest of the functions, like Interpolation to make gradients. Perty neat eh? And actually I am getting busy at work again so I only work on this during my free time :)

Thanks for the suggestion on ColorRadius, you are right. I named it that when I started fooling with the script because the first thing was to vary the color randomly around a centercolor, hence Radius. Now the script has changed and ColorStep is more appropriate.

Here is the new script
Colorpickerupper.txt (http://www2.zbrushcentral.com/zbc_uploads/user_file-997967795ugn.txt)


<BLOCKQUOTE>quote:</font><HR>We are going to have to ask Pixolator to include an option to auto start a script at ZBrush-bootup! <HR></BLOCKQUOTE>

Actually you can rename any script you like and call it "DefaultZscript.txt" in your Zscript folder and it will automatically load when you open Zbrush

Digits
08-16-01, 09:13 PM
http://www2.zbrushcentral.com/zbc_uploads0/user_image-998054670pfo.jpg

I added Color Selection according to ZDepth

Select your start color and end color
Move your object in Z depth and press "Zcolor" and it will color gradient

Set the "ColorZDepth" to set the range of Z for the calculation. Example: you want to gradient from -500 to 500 Z full range then set "ColorZDepth" to 500

Use "Z-Center" to center the Z area to use.
Example:
your object fits in your image at a depth of 1000

Press "Z-Center" or enter 1000 into the slider.
Set ColorZDepth to 500
Now your object will do a full gradient from
1500 Z to 500 Z

Here is the Updated Script:

Colorpickerupper.txt (http://www2.zbrushcentral.com/zbc_uploads/user_file-998021593dbx.txt)