rag doll physics

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

Postby tundramagi » Sun May 31, 2009 4:59 am

Mizu Kitsune wrote:its sending what drawn to the video card, i.e. the models, maps, and bitmaps. the qc and models would be in the next releases dataxxx.pk3 file.


It is converting the .md3 into it's own internal format, and sending the triangles to the card.

Read md3 -> convert to internal format -> convert into triangles the vidcard can understand.

This can be changed to (when a laser cuts a model, or a string of bullets rip through an arm):
Read md3 -> convert to internal format -> convert into triangles the vidcard can understand -> time passes -> bad things happen to model -> add/subtract triangles from interal model, split it into 2 or more internal models, throw them around (or one of them), etc.... they're just triangles, we can do this.

The md3 is just a starting point, the engine can do whatever it wants with the triangles in memory.
tundramagi
Forum addon
 
Posts: 974
Joined: Sun Jan 04, 2009 4:53 pm

Postby MirceaKitsune » Mon Jun 01, 2009 12:13 pm

Since I modeled a few characters for Nexuiz in Blender, I see the character skeletal problem like this: DP only knows to 'bend' models by their animations (every .zym model has its own verticles bones and animation sets, and DP shows a certain model while that model plays a triggered animation from itself). Imo what DP needs to know is how to animate bones dynamically as an offset over the normal animations, and how to rotate and offset bones or verticles via code.

If DP could do this it would allow more nice stuff apart from ragdoll physics. A very important possibility would be for players to be seen leaning back / forward when the player aims up or down. Another nice thing would be stuff like flexible models or brushes (flags, goo, etc) which could move when you touch them or go through them :)

Just an observation and idea - Water in DP already knows to animate verticles from code. If you go in Slimepit Revisited for instance and look at the slime, the entire water surface is wavery. So maybe code from there could be reused on the bones of player models to make them move as wanted.
MirceaKitsune
Keyboard killer
 
Posts: 593
Joined: Thu Aug 14, 2008 6:48 am
Location: Romania - Bucharest

Postby Mizu Kitsune » Mon Jun 01, 2009 10:55 pm

i can make the water splash with qc, but then lots of code to make things splash differently.
+The Dude+
[-Project 2501-]
Mizu Kitsune
Alien trapper
 
Posts: 362
Joined: Sat Apr 11, 2009 7:51 pm
Location: Maridia

Postby tundramagi » Wed Jun 03, 2009 6:22 am

Mizu Kitsune wrote:i can make the water splash with qc, but then lots of code to make things splash differently.


That would be cool, nexuiz doesn't have any of that yet.

Also would the cutting model in memory that we talked about above be possible (I would think it would be as you can do what you want with triangles once in memory.) That way we could even have the lazer grids which are found in some maps... cut the victims up properly :P.
(Hell, with that you could make a sci-fi horror movie completely in DP/Nexuiz).
tundramagi
Forum addon
 
Posts: 974
Joined: Sun Jan 04, 2009 4:53 pm

Postby Mizu Kitsune » Wed Jun 03, 2009 1:04 pm

i know it is possible with md3 because you can set the variables in mesh.qc, not sure about .zym but defs.qc effects.qc and either misc.qc or something like ragdoll.qc need to be done first.
+The Dude+
[-Project 2501-]
Mizu Kitsune
Alien trapper
 
Posts: 362
Joined: Sat Apr 11, 2009 7:51 pm
Location: Maridia

Postby tundramagi » Wed Jun 03, 2009 3:36 pm

Mizu Kitsune wrote:i know it is possible with md3 because you can set the variables in mesh.qc, not sure about .zym but defs.qc effects.qc and either misc.qc or something like ragdoll.qc need to be done first.


For cutting models (deleting current model, then spawning 2 (or more) models that are the generated-by-darkplaces divided models of whatever was cut (division being to the nearest vertex in a vertex loop) divverent said that work would also need to be done on the model caching code (I guess to deal with generated in memory models).

That is the same area where automatic LOD could be added (known as decimation in 3d modeling programs IIRC (basically your merging some close vertexes, reducing the count of the triangles thusly).
tundramagi
Forum addon
 
Posts: 974
Joined: Sun Jan 04, 2009 4:53 pm

Postby tZork » Wed Jun 03, 2009 4:44 pm

Nut sure if what your talking abt is segmented models, if so you could cut the mesh in X pieces and attach them by bones (dpm, zym) or tags (md3). The wired part would be to get normal animation to work then (algorithmic? reference skelly?). Also, it would need to be client side to not rape bandwidth.

The sane way would of course be to handle it by extending the engine so expose bone control to quakec, add multianimns and so on. but there seem to be noone willing or able to do this atm.
HOF:
<Diablo> the nex is a "game modification"
<Diablo> quake1 never had a weapon like that.
<Vordreller> there was no need for anything over 4GB untill Vista came along
<Samua>]Idea: Fix it? :D
<Samua>Lies, that only applies to other people.
tZork
tZite Admin
 
Posts: 1337
Joined: Tue Feb 28, 2006 6:16 pm
Location: Halfway to somwhere else

Postby Mizu Kitsune » Wed Jun 03, 2009 9:39 pm

tZork wrote:Nut sure if what your talking abt is segmented models, if so you could cut the mesh in X pieces and attach them by bones (dpm, zym) or tags (md3). The wired part would be to get normal animation to work then (algorithmic? reference skelly?). Also, it would need to be client side to not rape bandwidth.

The sane way would of course be to handle it by extending the engine so expose bone control to quakec, add multianimns and so on. but there seem to be noone willing or able to do this atm.

segmented models, yes. dpm?
+The Dude+
[-Project 2501-]
Mizu Kitsune
Alien trapper
 
Posts: 362
Joined: Sat Apr 11, 2009 7:51 pm
Location: Maridia

Postby tundramagi » Wed Jun 03, 2009 9:42 pm

tZork wrote:Nut sure if what your talking abt is segmented models, if so you could cut the mesh in X pieces and attach them by bones (dpm, zym) or tags (md3). The wired part would be to get normal animation to work then (algorithmic? reference skelly?). Also, it would need to be client side to not rape bandwidth.

The sane way would of course be to handle it by extending the engine so expose bone control to quakec, add multianimns and so on. but there seem to be noone willing or able to do this atm.


Not talking about segmented models per-se. We'd never get everyone to make those. I'm talking about DP segmenting the models in memory along the nearest vertex string when say a laser rips through someone. This is, ofcourse, possible as dp can do whatever it wants with the triangles in memory. Div says the model caching code is where most of the work needs to be done (that would include sending the clients the new in-memory data to draw the newly generated models I would think (send them the vertex and uvmap info for the pieces). For choosing where to chopup the model the ring-loop algo can be used from blender.

In OSS, one needs to program around artwork limitations :P, but really that's usually the best way as it reduces the burden on content creators. Also it makes things "just work" as one doesn't need to be using a supported model (as all would support it thusly).
tundramagi
Forum addon
 
Posts: 974
Joined: Sun Jan 04, 2009 4:53 pm

Postby Mizu Kitsune » Wed Jun 03, 2009 9:44 pm

i said i would segment the models. so far the only thing i can get to do with models is just animate regularly them and change the textures, besides bounce and slide in static dead position.
+The Dude+
[-Project 2501-]
Mizu Kitsune
Alien trapper
 
Posts: 362
Joined: Sat Apr 11, 2009 7:51 pm
Location: Maridia

PreviousNext

Return to Nexuiz - Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron