DGL https://delphigl.com/forum/ |
|
Windows Media Centre-like Background using OpenGL https://delphigl.com/forum/viewtopic.php?f=19&t=6846 |
Seite 1 von 1 |
Autor: | dpm_dpmartin [ Sa Aug 25, 2007 13:38 ] |
Betreff des Beitrags: | Windows Media Centre-like Background using OpenGL |
I have simulated something that gives the appearance of Microsoft's Media Centre moving blue-ish background using two textures - one is placed on the screen static with colour 1,1,1 in orthographic mode - using the entire screen space. I then add another texture with colour 0.06,0.06,0.06 and blend it with the underlying texture while spinning it around and scaling it - quite slowly so as to avoid it looking a bit mad. Very simple - and a rather pleasing effect - if kind of repetitive after a while. I was wondering whether it was simple to create a mathematical routine that would allow me to create a background across the entirety of the screen, say 1024 x 768, and generate some movements using some whizzy formulas that have the effect of the background moving or (hopefully) non-repeating waves being created in the colours. I'm sure this is what Microsoft must do with their Media Centre background as it moves around, seemingly, non-uniformly. |
Autor: | JSoftware [ So Aug 26, 2007 09:08 ] |
Betreff des Beitrags: | |
What about a simple perlin noise which is simply blurred very much and then moved a bit each frame. That sound to me like the most simple solution |
Autor: | dpm_dpmartin [ So Aug 26, 2007 14:27 ] |
Betreff des Beitrags: | |
Good pointer; thank you. I'd not heard of Perlin before - so I did some scouring around on the Internet and, originally, thought it would be too hard to begin with (I have a programming mind, not a mathematical mind - and they're definitely not the same thing!) but I have experimented and I have finally come up with the following fair approximation of a Windows Media Centre-like background which moves around very subtley: ![]() ![]() I use a 64x64 pixel texture and each time I update I calculate two iterations of 'noise' to draw to the texture while always forcing the Blue value to be 250 - I managed to elongate the white whisps by making the X values larger. I then scale my resulting texture by 1.1 on the X and Y to get rid of a funny border that I was seeing at the edges. Looks OK to me. |
Seite 1 von 1 | Alle Zeiten sind UTC + 1 Stunde |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |