mpolednik / script.kodi.hue.ambilight

Kodi add-on for Philips Hue lights with ambilight support. Based on @cees-elzinga 's original work.
Do What The F*ck You Want To Public License
157 stars 42 forks source link

ambilight 2.0 #36

Open mpolednik opened 7 years ago

mpolednik commented 7 years ago

Most of the stuff has been updated, so now looking at things that could be improved... Ambilight!

Current state:

The feature works by iterating over every pixel on the screen and grouping them up by hue. After we have all the hues, we create a hue "buckets". Number of these buckets is determined by color bias setting and can be summarized by following equation: num_buckets = 360 / color_bias. These buckets are then sorted by how large portion of screen they occupy and used to set the lights' color.

Braindump / 2.0: So I've for the first time looked at how proper ambilight looks - pretty nice vid is

https://www.youtube.com/watch?v=yOSNqjzSDSg

and well, that's not really possible with Hue. On the other hand, since Hue lamps can be moved around / positioned / spread, that really makes me think of 2 things:

The ambilight makes sense with pretty much any amount of lights, but for specific ambilight experience the plugin could work with 2 modes - "simple" (current algorithm) or "direction+effects" mode.

Direction+effects? What? My idea is to have the mode use slightly different algorithm. First, user will be able to set the relevant position of each ambilight bulb to the screen - left, right, above, below. That way, each direction could use most frequent hue of the screenshot's relevant side. So for the light to the left of the screen, we would only calculate most used hue on the leftmost ~5 % of the screen. What would this mean? Using the plugin along with proper ambilight TV or it's alternative would actually be suitable for huge rooms. Hue's delay would maybe even help the effect.

What about the effects part? Well something that doesn't make sense for built-in TV ambilight. Consider following screenshot from Tron: Legacy:

https://digitalmediaservices.files.wordpress.com/2011/04/tron_178.jpg

the orange can't really be expressed anywhere close to the TV. On the other hand, some dedicated light (e.g. back in the room, almost accentual) could totally use that color for more dramatic effect.

Thoughts?

JesCR commented 7 years ago

hi @mpolednik ! For me, the ambilight mode like that youtube video, it's too agressive and distracting. The hue lights gets a more subtle mode, perfect for my tastes... So go ahead with Direction+effects, as you know i have two bloom ligths for ambilight and i will be happy to test new modes

bredmich commented 7 years ago

Hi Martin, Sounds like an great idea. I wanted to get an 2-Zone Hue Ambilight since the beginning of this Addon! I got two Hue bulbs in frosted glasses that are standing on my speakers 2 meters left and right from my TV. The original Addon just pushed some colors to the bulbs. I would love to see a better calculation and two zones (left/right)

Cheers!

ghost commented 7 years ago

Multi zone would be awsome! I also got the lamps on my front-speakers. But also one on each of the rearspeakers. Perhaps you could make a left and right group and then add the lights to them.

hstamas commented 7 years ago

Instead of zones and groups I wonder if a better way of doing this across the board would be to have entries for specific lights, each one having the same parameter choices? Say lights 1 thru 5 (or some reasonable amount). That way we would have total control over what each light did or didnt do. Thats how the plugin over on the Plex side of things works and for me its been working 100%.

xX-Nexus-Xx commented 7 years ago

Hi, I just ordered my hue light strip in addition to my several light bulbs.

I'm using the plug-in with 2 lights only and it works so far .. I have tried to configure 4+ lights but I struggled with the setup. I would support a setup based on lights ... for example:

Simplified Sample Setup:

Sample Light Config: Light 1 (Light-Strip) ==> Led Start: 0 ..... Led Finish: 149 (LED Strip around TV) Light 2 (Bulb) == >Led Start: 0 .... Led Finish: 20 (Lamp bottom left to TV) Light 3 (Bulb) == >Led Start: 104 .... Led Finish: 124 (Lamp bottom right to TV)
Light 4 (Light-Strip) == >Led Start: 125 .... Led Finish: 149 (LED Strip behind Sofa)

This way you can easily assign any lamp to a certain area of the screen. By this approach we would not need pre-defined zones which can limit the future use and flexibility

Thanks for considering ... looking forward to your progress with this plugin! ... Great work so far !!

tonga1981 commented 6 years ago

This thread might not be active any more.. I have a issue with this addon and maybe some one here know what to do. In ambilight mode it works great with my old cartoon movies, but when i try a new movie its just a stativ color. Is it a codec ting or??