August 24, 2019, 07:59:33 PM

Author Topic: Shifting color hue?  (Read 277 times)

Offline Yellownakji

  • Full Member
  • ***
  • Posts: 247
  • No.
Shifting color hue?
« on: May 09, 2019, 02:53:45 PM »
Hi.

I'm trying to achieve a 'hue shift' pattern.    Not exactly a "setcolor" to a greyscaled image but to shift a colored image's colors.

Anybody have an appropriate method for this technique?

Offline Derron

  • Hero Member
  • *****
  • Posts: 2337
Re: Shifting color hue?
« Reply #1 on: May 09, 2019, 03:13:29 PM »
Realtime or a color algorithm?

In my framework there is the code to convert rgb to hsv or other colors
https://github.com/GWRon/Dig/blob/master/base.util.color.bmx

so you can simply read each color and manipulate the color then to your needs.


Of course this wont work in realtime for bigger pictures.

bye
Ron

Offline Yellownakji

  • Full Member
  • ***
  • Posts: 247
  • No.
Re: Shifting color hue?
« Reply #2 on: May 09, 2019, 03:25:17 PM »
Realtime or a color algorithm?

In my framework there is the code to convert rgb to hsv or other colors
https://github.com/GWRon/Dig/blob/master/base.util.color.bmx

so you can simply read each color and manipulate the color then to your needs.


Of course this wont work in realtime for bigger pictures.

bye
Ron


Real-time.   I would like my logo to utilize a rainbow hue effect, instead of just making every letter change color via setcolor.    I'm trying to get every frame to shift the color by 0.4.

Offline Derron

  • Hero Member
  • *****
  • Posts: 2337
Re: Shifting color hue?
« Reply #3 on: May 09, 2019, 04:02:25 PM »
Use shaders (eg with mojo of mky.mod).

Or trick with some overlay images (tinting the underlaying stuff, mix with another blendmode like Lightblend).


bye
Ron

Offline Henri

  • Full Member
  • ***
  • Posts: 207
Re: Shifting color hue?
« Reply #4 on: May 09, 2019, 04:50:24 PM »
Hi,

there is something to this effect in Bmax samples folder: Samples / flameduck / Circlemania.

-Henri
- Got 01100011 problems, but the bit ain't 00000001

Offline Yellownakji

  • Full Member
  • ***
  • Posts: 247
  • No.
Re: Shifting color hue?
« Reply #5 on: May 18, 2019, 05:36:36 PM »
Hi,

there is something to this effect in Bmax samples folder: Samples / flameduck / Circlemania.

-Henri

Not quite what i'm looking for.  It was very messy to compile in NG, as well.

I'm not really going to waste any more time on this effect.   What i have done is written my own replacement for SetColor(), which uses superior HSV instead of RGB.   I'm just done with RGB.