Main > Main Forum
<News> - Sweet eye candy cabinet!
blueznl:
Looked into this a little more, especially from the programming side. To build something that does it real time, grabbing screens might not be the right way, due to system load. If you have the CPU power to spare, then there is no issue though 8)
Also, regular screen caps from within Windows are, afaik, GDI based and thus will exclude DirectX sections.
I haven't got a LedWiz, but if there is a sort of DLL interface accessable by more than one application, a background application could sample the screen, and send it's output to a few specified ports of the LedWiz, thus allowing the LedWiz to work with any dedicated app as well as a background 'environment lighting' app.
Does that make sense? Euh ;D
(Hard to find some code samples, here's a little DirectX http://www.geocities.com/foetsch/d3d8screenshot/d3d8screenshot.htm)
RandyT:
I think I mentioned earlier that I was able to use the windows clipboard screen grab method under MAME, even at full screen. DirectDraw is enabled, so I'm assuming that it is working.
FWIW, I now have code which does a grid-type sample (user definable frequency) over either the entire screen or just the active app. It performs a bunch of real PITA logic to get an assessment of the main colors. I haven't hooked anything up to an actual LED-Wiz yet, but running WOW in a window next to the output window of my app and the colors are reflecting what's going on in the game. When the screen changes to the blue maze, my control lights blue. When the Worluk appears, it goes red/orange and so on.
It may not be compatible with D3D. Don't know, haven't tried it. It's not "real-time" (currently ~ 300ms intervals) and I still need to transition the changes, but I made a heck of a lot of progress last night. BTW, processor utilization on this system was very low (< 1%) but will change based on the demands you place on speed and accuracy. I also have another method at my disposal which uses an external graphics lib if this one turns out not to work very well. I can carve up the samples to add "zones" down the road if I decide a more advanced implementation is in order.
BTW, does anyone know if "real-time" is important on this kind of thing? If one were watching a movie (which, BTW, doesn't work with this method because the windows capture can't touch the overlay :'() the lighting would really only need to change with scene changes. I can imagine it being very distracting if it was all "blinky blinky" every time something happened on-screen.
RandyT
Level42:
Ambilight on Philips TV's are gradualy changing, but there is a whole range of settings you can choose from.
I wonder how you'll cope with the early games that have black backgrounds ?
RandyT:
--- Quote from: Level42 on April 17, 2007, 01:13:12 pm ---I wonder how you'll cope with the early games that have black backgrounds ?
--- End quote ---
That was part the aforementioned PITA logic ;)
Just finished transitioning the changes and it makes a huge difference in the quality of the effect. It also makes the sample time less important.
RandyT
squirrellydw:
Kinda off the topic, but can you add in somehow the lighting "dancing or flashing" to the beat of music?