View Full Version : Floating Boat Animation
04-06-2005, 08:26 AM
am a beginner of 3D Animation and I need your help.
Floating Boat Animation is actually my final year project.
The software pakage I am going to use is 3D studio max, and OpenGL for the 3D programming.
As I have to demonstrate 4 types of boat and 4 types of background(e.g. river across a city or river across a forest), I want to know how you guys model the floating motion of the object and let user to control the floating motion by increasing the speed of the wave? I really don't know how they move in the real life.How can I do?
Also, do you have any comment on the software and programming language or anything you want to let me know? pls feel free to leave a message here.
04-06-2005, 09:13 AM
the programming language is totally up to you.
personally, I use C++/C with MFC.
as for boat motion.
most types of simple harmonic motions (such as a
boat floating on water) can be simulated using a
sine function. How fast the boat rocks is
determined by the frequency of the sine function.
Your question is sort of loaded, so unless you
need help with some specifics, I'll leave it at
04-07-2005, 05:59 AM
thx for your reply, may i know what is "MFC"?
you mentioned the sine function, is it a built-in function/algorithm in C++ or 3ds max?
Is there any resource that i have take it as reference?
04-07-2005, 08:02 AM
MFC is the "Microsoft Foundation Class"; it's a
faster way to program object oriented C/C++ code.
sin() function is part of the C and C++ language.
you may or may not have to include <math.h>, I
you'll find a demo that uses the sin function
to bob the camera up and down as to simulate
taking steps in a (really) simple 3D world.
As you know, the sin function will return you
values in the range of -1,1. You can use these as
multiplying factors to rock the boat. Suppose
you want the boat to sway on the z-axis from
-20 to 20 degrees, you vary the argument to the
sin function based on the current frame.
...I hope you get the idea.
04-07-2005, 02:22 PM
There are two problems here, the motion of the water, and the floating of the boat.
Water motion can be a complex fluid dynamics problem or a simple sine wave approximating the result on the surface or a host of approximations in between.
The second part of a floating boat problem would be another physics problem. A boat could just trivially terrain follow on the water surface or more accurately a boat should have mass and volume and displace the water. In a moderately sophisticated model gravity pulls the mass of the boat downwards, the force applied upwards on the boat is a function of the water displaced by the boat volume, where the force is applied would depend on where the water is displaced.
The displaced water could in turn feed back to a CFD model but that would be pretty sophisticated.
So in its simplest form a floating boat could be a massless terrain following object on a deformable mesh with some sin waves. More complicatedly it could be a CDF model of water with a volume with mass under gravity displacing that fluid with a complex physics simulation and CSG style volume intersection calculations.
I suggest you opt for something in between those two extremes, what's acceptable probably depends on whether your project is for a computational physics class or a computer graphics class.
It's a cool project concept IMHO.
04-07-2005, 09:11 PM
P.S. my bad, there are three problems, the third problem is rendering the water and there are many ways to do that, some more realistic than others.
04-08-2005, 08:29 AM
Aeluned, can you recommand me some resource of C++? as i am still thinking abt which language i should use, C++, C#, Java or OpenGL,thx!
dorbie, thx for your analysis, I would like to do my project with simplest form, as I don't have enough to do a complicated one, I am just a part time student with a full time job.
04-08-2005, 09:07 AM
Well, OpenGL isn't a language, it's an API that
you'll use over the language of your choice.
In undergrad, when I first starting programming,
I learned in Java. Once I learned C/C++ I never
looked back on Java.
In Java I believe there's a utility known as JOGL.
The Java users here can fill you in on that;
that's about the extent of my knowledge on that.
As far as a reference...you mean on the language?
hhmm...there are more books out there on C/C++
than I can count.
If you want to use a C language, pick up any book.
Petzhold's Programming Windows is a pretty good
reference for windows programming using C/C++.
He's got a book on MFC as well.
I don't know what platform you're targeting
Pick a language you're comfortable with, and I'm
certain there's a portal to OpenGL for you some
04-08-2005, 11:55 AM
Can we get off the compiler off topic stuff and stick to the on topic portion about 3D simulation and OpenGL? I'm glad folks are helping but read the origional post, everyone discussing the benefits of one language vs another or class frameworks that have nothing to do with to OpenGL should have a stab at the meat of the problem :-).
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.