Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - flightcrank

Pages: 1 [2]
21
My take would be to load at least 2 screens that you want to transition between in memory. and then perhaps use a 3rd image as an alpha channel. and animate the alpha channel so that every pixel that is white show image #1 and every pixel that is black show image #2.

all you need to do then is animate the alpha channel to provide the clockwork like transition between the two images. as for implementing that you could start start of with the alpha channel all black. and then starting from the center of the screen draw 2 lines.  One from the center, straight to the top and the other to move to the left or right by 1 increment such as 1 degree. then you simply flood fill between the 2 lines to be white, which will show the whole of the 2nd image once complete.

there are probably better ways to do it. but that should be a good starting point.
l

22
Projects / Re: Shape Stories
« on: August 13, 2014 »
good to see another aussie here :D

23
General chat / Re: hello. complete noob here.
« on: August 11, 2014 »
I think processing is great for trying out new effects and getting some ideas down. It should be the default language used on the forum due to the common syntax and ease of plotting pixels.

I recommend it !

ive made my first 3D engine in it. heres a few screens.

24
I also have gaps in a triangle rasterizer i wrote. ill try mimicing the co-ords from your pic and see what i get.

i think the gaps are caused by rounding errors. I cast from floats to ints. so for example if an x value is "3.9" it gets cut to just 3. perhaps its the same in your version.

25
General chat / Re: RIP : Rik Mayall
« on: June 15, 2014 »
i remember him most from a series of videos called grim tales. where he told fairy tails like the tortoise and the hare (hedgehog and the hare) and rumplestiltzkin, hansel and gretel among many others. in the early 90's when I was a kid. He was awesome !

26
I think i understand what you mean. you want a thin horizontal image (probably of text) wrapped around in a circle.

In the 2D tunnel effect you get a 2d image and wrap it around in a circle maybe that could be of some use. you have  use polar co-ordinates.

another way would be to use a bitmapped font that is fixed width. take each individual letter and perform 2d rotation on each char around a circle. but that is beyond my expertise. good luck.


27
Freebasic / Re: Floormapper problem :(
« on: June 06, 2014 »
Can we start again with the theory of this floor mapper problem. I would like to understand this from the ground up but have gotten well confused. I'm not really interested in any code right now just the theory of how to implement this.
But I say I'm using the processing language for its simplicity in getting pixels on the screen.

Ok, this is the point I'm up to now. I've implemented some code to generate a checker texture. which can be found here
https://gist.github.com/flightcrank/7387beda0e8a644e5351
This is the image it produces.



Now I understand how the UV co-ordinate system works. I have made a small program that can can stretch or shrink this checker-board texture to any size window.

now I'm stuck as to how to proceed. What is the step by step theory behind the floormapper ? do you draw the texture one half at a time from the centre of the screen ? infact i just want to take this slow. hellfire made an image where the texture was curved like this



Then he corrected the problem with some more code. How would I got about getting that curved checkerboard image above. From there I would then like to get the final result, but I don't want to go to far and get to confused.

Ill say again i'm after more of the theory of how it works. not really any code.

28
General chat / Re: Reaction Times
« on: October 01, 2013 »
best was 154

29
ASM / Re: 115-byte speech synthesis on XP SP3
« on: August 26, 2013 »
damn im on linux so cant test. but sounds like a cool project. like the speech program on the Atari ST.

where did you learn the theory of how to implement it ?

30
Freebasic / Re: Floormapper problem :(
« on: August 21, 2013 »
nice post hellfire this is pure gold. i was wondering about rendering a texture mapped floor, without a 3d engine. Ill have a crack at this when i get some spare time.

I believe the SNES had a special hardware gfx  mode (mode7) that did something like this. for games such as F-Zero.

31
General chat / Re: Atari Demoscene
« on: August 15, 2013 »
WOW ! that article looks like pure GOLD. If only it was in english. Its hard  for me to read the source and still understand the overview of what the coder is thinking, like the overall picture or concept.

Still bookmarked  it tho !

32
Thanks so much hellfire I understand it so much better now. I got some nice gradients going !

33
and you lost me. I understand the concept but dont understand the formula or how you got it.

34
General coding questions / Create a radial gradient
« on: August 07, 2013 »
Hi all.

I am having a little trouble creating a radial gradient. Also I can not find any documentation on creating them programaticly.

Here is where I'm at so far:

Assume I want to make a radial gradient fill a small 16px width by 16px height rectangle/square. I take the center pixel (x =8 , y = 8) and I calculate the distance each pixel in the rectangle is from that center pixel using Pythagoras theorem. I'm left with a table of values that look like this

Code: [Select]
11.31  10.63  10.00   9.43   8.94   8.54   8.25   8.06   8.00   8.06   8.25   8.54   8.94   9.43  10.00  10.63
 10.63   9.90   9.22   8.60   8.06   7.62   7.28   7.07   7.00   7.07   7.28   7.62   8.06   8.60   9.22   9.90
 10.00   9.22   8.49   7.81   7.21   6.71   6.32   6.08   6.00   6.08   6.32   6.71   7.21   7.81   8.49   9.22
  9.43   8.60   7.81   7.07   6.40   5.83   5.39   5.10   5.00   5.10   5.39   5.83   6.40   7.07   7.81   8.60
  8.94   8.06   7.21   6.40   5.66   5.00   4.47   4.12   4.00   4.12   4.47   5.00   5.66   6.40   7.21   8.06
  8.54   7.62   6.71   5.83   5.00   4.24   3.61   3.16   3.00   3.16   3.61   4.24   5.00   5.83   6.71   7.62
  8.25   7.28   6.32   5.39   4.47   3.61   2.83   2.24   2.00   2.24   2.83   3.61   4.47   5.39   6.32   7.28
  8.06   7.07   6.08   5.10   4.12   3.16   2.24   1.41   1.00   1.41   2.24   3.16   4.12   5.10   6.08   7.07
  8.00   7.00   6.00   5.00   4.00   3.00   2.00   1.00   0.00   1.00   2.00   3.00   4.00   5.00   6.00   7.00
  8.06   7.07   6.08   5.10   4.12   3.16   2.24   1.41   1.00   1.41   2.24   3.16   4.12   5.10   6.08   7.07
  8.25   7.28   6.32   5.39   4.47   3.61   2.83   2.24   2.00   2.24   2.83   3.61   4.47   5.39   6.32   7.28
  8.54   7.62   6.71   5.83   5.00   4.24   3.61   3.16   3.00   3.16   3.61   4.24   5.00   5.83   6.71   7.62
  8.94   8.06   7.21   6.40   5.66   5.00   4.47   4.12   4.00   4.12   4.47   5.00   5.66   6.40   7.21   8.06
  9.43   8.60   7.81   7.07   6.40   5.83   5.39   5.10   5.00   5.10   5.39   5.83   6.40   7.07   7.81   8.60
 10.00   9.22   8.49   7.81   7.21   6.71   6.32   6.08   6.00   6.08   6.32   6.71   7.21   7.81   8.49   9.22
 10.63   9.90   9.22   8.60   8.06   7.62   7.28   7.07   7.00   7.07   7.28   7.62   8.06   8.60   9.22   9.90

Now am I on the right track here ? it seems like I am and that it makes sense to do it this way.. but now I'm stuck and cant actually draw the gradient.

so far I have tried to take the inverse of each number by dividing 1 by each number which give me this... each number is between 0 and 1.0

Code: [Select]
0.09   0.09   0.10   0.11   0.11   0.12   0.12   0.12   0.12   0.12   0.12   0.12   0.11   0.11   0.10   0.09
  0.09   0.10   0.11   0.12   0.12   0.13   0.14   0.14   0.14   0.14   0.14   0.13   0.12   0.12   0.11   0.10
  0.10   0.11   0.12   0.13   0.14   0.15   0.16   0.16   0.17   0.16   0.16   0.15   0.14   0.13   0.12   0.11
  0.11   0.12   0.13   0.14   0.16   0.17   0.19   0.20   0.20   0.20   0.19   0.17   0.16   0.14   0.13   0.12
  0.11   0.12   0.14   0.16   0.18   0.20   0.22   0.24   0.25   0.24   0.22   0.20   0.18   0.16   0.14   0.12
  0.12   0.13   0.15   0.17   0.20   0.24   0.28   0.32   0.33   0.32   0.28   0.24   0.20   0.17   0.15   0.13
  0.12   0.14   0.16   0.19   0.22   0.28   0.35   0.45   0.50   0.45   0.35   0.28   0.22   0.19   0.16   0.14
  0.12   0.14   0.16   0.20   0.24   0.32   0.45   0.71   1.00   0.71   0.45   0.32   0.24   0.20   0.16   0.14
  0.12   0.14   0.17   0.20   0.25   0.33   0.50   1.00    inf   1.00   0.50   0.33   0.25   0.20   0.17   0.14
  0.12   0.14   0.16   0.20   0.24   0.32   0.45   0.71   1.00   0.71   0.45   0.32   0.24   0.20   0.16   0.14
  0.12   0.14   0.16   0.19   0.22   0.28   0.35   0.45   0.50   0.45   0.35   0.28   0.22   0.19   0.16   0.14
  0.12   0.13   0.15   0.17   0.20   0.24   0.28   0.32   0.33   0.32   0.28   0.24   0.20   0.17   0.15   0.13
  0.11   0.12   0.14   0.16   0.18   0.20   0.22   0.24   0.25   0.24   0.22   0.20   0.18   0.16   0.14   0.12
  0.11   0.12   0.13   0.14   0.16   0.17   0.19   0.20   0.20   0.20   0.19   0.17   0.16   0.14   0.13   0.12
  0.10   0.11   0.12   0.13   0.14   0.15   0.16   0.16   0.17   0.16   0.16   0.15   0.14   0.13   0.12   0.11
  0.09   0.10   0.11   0.12   0.12   0.13   0.14   0.14   0.14   0.14   0.14   0.13   0.12   0.12   0.11   0.10

I can multiply each one by 255 to give me a range of values I can use to colour the pixel. and it works ! producing a radial gradient (that's only 16px in diameter for this example).

But when I want a bigger gradient lets say one inside a rectangle of 512*512. It wont work it will still produce the small gradient.

so for example if the screen was 512*512 pixel 0,0 would have a value of 256px left from center and 256px up from the center. which would give it a distance of 362.04px from the center (sqrt(256^2 + 256^2)). The inverse of that 1/362.04 which = 0.0027. so if I get that value in the integer range of 0 to 255 I get 0.0027 * 255 = 0.68. which gets culled to just 0.

so what do I do ? scale the numbers to have bigger values ? I'm out of my depth here!

I also have learning difficulty so if anyone could explain it all to my like I'm 5 or step by step like a debugger would that would be groovy !!


35
General chat / Re: The Welcoming Committee
« on: December 04, 2012 »
hey I'm main;y here to learn as much as I can. I have trouble learning new things but have a huge desire to learn as much as I can about demo coding.

I use the C programming language and use SDL to display my graphics. I want to stick with 2D stuff until I feel I have mastered it. then I will move onto OpenGL

Pages: 1 [2]