Color Picker

User avatar
trueBlue
Captain
Posts: 5206
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Color Picker

Post by trueBlue »

Okay
Have you ever seen the Lum change to 70110208031775968.000 when clicking in the left-hand side of the main bitmap control?
And the bitmap control turns 98% white?
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Color Picker

Post by clintonman »

trueBlue wrote: 05 Feb 2023, 03:06 When I looked at and tried all of the choices, the top row seemed best.
Still not able to get pure White easily from the color pickers.
I am really not sure what would be best.

Would not be very intuitive, but I wonder if you could put the code in the S1 button into its color picker and remove the button(s)?
Ok I found some stuff.
First there was an error in the code. The truespace hsl color has a bug in the hue part and I put the correction on the luminousity part.
Then truespace main clickable bitmap needed buffer zones on the top for the luminosity and both top and bottom for the saturation.

It's better now but still takes some effort so I'm going to try making the clickable bitmap taller, since we need to be able to get to the top and bottom values to get full black and white easily.

Cross posting:

"Okay
Have you ever seen the Lum change to 70110208031775968.000 when clicking in the left-hand side of the main bitmap control?
And the bitmap control turns 98% white?"


Nope, I haven't seen that. :o
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5206
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Color Picker

Post by trueBlue »

Do not know if its tS761StdUU9 or the Color Picker but this is what is happening when clicking on the edges in the main bitmap control.
I rebooted tS but it is the same.
I'll reboot my PC and give it a go in the morning.
User avatar
trueBlue
Captain
Posts: 5206
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Color Picker

Post by trueBlue »

clintonman wrote: 05 Feb 2023, 04:43
trueBlue wrote: 05 Feb 2023, 03:06 When I looked at and tried all of the choices, the top row seemed best.
Still not able to get pure White easily from the color pickers.
I am really not sure what would be best.

Would not be very intuitive, but I wonder if you could put the code in the S1 button into its color picker and remove the button(s)?
Ok I found some stuff.
First there was an error in the code. The truespace hsl color has a bug in the hue part and I put the correction on the luminousity part.
Then truespace main clickable bitmap needed buffer zones on the top for the luminosity and both top and bottom for the saturation.

It's better now but still takes some effort so I'm going to try making the clickable bitmap taller, since we need to be able to get to the top and bottom values to get full black and white easily.

Cross posting:

"Okay
Have you ever seen the Lum change to 70110208031775968.000 when clicking in the left-hand side of the main bitmap control?
And the bitmap control turns 98% white?"


Nope, I haven't seen that. :o
Maybe the above is my issue with the Color Picker?
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Color Picker

Post by clintonman »

trueBlue wrote: 05 Feb 2023, 05:02
clintonman wrote: 05 Feb 2023, 04:43
trueBlue wrote: 05 Feb 2023, 03:06 When I looked at and tried all of the choices, the top row seemed best.
Still not able to get pure White easily from the color pickers.
I am really not sure what would be best.

Would not be very intuitive, but I wonder if you could put the code in the S1 button into its color picker and remove the button(s)?
Ok I found some stuff.
First there was an error in the code. The truespace hsl color has a bug in the hue part and I put the correction on the luminousity part.
Then truespace main clickable bitmap needed buffer zones on the top for the luminosity and both top and bottom for the saturation.

It's better now but still takes some effort so I'm going to try making the clickable bitmap taller, since we need to be able to get to the top and bottom values to get full black and white easily.

Cross posting:

"Okay
Have you ever seen the Lum change to 70110208031775968.000 when clicking in the left-hand side of the main bitmap control?
And the bitmap control turns 98% white?"


Nope, I haven't seen that. :o
Maybe the above is my issue with the Color Picker?
I think the tS clickable bitmap just has issues. I made the bitmap taller and that along with the buffers seems to have done the trick. I'm looking at the saturation display because it's behavior seems a little off. Will look at other color pickers to see if it's misbehaving. I'll upload what I have tonight so you have something to see in the morning.
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Color Picker

Post by clintonman »

This one has a bigger clickable bitmap control and a white zone at the top of the luminosity display to make it easier to get to white. The value, red, green and blue "sliders" have buffers at the left and right to make it easier to get min and max values.
Fixed a color calculation bug.
It has 8 presets now. They can be resized since they only contain a single color. Random color values are the default and some notes are included in the code if specific default colors are desired.
I found that the saturation display theory isn't 100% compatible with the way the color picker is setup so it has a limit on the saturation value slider to avoid black and white values. Everything in between is good.
Attachments
Color Picker.RsObj
(295.98 KiB) Downloaded 45 times
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5206
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Color Picker

Post by trueBlue »

Thanks!
Occasionally, I am getting errors clicking in the Luminosity bitmap.

Code: Select all

ERR   Source object: /Scripts/CustomCommands/Color Picker/RestorePreviousState Error: Microsoft JScript runtime error Description: Overflow Error code: 0x800a0006 - (null) Line: 32, Char: 1 Script text:  util.SetNodeValueFloat(owner + "/UpdateRGB", "c_value", colorFS.PrevValue * 255); 
Then it stops working.
Select the selected object again and try again gives an error.

Now I get the SavePreset script, it gets random colors when you Reset them.
Nice!

The combo control looks like it defaults to the last item in the list.
I seemed to remember that the Color_ was showing more so in the previous version(s?)

TheNode script
Using two underscores kind of makes it look like one whole object name

Code: Select all

var connNodeSN = ColorConnList[i].theconn + "__" + Node.ShortName(ColorConnList[i].thenode);
Specular_Color__DefaultModelShader

What do you think about using:

Code: Select all

var connNodeSN = ColorConnList[i].theconn + "<- " + Node.ShortName(ColorConnList[i].thenode);
Specular_Color<- DefaultModelShader
For me, it kind of looks like an InAttribute

Panel Editing is a real pain in trueSpace when the controls are not a certain Grid size.
For instance, the color controls are 192x12
Color UI.png
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Color Picker

Post by clintonman »

trueBlue wrote: 05 Feb 2023, 11:32 Thanks!
Occasionally, I am getting errors clicking in the Luminosity bitmap.

Code: Select all

ERR   Source object: /Scripts/CustomCommands/Color Picker/RestorePreviousState Error: Microsoft JScript runtime error Description: Overflow Error code: 0x800a0006 - (null) Line: 32, Char: 1 Script text:  util.SetNodeValueFloat(owner + "/UpdateRGB", "c_value", colorFS.PrevValue * 255); 
Then it stops working.
Select the selected object again and try again gives an error.

Now I get the SavePreset script, it gets random colors when you Reset them.
Nice!

The combo control looks like it defaults to the last item in the list.
I seemed to remember that the Color_ was showing more so in the previous version(s?)

TheNode script
Using two underscores kind of makes it look like one whole object name

Code: Select all

var connNodeSN = ColorConnList[i].theconn + "__" + Node.ShortName(ColorConnList[i].thenode);
Specular_Color__DefaultModelShader

What do you think about using:

Code: Select all

var connNodeSN = ColorConnList[i].theconn + "<- " + Node.ShortName(ColorConnList[i].thenode);
Specular_Color<- DefaultModelShader
For me, it kind of looks like an InAttribute

Panel Editing is a real pain in trueSpace when the controls are not a certain Grid size.
For instance, the color controls are 192x12
Color UI.png
ColorPickerCrazyBigNumber.jpg
ColorPickerCrazyBigNumber.jpg (44.46 KiB) Viewed 477 times
I see it. A crazy big number. For me the number shown isn't big enough to give an error, but that super crazy big number you mentioned would. The error Overflow Error code: 0x800a0006 means "this is too big to handle".

Do you have a specific example of an undesirable value defaulting in the combo box?

I'll see about changing the combo underscores. Should be doable.

The 192x12 sliders can be resized now since the picker uses the mouse position instead of the color underneath. The only thing to know is that if they are not long enough it will be more difficult to get to the min and max values.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5206
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Color Picker

Post by trueBlue »

Do you have a specific example of an undesirable value defaulting in the combo box?
Just wished it went to Color first
Example:
Cube1 = Default Material (it only has one Color)
Cube2 = BlankDXMaterial (it has Color and Specular Color)
Now select each one
Cube1 is fine. :D
Cube2 shows the Specular Color and the main bitmap turns Black. :shock:

I think you mentioned you changed it to non-Alphabetized or No Sort.
TheNode:
var CBS_SORT = 256;
Are there different values I can experiment with?
User avatar
trueBlue
Captain
Posts: 5206
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Color Picker

Post by trueBlue »

If I Reset the c_value it seems to work, so far without errors
Reset C Value.png
Post Reply