I’m trying to make armor for my character and one struggle is to get the player model underneath not to poke through.
I was wondering if most games simply just delete the player model underneath or at least hide it. I’m assuming in the games where your outfit is always the same the clothing is probably built in to the model. In video games where you can change your outfit do they just set the material of the player model to one that isn’t rendered?
I could make separate materials for the arms, legs, torso, etc. and set them to a material that isn’t rendered when the appropriate clothing piece is on.
Is this the recommended method or should I keep messing around with the weight painting? If it’s the latter do you have any advice on keeping the playermodel from poking through?
Forget about materials.
You will need character’s main skeletal mesh and separate skeletal meshes ( all have to be rigged ) for torso, pants, shoulderarmor etc. and attach each one of them to different a skeleton slot.
You could start up with character dressed in only underpants, then add every clothing element with use of script / blueprint.
Keeping body from poking through clothes/armor is hard. Even in Witcher 3 many armors and clothes have this, for example, a belt sinking into nilfgaardian armor when doing certain animations / elf lady’s legs going through skirt when sitting / etc. In my case, i just try to weight paint every ‘layer’ very similar, so this way you can minimize these intersections. Unfortunately I don’t know about any other method than weight painting, which is a pain.
That wasn’t very encouraging, but thanks for the help. For some reason even if I make the clothing by duplicating the mesh and scaling along the normals (this keeps the exact same weight paint) I still have many problems with poking through. I may still try to use an invisible material for when he’s wearing clothing. Is there a reason why people don’t do this? I can see I will still need parts of the playermodel to be visible in case you see up his sleeve or something, but if I just made the elbow invisible that would save me loads of time.
Well it’s not that “hard”, it’s just a huge amount of work. Due to how huge games like TW3, Skyrim etc. are made, you simply do not have the time/manpower/money/pipeline setup to customize each and every armor set to work without clipping for every possible animation there is.
On a smaller scale, clipping definitively can be avoided by carefully matching the armor types/sets with the animations you have. It just takes quite some time but is not impossible.
What wielkiczarnyafgan suggested might be a better approach here, create different armor meshes instead of trying to match the skin weighting of an attached clothing.
I’m also having trouble with this, we’re on the same boat. Maybe someone else could figure out some better solution…
The workaround that i’ve figured out, is to make modular body pieces (In my case I’ve divided character mesh to Head, Torso, Arms, ForeArms, Hands, Legs and Feet) - then, in my Armor/Clothing Blueprint i have boolean variables like “coversTorso”, “coversArms”, etc. If an armor covers whole torso and whole arms, i set these booleans to true and then, in function “WearArmor” it hides certain body parts depending on these booleans, in this case it hides torso and arms parts of body mesh underneath. Of course it must cover whole body part to hide it - so when an armor covers whole torso, but only a half of the arms, i only check “coversTorso”.
EDIT: Argh, i’ve somehow missed wielkiczarnyafgan’s post. Maybe because of his awesome nickname (pozdro :D) @haldolium Yeah, maybe the better word is “very time consuming” than “hard” It can be tricky to match weights properly for every pose.
I appreciate everyone’s help for sure and I don’t want to sound stubborn, but no one has shown me what’s wrong, or rather, the disadvantage to the method I mentioned.
I had this idea to set the material for a certain body part to invisible if clothing was over it. I hesitated to use this idea because I’d never heard if it being done before and wondered if there was some major disadvantage to it that I wasn’t seeing.
I could defineately use the modular meshes, but the material method seems simpler. Again, is their a disadvantage to the material method vs the modular method?
I can see the modular method might be slightly better performance-wise because it doesn’t have to deal with a mesh underneath, but since a lot of video games do have a mesh underneath that isn’t invisible either, I wouldn’t think this would be a big problem.
TL;DR
One more question before I switch over to one of your suggestions:
What’s the disadvantage to my method?
I’m not an expert in this area but i’m also curious about this, it seems like an interesting approach. Besides performance i don’t see any disadvantages, but how would you implement it? If you don’t want to have modular skeletal mesh pieces, you’ll need to apply one UV texture to whole mesh - so for example to hide only legs, would you make some masked (in legs area UV space) material and hide only masked part? Or am i missing something?
I have used Poser and Daz Studio for years. A common technique in that area is to either put the clothing and accessories on, then remove the body parts that would not be seen and save that as a character -or- move the clothing until it fits the pose. While the first option is much easier to perform, there are many times when it is not a viable option (type of clothing, how sheer it is, what parts does the clothing cover, etc).
I would recommend what Slavq mentioned with removable modular body parts, but again it only works if you can’t “possibly” see the body part behind the clothing.
I suppose there wouldn’t be much of a performance issue with either method you decide to use, but I am highly curious on how you plan on implementing the transparent materials part. Your characters, I would imagine, would have to have different material zones for clothing-related items.
Sorry for the VERY late reply, I must have missed my email notifications.
Anyway my plan was to assign a separate material to each area (e.g. torso, legs) in Blender.
This will create separate material slots in the imported mesh.
You can then assign your normal material to every single slot
When the character is wearing clothing, say on the legs, apply your invisible material to that slot.
EDIT: Looked at the date of your post and realized my reply wasn’t as extremely late as I thought. I’ve had a long week lol.
Yeah, I’m going with the material zone method.
I hadn’t thought of sheer clothing and similar situations, but in that case I figure I can just switch my method. I’ll program in the ability for exceptions to the invisibility, and with those type of clothing I’ll do the extra work of weight painting it more perfectly.
As an opinion and if given the option then optimization via material and the use of material ID’s as well as masking is a better way to go than trying to optimize at the geometry level as moving geometry around is a problem that has been solved a long time a go.
Dealing with problems like poke through in general as well as the level of flexibility as to the needs of the final result problem solving by materials seems to be the way of the future taking into consideration power apps like Zbrush which are more about making the much needed textures and materials that fixes things at a much higher level of flexibility than it is to bang around in the basement.
Masking is also a usable technique as to practical use over and above the ideals of what would be considered best practice that helps to create options of putting the detail into the areas that needs it and that does not add unnecessary detail in areas not required.
The face for example is a critical area that always needs a higher level of detail than say a big toe so even as a single unified mesh one can easily tessellate the face in LOD0, using material slots or ID’s, to a level that will support texture and material solutions (displacement and normal maps) and then the optimization done in the LOD stages.
So I would say your original post is at least a sound solution over and above trying for force a fix in the geometry which has all ways been a time consuming vampire versus painting in the solution using a displacement map that solves the annoying poke through problem.
In my opinion material usage solves problems where trying to move things around to fit you generally land up creating other problems or making things worst and wasting a lot of time and effort in the process.