How often are physics forumlas used in 3D programming?

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
Bullet Pulse
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 89
Joined: Sun Feb 21, 2010 6:25 pm

How often are physics forumlas used in 3D programming?

Post by Bullet Pulse »

Like the title says, how often are physics formulas used in 3D programming?
For example, would you more commonly use an iterative solution find an object's location over time, or a formula that calculates it at time x?
Image
User avatar
Arce
Jealous Self-Righteous Prick
Jealous Self-Righteous Prick
Posts: 2153
Joined: Mon Jul 10, 2006 9:29 pm

Re: How often are physics forumlas used in 3D programming?

Post by Arce »

I spent a good 20 mins typing a nice, detailed response showing how you could achieve the same thing either way or use the two interchangeably, and stating that it really just depends.

But, since it took so long to type, when I hit sumbit, the motherfucker made me relogin, thereby clearing the entire form. GODDDDDAAAMANIT.


So, somebody else take this one, please?
<qpHalcy0n> decided to paint the office, now i'm high and my hands hurt
K-Bal
ES Beta Backer
ES Beta Backer
Posts: 701
Joined: Sun Mar 15, 2009 3:21 pm
Location: Germany, Aachen
Contact:

Re: How often are physics forumlas used in 3D programming?

Post by K-Bal »

If you have interacting objects I don't see how you could solve this with a non-iterative approach.
User avatar
Arce
Jealous Self-Righteous Prick
Jealous Self-Righteous Prick
Posts: 2153
Joined: Mon Jul 10, 2006 9:29 pm

Re: How often are physics forumlas used in 3D programming?

Post by Arce »

I'll type ya a response tomorrow, I hope.

Sorry man.
<qpHalcy0n> decided to paint the office, now i'm high and my hands hurt
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: How often are physics forumlas used in 3D programming?

Post by Falco Girgis »

K-Bal wrote:If you have interacting objects I don't see how you could solve this with a non-iterative approach.
Exactly.

You'll find that 99.99% of actual "formulas" are useless in game programming, because they are all a function of time. In a video game, every frame is another timestep, so the only place that these formulas even really make sense is going from one frame to another.

The math is still the same and the concepts are still extremely important--even more important since you can't blindly use a formula you're given to determine a value.
qpHalcy0n
Respected Programmer
Respected Programmer
Posts: 387
Joined: Fri Dec 19, 2008 3:33 pm
Location: Dallas
Contact:

Re: How often are physics forumlas used in 3D programming?

Post by qpHalcy0n »

In 3D programming you'll see them quite frequently. However, you often will not see them in "textbook form". The methods you learn about in the classroom are exact methods which are often very computationally expensive. You're more likely to see the same formulas but widdled down under "assumptions" that reduce the complexity of the formulae. For example, under the assumption that delta time remains constant or some other action, direction or force remains constant.

Interestingly, modern graphics hardware implement partial derivative functions which will give you average rate of change over X and over Y in a given domain natively. They're somewhat expensive but they're pretty damn handy in terms of predicting from motion buffers.
User avatar
davidthefat
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 529
Joined: Mon Nov 10, 2008 3:51 pm
Current Project: Fully Autonomous Robot
Favorite Gaming Platforms: PS3
Programming Language of Choice: C++
Location: California
Contact:

Re: How often are physics forumlas used in 3D programming?

Post by davidthefat »

There is an article in the Game Developer Magazine about physics
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Re: How often are physics forumlas used in 3D programming?

Post by Falco Girgis »

GyroVorbis wrote:
K-Bal wrote:If you have interacting objects I don't see how you could solve this with a non-iterative approach.
Exactly.

You'll find that 99.99% of actual "formulas" are useless in game programming, because they are all a function of time. In a video game, every frame is another timestep, so the only place that these formulas even really make sense is going from one frame to another.

The math is still the same and the concepts are still extremely important--even more important since you can't blindly use a formula you're given to determine a value.
I would actually like to partially retract this statement. What I said wasn't completely true. 99.99% of the time, functions of TIME are not used. General equations that are instantaneous such as the law of conservation of momentum are used constantly (albeit in different forms than you see in your textbook as qp has said).
Post Reply