Dark Bit Factory &  Gravity

Dark Bit Factory & Gravity

  • July 30, 2010 *
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Pages: [1]   Go Down

Author Topic: RotoScope (a new demo effect?)  (Read 1041 times)

0 Members and 1 Guest are viewing this topic.

va!n

  • Pentium
  • *****
  • Karma: 102
  • Offline Offline
  • Posts: 1165
    • View Profile
    • WWW
RotoScope (a new demo effect?)
« on: October 01, 2007 »
Hi guys! here is a graphic effect i coded for a coding competition by a german pb forum. deadline was 30.sep.2007 @ 23:59... Here is what i come up with... (i don't know to have seen that kind of fx before. runs in 800x600x32)  zip cointains exe and full sources...
« Last Edit: October 01, 2007 by va!n »
Logged
Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows7 x64
http://www.secretly.de

Jim

  • ADMIN
  • Senior Member
  • ********
  • Karma: 325
  • Offline Offline
  • Posts: 4676
    • View Profile
Re: RotoScope (a new demo effect?)
« Reply #1 on: October 01, 2007 »
Good effect, and definitely Karma+ for posting source.

Also, I'm very pleased to see that your degrees to radians function is accurate to 18 decimal places, 0.017453292500000002, that's down to the attometer level, about 1 quintillionth of a degree :D, or one billion, billion, billionth of a pixel ;D

Jim
Logged

p01

  • Atari ST
  • ***
  • Karma: 51
  • Offline Offline
  • Posts: 158
    • View Profile
    • WWW
Re: RotoScope (a new demo effect?)
« Reply #2 on: October 01, 2007 »
Kaleidoscope are not new to the scene :P
Also using a rotozoom to "feed" it is rather obvious as it produces many rotating patterns. See KaleidoSkop, a 256b intro by Beetle / 3SC in 2000 or in a loop, an insane 1k intro on C64 by Ate Bit in 2006

Kudos for sharing the source.
Logged

benny!

  • Senior Member
  • ******
  • Karma: 174
  • Offline Offline
  • Posts: 3424
  • in this place forever!
    • View Profile
    • WWW
Re: RotoScope (a new demo effect?)
« Reply #3 on: October 01, 2007 »
Love the kaleidoscope fx, va!n. Nice one. Good luck with your entry in the competition.
Logged
[ microBLOG - PHLOCKS - LABS - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Shockwave

  • good/evil
  • ADMIN
  • Senior Member
  • ********
  • Karma: 356
  • Offline Offline
  • Posts: 15085
  • evil/good
    • View Profile
    • WWW
Re: RotoScope (a new demo effect?)
« Reply #4 on: October 01, 2007 »
That is a pretty good effect, I'd like to wish you good luck in the competition! :)

Looking at the source I am sure that it can be optimised quite a lot more.
The two matrix constants can be computed outside the loop;

Code: [Select]
    MO1= COS (THETA)
    MO2= SIN (THETA)

And then inside the loop;

Code: [Select]
        ONE AXIS OF ROTATION
        XXX=X(L)
        YYY=Y(L)
       
        X(L) = MO1 * XXX - MO2 * YYY
        Y(L) = MO1 * YYY + MO2 * XXX

Which is probably still not the way I'd go about making this effect, but it would be a little faster than it is at the moment.

If I had to code this in software I'd make a very quick and dirty linear texture mapping routine, there would be no problem with warping of textures because there is no Z Co-ordinate.

But anyway I'll STFU now, the effect looks nice and the best of luck with the comp :)
Logged
Shockwave ^ Codigos....  Error: Keyboard not attached.... Press F1 to continue.

p01

  • Atari ST
  • ***
  • Karma: 51
  • Offline Offline
  • Posts: 158
    • View Profile
    • WWW
Re: RotoScope (a new demo effect?)
« Reply #5 on: October 01, 2007 »
Dunno the langage used here but surely you can replace:
Code: [Select]
While lTexturePixelX < 0 : lTexturePixelX = lTexturePixelX + 255 : Wend
While lTexturePixelY < 0 : lTexturePixelY = lTexturePixelY + 255 : Wend

If lTexturePixelX > 255 : lTexturePixelX = lTexturePixelX - 255 : EndIf
If lTexturePixelY > 255 : lTexturePixelY = lTexturePixelY - 255 : EndIf
by something like:
Code: [Select]
lTexturePixelX &= 255
lTexturePixelY &= 255

Also in a rotozoom, the slope is continous, therefore the inner ( X ) loop can be summed up to:
Code: [Select]
xLoopX += xLoopDeltaX
xLoopY += xLoopDeltaX
And the outer ( Y ) loop to:
Code: [Select]
xLoopX = ( yLoopX += yLoopDeltaX )
xLoopY = ( yLoopY += yLoopDeltaY )

HTH
« Last Edit: October 01, 2007 by p01 »
Logged

taj

  • Bytes hurt
  • Senior Member
  • ******
  • Karma: 189
  • Offline Offline
  • Posts: 4810
  • Scene there, done that.
    • View Profile
Re: RotoScope (a new demo effect?)
« Reply #6 on: October 01, 2007 »
The effect is very pleasing on the eyes. Karma++ for source.
Logged

Stonemonkey

  • Pentium
  • *****
  • Karma: 88
  • Offline Offline
  • Posts: 1164
    • View Profile
Re: RotoScope (a new demo effect?)
« Reply #7 on: October 01, 2007 »
Nice one Va!n, goodluck with the compo.
Logged

va!n

  • Pentium
  • *****
  • Karma: 102
  • Offline Offline
  • Posts: 1165
    • View Profile
    • WWW
Re: RotoScope (a new demo effect?)
« Reply #8 on: October 05, 2007 »
compo is running atm at www.purebasic-lounge.de ^^
Logged
Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows7 x64
http://www.secretly.de

Shockwave

  • good/evil
  • ADMIN
  • Senior Member
  • ********
  • Karma: 356
  • Offline Offline
  • Posts: 15085
  • evil/good
    • View Profile
    • WWW
Re: RotoScope (a new demo effect?)
« Reply #9 on: October 05, 2007 »
Good luck mate :)
Logged
Shockwave ^ Codigos....  Error: Keyboard not attached.... Press F1 to continue.

DeXtr0

  • C= 64
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 78
  • Proud member of dAWN
    • View Profile
    • WWW
Re: RotoScope (a new demo effect?)
« Reply #10 on: November 11, 2007 »
Great code and great Idea.
I'm not sure if I have seen this before but I think I have.

However well done. Karma ++ and good luck with the competition !

Keep us informed about your position (after the votings)  :-X

Cheers,
DeX
Pages: [1]   Go Up
 

 

B l a c k R a i n V.2 by C r i p

Page created in 0.166 seconds with 19 queries.