Author Topic: Newton physics in Q2!  (Read 6456 times)

Offline [BTF]Jehar

  • Swanky Member
  • *****
  • Posts: 777
  • Gee Gee or Whatnot.
    • View Profile
    • Tastyspleen.tv
  • Rated:
Newton physics in Q2!
« on: March 11, 2009, 10:17:27 PM »
I shit you not. Paril, as part of his CleanQuake2 code project, is toying with implementing full rigid-body physics into quake 2 as a server-side mod! Don't believe me? Check out the demo!

Demo:
http://jehar.tastyspleen.net/Quake/omgnewton.dm2

Test Model (unzip into baseq2/models):
http://jehar.tastyspleen.net/Quake/skin.zip

Map:
http://jehar.tastyspleen.net/Quake/killingbox.bsp

He'll be plugging away at this, and will be tackling ropes and ragdolls next!
« Last Edit: March 11, 2009, 10:39:22 PM by [BTF]Jehar »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
Tastyspleen ==Tastyspleen.tv==! All Quake, All the Time

Offline console

  • Brobdingnagian Member
  • ***
  • Posts: 4518
  • "Man, this is the way to travel," said my attorney
    • View Profile
    • tastyspleen.net
  • Rated:
Re: Newton physics in Q2!
« Reply #1 on: March 11, 2009, 10:48:51 PM »
Nice  :bananaw00t:

  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline Jay Dolan

  • Swanky Member
  • *****
  • Posts: 644
    • View Profile
    • Quetoo.org
  • Rated:
Re: Newton physics in Q2!
« Reply #2 on: March 12, 2009, 09:49:02 AM »
Is there a project page or additional forum post for this somewhere?

Offline Buzzard

  • Newbie
  • *
  • Posts: 25
  • Q2dv Engine Developer
    • View Profile
  • Rated:
Re: Newton physics in Q2!
« Reply #3 on: March 12, 2009, 09:57:43 AM »
i just played it with him and i got to say its amazing!
« Last Edit: March 12, 2009, 10:00:38 AM by Buzzard »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline peewee_RotA

  • Brobdingnagian Member
  • ***
  • Posts: 4152
  • Hi, I'm from the gov'ment and I'm here to help you
    • View Profile
  • Rated:
Re: Newton physics in Q2!
« Reply #4 on: March 12, 2009, 10:15:16 AM »
That's awesome! I know that ya3dag did it too. But still very cool!
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
GOTO ROTAMODS (rocketgib)
GOTO ROTAMAPS (fireworks)
HappyFriar- q2server.fuzzylogicinc.com
 Tune in to the Tastycast!!!!  http://dna.zeliepa.net

Offline [BTF]Defiant!

  • Carpal Tunnel Member
  • ******
  • Posts: 1502
    • View Profile
    • Quake 2 LAN party July-August 2007
  • Rated:
Re: Newton physics in Q2!
« Reply #5 on: March 12, 2009, 09:54:55 PM »

Impressive!
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
Next Event: http://www.quakecon.org/  Fall 2014
You missed the Quake 2 LAN party at http://athenslanparty.pbwiki.com/

Offline [BTF]Sigma

  • Phenomenally Prodigious Member
  • **
  • Posts: 3059
    • View Profile
  • Rated:
Re: Newton physics in Q2!
« Reply #6 on: March 12, 2009, 10:14:28 PM »
Fap Fap!!
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline Jay Dolan

  • Swanky Member
  • *****
  • Posts: 644
    • View Profile
    • Quetoo.org
  • Rated:
Re: Newton physics in Q2!
« Reply #7 on: March 13, 2009, 10:18:53 AM »
So I finally checked this out last night.  There's a _lot_ of work left to do before this is particularly useful, but I hope he keeps at it.

Offline Whirlingdervish

  • Super ShortBus Extravaganza
  • Illimitable Sesquipedalian Member
  • *
  • Posts: 6384
    • View Profile
    • The Dervish Depository
  • Rated:
Re: Newton physics in Q2!
« Reply #8 on: March 13, 2009, 10:22:49 AM »
looks like a promising project tho. would be nice to be able to whip shit at people and hurt them ala crysis.

I can imagine takin people out with a thrown headjib and all sorts of interesting uses for it if it can be applied to the other in-game items/models.

knocking the healthpaks by ssg off of their spawn point as a wounded player jumps to them from lift on dm1 would be completely hilarious.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline [BTF]ZeTHeR

  • Full Member
  • ***
  • Posts: 148
    • View Profile
  • Rated:
Re: Newton physics in Q2!
« Reply #9 on: March 13, 2009, 12:43:54 PM »
petty cool man, pretty cool.
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline Paril

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
  • Rated:
Re: Newton physics in Q2!
« Reply #10 on: March 13, 2009, 02:17:11 PM »
So I finally checked this out last night.  There's a _lot_ of work left to do before this is particularly useful, but I hope he keeps at it.

Thanks, I guess.

There's a few problems with the angles, I have a feeling Newton doesn't like the fact that Quake2 uses euler angles, because no matter how I cut it it seems to rotate weirdly in certain conditions. I'm probably not setting something correctly, but I'm not sure yet.

I'm trying to get PAL compiling so I can implement Bullet to replace Newton, because PAL provides a better interface for this sort of engine than Newton does off the bat. Besides being able to spawn boxes that can stack if placed correctly, it has no use right now. I was able to create a hanging object, but multiple hanging objects with pivot points (ie, ropes) didn't work correctly, most likely because of the cone limits not being set correctly, or a bad pivot point.

I wrote a quick ragdoll code, which sort of works, the positioning needs to be tweaked a little (I wrote the offset matrix and swapped x and z by accident), but it functions to a basic extent.

Once I have working PAL libraries I can start on working with different shapes and release a tech demo.

I also have been working on a method to convert .map files into vertices for passing to a collision mesh.. this method was apparently not the best. q2dm1.map converted to plain float vertices is around 3 GB, so I'm going to stick to a converter to strip the .map file of all unneeded info and save the values in binary, and have the DLL interpret the info into vertices.

-Paril
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline Jay Dolan

  • Swanky Member
  • *****
  • Posts: 644
    • View Profile
    • Quetoo.org
  • Rated:
Re: Newton physics in Q2!
« Reply #11 on: March 13, 2009, 09:37:11 PM »
I also have been working on a method to convert .map files into vertices for passing to a collision mesh.. this method was apparently not the best. q2dm1.map converted to plain float vertices is around 3 GB, so I'm going to stick to a converter to strip the .map file of all unneeded info and save the values in binary, and have the DLL interpret the info into vertices.

You did something wrong, then.  There's no way it should consume that much space.  Also, there's no reason to require the .map.  You can get the information you need from the .bsp; in fact it's actually easier if you do.  There is code in the Quake2World engine that converts the entire .bsp (including submodels) into static vertex arrays and vertex buffer objects.  I would have to imagine this is basically what you're looking for.

http://jdolan.dyndns.org/trac/browser/quake2world/trunk/src/r_model_bsp.c#L619

This populates r_worldmodel->verts, r_worldmodel->normals, etc.. with arrays of GLfloat.  Each msurface_t knows its index into these arrays.  You can basically think of each msurface_t as a GL_POLYGON.  This is the case for stock Quake2, as well.  This should be all you need to convert it to any other polygon-based mesh format.  If you need triangles instead of polygons, I have a simple triangulation function here:

http://jdolan.dyndns.org/trac/browser/quake2world/trunk/src/r_model_mesh.c#L579

It just walks around the polygon from vertex 0, subdividing it into tris.
« Last Edit: March 13, 2009, 09:43:32 PM by Jay Dolan »
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus

Offline [BTF] Reflex

  • Loquaciously Multiloquent Member
  • ****
  • Posts: 5324
  • !
    • View Profile
  • Rated:
Re: Newton physics in Q2!
« Reply #12 on: March 14, 2009, 06:41:06 PM »
knocking the healthpaks by ssg off of their spawn point as a wounded player jumps to them from lift on dm1 would be completely hilarious.

I like moving items out of sight with the Volator in Whale
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
Sometimes I think it’s a sin when I feel like I’m winnin’ when I’m losin’ again

Offline peewee_RotA

  • Brobdingnagian Member
  • ***
  • Posts: 4152
  • Hi, I'm from the gov'ment and I'm here to help you
    • View Profile
  • Rated:
Re: Newton physics in Q2!
« Reply #13 on: March 14, 2009, 08:09:10 PM »
knocking the healthpaks by ssg off of their spawn point as a wounded player jumps to them from lift on dm1 would be completely hilarious.

I like moving items out of sight with the Volator in Whale

Doesn't the air fist in ChaosDM do this as well?
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
GOTO ROTAMODS (rocketgib)
GOTO ROTAMAPS (fireworks)
HappyFriar- q2server.fuzzylogicinc.com
 Tune in to the Tastycast!!!!  http://dna.zeliepa.net

Offline [BTF] Reflex

  • Loquaciously Multiloquent Member
  • ****
  • Posts: 5324
  • !
    • View Profile
  • Rated:
Re: Newton physics in Q2!
« Reply #14 on: March 17, 2009, 04:52:24 AM »
that the one that shoots 'bubbles' ?   sounds familiar
  • Insightful
    Informative
    Funny
    Nice Job / Good Work
    Rock On
    Flawless Logic
    Well-Reasoned Argument and/or Conclusion
    Demonstrates Exceptional Knowlege of the Game
    Appears Not to Comprehend Game Fundamentals
    Frag of the Week
    Frag Hall of Fame
    Jump of the Week
    Jump Hall of Fame
    Best Solution
    Wins The Internet
    Whoosh! You done missed the joke thar Cletus!
    Obvious Troll Is Obvious
    DO YOU EVEN LIFT?
    DEMO OR STFU
    Offtopic
    Flamebait
    Redundant
    Factually Challenged
    Preposterously Irrational Arguments
    Blindingly Obvious Logical Fallacies
    Absurd Misconstrual of Scientific Principles or Evidence
    Amazing Conspiracy Theory Bro
    Racist Ignoramus
Sometimes I think it’s a sin when I feel like I’m winnin’ when I’m losin’ again

 

El Box de Shoutamente

Last 10 Shouts:

 

RyU

September 03, 2024, 05:15:49 PM
And wow Derrick is still playing lol
 

RyU

September 03, 2024, 05:15:15 PM
Just know yesterday is gone and soon tomorrow will be gone too  :)
 

Lejionator

August 08, 2024, 07:28:01 PM
It's tiem to QuakeCon!!!  ;)

https://www.youtube.com/watch?v=ThQd_UJaTys
 

ImperiusDamian

July 26, 2024, 09:34:53 PM
In nomine Quake II et Id Software et Spiritus John Carmack, Amen.
 

QuakeDuke

July 26, 2024, 05:10:30 PM
Hey, shout, summertime blues
Jump up and down in you blue suede shoes
Hey, did you rock and roll? Rock on!!  ...QD
 

Yotematoi

July 24, 2024, 01:31:20 PM
Ayer me mato 5 veces para robarme en la vida real hará lo mismo? [img]<iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid0wXU2VgS7atesBcSoMz5BWMJCJajeZFVT6GzSU6TtpJGddN9kLTvWNgcZaskkbKFQl&amp;show_text=true&amp;width=500
https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid0wXU2VgS7atesBcSoMz5BWMJCJajeZFVT6GzSU6TtpJGddN9kLTvWNgcZaskkbKFQl&show_text=true&width=500" width="500"
 

Yotematoi

July 24, 2024, 01:25:59 PM
hi ya está la basura de Martin, se cambió el nombre es un ladron estupido, asi llegó a 10000[img]<iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid03hZrkDUBJPZKCuFgy5hRUy831ekKJYVRzC7ajXaKQbJ6xcPgKftLukUDfovFyEq3l&amp;show_text
https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid03hZrkDUBJPZKCuFgy5hRUy831ekKJYVRzC7ajXaKQbJ6xcPgKftLukUDfovFyEq3l&show_text
 

Yotematoi

July 24, 2024, 01:25:59 PM
hi ya está la basura de Martin, se cambió el nombre es un ladron estupido, asi llegó a 10000[img]<iframe src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid03hZrkDUBJPZKCuFgy5hRUy831ekKJYVRzC7ajXaKQbJ6xcPgKftLukUDfovFyEq3l&amp;show_text
https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2Fzoloyoze.torito%2Fposts%2Fpfbid03hZrkDUBJPZKCuFgy5hRUy831ekKJYVRzC7ajXaKQbJ6xcPgKftLukUDfovFyEq3l&show_text
 

-Unh0ly-

July 05, 2024, 05:20:36 AM

Show 50 latest
Welcome, Guest. Please login or register.
September 20, 2024, 02:31:50 PM

Login with username, password and session length