Author Topic: Here's a lens mapping thing...  (Read 4617 times)

0 Members and 1 Guest are viewing this topic.

Offline Dr_D

  • Atari ST
  • ***
  • Posts: 151
  • Karma: 29
    • View Profile
Here's a lens mapping thing...
« on: December 11, 2006 »
It's more of a tutorial than anything. It was a little less detailed before, but I decided to add a couple more effects to it. The code is pretty well commented, so if anyone wants easy lens mapping, here it is. ;)
The Dr. is INsane!!!

Offline MrP

  • Atari ST
  • ***
  • Posts: 176
  • Karma: 18
    • View Profile
Re: Here's a lens mapping thing...
« Reply #1 on: December 11, 2006 »
Sweet. I was thinking of using something like this in my upcoming prod.... Now it looks like like I have the perfect learning material..... Nice One...

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17409
  • Karma: 498
  • evil/good
    • View Profile
    • My Homepage
Re: Here's a lens mapping thing...
« Reply #2 on: December 11, 2006 »
Really smart.
I like that. Have some Karma :)
Shockwave ^ Codigos
Challenge Trophies Won:

Offline .:] Druid [:.

  • freebasic n00b
  • Pentium
  • *****
  • Posts: 563
  • Karma: 47
    • View Profile
    • Intro-Inferno
Re: Here's a lens mapping thing...
« Reply #3 on: December 11, 2006 »
Very nice!  Karmaaaaa! :)
[sheep]: im sure he wants to goto prison.. they didnt get him last time.. he was promised a big cock up his arse.. and no doubt looking forward to it.. lets hope he gets his wish this year.

Offline Clyde

  • A Little Fuzzy Wuzzy
  • DBF Aficionado
  • ******
  • Posts: 7271
  • Karma: 71
    • View Profile
Re: Here's a lens mapping thing...
« Reply #4 on: December 12, 2006 »
Cool Dr D. :D
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.

Challenge Trophies Won:

Offline Dr_D

  • Atari ST
  • ***
  • Posts: 151
  • Karma: 29
    • View Profile
Re: Here's a lens mapping thing...
« Reply #5 on: December 12, 2006 »
Thanks guys. ;)

By the way, what does the karma do? Can I buy stuff with it?  :clap:
The Dr. is INsane!!!

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: Here's a lens mapping thing...
« Reply #6 on: December 12, 2006 »
http://dbfinteractive.com/index.php?topic=986.0

Thanks for posting the source code, karma  :P.  Had you thought about pre-computing the effect?  Basically for each pixel in the square containing the lens, you could store an x,y offset which tells you where to get the pixel from.

Jim
Challenge Trophies Won:

Offline Dr_D

  • Atari ST
  • ***
  • Posts: 151
  • Karma: 29
    • View Profile
Re: Here's a lens mapping thing...
« Reply #7 on: December 12, 2006 »
Yeah, it would surely be faster using an array to store pre-computed coords, but I was afraid it wouldn't be as easy to understand.
The Dr. is INsane!!!

Offline Ghost^BHT

  • Clueless and Happy
  • ^GVY
  • Pentium
  • ******
  • Posts: 931
  • Karma: 49
  • BYTE ME!
    • View Profile
Re: Here's a lens mapping thing...
« Reply #8 on: December 14, 2006 »
Quote
By the way, what does the karma do? Can I buy stuff with it?


Only in the afterlife.

Offline DrewPee

  • I Toast Therefore I am
  • Pentium
  • *****
  • Posts: 563
  • Karma: 25
  • Eat Cheese - It's good for you!
    • View Profile
    • Retro Computer Museum
Re: Here's a lens mapping thing...
« Reply #9 on: December 14, 2006 »
Nice piece of work!

Drew
DrewPee
aka Falcon of The Lost Boyz (Amiga)
Ex-Amiga Coder and Graphic Designer
Administrator of > www.retrocomputermuseum.co.uk