Saturday, 11 June 2011

Further work

The work for this honors project has finished and handed in and while i feel upset about the end results and grades for the honors project life must go on and i must continue to show off my capabilities in programming so i will use this blog as a way of keeping updates on my personal projects and thoughts of the work i'm doing. I as of this time working on my website but should soon be finished in producing it and later getting it hosted but after this is done i need a new project to work on. the following our some of the ideas of which i plan to do:

Improve previous projects: this as stated is basically to either polish and/or depending on the project included extra which was intended in the final result. in the case of the honors project the introduction of harmonic motion is necessary.

Advanced shadow mapping: one of my ideas for the honors project which i would like to continue. in this case i want to get the shadow of the object to be bound to the light source and the position of the light will affect where the shadow is positioned. This is the basic setup but further work would include the effects of the distance between the object and the light source which will affect the shadow. This means the shadow will contort stretch and fade depending on the distance between the light source and object position. I would also like to further this by adding multiple light sources which each have there own shadows which are drawn to the scene also with the multiple light sources i would like to get the light capable for canceling other shadows by there own light source. I'd try to do this using directX as i have a limited amount of work using directX and also older work involving shadows in directX.

Crazy snooker: This is a full game idea i plan to do this is basically a game of snooker with the same rules of snooker (first either spot or sprites need to be potted then the black) with different types of table shapes to play on. That is basic setup of the game maybe also introduce power ups not entirely sure yet. This would be produced on unity again due to lack of work based around unity that have done and also the possibility of selling this game on an android phone.

Monday, 2 May 2011

finalised update

again an update on my work. i have decided to stop adding things to my project and work mainly on my dissertation. Since last time i have added in a basic user input (being able to move the object, change its radius and mass) and have inputted VBOs.

i still have some work to do with the program which needs to be fixed. The first problem is that while the VBOs work the grid isn't draw correctly this cause the indices used go line by line and not quad by quad which is the way the triangle strip way works. This needs to be fixed and also the text would be helpful but not all that necessary so if i can text working would be create as well. I will also need to comment and clean up most of the work.

Monday, 18 April 2011

Object update

From previous updates i mentioned that i was going to attempt to get multiple deformations taking place at once unfortunately due to problems with writing the normals in the shader caused too much trouble to fix as of the time and will hopefully be looked into fixing later if times allows it.

Instead i worked on getting objects to fall onto my surface and then transfer the energy that they have accumulated to produce the depression in the surface. The values which were used to cause this depression was the radius of the object, the mass of the object and the velocity of which the object was traveling at when it hit the surface.

Both the radius and the mass of the object are constant values and thus isn't effected by the actions in the program. The velocity however isn't a constant and changes through use of specific equations dependent on what the object is doing. In the case of the program the object is being dropped from a specific distance and is effect by the following equation:

velocity = gravity * time

This is the standard equation to find the velocity of an object as it falls from a distance and the further it falls the faster it will go. In this project the surface and object is based in a vacuum so there should be no air resistance effecting the object what so ever.

Now that the depression of the surface is effect by the surface i need to get the reformation working with it as well as at the moment when the reformation takes place the center value of the circle algorithm is lost and the whole surface returns to its original state. this needs to be fixed. After that i may attempt to get the object to be thrown into the air by the elasticity of the surface or try to get multiple depressions working. I will also need to consider spending some time adding in some more optimization in the program so that it can have larger elastic surfaces and use less memory for its usage

Monday, 11 April 2011

Kinetic energy implementation

As of now the program now has the depression of the surface effected by a mix of kinetic, potential energy, hooke's law and tension of a string. The way the equation is set up is that the basic equation of kinetic energy and potential energy are added together from the depression to find the total energy of the depression:

velocity = 1/2*mass*speed^2 + mass*gravity*height

with the total energy found the equation now needs to find the tension of the surface. To do this the surface is set up like a array of strings with its own set of strings having tension working against the energy placed on the surface. With this the equation becomes:

1/2*mass*velocity^2 = 1/2*mass*speed^2 - mass*gravity*height + ((2*tension)/(2*length))(2*sqrt(height^2 + (length/2)^2) - 2*tension)^2

This equation will find the velocity of the object been pushed upon the surface. The problem with this equation is that the program already has the velocity of the object hitting the surface. Instead what is necessary is the speed as of the time of the object which was hitting the surface. With that in mind the equation needs to be changed to get out a wanted result:

speed = velocity + sqrt(2*gravity*height) - 2*(sqrt(((2*tension)/(2*length))*(2*sqrt(height^2 + (length/2)^2) - 2*tension)^2)/mass

With this the speed of which the depression goes at can be found. After this is found the value of speed is added to the overall height to find the depth of the depression.

There was only a few problems with the implementation all really mainly based around the values of the constants used for the equation needing to be change so that the deformation had a more of a realistic look or more depth to its depression. The main problem with the height of the depression usually ended up to large for real use. this was attempt to be sorted by dividing the value found by 100 but this cause the depression to continue without stopping due to the value just continuously being added together to make the depression much larger. This was by making the value used to change the surface and the height used in the equation separate values with the the surface height just the height value divided by 100 thus not effecting the end result or the next result from the equation in ways which did not produce unwanted results.

With these values effectively placed in i plan to after this try and get multiple depressions happening at the same time as my next marker to aim for for my project and after that if there is still enough times to implement actually have objects falling onto the surface and have them effect the depression of the object

Note to self: in dissertation increase explanation of the tension of the string and the energy placed onto the surface and explain each of the values used in the equations. Include visual representation.