081488 081366 081039 081038 080900 080899More Highlights

Register FAQ Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 11-03-09 Reply     Quote     UserGallery     ThreadGallery     Post#1
toddp
New Member
 
Join Date: Feb 2004
Posts: 16
Default Canvas Color Palette (zb3.1 & zb3.5)

Canvas Color Palette for zb3.5 and zb3.1.

Like many of you, I loved marcus_civis' ZSwatch plugin. As a scripting exercise I wanted to make my own version with a slightly different twist.

ccp_ui.jpg

This plugin drops the active color to a user specified location on the canvas. You can arrange your palette on the top or bottom, left or right side, and orient it horizontally or vertically. You can save and load as many palettes as you wish.

ccp_screen_highlight.jpg

Canvas Color Palette use:



  • Using the left hand menu's color picker, or the color picker from the Color menu, select a color.
  • Decide if you would like your palette on the top or bottom. Press your selection: "top" for top or "bot" for bottom. ( Note: zb3.5 will toggle between the selections, zb3.1 will not )
  • Decide if you would like your palette on the left or right. Press your selection: "lf" for left or "rt" for right.
  • Decide if you would like a horizontal or vertical palette. Press your selection: "hor" for horizontal or "vrt" for vertical.
  • *Note* You only have to make the placement selections once, unless you would like to make another palette in a new location.
  • Adjust the "Width" and "Height" sliders to the size patch you would like.
  • Press one of the numbered buttons. Number "0" will place a color in the corner of the canvas, while "9" will place a color towards the middle of the canvas, but still on the edge.
  • Place up to 10 colors in each palette location. "0" overlaps in each corner.
  • As you paint, hover over a color you would like to use. Hit the "c" hotkey ( zb default ) to grab the color of your choice from any of your palettes and keep painting.
Load/Save/Clear
  • The "Load" button pulls up a dialog box asking for a "zdt" file. If you have saved a palette previously, select it and your palette will load onto the canvas.
  • The "Save" button pulls up a dialog box to save your current palette.
  • *Note* I am using "zdt" because I found that extension in an example Zscript. I don't know if it is a valid ZBrush extension. It's worked for me so far....
  • The "Clear" button clears the canvas. If you have anything else dropped to the canvas, it will clear that too. The active tool stays on the canvas. It also clears the memory, so you can start a fresh palette.
In the image above I have placed the buttons and sliders into the left hand menu directly under the color picker. To do the same:
  • Go to Preferences -> Custom UI -> Enable Customize
  • Press and hold "ctrl"
  • Drag and drop the button or slider to a new location
  • Repeat for the other buttons and sliders
  • Turn off Enable Customize
  • Save your UI and Config
I've included a zb3.5 plugin as well as a zb3.1. I've also added the source script in case anyone would like to modify the script for their own use.


-Toddp
Attached Thumbnails
Click image for larger version

Name:  ccp_zbc_thumb01.jpg
Views: 63
Size:  22.5 KB  
Attached Files
File Type: zip canvas_color_palette_1.0_3.5.zip (13.3 KB, 418 views)
toddp is offline  
Old 11-03-09 Reply     Quote     UserGallery     ThreadGallery     Post#2
alannoon
Senior Member
 
Join Date: Nov 2003
Location: Chicago
Posts: 103
Looks great! I will try it immediately!!!
alannoon is offline  
Old 11-03-09 Reply     Quote     UserGallery     ThreadGallery     Post#3
Nattawat_OBBI
Senior Member
 
Join Date: Aug 2008
Location: Bangkok Thailand
Age: 42
Posts: 538
Great Color Palette! Thank you so much.
__________________
____Obbi____
www.3dzbrush-obbi.blogspot.com

SketchBook
Nattawat_OBBI is offline  
Old 11-03-09 Reply     Quote     UserGallery     ThreadGallery     Post#4
TVeyes
Senior Member
 
Join Date: Jul 2002
Location: Copenhagen, Denmark
Posts: 2,372
Great plugin and a neat implementation, thank you Nice touch with the size of the buttons so that they fit in the quick menu (although the left side of my menu is wider )
__________________
Mark
TVeyes is offline  
Old 11-04-09 Reply     Quote     UserGallery     ThreadGallery     Post#5
toddp
New Member
 
Join Date: Feb 2004
Posts: 16
Thanks for the enthusiasm. Tell me if it's working for you.

&thumb=1[color=#9a9a9a]]ccp_zbc_thumb01.jpg
toddp is offline  
Old 11-04-09 Reply     Quote     UserGallery     ThreadGallery     Post#6
alannoon
Senior Member
 
Join Date: Nov 2003
Location: Chicago
Posts: 103
Works pretty well, thanks!

I do have a couple of comments though:

I could not see swatch 0, and I think I finally figured out why: My canvas size is slightly bigger than my screen. is there something in Zscript that can be done to remedy this?

Also, it would be grand to have more swatches. Perhaps you can build a whole slew of them (50?) into the plugin menu and just let people pull out as many as they like, instead of limiting to 10?

Is it possible to implement a stack of rows or columns instead of just one strip? perhaps A B C D E toggle buttons, where each letter indicates the next row or column? So if I want to add a 5th swatch to the 3rd column of swatches, I would toggle "C" then press "5"

At any rate, nice script, thanks so much!!!
alannoon is offline  
Old 11-04-09 Reply     Quote     UserGallery     ThreadGallery     Post#7
Doqpelgänger
Member
 
Join Date: Apr 2006
Location: White Beach, Spain
Age: 99
Posts: 77
Do you know wheres the color picker button in ZB? i need to change the default "C" hotkey.
__________________
Doqpelganger's Portfolio & Blog
Doqpelgänger is offline  
Old 11-04-09 Reply     Quote     UserGallery     ThreadGallery     Post#8
toddp
New Member
 
Join Date: Feb 2004
Posts: 16
alannoon - Thanks for the feedback.

- I debated whether to account for a canvas that was larger than could be seen. There are plenty of zscript commands I could have used to place the palettes on screen. Ultimately I decided that it was better if they always appeared in a predictable location on the document even if it was off screen. As soon as the user would zoom out or scroll, new color patches would appear in a new location which was not preferable to me.

- You can actually have 80 ( less 4 since the corners overlap ) patches of color by selecting a different side or orientation. I purposefully limited the number because I'm storing the data in memory so you can save and load them. Granted 1620 bytes ( 1.5K ) is very small, but I wanted to be minimally intrusive.

- I thought about rows and columns of patch locations as well, but again wanting to keep things minimal, decided to go with what you see. I may make another version and do exactly as you describe.


-Toddp
toddp is offline  
Old 11-04-09 Reply     Quote     UserGallery     ThreadGallery     Post#9
toddp
New Member
 
Join Date: Feb 2004
Posts: 16
Doqpelganger - I do not know of any equivalent button press that would give you the same functionality as the default "c" hotkey. My guess is that it is something similar to a zscript, but internal to the exe and/or not revealed to the user. I suggest one of the following workarounds:

  • Hover in the rgb/hsv box in the left hand menu. Press and hold the left mouse button. Drag to any location onscreen from which you would like to grab the color. Release the mouse button. The color should now be the active color.
  • Write an equivalent zscript. This may not be a viable solution for some ( many? ). If I have some extra time, I can write one and post it.
-Toddp
toddp is offline  
Old 11-04-09 Reply     Quote     UserGallery     ThreadGallery     Post#10
marcus_civis
Moderator
 
Join Date: Jun 2004
Location: UK
Posts: 4,558
A very interesting and useful solution.

You could add a couple of buttons for color picking so that users could assign their own hotkeys. You need the code below

Code:
//commands for picking shaded color [IFreeze, [IKeyPress,ALT,[IClick,3352,[IHPos,3352,1],[IVPos,3352,1],([MouseHPos,1]-[IHPos,3352,1]),([MouseVPos,1]-[IVPos,3352,1])]] ] //commands for picking unshaded color [IFreeze, [IClick,3352,[IHPos,3352,1],[IVPos,3352,1],([MouseHPos,1]-[IHPos,3352,1]),([MouseVPos,1]-[IVPos,3352,1])] ]

(You might need to change the item ID for ZB 3.1 Mini HSV Color selector, I've a feeling it might be 3331.)

HTH,
__________________
Marcus

ZBrush Plugins Download Center
marcus_civis is offline  
Old 11-04-09 Reply     Quote     UserGallery     ThreadGallery     Post#11
zayacoon
Member
 
Join Date: Jul 2004
Location: Switzerland
Posts: 45
Cool Plug in very usefull thank you.
If you make a color row with the size of 32x32 and then change the size to smaler numbers lets say half the size, then you can ad more colors to your row because the smaler overlay the biger one.
__________________
www.oc-prod.com
zayacoon is offline  
Old 11-04-09 Reply     Quote     UserGallery     ThreadGallery     Post#12
toddp
New Member
 
Join Date: Feb 2004
Posts: 16
marcus_civis - Thanks for the ideas. I was thinking of using PixolPick, but yours would allow for the shaded color as well.

zayzcoon - Yes, that was my intention to allow for multiple sizes to overlap. Just be aware that you will only be able to save and load the last patch if multiple patches overlay each other.

For example:
  • You select "top", "lf", "hor" orientation.
  • You set the patch to be 32x32.
  • You click "5".
  • You select a new color.
  • You adjust the size to be 32x16.
  • You click "5".
  • The script would overwrite ( in memory ) the 32x32 patch. You would see both patches, one on top of the other, but if you saved the palette, only the 32x16 patch would load.
Another way to save/load overlapping palette patches would be to save the document and load it up in your next session.


-Toddp
toddp is offline  
Old 11-04-09 Reply     Quote     UserGallery     ThreadGallery     Post#13
HaloAnimator
Senior Member
 
Join Date: Aug 2004
Location: Boston, Ma
Age: 25
Posts: 185
This is a very sweet and useful plugin...now no more go back to photoshop to get the colour i used for my models
HaloAnimator is offline  
Old 11-04-09 Reply     Quote     UserGallery     ThreadGallery     Post#14
TVeyes
Senior Member
 
Join Date: Jul 2002
Location: Copenhagen, Denmark
Posts: 2,372
Doqpelganger - To change the hotkey for picking the main color simply assign a hotkey to the Color > Main Color swatch. This also works for the Secondary Color swatch. Note that you can only pick unshaded colors this way.
__________________
Mark
TVeyes is offline  
Old 12-05-09 Reply     Quote     UserGallery     ThreadGallery     Post#15
industripop
Senior Member
 
Join Date: Oct 2005
Posts: 658
Damn, I just found this and it's fantastic! This is exactly what I've been wanting for a long time. I can't believe with all of the powerful texturing tools ZB has, something like this isn't implemented as a base feature already. FYI, this works perfectly on Mac 3.2 as well! Great job!
industripop is offline  
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT -7. The time now is 03:00 AM.