Jump to content

Make boat react to waves?


Skybar

Recommended Posts

I have a small boat which is running through a FLIP wave tank. Right now I have only built the basics with the flip, and with the boat running along Z-axis with $F/3. I haven't tweaked it yet so the paddlewheels are kinda crazy, see the attached movie.

Basically what I'm wondering is; is there a way to make the boat react to the small waves? The only thing I can think of is hand animating it, but that won't really be correct and it will be quite hard to nail, to be honest. My second thought was to make the whole boat dynamic, make it float and actually make the paddlewheels push it along. But that seems quite excessive.

Anyone have some ideas on how to do this?

edit: It wouldn't let me attach anything, view here instead:

https://vimeo.com/68658489

password = odforce

Edited by Skybar
  • Like 1
Link to comment
Share on other sites

if you want to avoid sim here is an idea, but may not work properly with your turbulent water

you can project some points (or bottom part of the boat) to the surface along Y axis, then create oriented bounding box from them and rotate boat like that and maybe offset to their average Y +- your desired offset (depth)

the bbox will need to be computed in boat object space so it's easy to know separate axes (like Z is always along the boat etc.)

here is an example

boat_on_waves.hip

  • Like 2
Link to comment
Share on other sites

Thanks for that hip Tomas! Thats quite clever and works really good for me. It was a bit spikey though, so I imported it into chops as Raymond suggested and filtered it a bit. Now it's really smooth and follows the water surface quite alright! Thanks both of you :)

Link to comment
Share on other sites

  • 4 years later...
On 2013/6/19 at 9:32 AM, anim said:

if you want to avoid sim here is an idea, but may not work properly with your turbulent water

you can project some points (or bottom part of the boat) to the surface along Y axis, then create oriented bounding box from them and rotate boat like that and maybe offset to their average Y +- your desired offset (depth)

the bbox will need to be computed in boat object space so it's easy to know separate axes (like Z is always along the boat etc.)

here is an example

boat_on_waves.hip

Hi Tomas,

I am trying to do the same thing and I checked out your hip file and this is basically how I want to approach it, but I was wondering how to fix the flipping issue that occurs on several frames.

If you can point me in the right direction, would surely appreciate it. Thanx in advance!

 

 

Link to comment
Share on other sites

On 2018/3/16 at 10:59 PM, Atom said:

Try switching the Ray node method to Minimum Distance.

Thx for the reply Atomic. I actually tried the Minimum Distance, but the movement gets really rocky with that setting.

Would be great if I can get that smooth movement like when the setting is on "project rays" without the flipping.

Link to comment
Share on other sites

Quote

 

The logic is a bit flawed. The Bounding Box with the Oriented option enabled does orient a box around your input but because it is a deforming flat pancake, you may get a bounding box that is rotated in non-predictable ways. This means your Blast SOP removing primitive 5 for the most part is the top polygon of the bounding box but in some deformed states this is one of the front or sides of the box causing everything to fail.

By removing all of those three SOPs and just fusing all the ray points to get the average P and N, you are good. As well since the animation is at the object level, you don't need to supply UP as the forward Z direction which you tried to calculate by subtracting two known points from Primitive 5, which again fails when the box spins due to the deforming input.

 

I then took your logic but worked it up a bit differently using CHOPs. With CHOPs you can add lag for weight in both the P and N. I had to smooth the N out a bit. 

Have a look at the scene file.

boat_on_waves_jw.hip

Link to comment
Share on other sites

Next step is to make sure that you animate your boat such that the boat object itself is +Z forward. You scene was +X as forward.

Built a simple animation rig around your boat object using two nulls. Made sure there was no animation on the boat object itself but putting animation on a null above the boat.

Used the same network with the CHOPs to add dynamic motion to boat.

This also sets things up to build a bearing angle by inspecting the parent object orientation compared to the world root orientation.

boat_on_waves_rig.hip

  • Like 1
Link to comment
Share on other sites

Hi Jeff,

Thanks for taking time out to explain the logic behind the previous example and putting the new hip files together. Very helpful and very easy to understand.

Havent done much animation with CHOPs before, so need to do a little research, but I think I understand the process leading up to that.

I have one basic question. What are the benefits of animating on the object level as opposed to doing it at the geometry level?

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...