It is currently Sun May 19, 2013 6:48 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: graphic tests
PostPosted: Sun Jul 08, 2012 8:33 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue Oct 05, 2004 9:05 pm
Posts: 100
Location: Egypt
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?! ^^

Image

download 666kb

have fun =)

_________________
Kultstudio


Top
 Profile  
 
 Post subject: Re: graphic tests
PostPosted: Mon Jul 09, 2012 6:54 am 
Offline
Addict
Addict

Joined: Fri Oct 23, 2009 2:33 am
Posts: 2852
Location: Wales, UK
Looks like 3D with shaders but the movement is so nauseating I can't study it :|

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
 
 Post subject: Re: graphic tests
PostPosted: Mon Jul 09, 2012 1:49 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Jul 09, 2011 7:57 am
Posts: 276
3d, raytrace, 2d, shader ?

_________________
http://www.mediafire.com/pbstuff


Top
 Profile  
 
 Post subject: Re: graphic tests
PostPosted: Mon Jul 09, 2012 3:47 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Aug 31, 2005 11:09 pm
Posts: 2238
Location: Italy
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

_________________
[ Home ] [ My PC ] [ New to PB ? ]


Top
 Profile  
 
 Post subject: Re: graphic tests
PostPosted: Mon Jul 09, 2012 4:32 pm 
Offline
Enthusiast
Enthusiast

Joined: Tue Oct 05, 2004 9:05 pm
Posts: 100
Location: Egypt
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

_________________
Kultstudio


Top
 Profile  
 
 Post subject: Re: graphic tests
PostPosted: Wed Jul 11, 2012 2:55 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Aug 15, 2009 6:59 pm
Posts: 1024
Great demo.
The Super Nintendo actualy had hardware support for such drawing called mode7.


Top
 Profile  
 
 Post subject: Re: graphic tests
PostPosted: Thu Jul 12, 2012 3:36 am 
Offline
Enthusiast
Enthusiast

Joined: Mon May 14, 2007 2:13 am
Posts: 731
Location: Darling River
Nice demo :)
Is this a secret code project, or can you release source code to see how its done. :?:

_________________
PureBasic Rocks! Even More! And More!
PureBasic 5, Now We're Really Rockin!


Top
 Profile  
 
 Post subject: Re: graphic tests
PostPosted: Fri Jul 13, 2012 1:35 am 
Offline
Addict
Addict
User avatar

Joined: Tue Dec 23, 2003 3:54 am
Posts: 932
Location: New York
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.


Top
 Profile  
 
 Post subject: Re: graphic tests
PostPosted: Sat Jul 14, 2012 2:30 am 
Offline
Enthusiast
Enthusiast

Joined: Tue Oct 05, 2004 9:05 pm
Posts: 100
Location: Egypt
for this demo i use opengl
but here a pb-drawing code of the ball-part:

give me 182kb fun

_________________
Kultstudio


Top
 Profile  
 
 Post subject: Re: graphic tests
PostPosted: Sat Jul 14, 2012 12:19 pm 
Offline
Enthusiast
Enthusiast

Joined: Mon May 14, 2007 2:13 am
Posts: 731
Location: Darling River
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.

_________________
PureBasic Rocks! Even More! And More!
PureBasic 5, Now We're Really Rockin!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: mrv2k and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye