Thursday, March 24, 2011

Progress2

I am still trying to get a texture in. For some reason it is just not working. If I knew the reason I could make it work.
Anyways. 
At least now I can have fun loading bunnies, dinosaurs, cubes and spheres. 
As for how I am dealing with textures now:
The OBJ loader is supposedly loading the texture. And does the whole generating, binding, "parametering" and glTexImage2D. So it should be straight forward for me, right? Just send it to the first shader. Well, no.
I have Texcoords ready to be used and I am also sending them to the shader so I can get the correct color from the texture. 
Sigh.

I guess I can just jump to plans for the week:
- Keep working on the texture. I refuse to give up.
- Get lights going. 

Wednesday, March 16, 2011

Progress

I am updating my blog today because I will be leaving for Seattle tomorrow after my first class, so no time.


I have the obj loader in and working. The cubes and bunnies look like cubes and bunnies and I can read in color and shininess from mtl files.


Specular is also working:
I think. My formula for it might be wrong since I have changed it so much to test things that it is very very likely to not resemble at all any specularity formula.


I am trying now to get a texture in but it keeps breaking when I load it into a vbo. And coming to think of it, I am loading it to a vbo because that is what I did with the material, and the vertices, and so on. I don't know if the size is too large or I am giving it a wrong pointer to the texture. My loader gave me a bit of a fight before it finally gave in a loaded the texture in the first place.


Plan for next week:
- Get texture in
- Make lights ( I would like any ideas/suggestions/opinions on this matter since I am not sure yet how I can use lights in the shader (as in, getting them into the shader to use), where is were I am assuming the computations are made).

Thursday, March 3, 2011

Getting the OBJ Loader Back In

I have good and bad news.
The good news are that I am rendering something, loaded using the obj loader. 
The bad news is that it is not what it is supposed to be.


Here is a cube:
And here is the same cube from a different perspective:
Now, if that weren't supposed to be a cube, it would be regarded as "cool!"

Then I tried with a quad and I rendered only the points:
So, as you can see, it has 3 points correctly positioned and one (very faint in the diagonal) that is not where it is supposed to. I checked the files and loading the obj and everything looks fine. I will keep working on this until my class.

Edit:

I have a cube but the normals are wrong. So, I think this is a bad case of normal-vertex indexing.


Plan for the week after spring break
- Try to get the obj in in order to use a simpler base geometry to test my code on. If this is taking me too long,  I'll just continue using the "street" scene.
- Work on specular
- If things go smoothly I'll do more things, but I somehow doubt it.


Friday, February 25, 2011

Alpha Review

Oops, with alpha review being today I didn't update the blog last night. Oh well.
So I have some progress. I discovered the depth, normal and position buffers, so I worked on the diffuse and specular. I ran into weird problems (I still do at times) with my diffuse being pink even if I didn't set any color. Then it became gray and I was happy and managed to change it to red through the shader (which I wasn't being able to do before for some strange reason) and when I took the color out it was pink again... So, I think I like it red.



I made a video for the review, that I am uploading to you tube later I think.



My plans for the future are to get the OBJ loader in again (I had to ignore it for a while because I need to set up some VBOs and VAOs for the mesh and I felt the buffers were more important), work on the specular and get some lights in.
After that I will try to have my diffuse be a texture and then decide on the extension. I was thinking reflectance fields or light volumes, but I am open to suggestions (please?).

Wednesday, February 16, 2011

The shortest week/post

I have no pictures to show. Mainly because there is no visible progress.
I have been trying to get the buffers in but I guess there is a lot I need to learn about shaders and GLSL.
Plus I have been sick which totally ate my week from Thursday to Monday...

I found today shaders for deferred shading that come as part of the orange book examples so I guess I could use those. Unless, of course, it is wrong.

And I went from having a black screen to having a gray screen back to having a black screen. I am going to go ahead and pretend that is some progress.
Hopefully I get better soon and can actually work more on this.

So plan for next week is the same as the plan for this week:
-Get the buffers in (somehow)

Thursday, February 10, 2011

Another week

On this week's issue we have triangles, in different shapes and colors. We also have a teapot.

I played with the GLSL examples, the triangle one, and changed its color:


Made it smaller:

Since one wasn't enough, I made 2 of them:




 And that was it with the samples.

I then looked into a frame buffer tutorial, made it a project, went step by step and I got a rotating teapot:

And I also read some more. I am re-reading some of my resources since I am closer now to actually doing something that directly has to do with deferred shading.
The end.

I am now in the process of adding the frame buffer to my project. I had it as a Windows Application, hence the GUI, but I think I am changing it to a console application (bye bye GUI). We'll see how that goes. (Opinions, anyone?)

And that is that.

Plan for next week:
- get the frame buffer in, at least depth pass

Thursday, February 3, 2011

Some Progress


This past week I have been focused on catching up on GPU concepts and getting the OBJ loader in.

OBJ Loader stories:
I decided to use glm as the loader. But I figured a GUI would be helpful. So, I mixed glm and GLObjViewer and got glmObjViewer, or something. I am basically using the UI from GLObjViewer (since it has the window and the menu nicely in place) and glm as the actual loader. So, I have a bunny!



Joe just told me something to get the models exported from maya as obj to have reasonable .mtl files. I should have a Cornell Box with a sphere and/or cube inside soon enough.
So this part is sort of done, except that now I have to merge this with another project that will help me get up to speed with GPU programming.

Reading stories:
These are boring. I have read. I went through a simple tutorial on GPU concepts, read 2 more things about deferred shading again (to refresh my mind) and I am now in the middle of reading 2 tutorials about framebuffers.

Plan for the week:
-       Merge the 2 projects and play with them (or it, since I am merging them…).
-       Finish reading about framebuffers and start implementing.
-       Anything else that comes up and demands my urgent attention.