3D-Pictures
BlitzPlus Forums/BlitzPlus Programming/3D-Pictures
| ||
I´m again. I´m not a good programmer you see. But I can´t finde a way to hide a colorchannel (I hope you know what I mean, my english...). I want to crate some 3D-pictures with Blitz? Has everyone an idea? |
| ||
hm, you mean 3d as in 'just draw something in 2d that looks 3d, like raytracing'? B+ is 2d+gui eh .. for official 3d get Blitz3d or Blitzmax. Blitzmax can change rgb intensities. |
| ||
I think you mean anaglypic pictures: red/green or red/blue? The gamma commands might help: SetGamma and UpdateGamma. |
| ||
i mean th 3D pics with the red/cyan glasses you´re right. But The Gamma-Functions bring an useless result. Here an example: http://www.3d-brillen.de/3d/galerie/oliver/oo-wald.php3 |
| ||
Gamma works only in fullscreen. Else, you might need to use ReadPixel and WritePixel:Graphics 800, 600, 0, 2 SetBuffer BackBuffer() For i = 0 To 500 Color 0, 0, Rand($FFFFFF) Oval Rand(256), Rand(256), Rand(20), Rand(20) Next For y = 0 To 256 For x = 0 To 256 WritePixel x, y, ReadPixel(x, y) And $00FF00 ;use $FF0000 for red Next Next Flip WaitKey() |
| ||
I tryed some things. Now I know what I´ve to do. But its very complicated. I can use Read/writepixel-functions. Thanks. Now my problem: I have to fill the green colorchannel with write. I´ve worked on this for weeks. Bu now result. When everybody have an idea please poist it! I´m confused!!!!! |
| ||
can't you just change $00FF00 in the example above to $0000FF? If not, then please post your code so that we can figure out how you did it. |
| ||
Maybe you could readpixel what is on the screen, add the green and then write it back? -->WritePixel x, y, ReadPixel(x, y) Or $00FF00 This example combines two black&white images: |
| ||
@b32: Nice. It works. I didn´t know Lockbuffer. You´re an expert. Thank you. |