So I'm having a break through and a set back all at the same time with this animation stuff so i figure now would be a good time for a post. Maybe That will help me sort out my thoughts here.
I've been following the example code provided to us by Keenan. It's been a bit of a life saver as the fbx sdk can be a tough one to get through alive. I did discover a flaw with Keenan's code however in that it essentially zeroes out anything that doesn't have an animation curve. For all intents and purposes this seems aimed at nuking out the dummy nodes. The problem with this is that a large number of the dummy nodes seem to contain some pre and post rotations that throw everything off a bit. when you zero this out it means your animations turn out wrong.
So now that I've figured this out I've run into a new problem. Every so often during the animation my guy decides to just flail his arm or twist his torso in a weird way. I can't exactly figure out why this is happening and I think It'll take a bit of digging to get it all figured out. I do recall one of my classmates mentioned a possible problem with the quaternions. I'll have to investigate.
Thursday, June 7, 2012
Saturday, June 2, 2012
So I've been taking a look at what needs to be done before the due date and I'm having second thoughts about my complete revamp. I'm thinking at this point I'm going to just get the animation up and running so I can hand it in. There's a lot involved here and just not enough time.
I'm continuing to follow Keenan's refactoring path. It's not so hard to follow but as well saw in class the other day it shouldn't be necessary to actually code a lot of this because I'll likely just end up abandoning it in the end. I'll probably do some quick and dirty work just so that I can understand what is going on here a little bit better. I also think I'm going to have to hijack Keenan's math library, because I'm not so sure mine is working right. Maybe I'll do a few tests just to confirm things.
Lots to do. Lots to do. Hopefully my studying for Algorithms doesn't take too long.
I'm continuing to follow Keenan's refactoring path. It's not so hard to follow but as well saw in class the other day it shouldn't be necessary to actually code a lot of this because I'll likely just end up abandoning it in the end. I'll probably do some quick and dirty work just so that I can understand what is going on here a little bit better. I also think I'm going to have to hijack Keenan's math library, because I'm not so sure mine is working right. Maybe I'll do a few tests just to confirm things.
Lots to do. Lots to do. Hopefully my studying for Algorithms doesn't take too long.
Friday, May 25, 2012
Looking Ahead
So I've officially completed PA1-3 and uploaded all of the necessary files to perforce which means It's time to look ahead to PA4 and the end of game engines. The main focus here is to get some animation data working and it's a tall task. I could focus completely on just getting the animation to work from here on but I think I may be better served if I do a little bit of refactoring first. The engine is feeling pretty bulky right now and it would be nice to clean a few things up. I also still have yet to add in the game loop like we did in class.
I'm begining to become unhappy with how my objects are being managed by the object manager and I think i'd like to revamp that quickly as well. For some reason i'm not a huge fan of having to create space frigate and then space frigate object. then also adding in warbear and warbear object. They do exactly the same things except they just have different names and load different data. I feel like getting the PCS tree structure set us is going to be the way to go here. At that point I should be able to set up a more generic object class so I won't have to copy and paste the whole thing with every model I load.
There is a large amount of work to be done in the coming weeks and it's a good thing I've made myself a lot of free time. Time to get started on the big push.
I'm begining to become unhappy with how my objects are being managed by the object manager and I think i'd like to revamp that quickly as well. For some reason i'm not a huge fan of having to create space frigate and then space frigate object. then also adding in warbear and warbear object. They do exactly the same things except they just have different names and load different data. I feel like getting the PCS tree structure set us is going to be the way to go here. At that point I should be able to set up a more generic object class so I won't have to copy and paste the whole thing with every model I load.
There is a large amount of work to be done in the coming weeks and it's a good thing I've made myself a lot of free time. Time to get started on the big push.
Tuesday, May 15, 2012
PA1 - PA3. DONE.
So it's probably a little premature to actually call it a wrap, but I've just finished quaternions (all my tests pass at least. I won't be sure they work right till I use them) and as I posted a few minutes ago the archiver and the converter are basically finished. I might do a little tweaking here and there but I think that means it's on to animation. (but first a video game break!) Feels good to be done.
A Quick Diagnostic
So it's about time I get back to working on my engine. I think now is a good time to review what is left to be done.
I haven;t looked in a little while, but I'm pretty sure my archiver is all done. As I recall all of the unit tests passed and I think it looked pretty good. I'll be sure to double check that before the deadline.
Next up is the FBX model converter. This is looking decent enough. I've been able to take three different models, convert them to my desired binary format and then get them to display on the screen in my engine. I'm pretty happy with this in that that's basically all there is to the assignment, but If there's time I'd like to see if I can clean this up a little bit. I'm using a lot of vertex data in the engine, and I know I can make them a little leaner. Spacefrigate, Warbear, and Astro boy are up an running. I'm also considering throwing a couple of other models in there just for kicks.
Finally is quaternions. This went smoothly enough and I've got the majority of the tests passing just fine. The only thing I'm having trouble wrapping my head around is the direction of flight. I'm just not quite understanding what exactly it is I'm supposed to be returning. I've re-watched Keenan do this from class but I think I'm just going to have to rack my brain and figure it out. I may need to put a forum post up real soon.
That does it for the near deadline and then it's on to animation. There isn't a whole lot of time to get animation flowing so I'll probably try to get a head start on that.
I'm also going to need to make a few edits to my original game engine. I'll get the game loop up and running and just clean things up a bit. Hopefully I can make it easy enough to use when creating games in my spare time.
I haven;t looked in a little while, but I'm pretty sure my archiver is all done. As I recall all of the unit tests passed and I think it looked pretty good. I'll be sure to double check that before the deadline.
Next up is the FBX model converter. This is looking decent enough. I've been able to take three different models, convert them to my desired binary format and then get them to display on the screen in my engine. I'm pretty happy with this in that that's basically all there is to the assignment, but If there's time I'd like to see if I can clean this up a little bit. I'm using a lot of vertex data in the engine, and I know I can make them a little leaner. Spacefrigate, Warbear, and Astro boy are up an running. I'm also considering throwing a couple of other models in there just for kicks.
Finally is quaternions. This went smoothly enough and I've got the majority of the tests passing just fine. The only thing I'm having trouble wrapping my head around is the direction of flight. I'm just not quite understanding what exactly it is I'm supposed to be returning. I've re-watched Keenan do this from class but I think I'm just going to have to rack my brain and figure it out. I may need to put a forum post up real soon.
That does it for the near deadline and then it's on to animation. There isn't a whole lot of time to get animation flowing so I'll probably try to get a head start on that.
I'm also going to need to make a few edits to my original game engine. I'll get the game loop up and running and just clean things up a bit. Hopefully I can make it easy enough to use when creating games in my spare time.
Sunday, May 6, 2012
QUATERNIONS!
So I'm plugging my way through quaternions and I think I'm getting to the point where I should put up a good post.
This Sucks. I'm glad that this is the type of thing you can do once and then as long as you've done it right you won't really need to come back to it for a long time. There are a couple of problems I'm having right now. For one I think my conversion from a matrix to a quaternion isn't correct. I'm not sure why as the math doesn't really seem to be present in the documentation.
Secondly, Keenan has a large number of constructors and set functions with rotations about x, y, and z and here again I'm just not sure how to translate or what exactly he's looking for. I'm getting close to finishing the function's I'm able to and I'm thinking I might need to go see Keenan soon before the deadline so I can sort all of this out.
I moved away from The converter for now. I have a pretty clear picture in my mind on what needs to be done there, but I just wanted to get as far as possible on quaternions before I jump back in. hopefully I'm not wasting too much time.
-A
This Sucks. I'm glad that this is the type of thing you can do once and then as long as you've done it right you won't really need to come back to it for a long time. There are a couple of problems I'm having right now. For one I think my conversion from a matrix to a quaternion isn't correct. I'm not sure why as the math doesn't really seem to be present in the documentation.
Secondly, Keenan has a large number of constructors and set functions with rotations about x, y, and z and here again I'm just not sure how to translate or what exactly he's looking for. I'm getting close to finishing the function's I'm able to and I'm thinking I might need to go see Keenan soon before the deadline so I can sort all of this out.
I moved away from The converter for now. I have a pretty clear picture in my mind on what needs to be done there, but I just wanted to get as far as possible on quaternions before I jump back in. hopefully I'm not wasting too much time.
-A
Wednesday, April 25, 2012
MOAR Converter problems.
OK. so now I'm able to get all the right data to print to the screen. Theoretically it should've meant smooth sailing form there. Not the case. It seems I'm having problems writing the data to the file. It could also be a problem with the data itself but I'm not entirely sure.
Originally I had been allocating structures dynamically and writing the vert data to these structures, then writing the structures out to file. The dynamic calls were causing problems with my use of sizeof() so in order to get it just to work I hard coded a couple of things in so I can get the structures up there. I've written this data to file and even been able to parse it on the other side in my graphics manager. I had to create the object in the graphics manager which required a bit of copy and paste work from the pyramid structures. When I compile my graphics engine I can only see half of the frigate and parts of the polys I can see are a bit off. I'm still not sure what's causing the problems. I'll have to keep debugging.
-A
Originally I had been allocating structures dynamically and writing the vert data to these structures, then writing the structures out to file. The dynamic calls were causing problems with my use of sizeof() so in order to get it just to work I hard coded a couple of things in so I can get the structures up there. I've written this data to file and even been able to parse it on the other side in my graphics manager. I had to create the object in the graphics manager which required a bit of copy and paste work from the pyramid structures. When I compile my graphics engine I can only see half of the frigate and parts of the polys I can see are a bit off. I'm still not sure what's causing the problems. I'll have to keep debugging.
-A
Saturday, April 21, 2012
UV problem fixed
Well I discovered my UV problem. I was printing with %d instead of %f. WOW. I really hope these silly problems go away as I gain more experience in programming. But at least it didn't take me long to figure this out. Now I can move on to putting these values into some vectors and structs and seeing how they turn out.
-A
-A
Converter Troubles
So I've walked through what we've done in class. I think I have the general idea but I'm running into problems. If I can get the right values to print out that should mean I can put them in my struct for my VBO. Should be a piece of cake, but I'm having two major problems.
First, I'm not exactly sure where I should be writing the code to make this happen. The print statements I'm making are in DisplayMesh, like we did in class but it feels inappropriate to put everything there. I'm thinking about just creating a new .cpp file and doing the work there. I'll have to make sure I use all the same includes and mimic some of the loops and variable initializations.
Second, I've figured out how to get the control points mapped out so I can get the coordinates and the norms from that. I'm having trouble figuring out how to get the UV coordinates to print. It looks to me like there is a large switch statement dependant upon a couple of different modes. I'll have to continue to mess around with this until I get it figured out. I think I'll scour a couple of other blogs and maybe even pose the question on the boards if I don't find anything soon.
back to work!
First, I'm not exactly sure where I should be writing the code to make this happen. The print statements I'm making are in DisplayMesh, like we did in class but it feels inappropriate to put everything there. I'm thinking about just creating a new .cpp file and doing the work there. I'll have to make sure I use all the same includes and mimic some of the loops and variable initializations.
Second, I've figured out how to get the control points mapped out so I can get the coordinates and the norms from that. I'm having trouble figuring out how to get the UV coordinates to print. It looks to me like there is a large switch statement dependant upon a couple of different modes. I'll have to continue to mess around with this until I get it figured out. I think I'll scour a couple of other blogs and maybe even pose the question on the boards if I don't find anything soon.
back to work!
Wednesday, April 18, 2012
LIU sucks
more trouble with the archiver. I had a little skype session with Ben tonight about it and we still couldn';t figure it out. He posted his code up in the common directory to lend me a hand. I just took a good look and I feel like I'm doing the right thing here. It's weird because when I make my FindFirstFile look like his I get squiggled at. I scoured my project settings again just to be sure and I just can't figure it out. I'm turning in for the night. I'll be headed to the lab before class tomorrow to see if maybe my machine is the problem. If so I've spent hours staring at this thing in futility. Let's hope that my lab work tomorrow gets the job done.
-A
-A
Monday, April 16, 2012
YESSS! LOOK WHAT I HAVE CREATED!
So if you can't tell from the video I'm really riding the high of success right now.
It took me quite some time and I ran into many problems but I finally got my VODKA program to pass all of it's tests. A large number of the problems I ran into had to do with the project properties. I feel like I know those things backwards and forward after last quarter, but somehow I still manage to forget one or two almost every time I start back up. For some reason it also seems that when i move to a new workspace I sometimes lose some of these settings. I'm not sure why this happens. From here on out I'm going to try and check all of those settings as I start a new project rather than half way through so that I know I'm not missing something. It might also be handy to come up with some sort of a check list so as not to forget.
Now it's time to move on to LIU. I feel like I understand this one rather well conceptually so i think I'll be OK. (The famous last words of an over-confident programmer.) What I think I've learned from VODKA should really work out to my advantage. Create a header, write it to a file and then throw my chunks in there. I'll be using the method we discussed in class to find the appropriate files and away we go.
-A
Tuesday, April 10, 2012
ugh. i hate running into trouble.
So I've been trying to get started on these programming projects here and I'm hitting barrier after barrier. I really thought I'd be able to just get up and running after last quarter considering we only had a week off.
My biggest trouble to start was with perforce. I wasn't very familiar with how to branch it off and so instead I just set the workspace inside. I've finally got it working and it shouldn't be a problem from here except that because it is inside of my previous workspace I think the folder naming might get confusing.
Now that I've got my files downloaded one of the first things I did was load up the achiever unit test and give it a build. the build came down without failing any tests, but running it was a different story. Visual studio told me it was unable to start the program. I'm not exactly sure what this means or how to go about fixing it. I think for now I'm going to try and take a closer look at the unit tests and try to plan out how I'm going to tackle this problem.
I'm a little worried about some of the structure involved here. We talked about our program calling other executables (VODKA and LIU) and I'm not really sure what that's going to require. I'll certainly be asking more about this in class on Thursday.
Back to the grind.
-A
My biggest trouble to start was with perforce. I wasn't very familiar with how to branch it off and so instead I just set the workspace inside. I've finally got it working and it shouldn't be a problem from here except that because it is inside of my previous workspace I think the folder naming might get confusing.
Now that I've got my files downloaded one of the first things I did was load up the achiever unit test and give it a build. the build came down without failing any tests, but running it was a different story. Visual studio told me it was unable to start the program. I'm not exactly sure what this means or how to go about fixing it. I think for now I'm going to try and take a closer look at the unit tests and try to plan out how I'm going to tackle this problem.
I'm a little worried about some of the structure involved here. We talked about our program calling other executables (VODKA and LIU) and I'm not really sure what that's going to require. I'll certainly be asking more about this in class on Thursday.
Back to the grind.
-A
Saturday, March 31, 2012
START
And so it begins again. GAM 575 will take what we've learned in the last class and add a whole new arsenal of tools to our engine. I'm most excited to jump into adding animation data.
Wednesday, March 14, 2012
Tuesday, March 13, 2012
Lookin' Good .... Lookin' Real Good.
Alright then. I'm just about done. I've got everything I wanted to put in my graphics system up and running. I discovered a flaw in my collision tests once I actually made the cube move (only the sphere was moving before) but I patched that up real quick. I also added a spin and an orbit to each object's transform matrix. I did a final clean up of all my files as well. I'm happy with where it's at.
The only thing I have left to do is set up and record the Demo. This might take some handy work but I think it should work out just fine. I'm going to add in a second translation real quick so that I can make a couple of scenes and push them around to create what is essentially the scenes of my demo. then I'll be able to set up 3 or 4 cameras at that translation. I might also add in some additional camera controls but I just don't think it's worth it at this point. Tomorrow should be a piece a cake (except I'll have that paper to write and my other final to study for. Oh, the life of a grad student. )
Good Night
-A
The only thing I have left to do is set up and record the Demo. This might take some handy work but I think it should work out just fine. I'm going to add in a second translation real quick so that I can make a couple of scenes and push them around to create what is essentially the scenes of my demo. then I'll be able to set up 3 or 4 cameras at that translation. I might also add in some additional camera controls but I just don't think it's worth it at this point. Tomorrow should be a piece a cake (except I'll have that paper to write and my other final to study for. Oh, the life of a grad student. )
Good Night
-A
Back on Track
So I got a little bit derailed last night with the Bulls game which means tonight will be a bit of a crunch time. I have checked a few more items off the list since the last post so let's talk about those really quickly.
I've got my object culling working pretty well at this point. My sphere has been changing color as it passes through a sphere rather successfully for a while now and I finally got this code transferred over to the sphere object itself. I've inserted a check in the rendering and graphics objects files that essentially looks to see if the collision test passes and draws or doesn't based on the results. The weird thing about this one is that there isn't really an easy way to tell is it's working or not. I suppose that what the color change function accomplishes. I've also done some major cleanup on my files. They all had a few artifacts from older generations in terms of what was included and what was externally declared. I got rid of what wasn't necessary anymore and created a couple of header files to make the includes look nicer. It's looking pretty spiffy. I may need to take a run through my code and beef up some of the comments though.
I've only got a few real requirements left and then it's on to making improvements. First thing I'm going to tackle is the texture manager. for now I'm just going to get it running and hope for the best so I can get credit for it. I think if I were to be making my engine available for sale this manager would be virtually unseen to the user. I've been using the object manager to do the same work I'll have the texture manager do (load and delete textures) and I really like that as a simple interface. My object's calls to load or delete a texture will probably call the texture manager which will take care of counts and do the necessary actions and then return a pointer. beyond that I don't really see what it's going to need to do. It's not very robust and I've had some conversations with Ben (a classmate) about how to make something a little faster/more robust. He's clearly got a good sense for writing code that isn't going to break down. That should be the last requirement. I could technically start my demo right from there.
Then it's on to improvements. I'd like to add in a better means to get transformations applied to objects, or at least additional options. I think I'll make one function that takes a matrix and applies it directly to the object;'s transformation. I also like the options I have on the sphere, so I'll tweak those a bit and copy them over to my other primitives. In the future I could imagine just sticking some of them into the GraphicsObject class so that all future objects have the same basic functionality.
I'll likely improve the User interface to allow for the camera to do more than just pan left, right, forward and backward. but I'm not real sure on that one. This one will be an "if I have time" sort of thing.
This is a longer post but when I get it all written down it doesn't seem like tonight will be nearly as bad as I had originally thought. It's amaizing how far I've come in the last week or so. Let's get crackin'
-A
I've got my object culling working pretty well at this point. My sphere has been changing color as it passes through a sphere rather successfully for a while now and I finally got this code transferred over to the sphere object itself. I've inserted a check in the rendering and graphics objects files that essentially looks to see if the collision test passes and draws or doesn't based on the results. The weird thing about this one is that there isn't really an easy way to tell is it's working or not. I suppose that what the color change function accomplishes. I've also done some major cleanup on my files. They all had a few artifacts from older generations in terms of what was included and what was externally declared. I got rid of what wasn't necessary anymore and created a couple of header files to make the includes look nicer. It's looking pretty spiffy. I may need to take a run through my code and beef up some of the comments though.
I've only got a few real requirements left and then it's on to making improvements. First thing I'm going to tackle is the texture manager. for now I'm just going to get it running and hope for the best so I can get credit for it. I think if I were to be making my engine available for sale this manager would be virtually unseen to the user. I've been using the object manager to do the same work I'll have the texture manager do (load and delete textures) and I really like that as a simple interface. My object's calls to load or delete a texture will probably call the texture manager which will take care of counts and do the necessary actions and then return a pointer. beyond that I don't really see what it's going to need to do. It's not very robust and I've had some conversations with Ben (a classmate) about how to make something a little faster/more robust. He's clearly got a good sense for writing code that isn't going to break down. That should be the last requirement. I could technically start my demo right from there.
Then it's on to improvements. I'd like to add in a better means to get transformations applied to objects, or at least additional options. I think I'll make one function that takes a matrix and applies it directly to the object;'s transformation. I also like the options I have on the sphere, so I'll tweak those a bit and copy them over to my other primitives. In the future I could imagine just sticking some of them into the GraphicsObject class so that all future objects have the same basic functionality.
I'll likely improve the User interface to allow for the camera to do more than just pan left, right, forward and backward. but I'm not real sure on that one. This one will be an "if I have time" sort of thing.
This is a longer post but when I get it all written down it doesn't seem like tonight will be nearly as bad as I had originally thought. It's amaizing how far I've come in the last week or so. Let's get crackin'
-A
Sunday, March 11, 2012
Sphere VBO
I finally got the sphere vbo up and running. Things are really starting to come together here. I've still got a lot of work ahead so I'll keep this short. I owe most of the work to Derek. He posted his sphere VBO data and I used that data for my sphere. It was a bitch to get it running though. I couldn't get the thing to load for the longest time. He had some methods that weren't compatible with my system because of his collision testing. I commented out his collisions and will insert my own method for that. He also was attempting to load a texture that I didn't have saved in my folder and so for a while the object was being rendered and I couldn't see it. I think I'll work on reworking the matrix transformations next.
-A
-A
Saturday, March 10, 2012
Collision System
So it took almost a whole day of debugging and trying different things but I finally go the ball and box collision system working. I thought my math was right, and for the most part it was, but it took me a long time that my local variables weren't initializing the way I thought they were. I was trying to hold the position of the sphere in an object on my SphereObject but this just wasn't working and I didn't know it right away. I was using the debugger to pour through different areas of my code to figure it all out. so instead I used the object's LocalToWorld matrix to get it's current translation and now we are in business. What a hassle that was! alright... back to work.
VBO's!
Well it's just about time to call it a night here. I've gotten through setting up VBO's for the pyramid (this was done for us, so not as impressive) as well as the cube. This took a good amount of planning. I had to spend a good amount of time coming up with how to lay out the triangles. I decided to set up a triangle strip and this ended up being not nearly so bad. I accidentally flipped the last two verts and this took some time to figure out. beyond that it worked out well. I think I'll post my finished product in the common directory for others to check out. .... I wonder if anyone came up with a good VBO for the sphere.
Friday, March 9, 2012
Big Break Through
So I know it's only been a couple of minutes since the last post but I just had a large breakthrough I thought it was important to post.
One of the main reasons I had been struggling to get past the collision detection was because of opacity. We are supposed to try and get a sphere to pass through a cube and change color as it does using the collision detection math we had in class. The first thing I wanted to do was draw a cube with an object inside of it and make sure I could see the object through the cube.
I got both of the objects to show up on the screen in the right spots but for some reason my cube wasn't see through despite a proper amount of alpha being entered into the shader. I had gone through our text book and was sure I was doing what I needed but for some reason the cube was still looking solid. basically what you're supposed to do is draw the "inside" object first and then draw the"see through" object last. This means that the shader will blend the colors together creating the desired effect.
So I added my pyramid first and then my cube right on top of it, following the logic laid out. This is where I went wrong. my object manager does not draw the objects they were added to the list. adding the object to the manager pops it on to the front of the list, but then the draw method starts at the beginning and walks through the list. this means I added my pyramid (to the front) and then my box (again, to the front of the list) and when my object manager began it's drawing it started with the box and then the pyramid so no blending was actually done.
now that I have figured this out my collision detection should start to really be much easier to get going on.
-A
One of the main reasons I had been struggling to get past the collision detection was because of opacity. We are supposed to try and get a sphere to pass through a cube and change color as it does using the collision detection math we had in class. The first thing I wanted to do was draw a cube with an object inside of it and make sure I could see the object through the cube.
I got both of the objects to show up on the screen in the right spots but for some reason my cube wasn't see through despite a proper amount of alpha being entered into the shader. I had gone through our text book and was sure I was doing what I needed but for some reason the cube was still looking solid. basically what you're supposed to do is draw the "inside" object first and then draw the"see through" object last. This means that the shader will blend the colors together creating the desired effect.
So I added my pyramid first and then my cube right on top of it, following the logic laid out. This is where I went wrong. my object manager does not draw the objects they were added to the list. adding the object to the manager pops it on to the front of the list, but then the draw method starts at the beginning and walks through the list. this means I added my pyramid (to the front) and then my box (again, to the front of the list) and when my object manager began it's drawing it started with the box and then the pyramid so no blending was actually done.
now that I have figured this out my collision detection should start to really be much easier to get going on.
-A
Subscribe to:
Posts (Atom)