Using and animating characters with morph targets without glitches?

Well not saying don’t fix it but rather fix it in the iteration process at the point where it becomes an issue. Work the render and not the issue as in most cases if you go looking for issues you will find it and it becomes just one more thing that you think needs to be fixed when in a lot of cases you might not even run into it. It’s been my experience with UE4 that Epic does fix issues in due course and some times the problem goes away but with UE4 best practice seems to be about iteration.

For example dealing with Genesis zombie eyes is an issue when doing a 1-1 import that we solved via iteration of excluding eyes in the import and adding the eyes as a character component using a geo object and material supplied by Epic.

OK as I do use 3ds Max I see this as a smoothing group issue as to over stretching of the topology where the tessellation loss of the topology becomes triangulated so yeah it’s an error generated by UE4 as anything imported that is not from 3ds Max does not seem to contain smoothing information. The poly edit modifier is an invention that includes the smoothing group tool and groups are generally created based on the angle of the quad surface and is a shader effect as to how the connecting surfaces are rendered as referenced to the environmental lighting. .

So yeah is a UE4 issue as far as UE4 has issues as to properly lighting acute angles or distorted topology but as exported the skin weighting directly out of DS is less than ideal as well.

That said how would I attempt to fix “this” particular issue?

Well I outlined the workflow I generally use but I would as a first attempt import the G3 base as exported from from DS and regenerate the smoothing groups at the extreme pose and use the skin blend brush to correct the joint accommodation. The result over time is the perfect solution as derived via the iteration process and becomes a lot more refined over time.

As well

As a plan we as a team wanted to released a “fixed” version of the Genes 3 model but in our conversations with Daz3D was informed that they were working on something directly related to Unreal 4 along the same lines as to what they have done for Unity so if they fix the problems it’s an easy update for use as part of our pipeline development.

No JCMs yet. We are doing a lot of framework development and our lead character modeller uses Zbrush so she has access to some rather advanced morph creation tools. It’s not that difficult to make corrective poses and been around for years but at this point with a lot of work to do we are waiting to see if Epic adds a morph target loader. nudge nudge

For sure environmental lighting can and does have a large impact on material behaviour on objects that moves and in my opinion improves from one version to another. There has been some changes to sky and directional lighting since 4.24, for example why are both generating shadows as a GL effect and if required why?, and how is the material shader effected. If you change the shader effect, like use a skin or sss model, would the smoothing error go away?

Over all though 1-1 import of textures have improved as hair shader us in UE4 and skin have massively improved. Hair looks more like hair and skin no longer has that shrink wrap look as well the spiking problem was fixed so for sure Genesis is on Epics radar.

After all that though DS and Genesis is still not what I would consider a easy to use solution as to turn key requirements and as a development tool we have included it’s use since 2010 to test theory with out committing and the last 5 years as a productive tool as to the problems it solves as one would Blender :smiley:

As the saying goes “it’s a tool and it’s how you use it that matters”

Most of the issues aren’t actually exclusive to Daz, or make human or anything else that can help the workflow of modeling along.

That said, using a tessellation multiplier powered into a lerp that is managed by a texture as described above May (not necessarily, depends on the morph target too and how well it plays with tessellation) actually just solve your geometry driven issue.

The overall shadow, not so much, but I would bet on it looking better with a local multiplier of 8 or so.

Also, @FrankieV, the hair may be looking better overall, and I could possibly even use the new skylight parameters in the material, but it still lights up like a light bulb because of the irradiance parameters and something being wrong at the shader code level of the hair shader.
which, now that i think about it, it probably is something which can be adjusted exaclty within the shader model rather than attempt magic tricks within the material.

still, hair cards will outperform grooms for quite some time…

Yeah had the same problem with glowing hair using hair shaders built from scratch. Once again a problem fixed by Epic once they released the full Paragon collection with a with a wonderful set of hair, skin and eye shaders the was easy to remap to the G3 frame work.

Example of the result.

Keep in mine that this is a proof of concept video and the fastest way of seeing if something is working is to make the character dance. :wink:

Interesting facts is all 4 characters are based on a single character framework and although needs more work the result was predictable as to a desired result including the removal of the unusual annoying smoothing group, glowing hair, and zombie eyes.

Close up of skin and eye shader as well as a base hair material

and just because I think it’s cool

The “test” was done using an raw 1-1 import including hair and the VO generated by using Motionbuilders and cluster shaping with zero tweaking except for fixing the zombie eye problem.

If you look close you can see that the jaw has a slight deforming issues but the cool thing is cluster shaping works on all of the characters as part of the framework. Keep in mind as well we been working on this design path for 5 years so have solved most of the annoyances and could just as easy fix the jaw problem in the base once more important requirements are taken care of.

@MostHost_LA: I’m afraid that it won’t work to brighten only one spot, because it won’t be seamless and the skin texture now is very pale as it is now.

Furthermore the size and edges of the shadowed area depend on the angle of the rays from the light source in relation the spot (armpit are) affected.

Neither did the use of a subsurface skin profile nor using the tessellation multiplier (parameter value of 3, geometry got very fine) help in removing the shadow.
So this is no problem of the mesh itself.

@FrankieV: I’m in a situation, where it is a problem already as everything else seems to work just fine and it is really visible on my characters from “FPS” perspective.

As for smoothing groups I don’t have any issues with that in UE, because blender has the option to set the smoothing group for example to “edge” before exporting an fbx file,
so my mesh does contain smoothing group information during import into UE.

Even exporting without smoothing group information and thus regenerating them by ue did nothing.

By the way: Did you know that it is now possible to import daz characters (Genesis 8, Genesis 3) with all ~94 jcms into UE4 and even without any subdivisions it behaves and deforms in a clean way, so no need for further workarounds, adjustments , skin reweighting, resculpting or any other tricks.
But you need the dual quaternion version for it to look and behave like in daz. You can even import expressions etc.

The necessary tools are blender + diffeomorphic blender plugin. JCMs are bone driven already, which means that there is no need for adjusting your animations or morph target curves in ue4, because you can do everything in blender and just export it.
The workflow is really fast, so in my opinion DAZ / Genesis is really easy to use with UE 4, once you have learned what to do and follow a specific order during the workflow.

As for hair I wouldn’t want to use any daz hair in ue, because there are better solutions like taking hair from sims 3 (or some downloaded hair for sims 3),
which looks very good too and needs only ~10 k triangles maximum.

@all
Back to the “shadow”:

To reproduce the problem:

  1. Just load the standard genesis 8 or 3 character into ue4 with all jcms applied (because you won’t see the shadow without jcms)

  2. Create & import a pose with arms up

  3. Pose your character against the sun, so the light shines onto the armpit

Enough of guessing :slight_smile: Follow these steps and only then you will really be able to see what I mean. You can even use the non dual quaternion version of UE for seeing the same shadow glitch.

@Bronislaw666
You are making 0 sense. if you make a black and white highlight texture it won’t have Any seams simply because of the texture.
Its exactly the same as having a full skin texture.
If you have seams on a skin texture, you probably just have to increase the UV percision on your mesh import.
A texture in it self does not - ever - cause visible seams, unless you specifically made seams on it.

Also, share the UV map of your character. Normally, the seam is behind the back in a T shape for most models. Nowhere near the armpit. So its even more unclear what “seam” you think will be generated from adding a specifix corrective texture.

With ‘seams’ I mean color/shading differences between the outer and inner area. I’m sure it will not work, because the shadow is dependent on the armpit orientation in relation to the light source.

Have you even tried to reproduce the steps from above? It takes just a few minutes, you don’t need to load any texture for seeing it. It certainly is not a problem with the texture itself.

Again, the problem is not exclusive to daz.
Your setps are pointless to anyone who can reproduce the same light behaviour by applying any type of morph target to a skeletal mesh.
If you activate the morph under a light source with shading you’ll see some sort of shading artifact.

The same way you correct the shading behavour for that, is a valid way to correct the shading behaviour on any other skeletal mesh with morph targets - including a daz character.

If I’m not mistaken, JCM is literally just a morph target (blender shape key) which is directly controlled by a joint.
literally something we have used in the industry for years, that got a fancy acronym in Daz. Joint Controlled Morph?
its not some hocus pokus black magic that only a Daz export can create.

Make a blender 1m cube. Tab edit mode. Move the top to 1.5m so as to get a 2m tall rectangle. add a loop cut horizontally. Go object mode and add a subdivision modifier of 10 and apply it.
you should get a box with vertices every 10cm or so.
extremely low poly and easier to debug.
unwrap the rectangle with a standard box cut. Just so we actually get seams to check the shadowing on those too. The character has them in different areas, but still has them. Its good to debug.
Assign an empty material, just so unreal doesn’t freak out on import (which it shouldn’t anymore anyway).
while at it, select the whole mesh in edit mode and set faces to smooth.

Make an armature.
Add the base bone and stretch it to .5m so it sits at the middle spot of the original 1m cube.
Extrude a second bone to 1.5m so the box has 2 bones.
Move the botton of the bottom bone down to -.5m so that the whole box is covered.
Parent with automatic wrights.

Tab into pose mode. Bend the top joint by 45deg so you have a bent area to work on.

Now split. export and import into engine without a morph. This will be the comparison mesh.
Don’t forget to use the appropriate Faces smoothing group option

after export add a shape key base, and a shape key. Modify/adjust the shape with either push or pull and the automatic distribution.
Since the idea is to generate an armpit corrective probably pull inwards creating something that resembles a hole.

save it out/export and import in engine. Make sure morph is checked and all of that.

Make a blueprint, expose a float. Use the float to power the morph target of the skeletal mesh.
have it work on construction script if possible, so you won’t need to simulate.

When you alter the morph you will see how the engine acrually behaves with base lights on a morphed skeletal mesh.
you can use this cube to debug possible solutions.
because of very low poly it will be more subject to artifacts.

Also, since it literally takes me longer to write this then give you an engine ready cube, I’ll post one in 10 or so.

Here. This zip contains the “drop in .25.1” content folder files with the properly hooked up blueprints to modify the morph and alter the joint.
Here is what you get from it. You can start from this to solve your issue in whatever way you want. We mentioned a lot of solutions.

BTW, recompute tangent works. It’s next to the material Cast Shadows option for the LOD.
if you check it you get this:


It possibly looks worse, but you had said it wasn’t working at all.

Starting Image:

Also here are some more things to try that works for me.

  1. The mesh, set the Dynamic Inset Shadow parameter to true. this renders way better.
    result:
  2. Bump up the Shadow Resolution Scale for the directional light. It gets the area more defined.
    result using a value of 5.
  3. Enable Dynamic Indirect Lighting. - Remember that you glow at night (sadly because it really looks best) - unset it in BP after sunset…
    result:

Scratching my head I took a closer look.

I can confirm that there are “problems” with the Genesis 8 framework and seems to originate at the source.

Suggestion switch to and stick with Genesis 3 as it is well suited for video game use and has every thing one needs :smiley:

First of all many thanks to you all for the work you’re putting in for hopefully finally achieving a solution…

@MostHost_LA: Originally I thought recomputing tangents wouldn’t work.
After having done some tests, it works technically, but only in “inclusive” mode of default skin cache behavior and with support compute skincache checked as well of course. Unfortunately the resulting seams are really terrible.

The most promising of those solutions you have presented seems to be the one with increasing the indirect lighting intensity, but unfortunately it works only with stationary lights and I need movable lights, because my world has a dynamic day-night cycle with a moving sun.

@FrankieV: I looked into DAZ and there really are some artifacts on the g8 mesh in the armpit area (like in your video), esp. if the body has no subdivisions applied, but strangely the mesh looks clean in blender and ue, if you just look at the topology (wireframe mode).

The skin in unlit mode looks clean as well, so the strange artifact isn’t necessarily causing the shadow problems since those artifacts would be visible on the topology (wireframe mode, unlit mode…) as well.

Strangely enough Genesis 3 neither has those artifacts (in DAZ) nor has it those ugly shadows in UE4, although g3 and g8 share the same topology (except for the nails,eyes?).
But the reason could be a different one than you may think, because G3 characters come with the t-pose and G8 chars come with the a-pose, so the necessary bone rotation and thus extent of the corresponding corrective shape key (JCM) is a smaller one for G3 chars than it is for G8 chars for the arms up pose.

Consequently you will encounter more shadow problems where the extent of shape key intervention is bigger and it certainly is bigger with G8 chars as the distance from the arms up pose to the a-pose is a larger one than it is in relation to the t-pose. MostHost_LA’s posts suggest that the issue could equally lie with UE4.

Btw I’m using UE 4.25.1 Dual Quaternion Mod, are you using the same version?

@Bronislaw666
Remeber the discussion we had about floating point precision for mesh verticies and weight paint on the engine?
it doesn’t matter how clean it is in blender.
the mesh is first triangulated on import, and subsequenlty the weighpaint is normalized so some accuracy is bound to be lost.

And no, I’m on the regular engine. So it is likely that my meshes are even more distorted on import then yours are.

Also, my experiments were all done using movable light as my base level animates the time of day as well.
​​
the strangest thing is that there seems to be no way to disable self shadowing on a skeletal mesh. At least, from the movable directional light side of things.
I suppose I could force it to light with a skylight via light channels, but thats not really the same thing…

BTW. recomputing tangent on the hair makes it not glow ! :slight_smile:
Dynamic Inset takes care of resolving the rest.
Example shots:


And Dynamic inset on the head.

The hair material has a custom tangent output as well, so for whatever reason my settings had not ported over from the previews model.

I’ve discovered the same strange thing that no matter what I do the self shadowing of my character doesn’t go away. Even deactivating the sole directional light source (sun) in my scene doesn’t stop the armpit area from having a darkish (reddish) color as if there was a hole. UE is really assuming that there is some kind of deep hole.

Though, if you take my example meshes there is no difference when the morph is at 0.
My guess is that the value of the morph for the daz export/model is active and it is - somehow - what is getting used to calculate whatever shadowing is applied.
Read as - no morph, no problem.

Well the purpose of my testing was to compare apples to apples as someone with little or no experience using this kind of workflow as to expectations and predictability. AKA someone who does not know what they are doing or how to go about fixing things. As I mentioned G3 had issues up until 4.15 at which point I have to believe that Epic fixed the usability problems engine side and along with material behaviour at which point Daz Studio along with Genesis 3 became a usable product as far as a pipeline tool goes. I have no problems recommending to someone starting out as in a 1-1 import as the result can be improved as to what is required by UE4 in producing a AAA result via effort rather than having to deal with problems that can not be resolved, or should be, via a graphics hack.

So

The setup for the test was to take each of the framework assets, pose them as you suggested, and export them with out further processing and as compared to each other the results were totally different from one another to the point that G8 was unusable imported into 4.25.1. As an extension to the testing I also tested both using injectors, which is a key feature of using Genesis in the first place, and the problem become worst at which point there was no need for further testing as to usability except maybe the challenge of figuring out where the problem is occurring.

I forgot to mentioned that when I applied a full body morph holes opened up under the armpits.

My conclusion is the same as yours to put G8 aside until a “key” feature is fixed on either end as the end user should not be expected to hack around in an effort to force an asset to work as to expectations. If the case this is the point where it’s better to start from scratch rather than letting a 3rd party attempt to solve the problem for you :wink:

At the very least it’s worth pointing out the problem to Epic as they did respond to G3 problems and continue to improve the fidelity import and maybe one day fix the eyes issue (nudge nudge)

@MostHost LA: So it must be the ue4 shader calculation which is glitched? Do you know which file in the source code it could be that is affected?

@FrankieV: I’ve looked at your shadows/artifacts once again and they’re even worse than with my characters, because I don’t have any artifacts in UE4, only the shading issue. Maybe the fbx exporter of daz is faulty. As for the shadows I’m now thinking that the armpit area is a body part where multiple shape keys are being applied, maybe this could be the issue with the shader calculation?

Does it get better, if you import the Genesis 8 Characters into Blender through the newest Diffeomorphic importer and export from there to UE4. My workflow is always to export the character in the standard a-pose (Gen 8) at first and then to export the animations separately, so you always have a clean base mesh in standard pose.

I’m always using blender as a intermediate step for my workflow between DAZ (or any other tool, where I can mine some 3d assets) and UE as I can fit, resculpt and reweight clothing in blender, apply and test the behavior of multilayered clothing, fit hair or any other third party assets, correct twisted or ugly vertices etc.

As attachment how it looks (Genesis 8 female) in blender if imported through diffeomorphic plugin. The topology looks very clean. (wich JCMs applied)
Did you know that Genesis 8 hasn’t only got the normal JCMs, but so called muscle flexions JCMs as well, which makes it even more advanced.

Well, If I have time tomorrow, in an effort to figure it out as I will need to actually use the face morphs I have wasted about 10 hours on today, I’ll try and give the cubes a re-haul to put More then one morph onto the Hole area.
IF it is something we can easily replicate - assuming it even actually is a bug and not just a new “feature” of the engine - it will make filing a report a lot easier.

PS. btw, you could totally just subdivide that geometry at least 1 more time to get overall better shading at the cost of double the tris count?
It’s not as heavy as I would expect. 8 to 9 quads sideways means that there’s probably a vertex every 2cm or so (average of 20cm under an armpit).

I will definitively do a test with one subdivision when I find out how to exactly apply the hd morphs on a subdivided mesh. Supposedly it is achievable with the latest diffeomorphic update (it can now even import muscle flexions), but I don’t know yet how to extract the hd morphs.

As for the tricount it will not only double but jump from <32k to <131k, that’s for sure.

It’s ok for one main char, but not for a full scene with multiple chars, so I’d like to prevent using subdivided chars, because it has only a minimal advantage over the standard char mesh, which is almost perfectly optimized already.

I’ve reported the bug already a week ago but if we know more about the “why” of the issue, we could provide Epic with more details…

To me it’s a usability issue. I use 3ds Max and most things import as to expatiation but doing 1-1 from DS to UE4 with unpredictable results is a deal breaker. Part of our project design the ability to let players make their own player models in the future is on the table. Overall sure G8 is a better product, even with stuff that is not needed, but would require a lot of design changes to things already done.

Forgive the the production value but here is how we make use of the framework

So as you see no point in muscles or joint deformers. For that matter we are more interested at some point of importing game assets into DS so we can change body types. (for another time )

From the department of when pigs fly though the ideal would be total DS integration with UE4 but Epic would have to buy Daz3D for that to happen (not like they have not done so before :smiley: )

By the way we also use Motionbuilder so the bind pose does not matter as to characterize the model needs to face the Z direction and in the T-pose position. This includes quads as well. Ever see a cow in the t-pose? :smiley:

I’m using a similar approach (with skeletal mesh components) but instead of slicing the character up into several body parts every of my character components represents a different type/layer of clothing like underwear top, underwear bottom, shoes etc.

I tried to play with the hd mesh in blender but somehow it lacks the vertex weights and I don’t see any way of transferring them from the ld to the hd mesh. The documentation says nothing about the right workflow of importing hd characters into blender.

Apart from that: Any news on the shadow issue?