HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [Resolved] Facegen Morphs causing model translation on X/Y  (Read 2875 times)

johndeaver

  • General Accounts
  • *
  • Posts: 4
    • View Profile

Using the example GoldenGod morph targets scene, I have created a dynamic character definition and the facegen files necessary for full body morphing. Now, I am having a problem where morphs end up translating the model along the X/Y axis when using the Morph Testing tool. At first I thought this might have been caused by the fact that the targets are spread out in the example file so I made two different tests, one where I hid all extreme targets, adjusted the morph of the base (in 3dsmax 2011) to the target and exported each morph and one where I left all extreme meshes visible but stacked them on top of one another prior to exporting. The end result is exactly the same and at this point I really need some help in understanding what is going wrong. I've attached some screenshots that show model translating when the morph blend is applied.
« Last Edit: Oct 26, 12, 02:01:48 PM by HE-Cooper »
Logged

johndeaver

  • General Accounts
  • *
  • Posts: 4
    • View Profile
2nd screen (250K limit)
« Reply #1 on: Dec 12, 10, 03:54:38 PM »

 c
Logged

Stadi_Thompson

  • General Accounts
  • *
  • Posts: 324
    • View Profile
Re: Facegen Morphs causing model translation on X/Y
« Reply #2 on: Dec 12, 10, 08:26:52 PM »

hard to see what going on in those screenshots. can you post your log file from the facegen build (process.bat).
Logged

johndeaver

  • General Accounts
  • *
  • Posts: 4
    • View Profile
Better screenshots attached
« Reply #3 on: Dec 13, 10, 06:42:26 AM »

Code: [Select]
D:\HE\fgprojects\FOHuman\egm>del InternalMeanFace.*

D:\HE\fgprojects\FOHuman\egm>cd objs

D:\HE\fgprojects\FOHuman\egm\objs>REM

D:\HE\fgprojects\FOHuman\egm\objs>REM ***OBJ->TRI***

D:\HE\fgprojects\FOHuman\egm\objs>REM

D:\HE\fgprojects\FOHuman\egm\objs>REM Copy objs to extensionless files

D:\HE\fgprojects\FOHuman\egm\objs>FOR %f IN (*.obj) DO COPY "%f" *.

D:\HE\fgprojects\FOHuman\egm\objs>COPY "beergut.obj" *.
        1 file(s) copied.

D:\HE\fgprojects\FOHuman\egm\objs>COPY "FOHuman.obj" *.
        1 file(s) copied.

D:\HE\fgprojects\FOHuman\egm\objs>COPY "scrawny.obj" *.
        1 file(s) copied.

D:\HE\fgprojects\FOHuman\egm\objs>COPY "Strong.obj" *.
        1 file(s) copied.

D:\HE\fgprojects\FOHuman\egm\objs>COPY "tiny.obj" *.
        1 file(s) copied.

D:\HE\fgprojects\FOHuman\egm\objs>REM Use extensionless files to iterate through objs, converting to tris

D:\HE\fgprojects\FOHuman\egm\objs>FOR %f IN (*.) DO fileconvert obj-tri "%f" "%f" -o

D:\HE\fgprojects\FOHuman\egm\objs>fileconvert obj-tri "beergut" "beergut" -o

D:\HE\fgprojects\FOHuman\egm\objs>fileconvert obj-tri "FOHuman" "FOHuman" -o

D:\HE\fgprojects\FOHuman\egm\objs>fileconvert obj-tri "scrawny" "scrawny" -o

D:\HE\fgprojects\FOHuman\egm\objs>fileconvert obj-tri "Strong" "Strong" -o

D:\HE\fgprojects\FOHuman\egm\objs>fileconvert obj-tri "tiny" "tiny" -o

D:\HE\fgprojects\FOHuman\egm\objs>REM Delete extensionless files

D:\HE\fgprojects\FOHuman\egm\objs>DEL *.

D:\HE\fgprojects\FOHuman\egm\objs>REM Reposition tri files

D:\HE\fgprojects\FOHuman\egm\objs>MOVE *.tri ..\tris\
D:\HE\fgprojects\FOHuman\egm\objs\beergut.tri
D:\HE\fgprojects\FOHuman\egm\objs\FOHuman.tri
D:\HE\fgprojects\FOHuman\egm\objs\scrawny.tri
D:\HE\fgprojects\FOHuman\egm\objs\Strong.tri
D:\HE\fgprojects\FOHuman\egm\objs\tiny.tri
        5 file(s) moved.

D:\HE\fgprojects\FOHuman\egm\objs>cd ..\

D:\HE\fgprojects\FOHuman\egm>REM

D:\HE\fgprojects\FOHuman\egm>REM ***Build EGM***

D:\HE\fgprojects\FOHuman\egm>REM

D:\HE\fgprojects\FOHuman\egm>copy tris\*.tri .\
tris\beergut.tri
tris\FOHuman.tri
tris\scrawny.tri
tris\Strong.tri
tris\tiny.tri
        5 file(s) copied.

D:\HE\fgprojects\FOHuman\egm>call add_morphs.bat

D:\HE\fgprojects\FOHuman\egm>addanimatemorph diff FOHuman.tri FOHuman.tri "base human" InternalMeanFace.tri

D:\HE\fgprojects\FOHuman\egm>addanimatemorph diff InternalMeanFace.tri scrawny.tri "Scrawny" InternalMeanFace.tri

D:\HE\fgprojects\FOHuman\egm>addanimatemorph diff InternalMeanFace.tri tiny.tri "tiny" InternalMeanFace.tri

D:\HE\fgprojects\FOHuman\egm>addanimatemorph diff InternalMeanFace.tri Strong.tri "Strong" InternalMeanFace.tri

D:\HE\fgprojects\FOHuman\egm>addanimatemorph diff InternalMeanFace.tri beergut.tri "Beer" InternalMeanFace.tri

D:\HE\fgprojects\FOHuman\egm>tri2egm InternalMeanFace.tri InternalMeanFace.egm
5 diff morphs converted to EGM modes

D:\HE\fgprojects\FOHuman\egm>ECHO YES   | copy InternalMeanFace.tri "..\customizer_1_1\data\"
        1 file(s) copied.

D:\HE\fgprojects\FOHuman\egm>ECHO YES   | copy InternalMeanFace.egm "..\customizer_1_1\data\"
        1 file(s) copied.

D:\HE\fgprojects\FOHuman\egm>ECHO YES   | copy InternalMeanFace.tri "..\ctl\"
        1 file(s) copied.

D:\HE\fgprojects\FOHuman\egm>ECHO YES   | copy InternalMeanFace.egm "..\ctl\"
        1 file(s) copied.

D:\HE\fgprojects\FOHuman\egm>del .\tris\*.tri

D:\HE\fgprojects\FOHuman\egm>del InternalMeanFace.*

D:\HE\fgprojects\FOHuman\egm>del .\*.tri

D:\HE\fgprojects\FOHuman\ctl>customCtl InternalMeanFace.egm InternalMeanFace.tri dummy.egt si.ctl

D:\HE\fgprojects\FOHuman\ctl>copy si.ctl "templateBody.ctl"
        1 file(s) copied.

D:\HE\fgprojects\FOHuman\ctl>del InternalMeanFace.*

D:\HE\fgprojects\FOHuman\ctl>if exist ..\facegen_modeller_3_0\nul copy "templateBody.ctl" "..\facegen_modeller_3_0\si.ctl"

D:\HE\fgprojects\FOHuman\ctl>copy si.ctl ..\fg\
        1 file(s) copied.

D:\HE\fgprojects\FOHuman\fg>copy ..\ctl\si.ctl .\
        1 file(s) copied.

D:\HE\fgprojects\FOHuman\fg>BlankFGCoord si.ctl "defaultTemplate.fg"
Read 5 symmetrical geometry controls, 0 asymmetrical geometry controls, and egm basis number 20040219.
Read 3 symmetrical texture controls, 0 asymmetrical texture controls, and egt basis number 0.
Writing 8 controls.
D:\HE\fgprojects\FOHuman\fg>del si.ctl
Logged

Stadi_Thompson

  • General Accounts
  • *
  • Posts: 324
    • View Profile
Re: Facegen Morphs causing model translation on X/Y
« Reply #4 on: Dec 13, 10, 11:06:01 AM »

did you scale your OBJ files by .001? It says to set the scale in the OBJ export options to .001. Export them directly out of Max. we finally got it all working both face and skeletal morphs, was a pain to figure out as the wiki stuff was pretty juggled around and incorrect at some parts. one thing to remember anything that goes into customizer must be 1000 times smaller than the actual mesh. GR2 to OBJ will handle this for you. other wise you must shrink it manually or set obj export option scale to .001. For Maya users I believe it's .01. also make sure all you meshes transform and pivot is 0,0,0 by resetting xforms. Also in the facegen  template directory, everything is read only, make sure you set the folder and all its children files to readable otherwise it will not write your newly created tri file (morphs).
Logged

johndeaver

  • General Accounts
  • *
  • Posts: 4
    • View Profile
Re: Facegen Morphs causing model translation on X/Y
« Reply #5 on: Dec 13, 10, 08:54:33 PM »

Ding!
The .001 scaling was the final piece in this excruciating, epic quest. I had been exporting the .obj manually directly from max since the beginning as GR2TOOBJ produces obj of size 0 for me but was only checking that I had quads. This has taken me weeks of my spare time to piece together but the capability is seriously cool and worth the effort. If you do a tutorial for other HE users, I'd be happy to throw in what I know. Many thanks and if you get around to Boston, hit me up and I'll buy you a beer or 3 mate. Cheers!
Logged

JoshHalls

  • Founding Professional
  • *****
  • Posts: 335
    • View Profile
    • The Repopulation
Re: Facegen Morphs causing model translation on X/Y
« Reply #6 on: Dec 13, 10, 09:52:26 PM »

As a note, it seems to be an epic quest for everyone, might want to flag this section of the Wiki for update.
Logged
Co-Owner/Programmer - The Repopulation