ZBrushCentral

I want to set a custom (Color: Main Color) when I load Zbrush

Hello,

I’ve been trying to make it so that when Zbrush boots up, I get a different Main color (Color: Main Color) other then white. I came across a blogpost that explains how to do it ( http://atsuoichimaru.blogspot.com/2012/01/zbrush-startup-zscript_8211.html?showComment=1391847969974#c1008431693975989447 ) but what I don’t understand is how to enter the value for the color I want properly. In his example he uses a value of 46.18038 to represent dark grey, and I don’t understand what that value means (as in is this written as a hexadecimal color value or written in some other way that I’m not familiar with?) I’m confused because I’m mostly used to seeing colors written as #FF0000 or something similar to this.

This is the line I added to the file DefaultZScript.txt that I’m struggling with. I want to have a color value of Red 212, Green 183, and Blue 172.

[ISet,Color: Main Color, what value do I enter here when in Zbrush I see my color listed as R 212, G 183, B 172?]

Hopefully this makes sense, if not I’d be happy to make a video to help clarify my issue. Thanks!

Use the following line instead…

[IColorSet, 212, 183, 172]

note: If you have anything else in your DefaultZScript.txt file, make the above the first line. For example…

//startup
[IColorSet, 212, 183, 172]
[If,1,[IPress,Macro:Macros:Misc:startupmacro1]]
[pd]

As zber2 says, you can set the color like that. However, if you’re interested to know how that color value works it is the combined RGB divided by 65536:

Combined RGB is (R65536 + G256 + B)
So a dark grey color with RGB value of 46,46,46 = combined RGB of (4665536 + 46256 + 46) = 3026478
3026478 / 65536 = 46.180389404296875

Dividing the combined RGB is just a clever way of storing the value in a smaller amount of memory - combined RGB takes 6 bytes whereas the float value takes only 4 bytes.

really interesting thread. Thanks for all information here. Now i have finally the basicMaterial when starting Zbrush :+1:small_orange_diamond:+1:small_orange_diamond:+1:

On adding stuff to the DefaultZScript.txt file:

As a general rule, put any commands inside the [If, 1,…] container like this:

//startup
[If,1,
//other commands
[IColorSet, 212, 183, 172]
[IPress,Macro:Macros:Misc:startupmacro1]
]
[pd]

The reason for this is that many zscript commands can’t exist on their own but need to be inside a container. The [If, 1,…] creates such a container. Because ‘1’ is equivalent to ‘true’ then the commands inside will automatically run at startup.

The other thing to bear in mind is that if you call a plugin or macro then control passes to that and doesn’t return to the DefaultZScript, so in the example above any commands that you might add after " [IPress,Macro:Macros:Misc:startupmacro1]" would be ignored.

Zscripting is the last frontier!
Probably nothing too crazy but i would like to have all rendering settings stored at start up. So may be this could be done by modding the DefaultZScript.txt

Thanks for that Marcus! :+1:

Awesome, looks like it’s working for me now! Thanks again for the help. Thanks also marcus_civis for letting me know how the colors work within zbrush, that clears things up a lot for me.