Dark Bit Factory & Gravity

PROGRAMMING => General coding questions => Topic started by: Hotshot on July 27, 2009

Title: Moving Gadient?
Post by: Hotshot on July 27, 2009
I know how to make Gadient in BlitzMax but there is one things that got me stuck!!

How do you Move Gadient round abit like plasma?

Title: Re: Moving Gadient?
Post by: va!n on July 27, 2009
any screenshot of an example, how it should like?
Title: Re: Moving Gadient?
Post by: Hotshot on July 27, 2009
I got the Gadient picture that I have made and nothing ground breaking but I want gradient move...eg...moving colours

Title: Re: Moving Gadient?
Post by: va!n on July 27, 2009
you means, moving colors (gradient) diagonal?
if so, i would do it by calculating the diff between color1 and color2 and  changinng color1 step to step to color2... and color2 step by ste to color 1... this could work.. not tested yet..
Title: Re: Moving Gadient?
Post by: Clyde on July 27, 2009
Mr H: I have made a plasma in bmax it's in the bmax forum if you are interested. it uses pixel maps; i dont know how you are planning to draw to the screen ( render ), using plot or if you are familiar with a pixmap.

I think what you are after dude is to cycle the colours, like in a copper / raster bar type method.

If not then can you be a little bit more specific?
Also is this a BMAX question? or are you using something else?

Cheers, and please post your response so we can help you out.
Clyde.
Title: Re: Moving Gadient?
Post by: Hotshot on July 27, 2009
YES it is blitzMax questions...

I am sure lots of you have seen Moving Gadients in demo.

Quote
I think what you are after dude is to cycle the colours, like in a copper / raster bar type method.

You mean colours changing so often?

That what I want in Gadients as you seen the picture that my Gadients colours stay still as I want them moving in different colours....

I guess I have change colours in randoms?
Title: Re: Moving Gadient?
Post by: Clyde on July 28, 2009
Not quite using random values mate.

Let me install BMAX, and I'll have a play for you.
Title: Re: Moving Gadient?
Post by: Shockwave on July 28, 2009
A cheap way of making a cycling background would be to use two gourad shaded triangles to make a square, or even a quad and just vary the colours at each vertex, ok it wouldn't be the same look as a traditional plasma but it would be a virtually labour free way of making a colourful background.
Title: Re: Moving Gadient?
Post by: Hotshot on July 28, 2009
Quote
A cheap way of making a cycling background would be to use two gourad shaded triangles to make a square

I understand that on "two gourad shaded triangles to make a square" but how can I make the cycling background?
I do know that Triangles have 3 points.

I dont think I ever done Cycling Background background before

The code I used are

Code: [Select]
' Draw simple Gadients
Const Screen_X=256
Const Screen_Y=256
Const Depth     =0
Const Press_ESC=1

Graphics (Screen_X,Screen_Y,Depth)

While Not KeyDown(PRESS_ESC)
        
      For X=1 To Screen_X
          For Y=1 To Screen_Y
              SetColor X,Y,X
              DrawLine X,Y,X,Y
          Next
      Next
      Flip
Wend



Title: Re: Moving Gadient?
Post by: Shockwave on July 28, 2009
In opengl you'd just use the gl_triangles or gl_quads commands and change the material and / or colour at each vertex, I don't know how you'd do that in Bmax, it must be very easy though.