playMaker

Author Topic: is the hsv color in playmaker possible?  (Read 6812 times)

kyy921

  • Junior Playmaker
  • **
  • Posts: 50
    • 上海杉蔓数字科技
is the hsv color in playmaker possible?
« 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??


kyy921

  • Junior Playmaker
  • **
  • Posts: 50
    • 上海杉蔓数字科技
Re: is the hsv color in playmaker possible?
« Reply #1 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.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15602
  • Official Playmaker Support
Re: is the hsv color in playmaker possible?
« Reply #2 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/


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

 Bye,

 Jean

kyy921

  • Junior Playmaker
  • **
  • Posts: 50
    • 上海杉蔓数字科技
Re: is the hsv color in playmaker possible?
« Reply #3 on: June 17, 2012, 07:08:08 PM »
I can not coding.. 

really thank you!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15602
  • Official Playmaker Support
Re: is the hsv color in playmaker possible?
« Reply #4 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
« Last Edit: June 20, 2012, 09:05:32 AM by jeanfabre »

kyy921

  • Junior Playmaker
  • **
  • Posts: 50
    • 上海杉蔓数字科技
Re: is the hsv color in playmaker possible?
« Reply #5 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,

 

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15602
  • Official Playmaker Support
Re: is the hsv color in playmaker possible?
« Reply #6 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

kyy921

  • Junior Playmaker
  • **
  • Posts: 50
    • 上海杉蔓数字科技
Re: is the hsv color in playmaker possible?
« Reply #7 on: June 20, 2012, 01:10:56 PM »
A big thank you!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15602
  • Official Playmaker Support
Re: is the hsv color in playmaker possible?
« Reply #8 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