Conversation with ssarangi123 at 05-05-2007 10:52:37 IST on gvmanu_mech302 (yahoo) sarangi: yo gvm manu: hi manu: I read your GPU stuff its really interesting manu: I had some questions sarangi: ohh really sarangi: yeah sure... but do one thing... mail the questions onto the glug list sarangi: and lets discuss it on IRC sarangi: so we can save the chat manu: ok ok I will do that sarangi: and then we can put it in FAQ's in wiki manu: Its better I will mail as many people can read manu: ok ok sarangi: yeah but mail a copy to me directly since I have set the mailing list mails as digest manu: ok surely sarangi: what happened ??? u were saying something manu: ok manu: I will ask some doubts here also and same questions will be mailed also sarangi: ok cool sarangi: go ahead manu: Is GPU processor faster than normal processor? sarangi: well yeah in some terms sarangi: if you use the gpu in proper terms manu: mean manu: In what way they differ? sarangi: well... GPU read data in the form of textures sarangi: so they have a bandwidth constraint.. sarangi: which does make it a bit difficult to handle huge data.. sarangi: however.. with whatever is there.. manu: what are these textures? sarangi: u can achieve a lot of faster processing sarangi: yeah i will tell you what textures are manu: ok sarangi: textures are basically 2 dimensional images sarangi: like suppose u have a rectangle you want to show on screen manu: ok manu: then sarangi: now if u paste an image of bricks on the rectangle it might closely imitate the look of a wall sarangi: so the image is the texture. sarangi: so a texture is a 2d array of RGBA colors manu: ok ok manu: how RGBA colurs stored in 2-d matrix? manu: There are three colours and and two d matrix sarangi: well.... say the height and width of the texture is n * m sarangi: so the size of the 2d texture is n * m * 4 sarangi: thats the size sarangi: suppose the texture size is 2 x 2 sarangi: then the structure will be sarangi: RGBA RGBA sarangi: RGBA RGBA sarangi: got it sarangi: u can even have single valued or luminance textures. sarangi: which will be simply 2 x 2 matrix manu: ok ok sarangi: understand ? sarangi: i mean understood manu: I have one more doubt sarangi: yeah shoot manu: texture is a image manu: a 2-d image manu: ok wait I will start this way manu: I have a image consider a photo of 'x' person manu: Is the whole image is divided into textures? sarangi: yeah sarangi: yeah sarangi: no.. the whole image is known as a texture manu: I mean many textures or its a single texture? manu: ok ok sarangi: its a single texture sarangi: thats the name manu: Let image be any big in size sarangi: texture is basically an image which you can paste on any polygon manu: ok ok sarangi: yeah sarangi: but for GPU's manu: and this polygon may be 2-d or 3-d? sarangi: its 2048 x 2048 sarangi: the polygon is 2d sarangi: sorry 3d sarangi: but then you can have textures pasted to the faces sarangi: you can even have 3d textures sarangi: but we won't go into that manu: ok ok manu: now I know what are textures sarangi: :) manu: texture is a very big matrix as it should store many points of the image sarangi: yups sarangi: u got the point ;) manu: and it has to store RGB colours in it sarangi: yeah manu: one more question sarangi: yeah manu: since texture has to store RGB three colours at all points. then how is it a 2-d matrix? sarangi: well the data is arranged in the form of 2d datas.. sarangi: ok.. tell me one thing.. sarangi: u must have done some c programming manu: yes manu: yes yes ofcourse sarangi: right sarangi: ok.. how are 2d arrays stored in memory sarangi: wat happened manu: no nothing manu: I think there is too much of lag manu: a memory is allocated sarangi: hmmm sarangi: yeah thats is obvious sarangi: but how.. sarangi: how is it arranged manu: a(1,1) and a(1,2) are side by side sarangi: ok.. tell me one thing.. can u represent a 3x3 array as a 1d array manu: yes sarangi: how manu: x(a,b,c) as x(a,1,*) all * elements are in line in memory and then x(a,2,*) and once again they are in line and it continues so memory is a single dimension seperated by a, b, c manu: oh! sarangi: :) sarangi: ok.. i got the point sarangi: now see... manu: I am sorry I typed something and something came sarangi: whats the problem if instead of storing one data u store 4 data in line manu: ok ok I got it manu: then its a very big array sarangi: yeah thats what i said manu: ok ok manu: So now I say size of the texture for a image of size 100*100 pixels should be manu: 100*100*3 manu: these many points have to be assigned sarangi: yeah.. depends on what kinda texture you have sarangi: u can have a lot of types.. we will go into that later manu: ok ok manu: I have some more doubts before them whats is time there? manu: I think you need to sleep sarangi: so got the concept manu: yes yes I got the texture concept sarangi: now its 2:09 sarangi: well thats ok manu: ok then sarangi: coool manu: Now my question is that we need to develop a interface program between user input and GPU input in such a way that you give some matrix to multiply and it converts them to gpu way and multiply and output is once again is converted to user output manu: am I right? sarangi: yeah the first 0.1% sarangi: :) manu: ok :) manu: then what are we doing? sarangi: am already working on the multiplication thing... sarangi: we are gonna do a lot of stuff.. sarangi: first do mathematical stuff sarangi: and then we can slowly drift towards something like blender..[Blender is an animation software] sarangi: thats coz as of now.. blender is damn slow sarangi: without GPU support manu: ok ok sarangi: but that is at a later stag sarangi: geometric modeling using GPU's sarangi: will be awesome stuff manu: yeah sarangi: like say subdivision surfaces sarangi: and then we can have interfaces sarangi: which can do fft and all that [fft stands for fast fourier transform more details: "http://en.wikipedia.org/wiki/Fast_Fourier_transform"] manu: what is subdivision surfaces? sarangi: see.. suppose u design a mesh sarangi: with 100 triangles sarangi: remember... FEM meshing [FEM-Finite Element method, In FEM meshing we divide a given region into many parts] manu: yes manu: then sarangi: so.... how if i modify the same mesh to 1000 triangles [100-1000 triangles] manu: data to be stored increases manu: dimensions of traingles decreases [Size of the triangles] sarangi: then its a subdivision surface sarangi: i can then more accurately modify the mesh sarangi: yeah.. sarangi: not dimension.. but number of triangles manu: yes sarangi: so.. that is called subdivision.. its mostly used in study of deformable bodies manu: ok sarangi: so once u deform the body the triangular mesh needs to be subdivided manu: ok sarangi: so we can do a lot of stuff.. there is enormous stuff which can be implemented on GPU's sarangi: the deal is how can the well known algorithms be implemented on a GPU manu: ok sarangi: right now... only some data structures have been implemented.. sarangi: called GLIFT manu: ok manu: what do you mean by implemenation of data structures? sarangi: like for a lot of computations you need data structures right sarangi: like sarangi: linked list, binary trees, octrees etc manu: yes we need to data structures sarangi: yeah so implementation of data structures... sarangi: so we can think of a lot of ideas manu: like sarangi: and then see which direction we are heading to manu: I will try to read something about all these sarangi: like as in ? sarangi: yeah.... sarangi: lots of matter to read up.. sarangi: haven't heard from anyone else sarangi: though abt this manu: no I am always busy in mech stuff less interested in the world of softwares manu: I havent haerd ant all these stuff sarangi: ohhh... yeah i understand.. sarangi: its like stuff mostly from graphics sarangi: and from data structures and algos manu: yeah but I always like to learn something new manu: its fun manu: what will your MS get completed? manu: *when sarangi: by this september manu: ok :) manu: ok bye need to go for lunch I haven't had my breakfast sarangi: sure.. go ahead sarangi: even am going to sleep manu: :) good night!