Use Decimator to export to Unity

Hi everybody,

I'm completely new to Daz and Unity and have been watching many tutorials for the past few weeks to import a Daz character to Unity.(Yes, I purchased the indie license).

Since unity is limited to 65535 verts (I'm assuming verts is short for vertices ?), I've purchased Decimator to reduce the count. So basically, I want to decimate in Daz any mesh bigger than 65000 verts so it can fit Unity. My problem is that the decimator panel seems to decimate using a polygon count not verts.

I do not know what's the difference between polygons and verts but when I do specify 65000 in the polygons count and create the new lod then export, first I still see the original number of verts in export window instead of seeing the number after decimation and second, the verts count is still too high for Unity.

How do I know which number of polygons I must decimate so the number of verts match Unity's limit ?

Thanks !

Comments

  • Most figures don't need decimated, as they are much less than the maximum vetex count Unity expects. The average for Genesis 3 figures is around 17,000 vertices, for example. And polygon count is somewhat related to vertex count; the main difference is that not all polygons will be quads (meaning having four sides); some may be triangles or other shapes, so that will impact the polygon count accordingly.

  • DaedolonDaedolon Posts: 13

    Indeed, most of them don't need. But hair do, they usually have too many verts, reaching 200000+ most of the time.

    I did try to decimate them but when going to low, the result is ugly. So I still have to break hair in several meshes when importing to unity anyway.

    As to answer my own question, I noticed the polygons count is about half or 2/3 of verts count so I just set the polygons count to about 32000 to 40000 depending on the asset and it seems to work. But for hair, I still have to go much higher and let Unity split it in several meshes as said.

    If somebody has a better formula to estimate the verts count compared to poly count, I'd be interested.

  • skinwalkerskinwalker Posts: 76
    edited October 2017

    When you are exporting you will always see the original verts count, except if you import a decimated model and try to export it, but still if you decimate it and export it, the menu wont show you the reduced number of verts after you decimated them.

    After you import your FBX into Unity you can expand it and select the mesh, there you can see the actual verts and tris that the model has.

    I basically gave up on character body optimization, because I figured out I need every part of the character to look good (yes even teeth and nails). I only optimize the clothes and the hair.

    You have to be pretty lucky with the hair models, some of them can be reduced from 300k polys to 4k, some of them look really bad at even 200k.

    You can pretty easily reduce the polys of the clothes to 3-4k without having a big quality loss, It's different for every model, but most of them work.

    So basically you gotta be happy if you manage to reduce the hair's poly count down to 20k for example (even though its super high just for a hair), also one more thing you need for the hair is a good shader.and this package contains some good ones - https://www.assetstore.unity3d.com/en/#!/content/11978

    I will also share my workflow, which is the best one I've found after lots of tries

    1. Prepare the character, add clothes, hair etc and save the scene.

    2. Export as .FBX with the morphs, don’t select "Merge clothing into figure skeleton"

    3. Import the FBX in DAZ and optimize it with the decimator.

    4. Export the main body(naked) as FBX and import it into Unity.

    5. Decimate the clothes / hair - unparent, right click - select children and export as FBX, then import them into Unity (repeat for each cloth/hair).

    6. Use a script to copy the bones from the Genesis.Shape skinned mesh renderer to every cloth / hair you've added, so it animates properly with the character.

    Post edited by skinwalker on
  • hapciupalithapciupalit Posts: 121

    When you are exporting you will always see the original verts count, except if you import a decimated model and try to export it, but still if you decimate it and export it, the menu wont show you the reduced number of verts after you decimated them.

    After you import your FBX into Unity you can expand it and select the mesh, there you can see the actual verts and tris that the model has.

    I basically gave up on character body optimization, because I figured out I need every part of the character to look good (yes even teeth and nails). I only optimize the clothes and the hair.

    You have to be pretty lucky with the hair models, some of them can be reduced from 300k polys to 4k, some of them look really bad at even 200k.

    You can pretty easily reduce the polys of the clothes to 3-4k without having a big quality loss, It's different for every model, but most of them work.

    So basically you gotta be happy if you manage to reduce the hair's poly count down to 20k for example (even though its super high just for a hair), also one more thing you need for the hair is a good shader.and this package contains some good ones - https://www.assetstore.unity3d.com/en/#!/content/11978

    I will also share my workflow, which is the best one I've found after lots of tries

    1. Prepare the character, add clothes, hair etc and save the scene.

    2. Export as .FBX with the morphs, don’t select "Merge clothing into figure skeleton"

    3. Import the FBX in DAZ and optimize it with the decimator.

    4. Export the main body(naked) as FBX and import it into Unity.

    5. Decimate the clothes / hair - unparent, right click - select children and export as FBX, then import them into Unity (repeat for each cloth/hair).

    6. Use a script to copy the bones from the Genesis.Shape skinned mesh renderer to every cloth / hair you've added, so it animates properly with the character.

    I know that this post it's old, but I'm a little stuck on step 6... I'm not sure I follow. Is there any script that does that alreay? Or I need to create one, cuz if I need to create one I was wonering if you could be more explicit. 

    Thank you

  • He refers to a script that will walk through every game in your base figure and copy its transform, more to the point its rotation, to the clothes.

    is doable, you can do with a foreach(Transform bone in master.getchildren()) [pseudocode, not for copypaste] but the operations get a smidge out of hand and performance tanks FAST given how many bones. also to consider is that you don't always get the exact final bone count on clothes, most if not all don't have any of the face bones, so you'd have to do the matching by hand.is better in my experience to export the model as a whole, clothes and all as a single figure. then you have the opportunity of cleaning up the mesh that is hidden to avoid skin clipping through

Sign In or Register to comment.