Thread: [Plib-users] how do i???
Brought to you by:
sjbaker
From: Horacio S. <Ry...@Me...> - 2000-03-23 02:36:51
|
---------- Forwarded Message ---------- Subject: how much time and effort it takes??? Date: Wed, 22 Mar 2000 20:50:30 -0500 From: Horacio Sanson <Ryujin@Melissa.LoRdZ> Hi.. I've been around for a while quitely, but i have been studing a lot about 3D graphics and games. I read the OpenGL red book, the Nate and Nehe tutorials, the gtc, plib and crystal space documentation and source and still don't know how to start a game......... maybe this is not for me, but i won't quit. I've a lot of questions and here comes a big one....: How do i animate the entities in my game??? this is all theorical since i haven't write a line of code. This is the situacion: i have a player that has a lot of movements, he can walk, run, jump, duck etc. he also has a weapon like a sword, he can attack, defend, attack while jumping, dash, and has special attacks etc. My first idea is to make all the frames of the model in all positions and then draw all the frames in secuence depending of the action required. Since the player has so much movements it will take a lot of time but it's posible. But........ the player also has the ability to change weapons and armors, helmet, boots etc.. so the problem is if i have to make a model of the player with each armor, weapon and make all the frames for each weapon, armor??? if i have a model of a player and diferent model of swords, and i make the sword model child of the players hand model, the sword will follow the players hand whenever it moves???. + -> head model - -> hand model | -> body model s -> sword model s +++ s +++ + + s + + +++ s +++ | s s s | | ----- s |-- | s | \ | | \ s | | s s s | | s s s s standing attack1 for example: i have a model for the head, another for the arms, another for the body and for the sword. Then i have a secuence of frames of the attack movement. The question in a simple way is if i have to make the secuence of frames for all posible combination of body, arm, head, weapon???? i know there must be other way. If i move the arm as shown in the ascii art below, will the sword make the movement described in the ascii art?? or it will follow the hand all the time with the cutting edge pointing up??? i mean, will the sword rotate with the hand??? I have seen a lot of games, RPG at most, and i don't see much changes in the players look..... so i think what i want is not possible. Any ideas please tell me. I know this has nothing to do with PLIB, but i'm willing to use PLIB to do this, if it is possible. ------------------------------------------------------- thanks.... |
From: Land T. S. <lan...@am...> - 2000-03-23 04:01:48
|
Hello Horacio, > I have seen a lot of games, RPG at most, and i don't see much changes in the > players look..... so i think what i want is not possible. Any ideas please > tell me. I know this has nothing to do with PLIB, but i'm willing to use PLIB > to do this, if it is possible. I know this isn't going to be much of a helpful answer, but yes it is possible. A common way seems to be the parent-child relationship. The hand is the parent of the Gauntlet/Sword. You could use a full skeletal structure to represent the player and do mesh deformations (no, I have noooo idea how to do this =). You could also record all the movements of your players as individual meshes and just position the Sword/Gauntlet according to the position of a specific vertex in the player mesh (parent-child). -- +-------------------------+--------------------------------------------+ | Landshark (dave) | Visio clone for *nix? It's in the works: | | lan...@am... | http://queesio.sourceforge.net | +-------------------------+--------------------------------------------+ | X10 GUI Device Controller for *nix? http://q10.phlan.net | +----------------------------------------------------------------------+ |
From: Steve B. <sjb...@ai...> - 2000-03-23 05:13:20
|
Horacio Sanson wrote: > How do i animate the entities in my game??? this is all theorical since i > haven't write a line of code. This is the situacion: i have a player that has a > lot of movements, he can walk, run, jump, duck etc. he also has a weapon like a > sword, he can attack, defend, attack while jumping, dash, and has special > attacks etc. Well, modelling every step of motion from every position to every other position will be VERY tedious. At 60 frames per second, you'd need to build 60 models to get a one second move from (say) walking to (say) starting to jump, another 60 models for going from walking to fighting....this is going to balloon to unreasonable proportions pretty fast. What's needed is to model the character as a set of limbs with joints. The *simple* way to do it is to have each part of the guy's arms, legs body and neck modelled as a separate object - with transforms modelled for each joint. You can then store 'key frames' for the endpoints of various motions as sets of rotations and translations for each body part. You can interpolate the angles to get all the inbetween positions. This allows the player to go from partway through a walk sequence with (say) reaching forward with his right leg while his left foot is on the floor...to having both feet on the floor with knees bent ready for a jump. The storage for this is compact and the inbetweening code isn't too hard. That's essentially how Tux_AQFH models Tux and Gown. However, modelling (say) the forearm as one rigid polygonal model and the upper arm as another makes it very hard to make the elbow joint look convincing. Many modern commercial games adopt a technique called 'bones' where those joint transforms control an imaginary bone inside the forearm and another inside the upper arm. Each vertex in the 'skin' of the model is then weighted according to how close it is to each bone. (sortof)...hence, a vertex halfway along the forearm would be positioned using only the forearm bone. A vertex that's just a couple of inches from the elbow joint would use (say) 50% of the position it would have if it were transformed by the forearm and 50% of the position it would have if transformed by the upper arm's transform. PLIB doesn't directly support this stuff yet...but it's certainly something I'd like to play with if only I had the time. However, I've promised myself that I won't add major new PLIB or Tux features until PPE is a bit more complete. I'd need PPE to position the bones and set the vertex weights anyway - so that's the logical order of implementation. > My first idea is to make all the frames of the model in all positions and then > draw all the frames in secuence depending of the action required. Since the > player has so much movements it will take a lot of time but it's posible. Not really. > But........ the player also has the ability to change weapons and armors, > helmet, boots etc.. so the problem is if i have to make a model of the player > with each armor, weapon and make all the frames for each weapon, armor??? Exactly. > if i have a model of a player and diferent model of swords, and i > make the sword model child of the players hand model, the sword will follow the > players hand whenever it moves???. Yes - that WILL work because a sword is a rigid object. Doing that with (say) a shirt would be MUCH harder though. > I have seen a lot of games, RPG at most, and i don't see much changes in the > players look..... so i think what i want is not possible. Any ideas please > tell me. I know this has nothing to do with PLIB, but i'm willing to use PLIB > to do this, if it is possible. I think it's possible - and it certainly does have to do with PLIB - but the needed code for the skin+bones approach does not yet exist. Using simple rigid model articulation is much easier and can indeed be done with PLIB off-the-shelf. -- Steve Baker http://web2.airmail.net/sjbaker1 sjb...@ai... (home) http://www.woodsoup.org/~sbaker sj...@ht... (work) |
From: horacio <hs...@ca...> - 2000-03-23 13:40:58
|
Ok, is there any source of information about this terms you use in the answer: 1) simple rigid model articulation 2) vertex weights 3) bones, joints, etc.... sort of IK?? has anybody played Tenchu for PlayStation, or Dead or Alive???? how those graphics and animations are done???? later if i go on, i will ask how the camera is moved??? it seems that the camera is alive. I have a lot to learn....... ----- Original Message ----- From: Steve Baker <sjb...@ai...> To: <pli...@li...> Sent: Thursday, March 23, 2000 1:08 AM Subject: Re: [Plib-users] how do i??? > Horacio Sanson wrote: > > > How do i animate the entities in my game??? this is all theorical since i > > haven't write a line of code. This is the situacion: i have a player that has a > > lot of movements, he can walk, run, jump, duck etc. he also has a weapon like a > > sword, he can attack, defend, attack while jumping, dash, and has special > > attacks etc. > > Well, modelling every step of motion from every position to every other position > will be VERY tedious. At 60 frames per second, you'd need to build 60 models > to get a one second move from (say) walking to (say) starting to jump, another > 60 models for going from walking to fighting....this is going to balloon to > unreasonable proportions pretty fast. > > What's needed is to model the character as a set of limbs with joints. > > The *simple* way to do it is to have each part of the guy's arms, legs > body and neck modelled as a separate object - with transforms modelled > for each joint. > > You can then store 'key frames' for the endpoints of various motions > as sets of rotations and translations for each body part. You can > interpolate the angles to get all the inbetween positions. > > This allows the player to go from partway through a walk sequence with > (say) reaching forward with his right leg while his left foot is on the > floor...to having both feet on the floor with knees bent ready for a > jump. The storage for this is compact and the inbetweening code isn't > too hard. > > That's essentially how Tux_AQFH models Tux and Gown. > > However, modelling (say) the forearm as one rigid polygonal model and > the upper arm as another makes it very hard to make the elbow joint > look convincing. > > Many modern commercial games adopt a technique called 'bones' where > those joint transforms control an imaginary bone inside the forearm > and another inside the upper arm. Each vertex in the 'skin' of the > model is then weighted according to how close it is to each bone. > (sortof)...hence, a vertex halfway along the forearm would be positioned > using only the forearm bone. A vertex that's just a couple of inches > from the elbow joint would use (say) 50% of the position it would have > if it were transformed by the forearm and 50% of the position it would > have if transformed by the upper arm's transform. > > PLIB doesn't directly support this stuff yet...but it's certainly something > I'd like to play with if only I had the time. > > However, I've promised myself that I won't add major new PLIB or Tux > features until PPE is a bit more complete. I'd need PPE to position > the bones and set the vertex weights anyway - so that's the logical > order of implementation. > > > > My first idea is to make all the frames of the model in all positions and then > > draw all the frames in secuence depending of the action required. Since the > > player has so much movements it will take a lot of time but it's posible. > > Not really. > > > But........ the player also has the ability to change weapons and armors, > > helmet, boots etc.. so the problem is if i have to make a model of the player > > with each armor, weapon and make all the frames for each weapon, armor??? > > Exactly. > > > if i have a model of a player and diferent model of swords, and i > > make the sword model child of the players hand model, the sword will follow the > > players hand whenever it moves???. > > Yes - that WILL work because a sword is a rigid object. > > Doing that with (say) a shirt would be MUCH harder though. > > > I have seen a lot of games, RPG at most, and i don't see much changes in the > > players look..... so i think what i want is not possible. Any ideas please > > tell me. I know this has nothing to do with PLIB, but i'm willing to use PLIB > > to do this, if it is possible. > > I think it's possible - and it certainly does have to do with PLIB - but the > needed code for the skin+bones approach does not yet exist. > > Using simple rigid model articulation is much easier and can indeed be > done with PLIB off-the-shelf. > > -- > Steve Baker http://web2.airmail.net/sjbaker1 > sjb...@ai... (home) http://www.woodsoup.org/~sbaker > sj...@ht... (work) > > > _______________________________________________ > plib-users mailing list > pli...@li... > http://lists.sourceforge.net/mailman/listinfo/plib-users |
From: Steve B. <sjb...@ai...> - 2000-03-24 03:54:20
|
horacio wrote: > > Ok, is there any source of information about this terms you use in the > answer: > > 1) simple rigid model articulation > 2) vertex weights > 3) bones, joints, etc.... sort of IK?? Well, I'm sure there are better references - but one I know off the top of my head is the Carniverous Hexapod FAQ: ftp://ftp.netcom.com/pub/he/hexapod/charanimfaq.html ...check the parent document for other interesting FAQ's: ftp://ftp.netcom.com/pub/he/hexapod/index.html ...but I'm sure you could do better at one of the game developer sites. > has anybody played Tenchu for PlayStation, or Dead or Alive???? how those > graphics and animations are done???? later if i go on, i will ask how the > camera is moved??? it seems that the camera is alive. Moving the camera is a serious pain in Tux - I'd be interested to discuss good ways to do it. I'm still learning this stuff. > I have a lot to learn....... It never gets any better. :-) -- Steve Baker http://web2.airmail.net/sjbaker1 sjb...@ai... (home) http://www.woodsoup.org/~sbaker sj...@ht... (work) |