Thursday, March 21, 2013

Graphics Write-Up #9

This was a pretty interesting assignment on both sections.  The environment map was much easier of the two, especially since pretty much everything to get it working was done inside of the fragment shader.  In the first picture below you can see it clearly reflected in both the spheres on the sides as well as the floor.  I also went and changed my specular lighting to use the correct view position, using the camera's actual position instead of taking it out of the 4x4 matrix.  It was really cool to see this working in the scene.  I imagine that in the case of an outdoor scene, the environment map would be mirroring the sky-box.

Getting the render target working was more challenging.  It's also one of the cooler things we've done so far visually.  I ran into a few issues that were mostly related to my previous code structure as opposed to the current assignment, but once I'd fixed those, everything worked pretty smoothly.  Most of the troubles with this section was just making sure to put all the calls and change the render target in the correct locations.  Oh, one issue I had was trying to get both of the above to work with normal mapping in addition.  It might be working now that I've fixed a few other issues I ran into, but initially it wasn't working for some reason.  I'm going to look into that more once I have time since it shouldn't be messing up.

Here's what it looks like:


Here's PIX:


Link to code:  http://www.eng.utah.edu/~jthummel/graphics/ThummelGraphicsAssignment9.zip

Thursday, March 7, 2013

Two Week Pre-Spring Break Update

Things have been crazy lately what with the Industry Panel, Game Engineering, Game Graphics, AND Ubisoft on top of it all.  Not a good excuse for forgetting to blog, but there it is.

Last week was the panel and the gate decision.  The panel was fascinating.  It was so awesome to hear what people in the industry thought about our games, I learned so much from just listening to them.  I expected a lot of the feedback they gave such as scope issues for Co-Signers or the fact that Rover Rescue isn't an RTS, but there was also a lot of really amazing feedback for each game I'd never even thought of.

Vinyl was incredibly well received, but we also got a lot of great feedback on what we could improve.  Some key points were:

Making the song sound bad when doing poorly is really unique, definitely stick with this.
This game screams for mobile.
Use a controller, not the keyboard.
The speed indicator wasn't easy to see.

One of the best comments we got afterwards during a small play test session was the idea of adding another power up to be able to clear out all the static on screen.  This way if there's a section that's far too hard you'll be okay.  Mostly we just need to get better spawning off of the music.

There was no class on Tuesday, and then on Thursday all we did was learn which games continued on, Vinyl and Co-Signers.

This Tuesday we finalized groups and Vinyl now has 11 people on it.  Today we talked about what engine we want to use, what mechanics we want, our art style, pretty much everything.  It was a good two hours of team discussion and we really solidified our goals of what's going to happen.  On top of that we also checked out AudioSurf as a group to see what it's like.

Unfortunately, we're not positive on what engine we're going to use since Crytek seems to not be an option if we want to publish.  We're also looking at OGRE, but Unity is getting negative comments.  I really don't care which engine we end up using though.

Over Spring Break next week I'm going to look into pulling data out of an mp3 and also playing a bunch of other music games.

Here's a link to the video of our prototype we showed: http://youtu.be/icjEKQDvM-8

Wednesday, March 6, 2013

Graphics Write-Up #8

This weeks assignment was one of the easiest we've had in a while, which was nice.  Changing the Maya exporter was just a matter of seeing how the normals were done and then doing the same thing for the tangents and bitangents.  Of course, changing that meant the MeshBuilder had to change, but that was a simple fix to how the data was read in, after that all the binary code didn't need any modifications since it's all just more vertex data.

Writing the new shaders also wasn't bad since it was just reading in the new values and modifying the normal based off of them.  The most time intensive part of this assignment was simply making all the new files and loading them into the Lua file so that they're copied.

This was easily the most visually impressive task we've done yet, the normal mapping looks really awesome.

Here's what it looks like with normal mapping!  The left cube is with specular lighting, although you can't really tell with this screenshot.


Link to code:  http://www.eng.utah.edu/~jthummel/graphics/ThummelGraphicsAssignment8.zip

Thursday, February 28, 2013

Graphics Write-Up #7

Not a whole lot to say this time around.  Getting transparency to work was pretty easy, just a matter of setting the render state and then actually using an alpha value.  Most of my time this week was spent with getting the sorting code working correctly and coming up with a best as possible way to sort the transparent objects back to front every update.  Oh, and changing files around, but that's getting faster.

Getting the transparency working was awesome, the binary alpha in particular is really sweet.  It was also cool to see how big of a difference sorting the transparent objects back to front made.  You'd inherently think it shouldn't matter at all (since you can see through them!), but when I was drawing them front to back since that's the way I ordered them in my scene file, you could only see the one in front.  It really drove home the lesson.

Now that I'm looking at the 2nd screenshot below I should probably put the Render state code inside it's own PIX event just so it looks a little nicer, but I'll do that for next week since I don't want to go re-upload the code.

I also made sure to go back and fix all the little errors I'd made after getting feedback on Assignment 5.  6 will still have the same issues since it was submitted before then unfortunately.  Summing them up: I normalized the incoming normals to my fragment shaders so specular lighting is working at last.  I also took out my hard coded debugging specular exponent value and now pull it directly from the material as opposed to the scene file.  And....  I think that's everything that was wrong....


PIX events with only one Opaque and Transparent:

PIX events showing Opaque and Transparent expanded:

What it looks like now:



Link to Code: http://eng.utah.edu/~jthummel/graphics/ThummelGraphicsAssignment7.zip

Friday, February 22, 2013

Graphics Write-Up #6

Once again, this graphics assignment wasn't particularly challenging, but it did take a bit longer than I'd expected.  As of class yesterday I'd pretty much finished and had Maya models loading into my renderer.  However, for some reason only certain meshes were working, my original cubes worked fine and the new cone and soccer ball worked fine, but my torus didn't load at all.  This proved to be the most difficult part of the assignment as I'd never worked with binary files before.

I knew that I was writing the file out correctly, or at least I was pretty confidant I was since at first I didn't know how to convert a binary file into hex to verify it.  Once I got that working it became clear that I was indeed writing the file out correctly.  That left reading the file back in as the only issue.  This seemed rather confusing, though, as it was clearly working with some of the meshes already.  I tried using a cylinder instead of a torus, but it failed to work as well.  After talking to Cody during the break in class he helped me spot the error I'd made in my file reader.

The other section of the assignment, sorting all the PIX calls, was very easy, although it's been quite a while since the last time I wrote a sorting algorithm.  I didn't know at the time how to nest the calls, and now that I think about it I should have done that for this submission, but since we're going to be modifying it slightly during the next assignment I'll just make sure to do it then.

Oh.  I also think there's something wrong with my specular lightning, but I haven't gotten feedback on the last assignment so I'm not sure.  All attempts I've made at "fixing" it have done nothing at all though.

Here's the sorted PIX events broken down so that Effect is at the top of the tree, followed by Material and then finally the Entity.


Thursday, February 21, 2013

Vinyl, Prototype Complete!

By the end of Tuesday we managed to complete all our goals for the prototype.  Since last week we modified it so that instead of the static just randomly appearing, they now actually spawn based off the music itself.  One slight problem with this was that before we spawned them far enough away that it was difficult to notice this as well as we'd have liked.  We talked about running two music tracks, one silently that everything spawns off of, and the other delayed slightly so that everything shows up at the right time, but in the end we just spawn everything closer.  It looks great (other then seeing them appear, which really isn't that bad) and it's still possible to dodge everything.  Additionally, Sherly also got the equalizer fully working and it looks great.

We also found a fantastic Unity plug-in for sound manipulation that should allow us to do very awesome things with the game if we get past the first gate.

Today the producers are giving a dry run pitch to Cohort 2 and then Monday night is the big night.  The first gate.  All the prototypes will be pitched and shown to a panel of industry professionals and we'll see which games pass the gate and actually get a shot at being made into a full fledged game.  I think Vinyl stands a very good chance, but I'm still a little nervous.

Friday, February 15, 2013

Graphics Write-Up #5

This assignment ended up taking longer than I expected it would, but overall it wasn't terribly complex.  Most of the work this time around was just making all the new files, but it was really awesome to see the scene load perfectly after setting all of that up.

Getting the ambient lighting in was simple, but the specular lighting proved to be more challenging.  I got the correct equation in, but the light still wasn't showing up for some reason.  After going into PIX it was revealed that this line in the fragment shader:

float3 specularLight = pow( saturate( dot(R, V) ), specularExponent );

was resulting in 0, which would obviously mean that there's not going to be any specular light.  I talked with Sherly about this issue and she said that the same thing was happening with her 8 vertex cube, but that her 24 vertex cube worked fine.  So I made a new mesh for a 24 vertex cube so that each face could have its own normal and poof, it worked just fine.  I wasn't able to figure out why it doesn't work with the 8 vertex cube, but since it is working on the 24 vertex, at least I know my specular lighting calculations work.

Even though we didn't need a screen shot for this weeks submission, it feels weird to post a blog about a graphics assignment without a picture.  So here's my cubes with specular lighting in.  Unfortunately it's really hard to get a good shot with the rotating cubes.  The front and right side cubes are all using specular lighting, although only the 2nd and 4th are using the 24 vertex mesh.

Link to code: http://www.eng.utah.edu/~jthummel/graphics/ThummelGraphicsAssignment5.zip