• Welcome to Dark Bit Factory & Gravity.
 

Here's a lens mapping thing...

Started by Dr_D, December 11, 2006

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Dr_D

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!!!

MrP

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...

Shockwave

Really smart.
I like that. Have some Karma :)
Shockwave ^ Codigos
Challenge Trophies Won:

.:] Druid [:.

[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.

Clyde

Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.


Challenge Trophies Won:

Dr_D

Thanks guys. ;)

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

Jim

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:

Dr_D

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!!!

Ghost^BHT

QuoteBy the way, what does the karma do? Can I buy stuff with it?


Only in the afterlife.

DrewPee

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