I've actually got questions on two topics, but they seem related enough to include in one post -
Equipment:
As I'm working on making an RPG, I'd like to be able to have equipment fill other "slots" on the character (helmet, body armor, boots, etc.) I noticed while reading through the docs that weapon models are created with the portion of the skeleton that they're attached to the pelvis through; is this all that would be needed to render other pieces of equipment? (For instance, a helmet would include the head and spine down to the pelvis?) If I include other body types, do I need to then develop alternate skeletons for all the weapons/equipment that it can use as well? I'll also need to figure out how to include this in the update frames...
Hardpoints:
This is intended to be a largely mech-focused game, and being able to customize players' vehicles is a major theme. I'm hoping to have the vehicles render with different weapons actually visible on the model. I'm also planning to use several different scales and form factors for the mechs, and later have other vehicle types as well - which means that building a skeleton that matches the weapon's potential wielders will become very cumbersome! (Even more so when a given weapon may be equipped in more than one "hardpoint"). I'm not very familiar with the models, and how the renderer handles them - is there a way for the renderer to attach a given weapon model to a particular "hardpoint"? Maybe attach to a particular bone in the vehicle model? Does the renderer even have an awareness of the positions of the bones? Does it make any difference if these weapons won't change while the vehicle entity is "active" on the field?
Equipment and hardpoints
Re: Equipment and hardpoints
Hi, yes, and I answer them "as one":Stoo wrote:I've actually got questions on two topics, but they seem related enough to include in one post -
![Wink ;-)](./images/smilies/icon_wink.gif)
The sub/super-model system is quite easy to use and powerful:
It aligns bones in the sub-model with bones of the same name in the super-model.
It doesn't require that the sub-models skeletons begins at the skeleton root of the super-model.
For example, the root bone of a weapon model (the sub-model) could be "right hand", if the player model (the super-model) somewhere has a bone with that name in its body.
Another example, the weapon could have bones like "right shoulder" and "right hand", that would align with the players bones of the same name, but if between shoulder and hand, the player has "upper right arm" and "lower right arm", and the weapon has something else or nothing at all, it would work as well.
This system is very useful, because it combines perfectly well with animations, making sure that the sub- and super-models are always properly aligned and oriented to each other. It is also very easy to use in code.
The most difficult part is probably in the model authoring software, creating the skeletons and assigning proper bone names (the latter can also be renamed and tweaked in the Cafu Model Editor, if required).
About "hardpoints": We don't have exactly something like this at this time, but as a first alternative, I'd explore if the sub-/super-model cannot be used for this purpose. If you want to be able to support multiple attachment points (like "left hand" and "right hand") it would have to be added, but I guess that that would be relatively easy.
As a second alternative, we have "GUI fixtures". They're actually intended to attach GUIs to the models, but I can imagine that they could be used for other purposes as well.
![Wink ;-)](./images/smilies/icon_wink.gif)
Only if none of these meet your requirements, I'd suggest to add another explicit feature for naming individual vertices, e.g. for attaching arbitrary items to them for rendering.
Best regards,
Carsten
Carsten
Re: Equipment and hardpoints
Okay - so to make a pistol that could be wielded in either hand, I'd need two skeletons (and, presumably, two models) - one with a right hand bone, and one with a left; and decide which is appropriate to use (as well as animate each side). On the other hand (Carsten wrote: For example, the root bone of a weapon model (the sub-model) could be "right hand", if the player model (the super-model) somewhere has a bone with that name in its body.
Another example, the weapon could have bones like "right shoulder" and "right hand", that would align with the players bones of the same name, but if between shoulder and hand, the player has "upper right arm" and "lower right arm", and the weapon has something else or nothing at all, it would work as well.
![Razz :P](./images/smilies/icon_razz.gif)
I'd forgotten all about the GUI fixtures - they may be exactly what I'm looking for!Carsten wrote: About "hardpoints": ... As a second alternative, we have "GUI fixtures". They're actually intended to attach GUIs to the models, but I can imagine that they could be used for other purposes as well.![]()
What about using an intermediate "adapter" mesh? Vehicles might have a series of hardpoint_1, hardpoint_2, etc. bones, then a series of skeleton-only meshes with a hardpoint_n bone and a mount bone (and no renderable mesh) attaches to each, then each weapon mounts to the mount bone? Or is going to sub-sub-models likely to get hairy?
Re: Equipment and hardpoints
Yes, unless you'd want to play tricks with the bone names in the C++ code.Stoo wrote:Okay - so to make a pistol that could be wielded in either hand, I'd need two skeletons (and, presumably, two models) - one with a right hand bone, and one with a left; and decide which is appropriate to use (as well as animate each side).
I cannot recommend this though; never done it myself and don't know if it will work.
On the other hand ()
![Cheesy Grin :cheesy:](./images/smilies/icon_cheesygrin.gif)
Never tried it before, but I like the idea, it's a very nice one and better than hacks with bone names!What about using an intermediate "adapter" mesh? Vehicles might have a series of hardpoint_1, hardpoint_2, etc. bones, then a series of skeleton-only meshes with a hardpoint_n bone and a mount bone (and no renderable mesh) attaches to each, then each weapon mounts to the mount bone? Or is going to sub-sub-models likely to get hairy?
Submodels are designed to work hierarchically, so this should work immediately (if it doesn't, this would be a bug to be fixed, but either way, I don't see much of a problem here).
Best regards,
Carsten
Carsten
Who is online
Users browsing this forum: No registered users and 40 guests