Author Topic: Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?  (Read 2404 times)

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #60 on: July 12, 2012, 11:48:24 pm »


               

OldTimeRadio wrote...

...

I'm pursuing this whole thing from the standpoint of using full robes (from the neck down) and then turning the body parts themselves into the accessories I want by setting the robes 2da so that it doesn't hide them.  Plus the obligatory head/wing hair thing, and Ippensheir-style VFX, blah blah blah.  There's an ACBONUS value attached to body parts, though, so, I mean, yeah, that could get a little weird.  I'm always down for a little weird, tho.

...


  That's the general method I'd been trying with the monsters as robes tests I'd been doing.  I think it has merit for PCs as well, and at least standard PC races won't run into the problem I was having with non a_ba rooted models not being animated as robes.

  Have you managed to have it take a model specific plt?  That was the single largest problem I'd had with the method, I had to use the pmh0 plt even with setting them as a new race letter.
               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #61 on: July 13, 2012, 12:47:01 am »


               

Failed.Bard wrote...
  Have you managed to have it take a model specific plt?  That was the single largest problem I'd had with the method, I had to use the pmh0 plt even with setting them as a new race letter.

I'm not sure I have.  Going for the PLT version of a skin was always the last possible thing I'd do and I tend to use this trick when testing so...no?  I thought all that was settled business from 1.67:

Change to allow plt texture support on custom created part-based creature races. Part-based creatures (past row 481 in the appearance.2da) will now use a plt texture name based on the "RACE" letter specified in the appearance.2da (rather than always using the pfh0_ prefix). If your custom part-based creature is past row 481 in the appearance.2da and you haven't specified the race specific PLT texture the game will use the human PLT texture by default.

See also: Omnibus: custom AND race AND skin AND 1.67, and/or here

I've never done any of this stuff, AFAIK.  Just pointing to something useful, hopefully.
               
               

               
            

Legacy_MerricksDad

  • Hero Member
  • *****
  • Posts: 2105
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #62 on: December 28, 2012, 08:19:47 pm »


               Keep this thread alive:

I've been working on this exact thing since 2006 and I apparently missed this entire conversation. Keep watch in the next few weeks for the start of my own take on how to do it. You guys seem to have stumbled across all the same things I did when I first started. And fortunately, found out a few unrelated things I needed to complete the task (especially OTR).

My intent is to replace the entirety of the human animation tree with a new one, which of course contains a skin like those you were all working on. I then intend to release an entire package of replacement body parts that go over the skin, as shown in OTR's pics. With proper modeling in the skinmesh, they really do look good. I have just a tiny set of body pics waiting for approval on the vault, but soon I will show some ingame pics with gear on.

Is there really a bone limitation!? hmmmm, that will suck

Ive merged the human animation tree into a single model so I can run all my automated parts on just one file. Nothing is keeping me from breaking it up later of course. I've added (via scripts) a few more nodes (working on shoulders that actually work), and animations for those nodes. The female model also has jiggle built in that looks much more fluid than danglymesh, AND being hard-coded into the animation, is not apt to spill beyond armor parts built for that base skin.

This actually was pretty easy to skin because I can hide all the bones in gmax and use the animation slider to move parts around for better skin-to-bone painting.

After I finish both m and f human, I will start work on some custom non-humans. Not sure about what to do with phenotypes though. A lot of the games out there now have so many changeable features, like girth, that a single large phenotype doesn't seem like enough. I might do a skinny, realistic, and...er...big boned. Since its all in the skin, its super simple really to make phenos.

be back soon
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #63 on: December 28, 2012, 08:44:33 pm »


               <practicing yoga...>

I am so very interested in this that I've gone ahead and published the incomplete project so you can see what's got me excited :-)

<...to stay flexible>
               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #64 on: December 31, 2012, 03:02:21 am »


               Looking good! 

After looking over both your notes in this thread and on the Vault, the biggest warning/advice I can give with this particular task is as soon as you can, try to get a complete end-to-end process done to make sure the path you think is going to work, works.  Just confirm whatever workflow you have in mind will really get you 100% there. 

As far as bone limits go, you can get around any problems there by slicing your skin up into smaller chunks.  The last time I was playing with this I was using a weighted mesh which had way too many bones for NWN and whose bones I had attached to NWN bones so as to benefit from the existing NWN animations. 

I get around the bone limit by duplicating the skin mesh multiple times and then deleting portions of each duplicate so what's left has ~16 bones or less, with all unused bones removed.  So the girl in that video is multiple skin meshes: IIRC, one for her neck, chest, pelvis, thighs, shins and feet.  One for her arms and one (each) for her hands.  I kind of mix it up a bit when I'm testing, but I believe that's how this specific one was chopped up.  At most, there was one more segmentation, chopping the torso/legs horizontally at the navel or thereabouts.

That whole multi-skin process works absolutely fine- no problems at all.  It looks a little crazy, but it's not.  A good example of this technique is NewByPower's Talim robe.

I've moved onto experimenting with something I've been calling The Shady Sands Shuffle but the idea is so "out there" I've hardly worked on it am a little embarrassed to describe it until I can confirm it actually does what I think it will.  It would probably never come close to the nice looking bodies one thinks of with typical skin mesh, but trades all that away for (hopefully) an easier-to-achieve functionality using body parts to hold adornments like earrings, bracelets, etc.

So get your project done quickly so I can drop all this madness and become a contented pensioner making armor parts for those skin mesh bodies!

'<img'>
               
               

               


                     Modifié par OldTimeRadio, 31 décembre 2012 - 03:03 .
                     
                  


            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #65 on: February 05, 2013, 05:38:02 pm »


               This is mostly just for people who are actively working on this sort of thing and probably not so interesting to anyone else.  Even then...(lol!)

Since I started this thread I've tried every way to attach skin mesh to a PC that I can think of.  And while the goal is an improvement of some sort over the existing bodies we have, during the work I wound up rolling the problem around in my head and looking at it from different angles.  Just identifying what the problem was, was interesting, because it's really multiple problems and/or multiple goals.

All the stuff about dynamic armor and the ancillary issues of dynamic hair etc., aside, there's really a simple issue at the heart of all this, which is the Wooden Puppet Blues.  They're caused because the individual armor/body parts of a model are shaded independently of each other.  So, when a forearm is shaded, the engine knows nothing about having a hand attached or being attached to the bicep.  It just knows to shade the forearm model.  And because of the shading system, the darkest part of the bicep enters into the brightest part of the forearm and so on..

To wit:

'Image

You can get around this by using flat shading for all your areas, which is a terrible idea, or you could set the model to render in such a way that the shading doesn't affect it, such as I describe above.  Problem with this is that you wind up essentially making your model self-illuminating to blast away the shading, and that's not really much of a solution, either.

If anyone knows how to selectively turn off the shading for a model without causing it to become brighter, please post it!  Because that little trick, alone, could make most of the worst of the Wooden Puppet Blues go away, right there.

So the idea goes that doing the whole model (or as much as possible) as one solid skin mesh will result in even shading over the whole model or at least prevent the wooden puppet blues.  And that's true but the shading still highlights even the tiniest differences in a skin mesh.

Here are some experiments (which will hopefull move to WIP status soon) being displayed in the same unflattering lighting conditions.  Heads are the only normal geometry.  The neck on down, everything below the head, is skin mesh:

'Image

So it gets better, but there are still issues.  By no means are these done but the female has much more work put into her skin weighting and even then, look at the shading between the pelvis and the thigh.  I'm not saying these are paragons of anything, so someone can probably do better- but these are what I'm working with now. 

These bodies are very low-poly.  I think they're both almost exactly 1.5k faces each and at least for the male the individual part-based geometry is around 500 faces.  So pretty much 3x the faces.

A reasonable question to ask is "Is it worth it?", then.  I think it is.  Technically, I could make a case that these robes actually run faster than their part-based counterparts, even at 3x the faces.  But the main thing is it cures most of the Wooden Puppet Blues and things like that nightmarish shading between the torso and the pelvis.

But you give up dangly boobs and dangly boobs are not inconsequential, IMO.  '<img'>

Interestingly, out of all the approaches I tried, doing a full creature appearance where the skin is baked into the creature model itself gave the best result, though it too lost use of dangly.  No PLT either but things like the mythical head-tracking while in a skin mesh worked fine.  I would say OldMansBeard's approach, while seemingly limited, does have an awful lot going for it, especially with his purported enhancements to the bones, bringing back something like dangly for hair and breasts.

Having come to the conclusions I have, it's difficult to imagine a world where I do these as anything but robes.  The compatibility is high, whereas other approaches seem to run into roadblock after roadblock and also require what is probably a full re-do of the entire armor system.  Not saying it's not do-able, because I've seen enough to believe that it technically is.  It's just the tradeoffs.  At least that's the way I'm looking at it, today.  The tradeoffs along the way seem to have eaten at the usefulness of the dynamic armor/skin mesh idea to the point that I look at robes and they look like a better deal.  Again, that's just my arithmetic.
               
               

               


                     Modifié par OldTimeRadio, 05 février 2013 - 05:38 .
                     
                  


            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #66 on: February 05, 2013, 05:58:17 pm »


               Your odyssey with skinmesh for NWN has been very interesting to watch. I've learned a great deal.

In some ways despite the wooden doll shading problem there are some advantages with a parts based model that NWN unfortunately never took advantage of. Its the interchangeable parts that enable great variety.

These skinmeshed models however do look a great deal better.

I suppose NWN needs a HAK engine level hack that enables on the fly mesh manipulation so that we can customize these wonderful creations of yours. I wonder if PLT swapping is possible too.
               
               

               


                     Modifié par henesua, 05 février 2013 - 05:58 .
                     
                  


            

Legacy_painofdungeoneternal

  • Sr. Member
  • ****
  • Posts: 313
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #67 on: February 05, 2013, 07:13:23 pm »


               Interesting, that is kind of how NWN2 does it, with each being appearance being similar to the robes shown here. I really prefer having the options of both parts and robes in the same game, but it comes down to your desire for better appearance, or giving the players more options. Be nice if we could take the various NWN2 clothing appearances and export them so they are usable in NWN1 since they look like they are already basically doing what you are describing.

( I've always wished we could redo the model exporting tools so we could actually export an appearance to multiple games without the modeler having to really understand more than how to use the exporter, with the goal of actually getting a larger single modeling community whose work can be used by a lot more players since they are not limited to a single game. Just imagine a person doing a classic monster, and being able to see that monster in NWN1, NWN2, Kotor, Dragon Age, Jade Empire, or whatever similar games that support semi-similar formats, if a new game shows up like a real NWN3, there would just have to be a new export plugin setup and then the modeler could export all their models to that new game, thus making the content easy to migrate, yet still capable of supporting ancient games. )
               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #68 on: February 05, 2013, 07:27:16 pm »


               @Heneusa - Well, I don't want to give you the impression that things are as borked as they might seem.  All this stuff I'm doing is based around a very specific goal of mine, which (although this was done with TQ models) was originally centered around using materials from the Sims 2 modding community.  The hope was to try to kill a bunch of birds with one well-placed stone and produce something which wasn't just an improvement, but something that was modder-friendly for customization by other folks.

The technical base is actually pretty straight forward to accomplish:
1. Make a robe using exsiting individual body parts.
2. Edit armor parts so only the armor-looking bits remain, not the body portions.

You just shuffle all the PC body parts to a robe and shuffle the armor from the robe to the customizable nature of the multipart system, leaving some or all of the body parts visible in the parts_robe.2da:

'Image

Boom!  That's it.  I've simplified it a little bit but not much.  That's Ashtefere's system, just done in a shady (read "dodgy") way.

The two problems are A) It looks as bad as existing NWN models do (because you're using existing body parts to craft the "nude" or "jumpsuit" robe) and 'B)' It exposes the next step of the process, which requires scripting and also a sort of all-or-nothing commitment to replace big chunks of the existing armor parts so everything works with the new paradigm.  Environments where things are invisible unless they're wearing robes, a toolset which only displays the human normal phenotype when crafting armor...the little problems start to stack up and make whole new problems.

I have a splitting headache for some reason (not usual for me), but I just ran through this in Max and in-game and I don't think I'm missing anything in what I describe.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #69 on: February 05, 2013, 07:51:29 pm »


               OTR, I fully understand what you are presenting, and I agree with the advantages. With 2DA work for the robes (so that the robes do not replace anything), and remaking as invisible the default models for the parts based bodies it all makes sense as a very interesting approach.

But what is very interesting for me as a builder making creatures is the ability to stitch together monsters frankenstein style. So I was simply pointing out that each of these methods has its advantages and disadvantages.

Lately as I hear the call of Unity more strongly these days I am considering the zombie game I've been wanting to make for awhile. It will definitely use a rag doll and a parts based approach. The ability to lose body parts on the fly or to swap them in and out is just too tempting for that kind of game. Its actually a fundamental part of the game play, but ... thats the future for me not the now.

However like I said I definitely understand the value of skinmesh aesthetically. It seems to me however that to fully take advantage of it you'd need the ability to apply procedural modification to the mesh and/or the texture. So it would be interesting if some of the technical wizards are able to create this for us.
               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #70 on: February 05, 2013, 08:14:10 pm »


               Okay, think I might have misunderstood what you were saying.  Just to be clear, my last message shows a different method (Ashtefere's dynamic armor system) than the message I posted before it (normal robes). 

I'm sure Unity has many more features along those lines but Virusman did came up with a great way to switch textures on the fly using NWNCX:

'Image

I don't know if it works with PLT's, though.  As far as the mesh deformation, there's regular body part removal using scripting with a dynamic race, of course, but unfortunately I think it would be quite difficult with skin mesh.
               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #71 on: February 05, 2013, 08:21:30 pm »


               

painofdungeoneternal wrote...
Interesting, that is kind of how NWN2 does it, with each being appearance being similar to the robes shown here. I really prefer having the options of both parts and robes in the same game, but it comes down to your desire for better appearance, or giving the players more options.

They're not mutually exclusive, but with the materials I have chosen they sort of are.  I have a little more flexibility when it just comes to textures and there could be ways of using better textures to hide the lower quality of default NWN player models.  The shaidng thing would still be present, although quite a bit less using the Shuffle I have the screenshot of.  But, again, that leads to other issues, LOL.
               
               

               


                     Modifié par OldTimeRadio, 05 février 2013 - 08:22 .
                     
                  


            

Legacy_painofdungeoneternal

  • Sr. Member
  • ****
  • Posts: 313
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #72 on: February 05, 2013, 08:35:41 pm »


               Can i get what 2da work is needed to implement and support these, are they one time changes or something needed to support each robe on an ongoing basis. ( I have what is basically a simple scripting language to store what changes need to be made to 2da files for a given package )

Just curious as to if my systems could be used in conjunction to what you are doing here, i also have integrated usage of skywings script compiler, to basically build what is needed based on what happens to be installed. ( i already have some ideas from RWS related to automated generation of tilesets 2da files based on available models )
               
               

               


                     Modifié par painofdungeoneternal, 05 février 2013 - 08:36 .
                     
                  


            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #73 on: February 05, 2013, 08:45:46 pm »


               <dropping a line...>

Pain, re the automated generation of tilesets, Merricksdad has a lot of stuff in storage that he's dredging out.
Thread in Regional Mods
Thread in the Jan CCC

Don't mean to hi-jack this thread, lots of chewy details here I love :-) But I'd be happy if you scanned those posts.

@ OTR: I'm following this with rapt attention :-)

But...*sigh* ...back to work.

<...of pater>
               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #74 on: February 05, 2013, 08:55:51 pm »


               Not much 2da work required.  The first method would just have parts hidden in part_robes.2da, the second wouldn't- in order to allow the armor parts for traditional armor to "show through".  No idea which of them will get the most love or when they'll be released, but I'm thinking my work on these Titan Quest community models is going to culminate only in regular old robes.  MerricksDad and Failed.Bard are two other modders who sound like they might be actively working on the more complex system and so keep an eye out for their posts, too.

Edit:
@Rolo - No worries! 
               
               

               


                     Modifié par OldTimeRadio, 05 février 2013 - 08:57 .