Error too many bone influences per vertex

Does it ever happen in day-to-day animation skinning, that you'd want a particular vertex to be influenced by more than two bones?  If so, does that happen quite a lot, or rather rarely?

Does it ever happen in day-to-day animation skinning, that you’d want a particular vertex to be influenced by more than two bones?

If so, does that happen quite a lot, or rather rarely?

Yes — it happens regularly for a minority of vertices. The majority of verts only need to be influenced by one or two bones. The bendy parts of a human tend to end up with some verts that are influenced by many bones.

You can always reduce the number of influences by simply discarding the bone with the lowest weight, and renormalizing the remaining weights so that they sum up to 1.0.

On Xb360/PS3 it was common to have a limit of 4 bones per vertex. Going to XbOne/PS4, we found that allowing up to 8 actually did look noticeably better than 4, but we ended up using a limit of 6 bones per vertex.

Back on the Wii, we actually used to group the vertices by their number of bones, and write optimized code to process the 1-bone, 2-bone, 3-bone and 4-bone vertices separately.

We also used a LOD’ing scheme, where if a character was in the distance, their N-bone influenced vertices would only be influenced by 1 bone (the one with the highest weight).

Thanks! Very insightful. Interesting to cancel out bones in an LOD scheme.

Yes — it happens regularly for a minority of vertices

Can you give an example of which bones / vertices that would be? i.e. in which area of anatomy? By bendy parts, you mean knees and elbows?

Which bones would be used to have influence on a knee..

I can see how it would be a «knee bone» and perhaps a «hip bone»(?)

But which other bones ?

Or did you specify more than one bone placed inside the knee itself? (i.e. one for rotation and one for translation or something?)

The most complex part of a humanoid are usually the shoulders, which has is evident by the use of HUGE shoulder armour pieces to mask any problems there. Equally or more difficult would probably be the hip / thigh area, however most games get away with a small range of motions there (walking, running, jumping). But when your character is supposed to do Yoga poses, then these areas will become critical.

It depends mostly on the detail of the skelton.

A detailed skeleton often has helper bones to limit bad deformations from the skinning technique, which itself does not simulate sliding skin, volume preseravation, muscle bulges…

So it helps to add additional bones e.g. at the joint positions and in the middle of real bones, interpolating rotation to get better results.

Also very difficult areas are sholders and that butt :)

Using helper bones a maximum of 4 bones per vertex becomes already a problem.

HUGE shoulder armour pieces to mask any problems there

that’s a fun fact! :-)

I always wondered why WoW avatars have entire towers including battlements, on their shoulders.

sholders and that butt

hip / thigh area

So it’s maybe caused by the degrees of freedom a shoulder and a hip joint allow.

So it’s maybe caused by the degrees of freedom a shoulder and a hip joint allow.

Indirectly said, yes. But the real reason is: The body uses more visible muscles to achieve those degrees of freedom, and also the resulting movements cause parts of the bone to become visible through the skin in certain cases, so these areas are impossible to handle with just 2 bones.

Обновлено: 08.02.2023

Есть у меня модель (импортировал из другой игры) с текстурами, готова к нему физическая модель и скелет!
Добавляю его в Гмод как НПС. Модель ходит, стреляет. но вот беда! анимация не воспроизводится!
Чтобы использовать стандартную анимацию нужен скелет ValveBiped.
Естественно у модели скелет другой (хотя очень схож).
Сначала я пытался в файлах ragdollpsymodelreference.smd (скелетфизическая модель и сама модель соответственно) переименовать кости.
За пример брал модель humangroup01female01
Пронумеровал кости и на основе их местоположения (рисунок в приложении)
Но половину вершин перепутал из-за незнания точных координат (я тупо переводил и по аналогии переименовывал под ValveBiped). десяток костей осталось нетронутыми, несколько не влезло. В результате при старте модель буквально завязана на пять узлов! Да, теперь анимация есть.

В общем, у меня вопрос!

Как полностью импортировать модель в ГМод?
Я вижу два варианта, но не знаю, как их реализовать:

1. Вставить в эту модель скелет ValveBiped и просто подогнать вершины под физическую модель, оставив её нетронутой.
Но как? Есть подозрение, что в этом мне поможет программа XNA Mod Tool + addon ValveSource, но как именно там делать, я пока не разобрался

2. Добавить вместе с моделью собственную анимацию под её родной скелет. Но мне кажется, это сложнее. И я даже не представляю, как это сделать.

New Materials

There can only be one recolorable part per material, or perhaps you want to make a certain part of a model transparent (such as a logo) without affecting the whole texture. Or maybe you want certain parts to have certain effects such as extra reflection. Whatever the reason, adding a material is actually easy.

Click on the plus button to add more materials or minus to remove the material. Assign sets the selected faces to the selected material, Select selects all faces that are assigned to the material, and Deselect deselects all faces that are assigned to the material.

Split Model

Want to make a wristband or a part of a map its own object? After selecting the parts you want to split in Edit Mode, hit P and select the first menu’s option (separate by selection). Pressing L while hovering over a vertex will select connecting vertices, helping you select parts of the full object, but it’s up to you to practice with selecting areas.

On the contrary, hitting Ctrl+J joins the selected objects.

Как портировать модели в garry s mod

Garry’s Mod

28 мая в 14:05
does anyone know how to import mmd models to gmod?
or does someone know of a tutorial that can help me?
I would thank you a lot. Thanks
28 мая в 14:41

I know how to port models and there is a tutorial on youtube. basically once any model gets into blender you can port it. here is a playlist on porting models to sfm just change the crowbar output to gmod instead of sfm

28 мая в 14:41
I will also try to make a guide on it when I get the chance.
28 мая в 14:48
28 мая в 15:02
28 мая в 15:03

I know how to port models and there is a tutorial on youtube. basically once any model gets into blender you can port it. here is a playlist on porting models to sfm just change the crowbar output to gmod instead of sfm

SFM/GMod Porting Tutorial Part 1 (Models)

Do you want to learn how to port models but don’t know how? Either because 3D modelling is daunting, you don’t know how GMod or SFM works, or you don’t know where to get the models in the first place? I hope this tutorial will help guide you through the process.

Please let me know if there are details in the porting tutorial that require more explanation. I’d love to make this as clear as I can for everybody and it’s hard to do without remembering how it felt when this was all new (also admittedly pretty late as I write all this so I’m bound to have messed something up).

Tools

A major difficulty with porting is finding the required tools for importing, extracting, and converting, not to mention with free programs. Every tool required are included with links directing you to their source.
Blender (Steam version) is what we’ll use. This is not a Blender tutorial though Blender tricks will be shared to help kick-start your modelling knowledge.
We’re porting for SFM/Gmod so we’ll use the Blender Source Tools. Its installation instructions are found on the website.
We’re importing BFRES files so here’s the Blender script to use. If you plan to port maps, you probably want to have the KCL importer as well for the collision model. The installation is similar to the Blender Source Tools so refer to its instructions as well.
Crowbar will be used as the model compiler (raw-asset to game-usable converter). There are other options for compilation but this one is the simplest, and can also act as a decompiler if necessary.

Note that you need a SZS extractor (Nintendo.exe) to retrieve the BFRES model from the model files. Just drag the SZS file onto the executable and the work will be done for you. Adding this executable to the Nintendo.exe parameter will allow you to import SZS files directly.

Flexes

Flexes are called «Shape Keys», and they are found in the Data tab.

Shape Keys by Tomato127

Add shape keys using the plus button and remove them using the minus button. The Basis shape key will be the first key added and is simply the default state. A flex can only be edited when its slider is at 1, in case you’re experiencing odd issues unable to edit the model. Pressing the tack sets the selected shape key to 1 automatically, allowing you to sort through them and quickly edit as necessary.

Flexes can be whatever you want. The bust adjust slider is created by adding bumps to clothing using Sculpt Mode, for example.

Make sure the flex sliders are all set to 0 before compiling.

All you need is the center of the individual eyeballs, either the actual center of a sphere or the center of the sphere section, and the center point of the eyes as a compilation parameter later. I’m not too sure of easy ways to calculate this, but some models have eye bones and those positions should suffice.

More information are found on the wiki.

Model Import

Menu > Import BFRES. Find the file in the file search. Textures and bones can be imported, and animation support will be added soon. If you have Noesis, you can set its path in the parameter window within the User Preferences to unlock the DDS to TGA option. More information will be given in part 2 of the tutorial.

To view the textures on the models, it’s recommended you use the DDS to TGA option as Blender has difficulty loading the DDS files. Textures will only appear in the Cycles Render option.

Model Manipulation

More often than not model manipulation is required for the model to work in a new format. The only one required for GMod and SFM is the maximum number of weight groups a vertex is allowed to be in, which is 3 (in other words every point can be influenced by 3 bones at most). This can be assured by entering Weight Paint mode and select Limit Total on the left menu.

Limit Total by Tomato127

This menu is on the left, in Weight Paint mode. Press T if it doesn’t appear

You can leave this step until the very end, but make sure to remember to do it. If you receive a «Too many bone influences per vertex!» error during compilation, it means you forgot this step.

If you want to create models to merge onto the existing Inklings and Octolings, you need to import their bones, which can be done by decompiling the models using Crowbar.

Model Export

More often than not you need to group the model(s) with its skeleton. This allows you to work on multiple parts at once (such as for creating body groups) and choose the exported DMX’s name. This is relatively simple to do: just select the models to group and hit New Group. Name the group as you please.

Now comes the exporting! The export function is unusually not placed in the export main menu, but rather as a property of the scene.

Export DMX by Tomato127

The Export Path can be wherever you want, and the default values should suffice for both SFM and GMod. I recommend the DMX format over the SMD format due to its more convenient and up-to-date features. When hitting Export, select the group you have created.

Compilation

Tired? This is the final step, so keep it up! To be able to use the model in-game, it must be compiled into a game-specific format. The compiler requires instructions on how to create a model; these instructions are stored in a QC file. A QC file is really just a text file with a different extension, so create a text file and rename its extension. Every line is a command (empty lines are allowed for organization). Here’s a list of important commands:

$modelname path

The path to the exported model, relative to the models folder of the addon, including the mdl extension.

$body bodyname path

The path to the DMX file. There can be multiple of them, or none if they are all body groups (see below). Bodyname can be whatever you like.

$cdmaterials path

The path to the materials, relative to the materials folder of the addon. There can be multiple of them in case of shared resources. The path tends to be «models» followed by the model path (without the mdl extension) by convention.

$sequence name file

An animation for the model. This is necessary even if there’s no animation. I personally use «$sequence idle DMX file«.

A list of VMTs for the model’s alternate skins («skin» is actually the name of the texture group but goes unused). The first texture name must be the name of the material within Blender.

A list of DMX files for each model of the body group, or «blank» for no models. The DMX names do not appear in GMod but they do in SFM.

$scale number

In the offset that the model’s scaling should change, there’s no need to re-import the DMX into Blender just to scale it up; it’s simpler to change it here. Make sure this command comes before other commands or else they will not be scaled.

Inkling and gear scale is 4. NPC scale is 3. Scaling can vary from model to model so it’s recommended to set the scale here instead of scaling inside Blender.

$model name dmx file .
eyeball name bone X Y Z texture diameter angle unused scale
extra options.
>

Use this instead of $body if you’re doing NPCs with controllable eyes. XYZ is the sphere center coordinate for the eyeball (note that using $scale will not fix the XYZ coordinates!). You should read up the $model commands for more options.

$attachment name bone X Y Z

Special position relative to a particular bone, though this is mainly for the eyes. The name is «eyes» and they are normally attached to the head bone. Note that XYZ typed here should actually be X -Z Y of the eye center you calculated earlier.

Example

$modelname «testfolderbox.mdl»
$body body «inputmodel.dmx»
$sequence idle «inputmodel.dmx»
$cdmaterials «modelstestfolderbox»
$cdmaterials «modelstestshared»
$texturegroup skin < «oak» >
< «dark_oak» >
>
$bodygroup Sticker blank
studio «Sticker.dmx»
>

Open up Crowbarand find the QC file. Select the game from the drop-down list and hit compile (the UI can be found here). It’s that simple.

Note that the models won’t have textures! Check out part 2 of the tutorial (link at the top of this page).

Physics collision

It’s actually relatively easy: Just split the model and set the weight of each section to their corresponding bone to 1. Model pieces should not overlap to prevent collision glitches, and make sure each object’s origin are the same by hitting Ctrl+A and applying location.

If you want to view collisions in GMod, type «vcollide_wireframe 1» in the console.

Туториал по портированию моделей

Это туториал по портированию моделей из игры, как Portal 2 L4D2 т.д. Так что нам понадобится несколько прог, чтобы открыть VPKs.
1. GCFScape (умение пользоваться)
2. VTFEdit
Теперь откройте в папку игры (диск/Portal2/portal2/) и ищите Pak01_dir (открыть его с помощью GCFScape). После того как вы его нашли, вы должны искать только models и materials (так как они отвечают за модели). После того, как вы нашли,переносим на рабочий стол. После того, как вы их перенсили их на рабочий стол перейдите к С:/Steam / SteamApps / UserSteam/ Garrysmod / Garrysmod (пиратка: C:/garry’smod/garysmod И переносите в нёё две папки (models и materials) в папку garrysmod.

Можно ещё также создать папку в addons и туда перенести папки materials и models.

Это для Portal 2.
Чтобы вызвать GLaDOS нужно прописать в консоли prop_dynamic_create npc/GLaDOS/glados_animation.mdl

Если у вас есть например: Easy Animation Tool,Henrys Animation Tool и т.п. Они могут подойти для некоторых моделей (модулей,ГЛаДОС и прочих)

Читайте также:

      

  • Как выбить голову иссушителя в майнкрафт
  •   

  • Как улучшить крис demon souls
  •   

  • Алиса ты знаешь что такое cs go
  •   

  • Fable 3 что значит убить замахом
  •   

  • Старшая кровь ведьмак что это

Maya Forum

Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya topics.


Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.


Showing results for 


Search instead for 

Did you mean: 


  • Back to forum


  • Previous

  • Next

MarkPalcko

4112 Views, 8 Replies

‎01-17-2018

04:06 PM

Maintain Max Influences Maya 2018


Hi, I’m trying to figure out if Maya is skinning properly. I have a character I rigged and set the smooth bind skin weights to maintain max influences to 4. After I bind the skin I go an check some of the vertices in component editor to see how many bones are effecting a group of verts on the body. I’m seeing way more then four bones on a group of vertices say on the lat area that I selected. Is this the way to check to see if it’s using no more than 4 bones per vertex? If I’m doing this wrong could someone help?

Thank you!


  • Back to forum


  • Previous

  • Next

8 REPLIES 8

Anonymous

‎01-17-2018

04:13 PM

I wish I could tell how many times that has been broken and fixed over the years. This brings back memories from 2001. It has been broken perhaps every other version. If it wasn’t broken you wouldn’t have any reason to really upgrade.

MarkPalcko


in reply to:
Anonymous

‎01-17-2018

04:18 PM

lol I’ve been working on a really hard project and I swear I think I’m going crazy at times. So this is a bug?

Anonymous

‎01-17-2018

05:38 PM

Bugs happen by accident. This is intentional. Randomly reintroducing old bugs forces users to pay up to upgrade. It’s like paying to get something dirty removed that is stuck on your shoe . You don’t want to go into your home with that filth and get it all over your carpet. Your wife, or your client in real life, would divorce you.

mspeer

‎01-17-2018

06:33 PM

Hi!

This works fine here.

If you select more than one vertex, more joints may be shown in the list but not more joints than set as Max influences («4» in your case) should have a value higher than «0» per Vertex.

Please add more details for further help.

MarkPalcko

‎01-17-2018

07:26 PM

Ah ok, I see now. I was always wondering how this worked. Makes sense you have to select a single vert to see how many bones influence it If I’m trying to maintain no more then four per vertex. Is there a script or a good workflow that you could provide me to make sure I can work creatively but also be able to keep myself in check that I don’t go over the 4 bones per vertex limit? Other than that thanks for the help! Much appreciated!

-Mark

gautham.chandran47

‎01-17-2018

08:09 PM

You can go to » Windows -> General Editors ->  Component Editor » Then select the smooth skins in the tab.. 

You can see all the influences in it if you select any vertex and you can edit them in there too.

Hope this helps Smiley Happy

mspeer

‎01-17-2018

08:18 PM

Hi!

If Maya normalizes your weights interactively all time (default setting) it should keep influence at max or below.

There is no general warning tool that checks all vertices all time (computing intense), but you could create one on your own by using scripting and check this manual or automatically (for example after every action).

You could also try to use Metadata Visualization or something similar to visualize values:

https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/Maya/fil…

MarkPalcko

‎01-18-2018

02:21 AM

Ok great! Thanks again I’ll give this a try.


  • Back to forum


  • Previous

  • Next

Понравилась статья? Поделить с друзьями:
  • Error too many arguments to function long int random
  • Error too many arguments to function int rand
  • Error too few arguments for format
  • Error tokenizing data pandas read csv
  • Error tokenizing data c error expected 10 fields in line 6044 saw 11