Author Topic: [IMAGE PROCESSING] Pixel 3D  (Read 8467 times)

0 Members and 1 Guest are viewing this topic.

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
[IMAGE PROCESSING] Pixel 3D
« on: July 30, 2011 »
Pixel 3D - Raizor's entry for the DBF Image Processing Challenge (July 2011)
----------------------------------------------------------------------------

Blurb:
------

This was thrown together in a few hours on a Saturday afternoon and it probably shows ;)

You need the .Net framework v4 installed to run this demo(?)

I've used C# and the OpenTK OpenGL Toolkit to put this together. I thought it would be
quicker to use this and knock it up in C# rather than faffing around with image loading
in C++.

This proggy uses two images (a base image and a heightmap) to generate 3D data representing
the image. The heightmap is used to control the Z value of the pixel cubes. You can use the
same image for both the base image and the heightmap. The heightmap pixels are averaged (RGB)
to give a height/depth that is applied to the corresponding pixel in the base image.

Controls:
---------
* Drag the mouse around to move the 3D pixels.
* Use the mousewheel to zoom in/out.
* Load a preset image from the "presets" menu or load you own using the "Load Image" and "Load Heightmap Image" options in the file menu.
* If using your own images, you need to ensure they are the same dimensions and click "Process Loaded Images" (in the file menu) to get them on the screen.

Notes:
------

Images under 100x100 pixels will wok best, anything bigger than that will probably cause quite a bit of slow-down.

Performance is a bit shabby. This is probably a combination of C# and bad code. I started plugging in vertex array rendering functionality but ran out of time. This would probably work pretty well if converted to use shaders too. Maybe something for the future. I also toyed with the idea of adding some kind of music sync to control the 3D effect, so I may make a demo based on this idea in future.

Anyone, hope you get a minute of two of fun out of this, sorry it's a bit shabby.

Thanks for reading/looking,

Raizor

p.s. I've attached the source code to this post too. It's a bit messy, but might be useful to someone...

p.p.s. I was determined not to enter this compo as I've got to go into hospital on Monday for surgery to have a section of my guts removed :P Still, it's been nice and relaxing to work on this and probably good for me :)


« Last Edit: July 31, 2011 by Raizor »
raizor

Challenge Trophies Won:

Offline Pixel_Outlaw

  • Pentium
  • *****
  • Posts: 1382
  • Karma: 83
    • View Profile
Re: [IMAGE PROCESSING] Pixel 3D
« Reply #1 on: July 30, 2011 »

A very nice effect!
Seemed to run well on my computer.  ;D
Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17376
  • Karma: 497
  • evil/good
    • View Profile
    • My Homepage
Re: [IMAGE PROCESSING] Pixel 3D
« Reply #2 on: July 30, 2011 »
This is fun to play with Raizor :)

Thanks for supporting the challenge, I hope that your operation goes well for you.. It must be pretty scary having to face that.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
Re: [IMAGE PROCESSING] Pixel 3D
« Reply #3 on: July 30, 2011 »

A very nice effect!
Seemed to run well on my computer.  ;D

Cool, I thought it might be a bit slow :)

This is fun to play with Raizor :)

Thanks for supporting the challenge, I hope that your operation goes well for you.. It must be pretty scary having to face that.

Thanks Shockie. Better out than in, as they say ;)

I'm probably not going to be around for the voting, shall I abstain or PM you some choices?
raizor

Challenge Trophies Won:

Offline Shockwave

  • good/evil
  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 17376
  • Karma: 497
  • evil/good
    • View Profile
    • My Homepage
Re: [IMAGE PROCESSING] Pixel 3D
« Reply #4 on: July 30, 2011 »
If you PM me your votes I'll hijack a spammer account and submit them for you mate.
Shockwave ^ Codigos
Challenge Trophies Won:

Offline ferris

  • Pentium
  • *****
  • Posts: 841
  • Karma: 84
    • View Profile
    • Youth Uprising Home
Re: [IMAGE PROCESSING] Pixel 3D
« Reply #5 on: July 30, 2011 »
Hahaha this rules!! Props also for making something nice in C# :) . Fun to play with (love how the emo girl's cheekbones jut out, hilarious!). Well done!
http://iamferris.com/
http://youth-uprising.com/

Where the fun's at.
Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2717
  • Karma: 484
    • View Profile
    • http://www.rbraz.com/
Re: [IMAGE PROCESSING] Pixel 3D
« Reply #6 on: July 30, 2011 »
Cubes are always nice!

I would have tried that myself if I didn't have used it on Toy Destroy :)
Challenge Trophies Won:

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1199
  • Karma: 229
    • View Profile
    • Homepage
Re: [IMAGE PROCESSING] Pixel 3D
« Reply #7 on: July 30, 2011 »
Very cool effect! Love how the puppy and emo girl came out.  :)
Good luck on the operation, hope all goes well.
www.kirl.nl
Challenge Trophies Won:

Offline padman

  • Senior Member
  • Pentium
  • ********
  • Posts: 977
  • Karma: 258
    • View Profile
Re: [IMAGE PROCESSING] Pixel 3D
« Reply #8 on: July 30, 2011 »
Yep, this is also a very nice entry! Wish you good luck with the compo, the surgery and have some Karma for a speedy recovery!  :)
Challenge Trophies Won:

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
Re: [IMAGE PROCESSING] Pixel 3D
« Reply #9 on: July 31, 2011 »
If you PM me your votes I'll hijack a spammer account and submit them for you mate.

Cool, thanks matey :)

Yep, this is also a very nice entry! Wish you good luck with the compo, the surgery and have some Karma for a speedy recovery!  :)

Thank you Padman :)
« Last Edit: July 31, 2011 by Raizor »
raizor

Challenge Trophies Won:

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
Re: [IMAGE PROCESSING] Pixel 3D
« Reply #10 on: July 31, 2011 »
Hahaha this rules!! Props also for making something nice in C# :) . Fun to play with (love how the emo girl's cheekbones jut out, hilarious!). Well done!

Thanks Ferris :)

Very cool effect! Love how the puppy and emo girl came out.  :)
Good luck on the operation, hope all goes well.

Cheers Kirl

Cubes are always nice!

I would have tried that myself if I didn't have used it on Toy Destroy :)

rbz :)
raizor

Challenge Trophies Won:

Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: [IMAGE PROCESSING] Pixel 3D
« Reply #11 on: July 31, 2011 »
Neat effect. Good luck on the operation. Get well soon.

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1150
  • Karma: 174
    • View Profile
    • Raizor's Dev Blog
Re: [IMAGE PROCESSING] Pixel 3D
« Reply #12 on: July 31, 2011 »
Thanks zawran
raizor

Challenge Trophies Won:

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: [IMAGE PROCESSING] Pixel 3D
« Reply #13 on: August 01, 2011 »
Brilliant effect - the images seem to jump out at you :o
You are our 9001st visitor.
Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: [IMAGE PROCESSING] Pixel 3D
« Reply #14 on: August 01, 2011 »
Thats amazing Raizor, absolutely genius!

Challenge Trophies Won:

Offline SERGIO_ManOwaR_

  • C= 64
  • **
  • Posts: 48
  • Karma: 8
    • View Profile
Re: [IMAGE PROCESSING] Pixel 3D
« Reply #15 on: August 02, 2011 »
Cool effect. I apreciate the difficult of creating a 3D map based on a 2D picture. By taking a look at it, can see the way to create it is based on the bright deep with makes the brightest pixels stay near and the darkest been far away. This creates a 3D Image that has nothing to do with the reality and sometimes look a little scary watchin  it on people's pictures. Anyway its a cool effect, and a good idea to create something from nothing. I have tried it on some of my pictures and like to see the effects. Good work