Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: kyy921 on June 17, 2012, 12:15:14 PM

Title: is the hsv color in playmaker possible?
Post by: kyy921 on June 17, 2012, 12:15:14 PM
some time I wanne use  slider to control object  hsv color

but in playmaker, we can only use rgb color....

had anybody create some action to do this??

Title: Re: is the hsv color in playmaker possible?
Post by: kyy921 on June 17, 2012, 12:18:22 PM
I fact what i need, is , can we combine a hsv color,or  rgb color, with a vector, or three float,??

like i often do in vvvv.
Title: Re: is the hsv color in playmaker possible?
Post by: jeanfabre on June 17, 2012, 02:23:04 PM
Hi,

 I don't think there is such converter, even in Unity, there is one in the unity Editor, but that won't work during runt time.

Playmaker does have a fsmColor variable, but it's rgb based.

there is a javascript snippet that could be ported to a playmaker action.
http://schinckel.net/2012/01/10/hsv-to-rgb-in-javascript/ (http://schinckel.net/2012/01/10/hsv-to-rgb-in-javascript/)


Do you have scripting experience? else, I can built it.

 Bye,

 Jean
Title: Re: is the hsv color in playmaker possible?
Post by: kyy921 on June 17, 2012, 07:08:08 PM
I can not coding.. 

really thank you!
Title: Re: is the hsv color in playmaker possible?
Post by: jeanfabre on June 18, 2012, 03:27:58 AM
Hi,

 can you give this action a test. I am not sure what kind of signature you need for the HSV, so could you provide a  set of conversion examples so that I can find the range of the HSV values you are looking for?

[EDIT: fixed error]

 thanks,

 Jean
Title: Re: is the hsv color in playmaker possible?
Post by: kyy921 on June 18, 2012, 02:05:23 PM
I just try this action , its what I want!

great!
:) really thank you,

only one problem, i find the  H value has come problem, if its larger than 180,or 240. the color change well have a gap, and not smooth,

 
Title: Re: is the hsv color in playmaker possible?
Post by: jeanfabre on June 20, 2012, 09:05:56 AM
Hi,

eh eh:) the source I used for this had a bug on case 3, which corresponds to the 180-240 angle range of the hue.

So this is fixed now, simply re download the script. Thanks for spotting this. I have contacted him as well.


 Bye,

 Jean
Title: Re: is the hsv color in playmaker possible?
Post by: kyy921 on June 20, 2012, 01:10:56 PM
A big thank you!
Title: Re: is the hsv color in playmaker possible?
Post by: jeanfabre on June 21, 2012, 01:56:13 AM
Hi,

 No problem. the guy is going to update the page and gist, so thanks to you as well: Internet is now more accurate than ever  ;)

 bye,

 Jean