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.

DarkBASIC Professional Discussion / Anaglyph stereo in DBpro

Author
Message
Tomas
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location:
Posted: 19th Oct 2002 13:43
I have DarkBASIC basic version. Is there a way to make anaglyph stereo pair rendering (left and right eye camera views overlayed) in DBpro? I know that for example NVIDIA Detonator display drivers enable the use of anaglyph stereo via properties but my need is special. I would need to be able to program the effect to utilize so called "relaxed eye" method which means that the stereo image pair is very far away from each other. That is not possible with the Detonator setup. And the thing should happen in realtime.

To explain more: instead of rendering one camera view we should render two, one which is to the left of the actual viewing position and the other that is to the right of the position. Good values can be found by testing and adjusting. Also the "target point" of the camera might have to be adjusted = the cameras should be able to turn around the vertical axis. Then the other image should be toned to pure red and the other to pure cyan. And then the toned left and right images are multiplied together with adjusted horizontal distance inbetween to one single image that is the "relaxed eye anaglyph stereo image".

That could be coded for sure by several languages but for me it would make more sense if it was done in DB for now. Anyone interested in solving that? For a small nominal fee?

best regards, Tomas -> twesterh@welho.com
Mirthin
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Land of the Rising Haggis
Posted: 19th Oct 2002 16:31
You're after a 3d image. If I'm not mistaken. BBPro does multiple camera angles but if you want two images placed side by side you'd have to figure it out mathematically. In reference to the camera position, you'd have to copy your media and make the two move in the same way as each other. It's tricky.
Milamber
21
Years of Service
User Offline
Joined: 27th Sep 2002
Location: Australia
Posted: 19th Oct 2002 17:18
Position the camera to the left of it's current pos, then save the screen as an image or bitmap. Try copy bitmap, as the screen is bitmap 0. Then position the camera to the right of it's initial position, and repeat the process. Cycle through all the pixels, and return only the red or cyan part of the colour (VERY slow on DBv1). Then paste both images to sprites, ghost one, and put them both over the screen. Next frame, hide the sprites, and repeat the process. Will be VERY slow on original DB, so it's probably better to make a DLL to do it for you, or at least the mucking around with colour.

System Specs: AMD Athlon 1700+ XP, GA-7VRX motherboard, 128MB DDR RAM, GeForce2 MX400 64MB VRAM
Tomas
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location:
Posted: 19th Oct 2002 23:36
Milamber, I belive you are right. It might be interesting to try DB solution and then later try to develop a routine for the critical part. I have to take that time.

Or do you feel for trying the DB solution, if so you should tell me what would you like to charge for such a task and I should see if I think it´s worth of that.

Thank you for the encouraging reply and good instructions! And thank you Mirthin too.

Tomas

rapscaLLion
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Canada
Posted: 20th Oct 2002 00:27
Huh... By Anaglyphic, do you mean the funky color 3D images, or the stereo pair images with no color changes?

It's pretty easy, all you do is set up two cameras (this is harder in DB Classic, but still do-able.) You position the cameras how they should be for a stereo pair, and simply render like that. So simple

I would STRONGLY suggest using DBP for that though, because of multiple cameras and such. If you can't, get someone with DBP to program it for you. I would, but I am for too busy with my two projects and school, and work!

Alex Wanuch
aka rapscaLLion
Get the DB Weekly Newsletter at www.dbwn.cjb.net
Tomas
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location:
Posted: 20th Oct 2002 14:16
Yes, I mean the duotone (red-cyan) coded image that will be split to left and right eye by red-cyan glasses.

If DB should be the platform I would for sure update to pro.

A frien of mine was interested in the idea of using a .dll for the critical parts but he dosen´t know the DB and was wondering how to make the codes (DBpro + .dll) work together. There must be deeper information on that somewhere in DB documents?

-Tomas

Login to post a reply

Server time is: 2024-04-26 12:12:15
Your offset time is: 2024-04-26 12:12:15