Friday, March 22, 2013
Graphics Programming 9
Screenshot:
Well... The sphere (Actually a soccer ball on the top-right side) that suppose to have a wobble effect using the render target down here. It doesn't seem like it because algorithm for that in the shader is too crappy for now.
I'll change it when I got some time.
Pix:
Code:
Graphics09
Monday, March 4, 2013
Team Hack n' Hide - First Month
Producer:
AJ Dimick - Scrum Master
Zac Truscott - Lead Producer
Andrew Witts - Lead Designer
Engineer:
Vaibhav Bhalerao - Thief Engineer
Kiran Rajachandran - Thief Engineer
Chris Rawson - Hacker Engineer, Tech Artist
Nikhil Raktale - Hacker Engineer
Miao Xu (Max) - Hacker Engineer, Networking Engineer
We made it! After one month of crazy work, we finished the prototype of our thesis game Co-Signers and passed the first gate! The team really glued together since everyone loves the idea and we all have devoted so much on this game.
Co-Signers is a two player couch co-op game. One player plays as the hacker who operates on a 2D screen. Hie main goal is to hack into the computer network to help the other player by unlocking/locking doors, hacking into cameras, etc. The other player plays as the thief, who follows the hacker's guide, avoid guards and infiltrate into the highly secured building and retrieve the goal. We build a system that let two player help each other out and the main goal is to build the trust and tension between two players.
See more details on our team blog! : Team Hackn'Hide
Now when I finally got sometime to look back, it has really been a crazy ride!
We had our physic play-testing, whose goal is to make sure the core of our game - communication between two players - is working as it should be and fun enough to play. And I'm the camera in the video.
We spent a lot of time on brainstorming to make sure both player could have a fun experience, here is a screenshot of the whiteboard of one of our discussions:
So, what's my role in the whole developing process? Basically, I finished all the networking stuff of the prototype and also part of hacker system. I'll open two other posts to talk about this since networking in Unity is really painful and the graph system that we build for the hacker is really fascinating! So excuse me for not going too much details here.
The presentation is another thing that we spent much time in, since this is all that matters at the end of day. Chris and A.J. have put together a really cool trailer for our game, which truly helped us on the presentation day, here is the link:
Our producers really did a great job at the presentation day, even though there is a minor issue happened that day (the second projector for our live demo is somehow not working properly, which really freaks us out). Anyway, here is the presentation, enjoy!
To be continued...
Graphics Programming 8
Finally, normal map! It's always nice to know how to make things look realistic without using ten thousand polys. And this is how we do this:
In addition to the diffuse map, we use the normal map which gives you the "bump" information (similar to height map) to calculate lighting, so you actually feel like the surface as "bumpy" as it should be.
Sounds easy enough, so we just store the normal information in the normal map and pass it into the shader and that's it? Of course not.
The normals you store in the texture are set, which means they are only facing only one direction, this could be problematic. What is this suppose to mean? Well, imagine you have a cube, its six faces has the same texture. If you think about it, the normals you store in the texture can only fit one of those faces. How to make it fit any face of the cube? You need some way to convert the normals in the map from "texture space" to model space.
The way we do this is by using the "TBN" rotation matrix, we can get the right normals by using tangent, bitangent and normal of each vertex on the mesh. And we can get this information from mesh in Maya. After we get the normal, the lighting part is the same as before.
The implementation is fairly easy, nothing worth mention.
The screenshot:
Source:
Graphics 08
In addition to the diffuse map, we use the normal map which gives you the "bump" information (similar to height map) to calculate lighting, so you actually feel like the surface as "bumpy" as it should be.
Sounds easy enough, so we just store the normal information in the normal map and pass it into the shader and that's it? Of course not.
The normals you store in the texture are set, which means they are only facing only one direction, this could be problematic. What is this suppose to mean? Well, imagine you have a cube, its six faces has the same texture. If you think about it, the normals you store in the texture can only fit one of those faces. How to make it fit any face of the cube? You need some way to convert the normals in the map from "texture space" to model space.
The way we do this is by using the "TBN" rotation matrix, we can get the right normals by using tangent, bitangent and normal of each vertex on the mesh. And we can get this information from mesh in Maya. After we get the normal, the lighting part is the same as before.
The implementation is fairly easy, nothing worth mention.
The screenshot:
Source:
Graphics 08
Friday, March 1, 2013
Graphics Programming 7
So this one is fairly easy, all about transparent effects, just a change of render states. We still need to add a few variables to effect and material files, but it's trivial compared to 4, 5 & 6.
So, as always, about those effects:
Partially Transparent:
Doing this will make your own materials transparent, based on the alpha you set. In order to achieve this, you'll have to draw those objects back to front (based on the distance from the camera). The reason for that is, to make a pixel "transparent", I actually need to know what color is already there on the screen, then do the calculation based on the alpha that I set.
Binary Alpha:
Basically, you set a threshold to determine whether the alpha value in the texture is 0 or 1. In other word, completely opaque or transparent. In this way, you can "cut" the irrelevant part of the texture that you don't want, which is pretty handy in many cases.
Additive:
Add the color info in this texture to what's already in the scene. Kind of like the binary alpha, but instead of completely overwrite the original pixel, it adds to it.
The tough part of this assignment is to render the partially transparent entities. The sorting algorithm is easy, but because of the way I did the sorting (I sorted effect->material->entity on load using a manager kind of thing) in Graphic 5 & 6, I can't sort the distance from the camera based on effect. I have to get the entity list again the way I did in Graphic 4 and do the sorting on that base, which actually took me sometime.
Some textures that I used are from this website: textures
Screenshots from PIX:
Screenshot for the game:
Control:
To control the point light:
use "I" - up, "K" - down, "J" - left, "L" - right, "U" - backward, "O" - forward;
To control the camera: Arrow Keys
To control the box: WASD.
Link to the code:
Graphic 07
So, as always, about those effects:
Partially Transparent:
Doing this will make your own materials transparent, based on the alpha you set. In order to achieve this, you'll have to draw those objects back to front (based on the distance from the camera). The reason for that is, to make a pixel "transparent", I actually need to know what color is already there on the screen, then do the calculation based on the alpha that I set.
Binary Alpha:
Basically, you set a threshold to determine whether the alpha value in the texture is 0 or 1. In other word, completely opaque or transparent. In this way, you can "cut" the irrelevant part of the texture that you don't want, which is pretty handy in many cases.
Additive:
Add the color info in this texture to what's already in the scene. Kind of like the binary alpha, but instead of completely overwrite the original pixel, it adds to it.
The tough part of this assignment is to render the partially transparent entities. The sorting algorithm is easy, but because of the way I did the sorting (I sorted effect->material->entity on load using a manager kind of thing) in Graphic 5 & 6, I can't sort the distance from the camera based on effect. I have to get the entity list again the way I did in Graphic 4 and do the sorting on that base, which actually took me sometime.
Some textures that I used are from this website: textures
Screenshots from PIX:
Screenshot for the game:
Control:
To control the point light:
use "I" - up, "K" - down, "J" - left, "L" - right, "U" - backward, "O" - forward;
To control the camera: Arrow Keys
To control the box: WASD.
Link to the code:
Graphic 07
Subscribe to:
Comments (Atom)






