Aller au contenu

Photo

creating taller elves through 3ds max


  • Veuillez vous connecter pour répondre
68 réponses à ce sujet

#51
DarthParametric

DarthParametric
  • Members
  • 1 409 messages
Part 4: A giant amongst men.

So, after much experimentation, I found a viable approach for scaling up a male Human head to fit the Qunari body. It's not quite as straight forward as the Human-sized Elf I described in the previous post. This one requires a bit of massaging to get the mesh in just the right shape, size, and position. As a result, there's a bit of deformation from the original head, but it was necessary in order to get everything to line up (Qunari head is red, Human head is green):

Posted Image

You can see there that the most important facial features - the eyes and mouth - line up pretty well. The front and sides of the neck line up as well, although the back of the neck does not. This results in a small gap in this area with the naked body model, but fortunately it's is virtually unnoticeable unless you go looking for it. Anyway, on with the show!

So to start with we need our morph. You can go with whatever shape you like, but for illustration purposes I'm going with everyone's favourite prematurely dead mentor, Duncan:

Posted Image

I chose him for two reasons. The first is that I'm both lazy and unskilled with the morph editor, so the shape presets alleviated both those problems. The second is that I wanted to include a beard in the process to illustrate how to deal with those, and Duncan was the most worthy candidate in that regard. You'll see in the image that I highlighted the specific hair and beard models required for this example (unique hair/beard models that only Duncan uses).

As was the case with the Elf head, save your MRH and export the XML. With that done, you can close the toolset for now. Open up DATool and extract the following models -

Human male:
hm_brd_duca_0/2/3 - Duncan's beard
hm_har_blda_0/2/3 - Human scalp
hm_har_duca_0/2/3 - Duncan's hair
hm_uem_basa_0 - Human eyes
hm_uhm_basa_0/2/3 - Human base head
hm_ulm_basa_0 - Human eyelashes

Qunari male:
qm_har_blda_0 - Qunari scalp
qm_uem_basa_0 - Qunari eyes
qm_uhm_basa_0 - Qunari base head

With that done, close DATool and open up Max/GMax. Following the same procedure as last time, generate your donor head XML files, only this time using hm_uhm_basa_0. Once you have compiled your new head model files, we can begin the scaling process. Much the same as in Part 3, we'll start off with a World Scale change to up-size our model, only this time we'll follow it with a non-uniform scale and move chaser. But more of that in a bit. Reset the scene, then open the Listener and paste/type in:

DAOTools.WorldScale = 1.12

and hit Enter. With that done, import your newly compiled head, confirming first that the import windows states WorldScale from Setup: 1.12. Once that has finished importing, select the GOB and tick the Merge with selected checkbox, then merge in hm_har_blda_0 and hm_ulm_basa_0. Once those are finished, close the importer. Now open up the Listener again and reset the World Scale back to 1. Now we need to export. This is only a temporary file, so call it whatever you like. I named mine DUNCAN_SCALED_HEAD_SCALP_LASHES_0. With that done, reset the scene.

Now import the Qunari base head, qm_uhm_basa_0, making sure first that World Scale is at 1. Once that is finished, merge in the temporary file you just exported and close the importer window. You should now have something like this:

Posted Image

Now we need to do some tweaking. Select your custom head mesh. This should be called HM_UHM_BAS_FaceM1. In the modifier stack, select the editable poly object at the bottom, then from the drop-down list add an XForm modifier (in GMax, this is under, appropriately enough, the Parametric Modifiers section, in Max it's at the bottom of the list). Select the XForm in the stack and expand it, making sure the Gizmo is selected. You should see a box appear around your head. Now select the Non-Uniform Scale tool. You can get this by holding down on the Uniform Scale Tool button until the flyout pops up. The Non-Uniform one is in the middle. With that activated, go down to the co-ords box at the bottom of the screen. Next to that on the left is a little square button. If you mouse-over it you'll get a tooltip labelled Absolute Mode Transform Type-In. Activate this button. Now you can enter values in the co-ord boxes. For the X value, enter 107.6 and hit enter/click in another window. You'll see your head become a bit wider. Leave the Y value as-is. For the Z value, enter 95.1. Your head will become a bit smaller and drop down in height:

Posted Image

Now change to the Move tool. In the Z co-ord box, enter a value of 0.084. Your head should pop back up in line with the Qunari head. With that done you can deactivate the Gizmo in the modifier stack (just click on it). Now you can select the scalp and eyelashes meshes in turn and repeat the process: add XForm modifier, scale, move. Once that is finished and you are happy that everything is scaled and positioned as it should be, you can select the Qunari head mesh and delete it. That should leave you with something like this:

Posted Image

You may be wondering why we went about things in this manner. The reason is because the initial World Scale transform was primarily done to get the Human rig the same size as the Qunari rig, thus allowing the two to be merged together. If you try merging two rigs of different (especially radically different) sizes, bad things will happen. So once that was done, we then needed to apply some additional transforms to get the head in the right dimensions and position. The proportions of the Qunari head require the Human head to be squished top-to-bottom and stretched side-to-side.

So now we have out head sized up correctly, it's time to export it. Before we do though, we need to rename the material applied to the FaceM1 mesh so we can specify some custom textures. I named mine uh_hed_tallduncan. Also, in keeping with practices established in previous posts, change the mesh names from HM to QM. Once you've done that, you can export. Name it something appropriate, remembering to adhere to the DA model filename conventions. I named mine qm_uhm_tallduncana_0. Once the export is finished, reset the scene.

Now we have our base head, we need some hair and eyes. You may be also be wondering about the beard and why we didn't include that as part of the head model. The reason is the same one as why we included the scalp mesh in with the head model instead of the hair model, as the vanilla models do - tints. Having the beard as part of the face model causes problems trying to get it to accept tints, so we'll be including it with the hair model. Let's do that now.

Set your World Scale to 1.12 again. Import hm_har_duca_0, them merge in hm_brd_duca_0. Once that is finished, set your World Scale back to 1. Select the scalp mesh, which should be labelled with the epithet HairM1, and delete it. Now change the hair mesh name from HM to QM. Very importantly, change the beard name from HM_BRD_DUC_BeardM1 to QM_HAR_DUC_HairM3. I think the most critical thing here is the HairM3 epithet (but possibly the _har_ as well). Changing the name will allow it to tint properly. We are now going to do the same temp export that we did for the head model in order to swap to the Qunari rig. Strictly speaking, this is probably not necessary and the scaled Human rig would suffice, but I figure for the LOD0 at least, better to take this extra step to make sure everything aligns correctly. We won't worry for the LOD2/3 models. Export the model with a temporary name, then reset. Import qm_har_blda_0, making sure World Scale is 1. Merge in the temp hair/beard model. Now repeat the scaling process from before for both the hair and beard meshes: add XForm modifier, scale, move. Once that is finished, delete the scalp mesh and then export using an appropriate name. I called mine qm_har_tallduncduca_0.

Now repeat this procedure for the eyes. Set World Scale to 1.12, import hm_uem_basa_0, reset World Scale to 1, export temp file, reset scene. Import qm_uem_basa_0, merge in the temp scaled eyes, scale/move, delete Qunari eyes, change custom eyes mesh name from HM to QM. Export with appropriate name. I called mine qm_uem_talldunca_0.

With that done, we have all our LOD0 models. I won't cover the LOD2/3 creation process here. It is the same as was covered in Part 2 of the guide, but with the additional scaling/move we just did for the LOD0 models. As I said before, you shouldn't need to use the Qunari rig for the LOD2/3 models. Just do the initial World Scale 1.12 import, then do the subsequent manual scale and export at World Scale 1.

Now on to the textures.This follows the exact same procedure laid out for the Elf head, so i won't repeat the specifics. For the Duncan head though I chose a different channel in the stubble tint map for the eyebrows (Blue, for the bushy ones) and also added in the mutton chops from the Alpha channel. I also overlaid the neck area from the Qunari diffuse to try and get a better skin tone match with the body (didn't really seem to do much) and whitened the teeth. For the normal map, I tried the Qunari normal as Duncan seems to have a few wrinkles. Here's a brief summary pic (bit outdated - check source files for final version):

Posted Image

The last remaining task is to create the required GDAs. This follows the same pattern as previously, extending the appropriate race sheets (qunari_hair and qunari_heads) and adding in an additional line to the existing eyes sheet. Then it's on to testing. A lack of suitable Qunari in Origins makes Sten the test victim by default, so I duplicated his UTC and swapped out his morph for my new Duncan head:

Posted Image

Everything seems to be in order. Time to fire up the game for a quick test. Drum roll....

Posted Image

Moving right along... Here's a close-up of the neckline/body join:

Posted Image

And a more modest side-by-side, in daylight this time:

Posted Image

Here are a couple of convo shots:

Posted Image Posted Image

As I mentioned the other day, it seems that heads don't get automatically removed by helmets like morphs do, which causes some intersection issues:

Posted Image

It seems like it does still remove the hair model at least. I guess that is an insurmountable issue with using head models over morphs. You may need to either not use helmets at all, or try and find one that obscures any intersection (i.e. winged helmets). For Elves particularly, try and avoid giant bat ears like I used on my morph.

Modifié par DarthParametric, 25 août 2011 - 01:47 .


#52
LukaCrosszeria

LukaCrosszeria
  • Members
  • 1 304 messages
Amazing! :P I guess I'll have to tone down the elf ears. They were a bit big on my elf :pinched:

Edit: I've redesigned the mrh a little, but I'm fuzzy on the weighing on the human base head. When I tried it, the result got distorted. I'm supposed to open the human base head LOD0 and import and merge the skin from the custom elf model, right?

Modifié par LukaCrosszeria, 26 août 2011 - 02:29 .


#53
DarthParametric

DarthParametric
  • Members
  • 1 409 messages
The skin generation is only for the LOD2/3 models. You do it because you are taking a mesh weighted for extra bones that don't exist in the LOD2/3 rigs. You shouldn't need to touch the LOD0 head's original skin modifier, as it is being paired with an LOD0 rig, thus the bones are the same.

Btw, further experiments with the Human-sized Qunari have revealed a bug. For some reason, it seems that occasionally the scalp receives no tint (and perhaps even no texture). Changing the NPC's equipment fixes it. I'm not sure what the issue there is exactly.

Another limitation I have found concerns beards. Seeing as we merged the beard mesh into the hair model, and the game still removes the hair model when equipping helmets, when using an open face helmet the head becomes beardless. Unfortunately there doesn't seem any way around this. We had to merge the hair and beard because a model can only receive a single tint (which is why we removed the scalp from the hair model and merged into into the face model - so it could receive the skin tint). There is provision in the creature editor for a separate beard model slot but I have been unable to get it to work for Qunari. Humans have a beard worksheet in APR_BASE. When using a custom head, they can add a beard model to the beard slot. There is no beard worksheet for any other race (not even dwarves). I tried extending APR_BASE and and pointing it to a new Qunari beard worksheet I created, but it didn't have any effect. I suspect it may be hardcoded, or else controlled somewhere else I haven't been able to find.

EDIT: OK, so I found a workaround. It seems that my GDA extensions were actually working, it's just that the toolset doesn't recognise them (hardcoded perhaps, like I said). Anyway, the way around it is to edit the UTC after it has been exported, adding in a node for the beard in the appearance section. Seems to work fine in-game and it fixes the open-face helmet issue:

Posted Image

While testing the beard fix, I set the UTC to no hair model, which as a consequence gave me a better look at the scalp issue:

Posted Image

The shot on the left is what he looked like on loading a save, the shot on the right was after I unequipped his clothes (unequipping the sword didn't have any affect - only seems to reset with physical appearance changes caused by armour/clothes). I thought maybe it might be a hair alpha issue (alphas in DA are flaky to say the least), but with no hair model that rules it out as a possibility. I did establish though that the texture is applied - it just has no tint. I think the most practical way to solve it would just be to combine the face and scalp into a single mesh and editing the UV map to fit both parts on a single texture. The default maps are only 512x512 anyway, so a 1024x1024 map would be plenty big enough for both.

Modifié par DarthParametric, 27 août 2011 - 07:51 .


#54
LukaCrosszeria

LukaCrosszeria
  • Members
  • 1 304 messages
That's amazing work once again :P

I'm sorry, you've already explained so much, but can you tell me how I have to weigh the elf head on a human base head? (seeing as the remade elf head has the same problem)

#55
DarthParametric

DarthParametric
  • Members
  • 1 409 messages

LukaCrosszeria wrote...

can you tell me how I have to weigh the elf head on a human base head? (seeing as the remade elf head has the same problem)


I already did:

DarthParametric wrote...

The skin generation is only for the LOD2/3 models. You do it because you are taking a mesh weighted for extra bones that don't exist in the LOD2/3 rigs. You shouldn't need to touch the LOD0 head's original skin modifier, as it is being paired with an LOD0 rig, thus the bones are the same.


You don't need to reweight the LOD0 head at all. It should already be imported with a functioning skin modifier, all you need to do is just scale it and move it as I described in Part 1.

If you are having troubles with the LOD2/3 heads, just use the base Elf head LOD2/3 models instead - scale them up and position them just like your custom head and you won't need to reweight those either.

Unless you are talking about something else. What exactly is the problem? Post some screenshots perhaps.

#56
LukaCrosszeria

LukaCrosszeria
  • Members
  • 1 304 messages
Oops, I misunderstood, sorry. I'm just testing Maethan (the taller elf in my mod) in game, I'll post some screen shots of his facial animation. I'm working out some cutscene kinks, will post asap.

#57
LukaCrosszeria

LukaCrosszeria
  • Members
  • 1 304 messages
Just wanted to let you know I'm stil working on working out stuff in my first level, I haven't dropped this or anything. I'll get back to you as soon as I can.

Edit: Ugh, I spent so much time working out errors in my mod, after that long break I had to relearn so much. :pinched: Sorry it took so long.

Here's screenshots to show what I mean with his mouth animation acting weird.

screenshot1.jpg
screenshot2.jpg
screenshot3.jpg
screenshot4.jpg
screenshot5.jpg

Modifié par LukaCrosszeria, 16 septembre 2011 - 06:25 .


#58
DarthParametric

DarthParametric
  • Members
  • 1 409 messages
Might need to see a video to clarify what you mean by weird. There are no obvious mesh issues I can see there at least. Possibly it's not a model issue, just Bioware's ropey animations. Although to be fair, lip syncing in games across the board is not exactly going to win many awards.

#59
LukaCrosszeria

LukaCrosszeria
  • Members
  • 1 304 messages
Oki, I will try to make a video with Fraps, though the video file size is always huge ><

#60
DarthParametric

DarthParametric
  • Members
  • 1 409 messages
That's because it is likely capping it as an uncompressed AVI. You'll need to re-encode it with some codec that uses compression, like Xvid, etc. Virtualdub is a free encoding app that will do the job for you. You can grab Xvid Windows binaries here. Then just upload the file somewhere or put it on Youtube. I've never used FRAPS to cap video, so maybe it can encode to a specified codec natively on the fly. Install an appropriate codec first then have a look in the FRAPS settings.

Modifié par DarthParametric, 17 septembre 2011 - 06:47 .


#61
LukaCrosszeria

LukaCrosszeria
  • Members
  • 1 304 messages

DarthParametric wrote...

That's because it is likely capping it as an uncompressed AVI. You'll need to re-encode it with some codec that uses compression, like Xvid, etc. Virtualdub is a free encoding app that will do the job for you. You can grab Xvid Windows binaries here. Then just upload the file somewhere or put it on Youtube. I've never used FRAPS to cap video, so maybe it can encode to a specified codec natively on the fly. Install an appropriate codec first then have a look in the FRAPS settings.


I have VirtualDub, tried to use it to compress an avi once. I didn't have the xvid binaries yet though, I'll give it a whirl, thanks Darth!

#62
BloodsongVengeance

BloodsongVengeance
  • Members
  • 590 messages
heyas, you guys still around?  yes, i'm slow and only got around to trying it today.

   i'm having trouble with this step:

Without making any modifications we want to export this model. You can name it whatever you like - I called it em_uhm_basa_0_ORIGINAL.
Once the export is finished you can reset/close Max/GMax. Now you need
to navigate to the DATools folder in your system temporary directory.
For Vista/Windows 7 this should be C:\\Users\\<USER NAME>\\AppData\\Local\\Temp\\DAOTools\\ and for XP it should be C:\\Documents and Settings\\<USER NAME>\\Local Settings\\Temp\\DAOTools\\.
Here, depending on how much you have used the script and how long it is
since you cleaned out your system's temp files, you should see a bunch
of XML files. You are looking for two files with the name of the model
you just exported. In the case of my example that is em_uhm_basa_0_ORIGINAL.mmh.xml and em_uhm_basa_0_ORIGINAL.msh.xml. Grab these two files and move them to your working directory.


i have xp, but i do not have the ..\\Temp\\DAOTools\\ directory.  i have a 'DATool' directory in the application data directory, which obviously isn't it.  is there any other idea where the files might go?

did i use YAGG wrong?  all i got was a .met file out of it.  :/

#63
DarthParametric

DarthParametric
  • Members
  • 1 409 messages
You'll have to ask Eshme about that, as I'm not on XP so can't confirm the location. Basically there should be a temp directory somewhere that the script dumps out XML files that are then compiled by the toolset's MSH/MMH compilers. Possibly YAGG puts them somewhere else though.

#64
Eshme

Eshme
  • Members
  • 756 messages
Type down "sysinfo.tempdir" in the listener (by opening it with F11) and it gives the answer.

Thats where DAOTools directory is located and that stuff is stored until your next disk cleanup.

#65
DarthParametric

DarthParametric
  • Members
  • 1 409 messages
Go to the Start menu, select the Run command and put in %TEMP% and hit enter. That will open an Explorer window inside your system temp folder. There should be a folder called DAOTools in there.

#66
BloodsongVengeance

BloodsongVengeance
  • Members
  • 590 messages
heyas;

sorry, running around and very slow on everything.

thank you for how to find the temp dir! i did find mine. still no DATools sub-directory. i'll ask eshme :/

OH!  there is eshme!  ::waves::

i did that, and it told me the same temp dir as %TEMP%... which is F:\\Temp.  but... still no DAOTools directory in there.  is it possible it's screwed up because every time i start gmax, daotools says it's starting up for the first time?  it's not saving it's info.

  oh, wait a minute...
no, okay, i tried the import/export again after telling daotools the proper directories.  i'm getting MTX files dumped in my temp base directory, but no daotools sub-directory there.

  do i even need to be using yagg to get dao tools to dump temporary xml files?  cuz i'm pretty sure i'm using yagg wrong.  (since i dont know how to use it.)  but still... no xml files. that i can find.

Modifié par BloodsongVengeance, 01 juin 2012 - 02:54 .


#67
BloodsongVengeance

BloodsongVengeance
  • Members
  • 590 messages
eshme, when exactly does daotools write/create this temp directory?

#68
DarthParametric

DarthParametric
  • Members
  • 1 409 messages
Looks like you're using a custom specified temp directory rather than the default Windows one. Possibly that is screwing with the script if it is not saving the settings (there should be a file called DAOTools.INI that holds all your settings in DAOTools directory in the temp directory). Although if the script is showing that as the temp directory then it is obviously set in the system env variables. In theory it should work fine.

Are you able to actually export game models? The only way that is possible is if Eshme's script is exporting XMLs. They are then compiled by the toolset's bundled processors (which Eshme's script calls with a batch file). Try importing a game model then exporting it.

#69
Eshme

Eshme
  • Members
  • 756 messages
Yagg takes care of saving actually. Temp folder being on drive F is nothing to worry about, Network drives maybe, heck its a crappy workaround what can i do.

Yagg has to be in "snoop" mode, being in the task bar watching gmax. If its in grab mode, right click on it switch to snoop mode.
You can tell its working, when its symbol turns white when gmax is opened. And yellow while saving. Otherwise its grey.

eshme, when exactly does daotools write/create this temp directory?

As soon gmax is started. Got to run yagg before gmax starts.