Thursday, March 21, 2013

Data Visualization Tool

For Vinyl we will be doing a lot of audio data parsing and manipulation. This means we will be looking at large arrays of values and making changes for them. So to do this I created an array visualization tool that can take an array and visualize it along a graph. I also wanted to be able to scroll across the data, zoom in/out and mouse over a specific value. I also wanted to be able to do this for multiple arrays either on different graphs or the same graphs.
For this I first looked for tools that already did this. The main one I looked at was Excel. But i found it would have been a challenge to dynamically make the graphs based off of the data, and different graph combinations of arrays.
Another tool i found was a C# project called ZedGraph that did a nice display of an array, and it was open source. So I used that to display the graphs. With that my tool can now display one graph with N number of arrays on it. It also can display 4 graphs at the same time.

It overall works well, but I am running into one problem I will need to look into the ZedGraph code to fix. The problem is that I am trying to draw hundreds of thousands of values, and it is slow. So i need to change the code so that when you are zoomed out far enough that you are trying to draw too much data, it will only draw some of it. The dission i have is how to bring down the data. I could display every X values. so if i want to show 50 data points and have 170. i could just display every 4th point. The other way is to average the values around it.
I think I will take the every X values so that i don't end up averaging the Waveform into 0. But I will see how it works.

Tuesday, March 12, 2013

Game Graphics Assignment 9

This was a fun one. This was stuff that I had no clue how to do coming into the assignment. It was also fun because I was able to do all of it with only one change to a file parsing, everything else worked withing the parsing i already had.
I didn't run into (major) problems at any point during this. the environment map worked the first time i compiled. And for the differed rendering part It worked once i got a few small bugs out of the code.
Although I watched the video from the class closely for this assignment.

The effect I made for the special transparent was a magnifying glass. I take the tex coords and pick the back pixel closer to the center of the cube depending on how far outside from the center I am. So the outside of the cube is getting pixel from closer to the center of the cube, while the center of the cube is getting the pixel right behind it.

Everything should be working
Link To Code

picture of pix showing the opaque bucket render target/texture

Friday, March 8, 2013

Game Graphics Assignment 8

I was very lazy to work on this assignment, but got it finished. It didn't take too long.
I did enjoy doing this assignment as I had never done normal mapping before. I didn't run into any trouble with the actual normal mapping calculations.
I did have to change my material and effect system so that the effect would declare how many textures it wanted, what type each was (diffuse and normal map are my only 2 atm), and what its name is in the shader. Then the material lists how many textures it has and for each what type it is (diffuse or normal map) and the filename.
Then when rendering I have the material and loop through each texture it has and assign it by looking up that same texture type in the effect. I should probably do it the other way around, that the effect looks up the textures it needs in the material. But I only realized that later. the way it is now if the effect expects a normal map and the material doesn't have it, I have no error being thrown. It would just render without the sampler being set (or set tot the correct thing). The other way around I would be able to have the effect warn the user that it expected a texture of type X and the material did not have one.

Ok so i was having trouble with specular light being too bright. This was because i was multiplying the light intensity with the light color and the specular intensity. So the specular was getting the intensity twice. Now only the light color gets the light intensity.

Also had trouble with the letters being not quiet right from some places. The reason was that the y values were backwards. So i redid the height map and now it works correctly. This gave me trouble because the lighting was correct when i went left and right (the sides of the raised letters that were facing the light would light up). But the top and bottom were wrong.



Everything should be working.
Link to Code