Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Real 3D (IMAX like) get pixelinformation from view #175836
01/02/08 10:24
01/02/08 10:24
Joined: Sep 2007
Posts: 48
Deutschland
H
HoopyDerFrood Offline OP
Newbie
HoopyDerFrood  Offline OP
Newbie
H

Joined: Sep 2007
Posts: 48
Deutschland
Hi, I made some experiments creating real 3D pictures, watchable with red/cyan glasses, with the A7. And more ore less I succeeded. The problem is once again the framerate. For creating a stereoscopic so called anaglyphic image I use pictures from two differnt views with a small offset between them. From each pixel of the views I take the colour information and calculate the colour of the pixel in the 3D view. Creating the picture pixel by pixel with "pixel_to_bmap" is not fast but this is not the problem. The problem is bring the two views in a format I can read from with "pixel_for_bmap" and "pixel_to_vec". First I displayd them on screen made a screenshot and read from this. This was really dumb and very slow. Now I render them both to one texture an read from this. The Problem is I have to do "bmap_to_format" first. And this is so slow I get only 2fps creating a 400x300 3D image. Converting the 800x300 texture containing the two views takes most of the time. Is there a faster way to get the colour of pixels in a view?

Here a 3D picture created with the A7 if someone is interested to try itself. Use glasses with a red colour filter in front of the left eye and a cyan colour filter in front of the right one to watch it.


Last edited by HoopyDerFrood; 01/02/08 10:29.
Re: Real 3D (IMAX like) get pixelinformation from [Re: HoopyDerFrood] #175837
01/02/08 10:43
01/02/08 10:43
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
maybe you should use a postprocessing shader for this. i dont have sucha 3d-glass otherwise i'd already have tried it

Re: Real 3D (IMAX like) get pixelinformation from [Re: ello] #175838
01/02/08 11:09
01/02/08 11:09
Joined: Sep 2007
Posts: 48
Deutschland
H
HoopyDerFrood Offline OP
Newbie
HoopyDerFrood  Offline OP
Newbie
H

Joined: Sep 2007
Posts: 48
Deutschland
I thought about a postprocessing shader, too. Unfortunately I'm not familiar with shader programming.

So if someone is interested in accepting this challenge please contact me. I for myself do this experiments not for one of my own Projects. Just to ceck what is possible with the A7 and provide this knowledge to the community. I'd glad if someone wants to join my research.

I made my glasses myself. All you need are two colour filter gels which cost about $1 each.

Re: Real 3D (IMAX like) get pixelinformation from [Re: HoopyDerFrood] #175839
01/02/08 11:50
01/02/08 11:50
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
Quote:


I made my glasses myself. All you need are two colour filter gels which cost about $1 each.




aint that problematic because you need somewhat normed colors to get it working? or else i could think of creating a panel where you can adjust the colors for the stereo image.

Re: Real 3D (IMAX like) get pixelinformation from [Re: ello] #175840
01/02/08 12:05
01/02/08 12:05
Joined: Sep 2007
Posts: 48
Deutschland
H
HoopyDerFrood Offline OP
Newbie
HoopyDerFrood  Offline OP
Newbie
H

Joined: Sep 2007
Posts: 48
Deutschland
You need more or less normed colours, but they are easy to get. Just primary red (RGB: 255,0,0) and a Cyan (RGB: 0,255,255). Everywhere you get filter gels you also get some in these colours. And they don't have to fit absolute perfectly. Your brain is used to see 3D, if it gets information that looks like a stereoskopic view it creates a steroskopic view. And anyhow these cheap filters are not physical perfect. But they are absolut sufficient.

And its not good to change the algorithm becaue with these colours you can create coloured steoroscopic images (all colours exept red).

Re: Real 3D (IMAX like) get pixelinformation from [Re: HoopyDerFrood] #175841
01/08/08 03:12
01/08/08 03:12
Joined: Oct 2006
Posts: 175
G
Gumby22don Offline
Member
Gumby22don  Offline
Member
G

Joined: Oct 2006
Posts: 175
Couldn't you create two VIEWPORTS on top of each other with a 50% transparency and a sum on the top one?

Don
have a great day

Re: Real 3D (IMAX like) get pixelinformation from [Re: Gumby22don] #175842
01/08/08 19:54
01/08/08 19:54
Joined: Sep 2007
Posts: 48
Deutschland
H
HoopyDerFrood Offline OP
Newbie
HoopyDerFrood  Offline OP
Newbie
H

Joined: Sep 2007
Posts: 48
Deutschland
I've tryed this way first. But for good results you have do use this algorithm for each Pixel.

pixel = pixel_for_vec(vector(PixelColour2[0],PixelColour[1],0.7*PixelColour[1]+0.3*PixelColour[0]),50,format);

PixelColour1[0] = blue value first view
PixelColour1[1] = green value first view
PixelColour2[0] = blue value second view
PixelColour2[1] = green value second view

I tryed views with coloured objects in front of the camera, too. But I never get the same results like "filtering" the colour information with this formula.

For each pixel you have to take the blue and green value from one view and calculate the red value from the blue and green value of the other view. And so you get an partly colourd anaglyphic picture containing all colours except red.

Re: Real 3D (IMAX like) get pixelinformation from [Re: HoopyDerFrood] #175843
02/21/08 23:06
02/21/08 23:06
Joined: Sep 2007
Posts: 48
Deutschland
H
HoopyDerFrood Offline OP
Newbie
HoopyDerFrood  Offline OP
Newbie
H

Joined: Sep 2007
Posts: 48
Deutschland
Good news everyone!

Slin wrote a shader which is so simple, even I can understand. And it's so fast and effective that the small testlevel I created runs with full framerate at XGA resolution using this shader.

I try to write a tutorial about using it in the next time. And maybe I try to translate it into english, too.



Last edited by HoopyDerFrood; 02/21/08 23:10.
Re: Real 3D (IMAX like) get pixelinformation from [Re: HoopyDerFrood] #175844
02/27/08 20:29
02/27/08 20:29
Joined: May 2003
Posts: 567
Spain, Canary Islands
Felixsg Offline
User
Felixsg  Offline
User

Joined: May 2003
Posts: 567
Spain, Canary Islands
You goes to publish the code?
or a demo with the source of that shader
working?

Re: Real 3D (IMAX like) get pixelinformation from [Re: Felixsg] #175845
03/12/08 10:22
03/12/08 10:22
Joined: Sep 2007
Posts: 48
Deutschland
H
HoopyDerFrood Offline OP
Newbie
HoopyDerFrood  Offline OP
Newbie
H

Joined: Sep 2007
Posts: 48
Deutschland
Yes, I want to publish everythig as soon as possible. But it may take some weeks before I can find the time.
If you need the code immediately, send me an email or contact me via ICQ.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1