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

0 Members and 1 Guest are viewing this topic.

Offline va!n

  • Pentium
  • *****
  • Posts: 1432
  • Karma: 109
    • View Profile
    • http://www.secretly.de
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 »
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • 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
Challenge Trophies Won:

Offline p01

  • Atari ST
  • ***
  • Posts: 158
  • Karma: 51
    • View Profile
    • www.p01.org
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.

Offline benny!

  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4384
  • Karma: 228
  • in this place forever!
    • View Profile
    • bennyschuetz.com - mycroBlog
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.
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17407
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
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 :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline p01

  • Atari ST
  • ***
  • Posts: 158
  • Karma: 51
    • View Profile
    • www.p01.org
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 »

Offline taj

  • Bytes hurt
  • DBF Aficionado
  • ******
  • Posts: 4810
  • Karma: 189
  • 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.
Challenge Trophies Won:

Offline Stonemonkey

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

Offline va!n

  • Pentium
  • *****
  • Posts: 1432
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: RotoScope (a new demo effect?)
« Reply #8 on: October 05, 2007 »
compo is running atm at www.purebasic-lounge.de ^^
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17407
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: RotoScope (a new demo effect?)
« Reply #9 on: October 05, 2007 »
Good luck mate :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline DeXtr0

  • C= 64
  • **
  • Posts: 79
  • Karma: 4
  • Proud member of dAWN
    • View Profile
    • dAWN Creations
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