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

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0


               So I'm finally getting decent enough at understanding how skin mesh works that I'm starting to look at skin meshing  PC characters.  But I've been spending more free time lately trying to figure out the best way to do it than actually doing it and I'm sure each method is going to have hurdles I'll have to jump over to get there.

My goal is to implement this idea from the Vault, basically.  For praticality, we're talking about being skinned from the neck or chest on down.  I don't want to do it as a robe but I am not averse to doing it as a tail.

So, I can get a skin mesh working by copying it over to the p model on a player. As long as they don't switch body parts from p**_(bodypart)000, everything seems "fine".  That's exactly what I used for this experiment- though you'll need an X-Fire account to view it.  Not really a great solution, IMO.

There are two other methods that seem like the next step: Duplicating the *_g skeleton in the a_ba supermodel series and rigging the skin mesh to that from the p-model on (which would mean a new phenotype) or doing the skin mesh just like horses, as a tail, and supermodeling the tail into a_ba instead of h_ba, which I think might allow me to get around needing to make a new pheno.

What am I missing?  Are there other approaches which are a better way to implement something like this?  If so, what are the advantages?

The old "Facelifting NWN" threads had a lot of good discusson but they covered a couple of topics at once and I'm trying to focus on this one specific thing.  Because of the sheer amount and variety of free-to-use meshes and textures, I'm looking at models originally created by the worldwide Sims 2 community.  Those break down to body mesh, face mesh and hair mesh as separate articles. 

The idea is rig the body mesh to the NWN skeleton, rig the face mesh to neck_g and then the hair to head_g.  Theoretically, robes and cloaks would still work and all body parts should still be usable, though they (like robes)  might suffer from clipping.

That's the idea, anyway.  Thoughts?
               
               

               


                     Modifié par OldTimeRadio, 03 décembre 2011 - 08:11 .
                     
                  


            

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 #1 on: December 03, 2011, 07:57:29 pm »


               <breaking out...>

I don't having any cogent ideas at the moment.

I was looking at using effects to add clothing, jewelry, etc. and it is extremely limited by the nodes available to NWScript. You figure this out and find a way for me to stitch things to places *other than* head, torso, hands and left forearm and I'd kiss you.

Well, hug you.

Hmmm. Fist bump, anyway :-P

<the pins & needles>
               
               

               
            

Legacy_Rubies

  • Hero Member
  • *****
  • Posts: 508
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #2 on: December 04, 2011, 01:30:11 am »


               Not sure how close it is, but I've been continually hopping between working on similarly updated NWN characters (though I haven't worked on them in a while, now), but I'm afraid I've rather dropped the compatibility side of things, using LShoulder and RShoulder for the head, and dropping the forearm, hand, and shin nodes. I do have a rigged model, which I'd be more than happy to send you if you wanted to take more of a look at it, but you'd probably be better off just using it as somewhat of a reference as it's not perfect (it's still -very- buggy, it doesn't have support for Robes, and Cloaks are... modified a bit, so you'd be a bit stuck there too).
               
               

               


                     Modifié par Rubies, 04 décembre 2011 - 02:19 .
                     
                  


            

Legacy_s e n

  • Hero Member
  • *****
  • Posts: 654
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #3 on: December 04, 2011, 09:05:42 am »


               i dont see the difference among using a body skinmesh and a robe skinmesh: the procedure of animation will be the same and they would share same animation nodes as well...like you said there may come issues from clipping when adding clothing parts to the body (the question is: does the engine allow to "hide" certain parts like it does when adding standard cloting? i dunno that)... but even if it doesnt, the idea of having skinmeshed bodies that can be overridden by skinmeshed robes sounds cool: you can even try something with nwn2 models, thats the same split body/head/hairs/eyes... its just a looooooooong work to reassing verts to animation nodes and safely weight all of them... very very long and brainstorming work
               
               

               
            

Legacy_OldMansBeard

  • Full Member
  • ***
  • Posts: 245
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #4 on: December 04, 2011, 02:29:03 pm »


               I've been working on skinmesh ideas lately too and I pretty much agree with what everyone else has already posted.

There's not much difference between doing whole bodies and doing robes, in terms of technique and design, apart from the heads of course. Doing whole bodies allows more variety because, whilst we are limited to 255 entries in parts_robe.2da, we can have up to 65535 distinct entries in appearance.2da so the scheme I'm moving towards is to provide robes for PC/Henchman outfits and distinct appearance models for all other NPC's. But that's a matter of judgement.

You definitely need extra bones to do it convincingly and those need their own animation keys in the supermodels. It's a matter of taste what bones you add and how you animate them. Personally, I've written some software (an offshoot of CleanModels3) that riffles through supermodels, adds extra bones (about 60 of them) and computes their animation keys from other keys, allowing for gravity and so on, all done automatically. I just couldn't face adding all the keys by hand, although it might give better results if I did and it's not an approach that would suit everybody.

You can't do the whole body with one skinmesh if you use lots of extra bones because there's a hard limit of 17 bones per skin. What you can do though, and what I do, is to use several skinmeshes within each model. You need to disguise the joins somehow - perhaps a belt at the waist and so on, but otherwise this works fine with no apparent lagginess.

It's possible to overlay rigid parts (a shin, for example) over a skinmesh body if you design them carefully to avoid clipping and if you are doing the skins as robes this is a good way to get some variety. Making the parts to work equally well as ordinary parts without a robe is a bit challenging but it can be done if you design your scheme with this in mind at the start.

Having seen my own results so far, I'd say it's definitely worth the effort to get past the "stick figure" look in vanilla NWN but that the effort is not inconsiderable.

Hope this helps.

OMB
               
               

               


                     Modifié par OldMansBeard, 04 décembre 2011 - 02:30 .
                     
                  


            

Legacy_Zwerkules

  • Hero Member
  • *****
  • Posts: 1997
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #5 on: December 04, 2011, 04:16:48 pm »


               @OMB: I'd love to see some screenshots of your work.
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #6 on: December 04, 2011, 05:15:21 pm »


               How does one take advantage of all of the existing custom animations and phenotypes with a system like this?
               
               

               
            

Legacy_Nostrebor

  • Newbie
  • *
  • Posts: 43
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #7 on: December 04, 2011, 05:39:59 pm »


               Will these approaches allow the changing of skin color, tattoos, etc.?
               
               

               
            

Legacy_s e n

  • Hero Member
  • *****
  • Posts: 654
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #8 on: December 04, 2011, 06:33:36 pm »


               of course
               
               

               
            

Legacy_OldMansBeard

  • Full Member
  • ***
  • Posts: 245
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #9 on: December 04, 2011, 06:51:42 pm »


               @Zwekules - all in good time. '<img'>  I'm not ready to go public with the models yet, just sharing what I've learnt so far in getting as far as I have.

@henesua - for me, it's not a problem. I'm using some custom phenotypes anyway and I've tried the scheme out with a few custom animations of my own just out of interest and it works. Once you have your software written, it's a matter of minutes (literally) to run custom phenotypes and custom supermodels through it to add the bones and animation keys. The hard bit is writing the software ...

This assumes, of course, that you have some way of rescaling and reshaping the skins themselves to different phenotypes, or of reconstructing them from scratch in the different proportions. I've made life simple for myself by using races and phenotypes that are derived from the basic one by variously scaling height, breadth and depth in different proportions. There are tools for doing that and it saves a lot of hand-crafting.

@Nostrebor - yes.
               
               

               


                     Modifié par OldMansBeard, 04 décembre 2011 - 06:54 .
                     
                  


            

Legacy_s e n

  • Hero Member
  • *****
  • Posts: 654
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #10 on: December 04, 2011, 07:11:24 pm »


               OMB you're the Master of the Bit
               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #11 on: December 05, 2011, 03:30:23 pm »


               Lots of interesting responses! I should have been clearer in my original post, though.  I'm trying to find the least-intrusive, least-complicated way to add a skin mesh body (neck or chest on down) to the PC while still allowing for dynamic heads and maybe heads and hair, if I attach heads to the neck model.  For discussion's sake, though, I'll just leave it at head and body meshes.

Using a non-dynamic appearance won't work for what I'd like to do because...it's non-dynamic.  To get the variety (outside of envmap or VFX tricks, etc.) of dynamic models with non-dynamic models requires a prohibitive amount of data, most of which is redundant in comparison to a dynamic model.

Using a robe is much better because I can now mix and match my skin mesh body with my head and I don't have to generate all the possible combinations like I would with a non-dynamic model approach.  The only problem is that it eats into an armor slot, which is more obtrusive than I'd like.  I would like it to eat no armor slots.

There's nothing "wrong" with either of those two methods.  They're just the wrong tool for the job if the job, specifically, is creating an unobtrusive (don't eat an armor slot) skin mesh body on PC which you want to have dynamic heads for.  Late yesterday I did find an article in the Omnibus which I'd overlooked because of the misleading title, called "Scaling within NWN" and which makes me think that mostly mimicing the way DLA horses is the best it's going to get.  Maybe.

Unless someone can think of a better approach for getting the skin mesh body onto the player which still allows for dynamic heads and doesn't use an armor slot?  Let me know your ideas if you can!

@ Rolo Kipp - Never even thought of that, great idea!  I think the farthest I ever got thinking along those lines was something like the claw attachment on the lizardman I did for the last CC challenge.

@Rubies - Thank you for the offer!  I'm really just trying to focus on how far I can get with a 14/15 bone skin mesh model (won't include belt as a bone, optionally includes neck as one).  I'm also trying to stick as close as I can to the existing framework, skeleton-wise.  Not really out of love, but necessity and compatibility. 

@S E N - Hopefully my explanation clears up why I'm trying to avoid robes.  Nothing wrong with the concept, it's just the limition of using up an armor slot  I'm just being picky to start with and see how much I have to yield to the game engine. 

...but even if it doesnt, the idea of having skinmeshed bodies that can be overridden by skinmeshed robes sounds cool: you can even try something with nwn2 models, thats the same split body/head/hairs/eyes.

Something in that ballpark is my hope.  I'm a fan of creative scavenging so kitbashing together armor from one source, body meshes from another, etc. is not just an option, it's my main focus.

@OldMansBeard -  Your project sounds interesting and I'd also like to toss on my request for screenshots or, really, video based on what I imagine you're doing.  Bones, skin mesh are done through vertex programs and so even what most think of as "very complex" models, bone-wise, seem to play very nicely as those calculations take place on the GPU.  If you click on the white X in my signature line (or here) that will bring you to my XFire videos page.  I uncovered some interesting though esoteric behavior regarding the bone limit in NWN, and those videos start with either "52 bones" or "53 bones" and run, chronologically, from lower right to upper left.  As far as seams on skin meshes go, you might look into the phrase "average normals" on Google.  I haven't had time to play with it much, myself, but it seems promising and has apparently been used for some time to address that issue.

Thank you for the information and it's nice to see someone else also working to get us out of "the sticks". '<img'>

@Heneusa - Since any solution would supermodel into a_ba, it shouldn't really have much of an impact.  At worst, it would require duplicating 14 or so *_g bones (that make up the body, sans belt and starting at the neck or below) in any of the animations.  The duplication of those bones is necessary if I can't come up with a way to get skin mesh using dynamic bones to play more nicely.  I don't have many more tricks to try, but at least one more I haven't used yet.  Seeing what I'm trying to do, if you have any suggestions to make it more efficient, now's the time they would be the most helpful.

@Nostrebor - Yes, as tails can use PLT.  Though you wouldn't necessarily be required to use them.
               
               

               


                     Modifié par OldTimeRadio, 05 décembre 2011 - 03:32 .
                     
                  


            

Legacy_Rubies

  • Hero Member
  • *****
  • Posts: 508
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #12 on: December 05, 2011, 04:46:22 pm »


               In terms of animation, mine are rigged up almost exactly to the standard NWN models. Replacing the LShoulder and RShoulder nodes with the Head node would let you use a_ba as a supermodel. I went with cloaks as 'head' nodes due to the fact that you can then get hats/helmets that hide hair/head separately, but it shouldn't take too long to convert. I'll try throw together an untextured model with the head model switched that you can take a look at. '<img'>

On a side note, that WOK walkmesh placeable is -really- interesting!
               
               

               
            

Legacy_OldTimeRadio

  • Hero Member
  • *****
  • Posts: 2307
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #13 on: December 05, 2011, 06:26:03 pm »


               Ah, now I think I see what you're talking about.  Yeah, if you want to throw it onto Mediafire and either post a link here or PM me, that would be great.  Thanks a lot, Rubies!
               
               

               
            

Legacy_henesua

  • Hero Member
  • *****
  • Posts: 6519
  • Karma: +0/-0
Looking for the "best" way of implementing a skin mesh on a PC. Thoughts?
« Reply #14 on: December 05, 2011, 08:27:44 pm »


               I'll point the Q folks in the direction of this thread, as some of the models that I wanted to work with Ragnorok's alternate combat animations are presently problematic. These are the long coat models which have super model ba_coat or some such. Perhaps it will be easy for them to fix those up.