# boat in the ocean

#1

I know this has been asked before, but after spending some time searching I am yet to find an answer to my problem. And it really seems like it shouldn’t be very hard.

What I’m going for is a boat moving in the ocean - it bounces up and down with the waves.
That’s easy enough - Give it an attachment constraint. But I also need to have the boat moving across the ocean as well, making turns and so forth. And while the attachment constraint allows you to animate it’s position along the surface, the interpolation for this motion is awful. And with as many waves as this may be going over, manually tweaking this is not a very feasible option.
So then there’s the surface constraint. Better, yes, but it’s far too limited in what geometry it will work on. I can only get a single wave for the motion, and I’m going to need lots of waves. In almost every case that I had more than one wave to move over, the constrained object would start moving vertically for some reason. And building multiple meshes and continually linking between them would take even longer than the slow process of adjusting the previous motion. I was able to get around this limitation in the constraint by applying a wave modifier to a spline, and then adding some loft to that. But this comes with the side effect that it’ll crash max if you move the U or V sliders in the wrong direction.
So, unless I’m doing something sompletely wrong, the surface and attachment constraints are out.
I also tried creating two single-poly planes, and attaching them to the surface with the conform space modifier. The idea was to place them close together, and then link the boat inbetween them. But it seems that nothing from ‘conform’ can be inherited, so that’s out too.
The last idea I had was to use particle flow, sending the boat as a particle along the surface. But…slow as hell, and I couldn’t seem to get it working right (I’m still new to particle flow, though)
And yes, I know about realwave…I could do this (with advanced effects) in just a couple minutes in that great program. Unfortunately, I can’t use any plugins for this, aside from the ones that come with max.

So…does anyone know of an easy way to do this? Maybe some simple max scripting that would do the trick?

#2

#3

Well a very clever script controller is a great answer. What you need to do is use intersectRay to cast a ray at the waters surface and move the boat to it. you can then get the ray angle and set the rocking motion of the boat based on the surface of the water. You can also set up an offset motion. Amimating the boat is just as it would be if it were on a flat plane.

#4

Both of the above solutions are valid, but possibly very time consuming to get the look you want.

Here’s another: animate the water with whatever ripple/wave methods you think look best. Then, select your boat and assign it an Attachment Constraint—pick the water surface, adjust which face it should stick to, etc. (read the help on Attachment Constraints)

If you don’t like the boat rotating as it floats, assign it an Orientation constraint and constrain it to something else (a dummy, perhaps) to make it stay “upright”, or to rotate it manually. A position constraint will allow you to dip it below the surface as much or as little as you’d like.

just an idea, anyway…

-jim

#5

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.