Any Maya gurus knocking about? Smoothing a Daz character.

RobinsonRobinson Posts: 751

I have successfuly exported Daz characters to Maya (final destination Unreal Engine - I'm learning the toolchain, not producing anything commercially right now) using both FBX export and Laylo's Genesis 3/8 for Maya.  The export from Daz is base resolution though, which looks somewhat jagged in the engine, so I want to increase the detailing.  I've tried various different ways of smoothing in Maya.  The mesh looks great but in order to continue to the next step in the chain, I have to export from Maya to Unreal, which means I have to "collapse" the transform stack (Delete non-deformer history).  When I do this, the weight mapping messes up pretty badly, especialy in the mouth area.

Does anyone have experience of this?  I don't fancy weight-painting a Daz model in Maya.  They're already beautifully weight-painted by Daz.  I've tried other methods like manually transferring the weights from low to high poly but no dice.  I'm hoping there's a parameter I need to make it work (a crazy dream) but I'm thinking maybe I'm just screwed and it's low-poly Daz or nothing in Unreal.

Am I using the right tool for the job?  Will Blender 2.8 be able to successfuly smooth the mesh without messing up the weights?  There must be a guru or three lurking around here...

Anyway here's a gallery of pictures illustrating the problem and a single picture showing the final output:

 

https://i.imgur.com/vcec2pnr.jpg

 

 

 

Post edited by Robinson on

Comments

  • I've seen this, too, exporting to Blender at base resolution. The problem is that "base resolution" is a misnomer, because it's not a model that is ever supposed to be used in that it does not represent just a lower resolution version of the artist's vision. It is really a SubD cage that is supposed to be subdivided using the algo that Daz uses. The SubD cage, if it is (mis)used to form faces, won't look right. You have to apply SubD, even level 0, to get a model that corresponds to what the artist intended.

    The point is that there is a difference between exporting a model at base resolution, and have it interpreted by an external app as a model to be subdivided (wrong because the faces will actually go through the model's vertices) and exporting a model at base resolution and have it interpreted by an external app as a subd cage to be subdivided (correct because the subdivided vertices do not necessarily pass through the cage's vertices but are only influenced by them, like a Bezier curve). I don't know Maya well, but you have to preserve the fact, and communicate it to Maya, that what it is importing is a SubD cage, not a lower resolution version of a higher res model.

    This is why Alembic, for example, has two modes, one for models and another for SubD cages; The receiving app has to know what it is getting. Daz calling the SubD cage "base resolution" doesn't help anyone's understanding.

  • RobinsonRobinson Posts: 751

    The point is that there is a difference between exporting a model at base resolution, and have it interpreted by an external app as a model to be subdivided (wrong because the faces will actually go through the model's vertices) and exporting a model at base resolution and have it interpreted by an external app as a subd cage to be subdivided (correct because the subdivided vertices do not necessarily pass through the cage's vertices but are only influenced by them, like a Bezier curve). I don't know Maya well, but you have to preserve the fact, and communicate it to Maya, that what it is importing is a SubD cage, not a lower resolution version of a higher res model.

    This is why Alembic, for example, has two modes, one for models and another for SubD cages; The receiving app has to know what it is getting. Daz calling the SubD cage "base resolution" doesn't help anyone's understanding.

    I thought as much.  If Maya knew what to do with the subd info (it gets exported when the FBX is exported), or even if it was carried through the FBX pipeline to Unreal and it knew, then it would be easy.  My temporary "solution" is to "smooth" the mesh in Maya by selecting all of the UV shells except the head.  The result isn't very good with certain poses when it gets to the engine but I suppose that's what JCMs are for, i.e. I will need to create a blend shape to smooth certain features or export those as well (Laylo's script does import and bind the JCMs I think but I'm not sure if/how they get carried on into the engine - I suspect they don't at all as FBX probably doesn't support it).

    I do wish Daz would support an easy to use toolchain right into an engine like Unreal.  FBX just doesn't cut it.

  • RobinsonRobinson Posts: 751
    edited January 2020

    I had a brainwave the other day about how to smooth the rigged, weighted and blend-shaped mesh in Unreal Engine.  I thought perhaps if I use in-engine tessellation and then bake some displacement maps for the character from the high poly smoothed version, I could get more or less the effect I was looking for.  My experiments failed miserably, mostly because I'm a noob at baking and also because I have to take account of what the shader will actually be doing when applying the map. 

    Anyway if someone else comes here looking for info, I found somebody who'd anticipatory-plagiarised my idea many months before I'd had it.  I don't think I'll have much success if I try to replicate and improve on what he's done and I've got no idea if it'll work on a rigged, animated mesh, but for interest check out his blog on it.

     

     

    Post edited by Robinson on
  • Robinson said:

    The export from Daz is base resolution though, which looks somewhat jagged in the engine, so I want to increase the detailing.

    Usually game engines (like UE4)rely on normal maps for dealing with jaggies.  Or that's my experience as someone who has baked normal maps and had in game.  And you can't just convert displacement maps to a normal map.  You need to do a proper bake High to low poly.  All normal maps may look blueish-purplish, but actually each pixel carries vital data that our human eyes have no experience interpreting. 

    Would strongly recommend you explore baking a good proper normal map to smooth out the base mesh, and avoid weight maps as that is "hell of a woman fury scorned" level of attention-demands. (Have done alot of rigging or weight painting so I don't make that comparison lightly). 

    IF you still want to continue with that route, would recommend you "rip" out that mouth mesh and make it a separate object with it's own skeleton.  Maya must be averaging the heck out of the verts and detroying the weights when you collapse the stack. (Don't they have settings for controlling that in the background somehwere?)  Anyway, there will be some tricky choices to make as to where you clip the mouth mesh.  But given it's hidden and in the shadows alot when mouth is open you have room for error.

    Wish you good luck with your UE conversion efforts.  Would join you, but at this time, the idea of converting all the materials for all the DAZ assets i have is just too much.  Real time with physics for Daz assets would be amaze-balls.  But there are many things in Daz Studio (like easily made morphs and auto applied via ERCs) that would just be too much to give up.  Hopefully Daz via Maya eventually gets a portal between the two.  Looking forward to eventually an update on the Maya to Daz plugin that Daz called for Beta volunteers many months ago.

    PS.  Saw a couple of your renders a few months ago in the Post your renders thread.  Thought your themes and quality was quite good, which is why taking time to reply now. 

  • RobinsonRobinson Posts: 751
    edited January 2020

    Thanks for the reply.  Yes, I am using normal maps in Unreal (when provided, else generating them myself if not).  Some tweaking with map intensity to get the right look on it but they're great for close-up detail.  What concerns me in general isn't the skin detail though, it's the level of tessellation.  The curves around the hips and shoulders for example, aren't "curves", they're have sharp discontinuities.  If you take a Daz model down to 0 tessellation/mesh-smoothing, that is the effect you get in your iRay render.  Base tessellated models exported from Daz are pretty low resolution compared to what today's hardware is capable of in real time.  As above they should be considered control cages for the tessellation and smoothing algorithms.

    The way Daz does this is what you'd do if you didn't have a time constraint: tessellate and smooth the mesh with some algorithm (Catmark), at your leisure.  A game engine is slightly different of course, preferring as much work is done beforehand as possible, preferably baked into maps or the mesh itself.  Smoothing the mesh of an already rigged figure is problematic.  Lots of fixes are needed even with modern weight transfer algorithms.  Blend shapes are a disaster of course.  So some solution to in-engine RT Catmark smooth has to be found.  That is to say, some way of smoothing the mesh after it has been posed, the blend shapes applied and so on, before it gets rendered.

    The only way I can think of doing it takes advantage of both strengths of an engine like Unreal: Tessellation and Sampling.  All we need is a shader that can take "height" (in effect some delta, -ve or +ve) from a height map and adjust a vertex to that position (along the normal of the point).  This would allow me to smooth a low poly mesh to a high poly one with ease. 

    Some generic solution supported in Unreal would be good but I don't see anything on their development path towards it.  The only thing I found was the link I posted above, which is an experiment and probably not usable from my just copying what he did.

    Edit: The term I'm researching is "Vector Displacement Map".  It seems there's more on this through google.  As always it's important to know what to search for.  e.g there's a paper on it here.

    Post edited by Robinson on
  • Robinson said:

    The curves around the hips and shoulders for example, aren't "curves", they're have sharp discontinuities. 

    Sounds like you have put alot of thought and effort into making this work.  It would be worth it if you get it. smiley

    Do find that maybe a bit surprising that there are sharp discontinuities.  The DS base mesh is quite well laid out and is alot denser than many game meshes.  Though is true distortions can happen with weights as the mesh is pulled back and forth. 

    Still think it would be worth making a special normal map as a test to be sure that it's not just a matter of the quality of the normal maps.  In DS, I disable all my normal maps, and just use the bump, HD and sometimes displacement maps.  From what I did see of the normal maps included with some products, I didn't get a great feeling about the quality.  But maybe i didn't look enough.  And some artists probably do make good normal maps.  Just you'd have to test them all because near imposssible to tell by just looking at them.

    A test of a new good normal map wouldn't take too long.

    If you have time, a sugestion would be to take the Daz base figure into sculting app of your choice extrude it enough that you are comfortable all jaggies are covered by "enough" excess clay.  Pick a spot where issue is worst and sculpt it down to something very smooth, making sure the HP clay stays above the LP base mesh.  By just doing one spot you can save alot of time, and see if you can see something that might help you figure out the max limits of normal maps in UE.  Then do a spot render with your new normal.  Normal maps you can make amazing things , like belts for a waist without any supporting mesh.  Well almost. Quality would be better with mesh to support it.  Anywho, just a thought, or what I would do if I wanted to make sure that I had fully checked out normal map possibilities.

    As to all the other possibilities to smooth the mesh.  Don't doubt there are efforts underway.  But have not heard yet about anything mainstream that compares to Daz's solution.  Though haven't been actively looking too hard lately either.  Honestly for me this is why native DAZ is first rate.  Even in Daz with SubD 4, and JCMs in place, there are several poses that can tear the mesh.  Having JCMs (ERC tied to bone keyed parameters) (and having manual morphs as a backup) is just the cat's  meow.

    Think a vector displacement map would still be subject to weights and all the stresses it puts on the underlying mesh, and nevermind in poses there are averages that need to be worked out.  So you could end up with the mouth tearing example even with fancy smoothing ideas.  To me that is actually shocking that in Maya you can't specify how it should average the weights with some tolerance parameters.  So when I look at something like that which is basic and should be working, I tend to be cyncial about next gen stuff that is still in development.  But have been surprised before too.  lol.

    Still think it would be worthwhile to see if you could stretch the capability of normal maps a bit more.  Would be interested to hear if you do find a way! Good luck!

  • InuGamesInuGames Posts: 65

    Hi there,I don't know if the question is still relevant, but I think I found how to export hi-res skinned and subdivided mesh and morphs from daz as fbx. Please let me know if somebody is interested, I'll post a description.

    ScreenShot00043.png
    999 x 893 - 1M
    ScreenShot00044.png
    999 x 893 - 557K
    ScreenShot00040.png
    999 x 893 - 938K
    ScreenShot00039.png
    999 x 893 - 421K
  • InuGames said:

    Hi there,I don't know if the question is still relevant, but I think I found how to export hi-res skinned and subdivided mesh and morphs from daz as fbx. Please let me know if somebody is interested, I'll post a description.

    I don't know if it's too late, but I would appreciate it if you could show it how it's done! The shoulders and knees don't look very good when I import a character to UE4 (they look low poly), I tried to use tessellation, but in the animations the knees and shoulders look horrible.

Sign In or Register to comment.