XNA Creators Club Online
Page 1 of 1 (5 items)
Sort Posts: Previous Next

Effect like windows vista screen saver Aurora

Last post 10/22/2009 11:58 AM by Byron Nelson. 4 replies.
  • 10/15/2009 3:31 PM

    Effect like windows vista screen saver Aurora

    Hi,

    I would like to do an effect like Windows Vista Screen Saver named Aurora, but i don't know how to start to do or to search in Internet.
    One video with the effect: http://www.youtube.com/watch?v=milJGmdHdiE&feature=related

    Any Idea?

    Thanks
  • 10/15/2009 6:40 PM In reply to

    Re: Effect like windows vista screen saver Aurora

    Probably the hard way but what I would do is

    1: create a multi-slice rectangle

    1:B write a shader to...
      2: distort each vertex's Z based on the sum of sin(timestep) + sin(timestep * somefactor)
      3: alpha blend two noise textures on top, scrolling the texture coordinates at two different rates, fluxuating the colors of each based on different timesteps
      4: alpha blend the edges based as a function of their distance from the vertical center

    Best,
    Byron
    ..shaders make you feel... powerful, or very very stupid.
    http://drjbn.spaces.live.com/
  • 10/16/2009 10:20 AM In reply to

    Re: Effect like windows vista screen saver Aurora

    I try it.
    Thank's!!
  • 10/16/2009 7:35 PM In reply to

    Re: Effect like windows vista screen saver Aurora

    Here's a little something for ya...an effect from Space Pirates.  Change the way Dest is scaled and the colour values used in the spriteDraw calls and the world is your oyster.  Declare HyperspaceBuffer as a ResolveTexture2D with the current presentation parameters for width, height and format.

                        GraphicsDevice.Clear(Color.Black); 
     
                        // Draw enlarged version of previous screen before plopping on random blobs in  
                        // the middle of the screen 
                        Rectangle Dest = new Rectangle(0, 0, GraphicsDevice.PresentationParameters.BackBufferWidth,  
                            GraphicsDevice.PresentationParameters.BackBufferHeight); 
                        Rectangle Source = Dest; 
                        Dest.Width += 160; 
                        Dest.Height += 100; 
                        Dest.X -= 80; 
                        Dest.Y -= 50; 
                         
     
                        spriteBatch.Begin(SpriteBlendMode.Additive, SpriteSortMode.Immediate, SaveStateMode.SaveState); 
                        spriteBatch.Draw(HyperspaceBuffer, new Vector2(Source.Width / 2, Source.Height / 2), Source, 
                            new Color(0.19f, 0.19f, 0.19f), 0.005f,  
                            new Vector2(Source.Width / 2, Source.Height / 2), 1.0f, 
                            SpriteEffects.None, 1.0f); 
                        Dest.Width += 160; 
                        Dest.Height += 100; 
                        Dest.X -= 80; 
                        Dest.Y -= 50; 
                        spriteBatch.Draw(HyperspaceBuffer, new Vector2(Source.Width / 2, Source.Height / 2), Source, 
                            new Color(0.19f, 0.19f, 0.19f), -0.005f, 
                            new Vector2(Source.Width / 2, Source.Height / 2), 1.0f, 
                            SpriteEffects.None, 1.0f); 
                        spriteBatch.Draw(HyperspaceBuffer, Dest, Source, new Color(0.6f, 0.6f, 0.6f)); 
                        // Draw 2 random coloured blobs mid-screen to be picked up next time round 
     
                        int X = Source.Width / 2; 
                        X += (Rnd.Next(100) - 50); 
                        int Y = Source.Height / 2; 
                        Y += (Rnd.Next(100) - 50); 
                        spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkOrange); 
     
                        X = Source.Width / 2; 
                        X += (Rnd.Next(100) - 50); 
                        Y = Source.Height / 2; 
                        Y += (Rnd.Next(100) - 50); 
                        spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkCyan); 
     
                        X = Source.Width / 2; 
                        X += (Rnd.Next(100) - 50); 
                        Y = Source.Height / 2; 
                        Y += (Rnd.Next(100) - 50); 
                        spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkMagenta); 
     
                        X = Source.Width / 2; 
                        X += (Rnd.Next(100) - 50); 
                        Y = Source.Height / 2; 
                        Y += (Rnd.Next(100) - 50); 
                        spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkGreen); 
     
                        X = Source.Width / 2; 
                        X += (Rnd.Next(100) - 50); 
                        Y = Source.Height / 2; 
                        Y += (Rnd.Next(100) - 50); 
                        spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkBlue); 
     
                        X = Source.Width / 2; 
                        X += (Rnd.Next(100) - 50); 
                        Y = Source.Height / 2; 
                        Y += (Rnd.Next(100) - 50); 
                        spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkRed); 
     
                        X = Source.Width / 2; 
                        X += (Rnd.Next(100) - 50); 
                        Y = Source.Height / 2; 
                        Y += (Rnd.Next(100) - 50); 
                        spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkOrange); 
     
                        X = Source.Width / 2; 
                        X += (Rnd.Next(100) - 50); 
                        Y = Source.Height / 2; 
                        Y += (Rnd.Next(100) - 50); 
                        spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkCyan); 
     
                        X = Source.Width / 2; 
                        X += (Rnd.Next(100) - 50); 
                        Y = Source.Height / 2; 
                        Y += (Rnd.Next(100) - 50); 
                        spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkMagenta); 
     
                        X = Source.Width / 2; 
                        X += (Rnd.Next(100) - 50); 
                        Y = Source.Height / 2; 
                        Y += (Rnd.Next(100) - 50); 
                        spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkGreen); 
     
                        X = Source.Width / 2; 
                        X += (Rnd.Next(100) - 50); 
                        Y = Source.Height / 2; 
                        Y += (Rnd.Next(100) - 50); 
                        spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkBlue); 
     
                        X = Source.Width / 2; 
                        X += (Rnd.Next(100) - 50); 
                        Y = Source.Height / 2; 
                        Y += (Rnd.Next(100) - 50); 
                        spriteBatch.Draw(HyperBlob, new Vector2(X, Y), Color.DarkRed); 
     
                        spriteBatch.End(); 
     
                        GraphicsDevice.ResolveBackBuffer(HyperspaceBuffer); 
                        GraphicsDevice.Clear(Color.Black); 
                        spriteBatch.Begin(SpriteBlendMode.Additive, SpriteSortMode.Immediate, SaveStateMode.SaveState); 
                        spriteBatch.Draw(HyperspaceBuffer, Vector2.Zero, Color.White); 
                        spriteBatch.End(); 


    Quick and dirty but it works nicely for me!

    Regards,
    Mike
  • 10/22/2009 11:58 AM In reply to

    Re: Effect like windows vista screen saver Aurora

    I just happened to think of it, but Charles Humphrey's "rolling fog" demo might be something you could get a start with as well.

    http://xna-uk.net/blogs/randomchaos/archive/2008/01/03/rolling-shader-fog.aspx

     Best,
    Byron
    ..shaders make you feel... powerful, or very very stupid.
    http://drjbn.spaces.live.com/
Page 1 of 1 (5 items) Previous Next