• Welcome to Dark Bit Factory & Gravity.
 

[IMAGE PROCESSING] Pixel 3D

Started by Raizor, July 30, 2011

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Raizor

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 :)


raizor

Challenge Trophies Won:

Pixel_Outlaw


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

Shockwave

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:

Raizor

Quote from: Pixel_Outlaw 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 :)

Quote from: Shockwave 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.

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:

Shockwave

If you PM me your votes I'll hijack a spammer account and submit them for you mate.
Shockwave ^ Codigos
Challenge Trophies Won:

ferris

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:

Rbz

Cubes are always nice!

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

Kirl

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:

padman

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:

Raizor

#9
Quote from: Shockwave on July 30, 2011
If you PM me your votes I'll hijack a spammer account and submit them for you mate.

Cool, thanks matey :)

Quote from: padman 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!  :)

Thank you Padman :)
raizor

Challenge Trophies Won:

Raizor

Quote from: Ferris 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!

Thanks Ferris :)

Quote from: Kirl 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.

Cheers Kirl

Quote from: rbz on July 30, 2011
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:

zawran

Neat effect. Good luck on the operation. Get well soon.

Raizor

raizor

Challenge Trophies Won:

combatking0

Brilliant effect - the images seem to jump out at you :o
You are our 9001st visitor.
Challenge Trophies Won:

rain_storm

Thats amazing Raizor, absolutely genius!

Challenge Trophies Won:

SERGIO_ManOwaR_

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