måndag 28 juni 2021

Update2

I've added the spring physics, I've also added gravity and a repulsion force from the ground. I might add friction and collisions later but I'll leave it as is for now. I've updated the visuals to make it easier to comprehend what is going on, with the node spheres being smaller and the edges being visualized by lines. It took while of adjusting the values before I managed to get it to a stable position but it works now. At the moment the edges doesn't break, so my next step is going to be to make them breakable and then dropping the object from a height to see if it breaks.


tisdag 22 juni 2021

Update1

 I've structured up the code and created both a node class and an edge class to keep track of the data. I also have a class that controls everything and creates the breakable object. The object will be consisting of a bunch of nodes connected with edges in a cube formation. The edges will then apply spring forces to the nodes. If the springs are stiff enough this will hopefully mean that the object will be unmoving in its resting state and once enough force is put on the object it will start deforming and eventually crack. I haven't started applying the physics yet but I've made the code for constructing an object with a set width/height/depth. At the moment I'm using spheres to represent the nodes but there's currently no visual representation of the edges.




onsdag 16 juni 2021

New attempt

 It was too long since I worked on this course so I'm redoing the project from scratch following this paper Animation of fracture by physical modeling (kth.se) while keeping the lessons learned from my previous attempt in mind (so not really from scratch I guess). The custom mesh aproach caused too many problems and was a pain to deal with so I'm rethinking my aproach. The current plan is to keep the visual programing seperated from the logic programing and when the logic is done I can then either represent the nodes in the form of cubes that are easier to work with or give the custom mesh another go. I'll try to make an update after each working session from now on until I'm done.