Page 1 of 1
graphic tests
Posted: Sun Jul 08, 2012 8:33 pm
by xperience2003
hi,
last days i was playing with some programming techniques
here a small demo with 4 parts, maybe someone know
which part uses which technique?! ^^
download 666kb
have fun =)
Re: graphic tests
Posted: Mon Jul 09, 2012 6:54 am
by IdeasVacuum
Looks like 3D with shaders but the movement is so nauseating I can't study it

Re: graphic tests
Posted: Mon Jul 09, 2012 1:49 pm
by xorc1zt
3d, raytrace, 2d, shader ?
Re: graphic tests
Posted: Mon Jul 09, 2012 3:47 pm
by luis
Hard to say since every thing can be done in multiple ways and you end up with the same pixels, anyway let's try

:
1) 2d textures + a shader
2) no idea (almost all white, is it supposed to look that way ?)
3) could be done in too many ways
4) parallax mapping through a shader
Re: graphic tests
Posted: Mon Jul 09, 2012 4:32 pm
by xperience2003
good
now the unbelievable truth, all parts are 2d:
-No floats
-No using of any 3d commands, also No shaders
-No higher maths, like tan, sqr and so on, just sin/cos in a table of longs ( Sin(i*(2*#PI/360))*1000 )
..also no raytracing , no voxels
-No real 3d matrix calculation
it's just simple drawing with plots
z = (y*15)+zoomvalue ;simple depth
u = (dx * cosw - dy * sinw) /z ;pos= texturecoordinates
v = (dx * sinw + dy * cosw) /z ;simple 2d rot div depth
dx and dy = drawx/2 drawy/2..center of screen
the last part adds highmap-values to simulate parallax,and draw lines
line(x, y-highmapvalue ,x, y+highmapvalue) but it's no voxel engine
Re: graphic tests
Posted: Wed Jul 11, 2012 2:55 pm
by Thorium
Great demo.
The Super Nintendo actualy had hardware support for such drawing called mode7.
Re: graphic tests
Posted: Thu Jul 12, 2012 3:36 am
by electrochrisso
Nice demo

Is this a secret code project, or can you release source code to see how its done.

Re: graphic tests
Posted: Fri Jul 13, 2012 1:35 am
by kenmo
Nice demo, I really like #3 and #4.
electrochrisso wrote:Nice demo

Is this a secret code project, or can you release source code to see how its done.

I wonder this too.
Re: graphic tests
Posted: Sat Jul 14, 2012 2:30 am
by xperience2003
for this demo i use opengl
but here a pb-drawing code of the ball-part:
give me 182kb fun
Re: graphic tests
Posted: Sat Jul 14, 2012 12:19 pm
by electrochrisso
xperience2003 wrote:for this demo i use opengl
but here a pb-drawing code of the ball-part:
give me 182kb fun
Quite amazing for the small amount of code, I am going to study this in more detail, thanks for sharing.
I am wondering why I can't run it under opengl, do I need to install it on my win7 machine, or is it my graphics chip, works fine with DirectX.