Friday, 25 November 2011

Making things float

I was trying to think about what else we needed the river to do and remembered that there is a log floating in the river that the cat grabs hold of. When I was reading the book Mastering Autodesk Maya 2011 by Eric Keller I came across how to make things float in the ocean shader.

I created a basic log shape using a cylinder and then moved it so it was half in and half out of the water. I then put it at a slight angle and, once selected, went to "Ocean - Float selected Object". Voila! My log now floated in the river. I rendered out a scene and this was the outcome.



There is only very subtle movements as the river is very slow moving but the log is definitely floating. At the very beginning though, it does this unnecessary bounce which I had not told it to do but it does anyway.  It is very small and hardly noticeable but I noticed it and now cannot stop noticing it annoyed me. I decided to go delving into the settings to see if it was something in there. These settings are agin very sensitive because if I changed something by the smallest amount, it made the log come out of the water of go under or bounce around even more. I reverted back to the original settings and saw a setting called "Start Y" which was set at -0.064. I thought this referred to a position and my logic told me it was probably the tart position. I started to change it and saw the log jump up the the air again and back under water. In the end I set it to 0 and it actually worked. I did a render with it at zero and the bounce had pretty much disappeared. I tried to get it to disappear completely by changing the setting by 0.001 each time but it kept making the bounce worse again. I left it at zero and even though the bounce has not completely gone, it is barely noticeable.



As with the other test the movement is very minimal but that is because the river is a slow moving river. It still looks slightly static but I think that is down to the model. It is just a basic shape so looks solid and static but if it was a proper model of a log it would would blend in a lot more and be more believable. I did not use a model of the log as it has not been made yet but I will do this test again later on in the year when the model has been made and see if it works just as well.

No comments:

Post a Comment