Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Pull out your 3d goggles

Author
Message
Joe Cooning
21
Years of Service
User Offline
Joined: 29th Mar 2003
Location: United States
Posted: 8th Oct 2005 22:24
Here's the some fun code to check out. You set up a 3d scene, then pull out your glasses and watch as it comes out of the screen. Still need to make it so that you can put it in a game rather than just make one still shot at a time...but it's still cool anyways.
If you don't have 3D glasses, get a red gel sheet (thin plastic sheets used for coloring lights on stages and such) and put it over your left eye, then get an aqua (blue/green) colored gel sheet and put it over your other eye. Enjoy!
(if anyone can make this into a shader or usable in a game, let us know)

tpfkat
19
Years of Service
User Offline
Joined: 1st Sep 2005
Location: lancashire/uk
Posted: 8th Oct 2005 22:38
doesnt work with the 3d shutter glasses, ill redo it with dx for them.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 8th Oct 2005 23:28
That's because shutter glasses work on a totally different theory.

Joe's effect is overlapped images, shutter glasses work on alternating frames.

tpfkat
19
Years of Service
User Offline
Joined: 1st Sep 2005
Location: lancashire/uk
Posted: 8th Oct 2005 23:33
thats what i meant by redoing it in dx
Joe Cooning
21
Years of Service
User Offline
Joined: 29th Mar 2003
Location: United States
Posted: 8th Oct 2005 23:34
The way it works is that you take two camera shots of a scene (one for each eye). you then combine the red values of one with the blue and green values of the other. The glasses will then neutralize the places matching the colors over each eye, so each eye recieves a different image (like in real life). The only reason we see depth is because we have two eyes.

tpfkat
19
Years of Service
User Offline
Joined: 1st Sep 2005
Location: lancashire/uk
Posted: 8th Oct 2005 23:51
who was that to. i know how 3d works, i just thought on the offchance it was somthing that was done in what db is famous for....direct x manipulation which is what the shutter glasses work with, thats why i said, ill redo it in dx.
i used to draw pics as a kid with red and blue and use the 3d glasses that came with comics.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 9th Oct 2005 00:20
thicko, if you're redoing it for shutter glasses, it will be simpler. You don't need to mess with the colours, just the offset of the alternating images.

How do you plan to do it? I would think just shifting the camera each frame would be enough.

Joe Cooning
21
Years of Service
User Offline
Joined: 29th Mar 2003
Location: United States
Posted: 9th Oct 2005 04:01
@thiko: That wasn't so much to you as to anyone might want to now how it works so that they could try doing it.

So how do shutter glasses work? I might be able to come up with something.

Joe Cooning
21
Years of Service
User Offline
Joined: 29th Mar 2003
Location: United States
Posted: 9th Oct 2005 05:10
I looked up shutter glasses and I think I might have something. Tell me if it works or not.

tpfkat
19
Years of Service
User Offline
Joined: 1st Sep 2005
Location: lancashire/uk
Posted: 9th Oct 2005 09:46
shutter glasses work with 2 images. they open and close ove each eye rapidly alternating so with one eye you see one image and the other eye sees the other image producing what i think is a very high quality 3d image.
they work with all direct x apps so even your basic cube spinning can be shown in 3d very easily,i use them for games but they unfotunatly dont work properly with doom3.
just make a program using 3d commands and the glasses do the rest of the work, their very good and were quite cheap too.
UnderLord
21
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 9th Oct 2005 22:39
Haha i never thought of using 3d glasses with like CSS (if it works) ima have to go find me some now anyone know where i can get some 3d glasses at?

When we talk to god, we're praying. When god talks to us, we're schizophrenic.
http://dbworlds.darkuniverse.net/
tpfkat
19
Years of Service
User Offline
Joined: 1st Sep 2005
Location: lancashire/uk
Posted: 9th Oct 2005 23:45
ebay, i got mine their and their very good, buy now, 19.99
UFOs other account lol
19
Years of Service
User Offline
Joined: 3rd Jun 2005
Location: Somewhere :)
Posted: 10th Oct 2005 01:41
YOU SPENT 20 DOLLARS ON 3D GLASSES!!! YOU ARE WEIRD!!!!

Sorry, I left the caps lock on...

Green Bunnies rule!
UnderLord
21
Years of Service
User Offline
Joined: 2nd Aug 2003
Location:
Posted: 10th Oct 2005 01:43 Edited at: 10th Oct 2005 01:44


It won't let me post just the image keeps telling me to turn my caps lock off =(

erm i mean it wouldnt let me just post the image all by its self no text....none....zero....zip.....okie....peace....

When we talk to god, we're praying. When god talks to us, we're schizophrenic.
http://dbworlds.darkuniverse.net/
Joe Cooning
21
Years of Service
User Offline
Joined: 29th Mar 2003
Location: United States
Posted: 10th Oct 2005 03:20
That's why I have the red-cyan scheme for 3d. With that, you can obtain the glasses in all sorts of way, or just make your own. Not as good quality, but still fun to see.

tpfkat
19
Years of Service
User Offline
Joined: 1st Sep 2005
Location: lancashire/uk
Posted: 10th Oct 2005 10:43
green bunny:


you can make digital shutter 3d glasses....wow..tell me how.
i thought 3d digital shutter glasses were cheap for 20
but please tell me how to make them for less.

and no i didnt spend $20...i spent £20 which is about 40 dollars.
UFOs other account lol
19
Years of Service
User Offline
Joined: 3rd Jun 2005
Location: Somewhere :)
Posted: 10th Oct 2005 16:11
I understand that they are expensive, but why would you still buy them anyway?

Green Bunnies rule!
tpfkat
19
Years of Service
User Offline
Joined: 1st Sep 2005
Location: lancashire/uk
Posted: 10th Oct 2005 17:31
you cant make lcd digital shutter glasses unless your an electronics wiz and then you have to write the drivers for them and
because they enhance games, im currently playing theif 3 and they improve the game with more depth perception, the images really appear to come out or go deep into the monitor,i was dubuios when i bought them but now i use them on all games ( some games dont work properly with them).
UFOs other account lol
19
Years of Service
User Offline
Joined: 3rd Jun 2005
Location: Somewhere :)
Posted: 10th Oct 2005 17:57
OK, whatever. It just seems strange that someone would spend that much money on 3d glasses.

tpfkat
19
Years of Service
User Offline
Joined: 1st Sep 2005
Location: lancashire/uk
Posted: 10th Oct 2005 20:02
that much? clearly youve never tried them.i got a geforce 5500,2 gig of ram and a 2800 athlon mobile,i use my machine for writing programs and playing games,most people spend at least £30 on a game that might last about 2 weeks before theyve finished with it, ive had the glasses 6 months and im still using them and they really enhance a game.
as for " ok wahtever it seems strange" no...it isnt strange , its my preference and i bet poeple including yourself have spent more on somthing that you maybe have only used once or twice.
why bother having a 3d card in the machine...becuase you want to experince better graphics,you want to see the depth, the glasses add to that experience.
UFOs other account lol
19
Years of Service
User Offline
Joined: 3rd Jun 2005
Location: Somewhere :)
Posted: 10th Oct 2005 20:48
I'm not saying it is strange, I'm just saying it seems strange.

tpfkat
19
Years of Service
User Offline
Joined: 1st Sep 2005
Location: lancashire/uk
Posted: 10th Oct 2005 21:20
why does it seem strange...???
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 19th Oct 2005 21:13
Could it work in real time if you use the set camera to image command?

[url]andrewneale2004@yahoo.com[/url]
http://www.elbsoftware.dbspot.com
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 19th Oct 2005 21:31
Nice

I did this, well a long time ago (2003 I think it was). Just used some camera rendering to sprites which had selective colour channels

http://forum.thegamecreators.com/?m=forum_view&t=14979&b=6

"A book. If u know something why cant u make a kool game or prog.
come on now. A book. I hate books. book is stupid. I know that I need codes but I dont know the codes"
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 13th Nov 2005 23:52
I remember playing Descent using the 'cross eyed' technique - fantastic!

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 16th Nov 2005 15:16
Descent mmm spent hours on that game and version II.
might have to get me a pair of these 3d glasses...

If no-one gives your an answer to a question you have asked, consider:- Is your question clear.- Did you ask nicely.- Are you showing any effort to solve the problem yourself 

Login to post a reply

Server time is: 2024-11-23 11:33:25
Your offset time is: 2024-11-23 11:33:25