Thursday, March 31, 2011

Forgetting and Moving Forward

Hey Everyone
So this past week I focused on prioritized folding, fixing bugs, and memory (opposed to what I said in my evaluation post where I said I would work on the GPU implementation and memory). I did not do the GPU implementation because I felt that I still had too many bugs for me to move over to the GPU just yet.

So I think that I figured out what was going on with the angles and the acos stuff. I also think it does not really matter, mainly since I am controlling the direction of the fold with the mountain and valley direction variable. I decided that I need to add an addition variable to my rotation spring just for finding the angles, because it is possible that there could be problems with stuff lining up. It may make it hard to autogenerate the rotation springs from a UI though.

One thing I wanted to do was add prioritized folding. There is a few reasons for this. One is that it lets me do more complex folds that were having problems when folding all at once. Another reason is that it allowed me to test out some other problems easier and find bugs. In addition to giving rotation springs priorities, they can also be activated and deactivated. This way they are all not moving at once. Another thing the rotation springs got were links to their structural springs along their moment arms. This allows them to disable them during folding because these structural springs can have problems with multiple folds. So the linear springs can also be activated and deactivated now. All these things really helped me debug stuff. So below is my first multistep fold, a pleat fold. Here I fold the paper in half diagonally and then fold the corner back to the center.



I then tried something a little more complex where I have to fold through multiple sheets of paper. Unfortunately it did not work out as well as I hoped. Strange things are happening. When I setup the creases like they should be on the second fold (mountain and valley), it does not fold at all. When I setup the second fold incorrectly (both valley folds), it folds, but then it explodes. Take a look below (I cut out the explosion):



So I still need to fix a few bugs here and there with that setup. But I am in general happy with out it worked out.

After all that I went back to my memory implementation. It is certainly interesting. Last week I had implemented completely new bend springs that add rotation springs when they are stretched or compressed by a certain threshold. However this caused nothing but explosions. So I brought it back and tried doing simple stuff. In my first attempt I had a 2x2 lattice with a rotation spring in the center and gave it an angle that was not 0 or Pi. This worked very well. So I tried creating a large lattice with a bunch of rotation springs along it horizontally to in theory make it curl. Here was the result:


Definitely the best way to describe this is as a "ghost". It actually kind of looks like a plastic bag in the wind. And I am very surprised it remained stable. So after this try I brought it back and tried a few other methods. I played with their angle, spring constants and the amount of rotation springs, but they all had their problems. Here is a video of a single line of rotation springs down the center of the paper. It is interesting that it pulls the middle of the paper up, sort of like pinching it.


So the adding of rotation spring to simulate memory are just not working as I would like them to. I am going to keep at it but I am not sure it is going to work. One thing I did try instead was to actually as the paper compresses or expands, the bend springs change their rest length depending on how they are handled. This actually produced pretty good results. As you can see the two corners are brought to the center, and when the force is removed (the jolt) it pulls back and rolls up. If I did not change the bend spring's rest length then it actually unfolds back to is flat state.



So as for next week I will continue on the memory and fixing the prioritized folding. If I have time I'll start the GPU implementation. Otherwise that will get pushed to after beta, which is unfortunate because I wanted to have it for beta review. I might also have to set aside time to do what ever prep / presentation I need for beta review.

No comments:

Post a Comment