Character topology comes out "through" clothes/props fix....

This forum is aimed at user contributions, in the form of assets, side projects, code patches and similar.

Moderator: joepal

Character topology comes out "through" clothes/props fix....

Postby devrich » Thu Feb 12, 2015 6:21 am

"Suggest and contribute"

Ok here is my idea that my brain just assembled ( Now for programming it )... Warning: programmer-speak used in the solution-theory:

Problem: Character topology comes out "through" clothes/props during animation/posing sequences.

Solution-Theory: raycast'd simulation of raytracing 'from outside' -> 'in' by_which: raycasts are emitted to all joints ( bones ) starting from offset'd x/y/z pos 'outwards' 'from' all joints ( bones ). Any clothing/props detected ( in poly/tri/quad ) remain while "secondary raycast" ( is done in secuence ) in the same vector_direction starting at the x/y/z of the clothes/props ( with all clothes/props 'hidden' from detection during this "secondary raycast" ) to detect the specific 'underlayine' character skin topology which then is 'marked ( or listed in an array/vector list ) for removal' .

Solution-Theory-Final-Phase Version A: During the final phase of this Solution-Theory; we go through and remove all character topology poly/tri/quad that is 'marked for removal' and the way to remove it it to _NOT_ remove the topology ( as in vertices ) but _instead_ we update the poly/tri/quad lists to not include the indicies for that specific poly/tri/quad thus removing the poly/tri/quad withOUT removing the verticies that made it up -- this is important to keep the verticies in there in order to avoid countless potential problems when they are referenced by MakeHuman, MakeTarget, MakeClothes, and any programs that would use the bones/verticies for animation data. Additionally by keeping the verticies all in place; we provide the possibility for re-introduction of the character model for re-modification and re-purposing without having to add back in any missing verticies.

Solution-Theory-Final-Phase Version B: During the final phase of this Solution-Theory; we go through and remove all character topology poly/tri/quad that is 'marked for removal' and the way to remove it it to _NOT_ remove the topology but instead set that specific poly/tri/quad's UV to a 100% transparent texture.

Afterwards: attach the clothes/props to the model at that same specific points so that when the character moves during animation; the clothes/prop "section" moves along with the model.

Possible hurdle is "bending" clothes/items such as at the elbow, knee, ankle, and shoulders which would need to have additional weighted verticies added to the clothes/props in order to allow for 'bending' animations.

Note to all: I put this here partially so that I can find it easily later on should I get the time and resources to set this up myself -- HOWEVER!! if you want to give it a go then by all means PLEASE do so :-D
Don't settle for what someone else made -- upPIC your own [:.:] at:
User avatar
Posts: 79
Joined: Sun Jan 25, 2015 2:47 pm
Location: Usa

Re: Character topology comes out "through" clothes/props fix

Postby brkurt » Thu Feb 12, 2015 1:44 pm

I take it that you do not do much 3d modelling in Blender; so, I will try to explain why your approach has (severe) limitations.

First: MH models are meant to be reusable, as are MH clothes and hair. Once you start to remove character topology (there are no triangles in MH models, by the way, they were all removed since MH .9). Reusability of code is standard OOP philosophy, which MH adheres to.

What this means is that the models will always be used in poses and animations that you cannot predict. :o

Second: The better solution is to create code where the body mesh, clothes mesh and hair meshes do not intersect. I'm under the impression that this is a major feat in coding, but still each mesh needs to be asymptotic to every other mesh (almost by not quite touching). In Blender this is accomplished with corrective shape keys.

Third: Mesh intersection problems should be pose-specific. This will reduce the number of variables. For example, to create a complete walk cycle with multiple clothes and hair eight basic poses are needed, with another eight intermediate poses to solve unforeseen problems. We don't have Elizabethan gowns for our female models yet, but they'll be coming along as Valentina looks like a go. ;)
Posts: 1091
Joined: Sun Feb 17, 2008 8:49 pm

Re: Character topology comes out "through" clothes/props fix

Postby duststorm » Thu Feb 12, 2015 2:42 pm

MakeHuman already contains code to remove faces hidden under geometry. These are specified manually by clothes creators.
When enabling face hiding, unused vertices are removed to make output meshes more performant for render engines, but it would be easy to simply _not_ remove any vertex. (easy in terms of code, it would just be _not_ performing a certain step, but making it all sound and easy to understand in the GUI might be a challenge)

However a raycasting approach as you suggest is possible to integrate into MakeClothes. But you probably need some benchmark poses on which you want the raycasting to happen. Making it a static pre-process will make things faster.
MakeHuman™ developer
User avatar
Posts: 2566
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Return to User contributions

Who is online

Users browsing this forum: No registered users and 1 guest