Importing Daz Studio Characters into Unity - Use them in your game... Unoptimized version
This is going to be the first tutorial for actually getting characters from Daz Studio into Unity to be used in games. This is not an optimized version. I am just doing it the simple way. I even make one mistake just so I can show you a difference and in anticipation of future tutorials.
In this tutorial we will make an orc, clothe the orc, and change the materials of the clothing inside of Daz Studio. We will then export that orc in an FBX format that we can then bring into Unity. This tutorial assumes you have some basic familiarity with Unity, so if some parts are confusing you may want to play around with the basics first. If you are familiar with Unity then this should be a piece of cake. Future tutorials will deal with optimizations, and addressing some problems this tutorial will illustrate that we will want to tackle later.
Let's make an Orc
In Daz Studio I am going to be using the Ogora figure from the vendor/artist RawArt. I like it's look so it is the one we will use.
In this image I have changed his material to a green material rather than the red one it defaults to.
With the figure selected I go back and to the wardrobe section. Smart Content will only show clothing that is considered compatible with this figure.
I went into the Viking Male for Genesis 2 Male clothing. I've messed with this one before and I know I can get an armor and clothing look for my orc that I like.
In this image I have applied the vest and pants and I have clicked on accessories so I can select some other things to add.
I added bracers, one of the two types of belts, and little ankle cuff like cloth pieces. I am satisfied with this look but I want to select different materials for this clothing as I know I own quite a few other textures for these.
With the vest selected I go back in the smart content browser one level and click on materials. It shows me products I own that are designed to be used with this vest. This is an easy way to find texture packs you've purchased for various clothing. I have quite a few for the viking male and female type clothing as I am making a fantasy themed game and these come in pretty handy.
I am going to select the first one from that list. It actually has some things for male and female in this particular pack, but for the orc I'm going to change all of the clothes to use the textures from this one.
I am satisfied with that look for my Orc. Now is the time to start thinking how to get it out of Daz Studio by Daz 3d and into Unity.
With the orc selected I can click File and Export...
Give it a file name and tell it where I want to save it.
Notice for those of you using other projects there are many different formats that can be exported, but for Unity we are going to use Autodesk FBX format and this is likely what you would need for Unreal, and other game engines as well.
It will give you some options... UH OH we have a problem. At the bottom of that export notice how the Genesis 2 Male figure is selected for export but none of the clothing and other things are? That isn't what we want.
Let's cancel this.
Let's make sure all the things we want to be exported are selected. (For future reference you can right click on Genesis 2 Male and choose SELECT ALL and it is much faster)
Back at our export screen it is showing all the clothing and such as selected. Also make note of all of the other options on that screen, as they likely will be very important in many cases depending upon what you are doing. Myself or @theanubisrider will definitely come back to them in future tutorials.
We have exported and it has created an FBX file and a folder full of textures.
We can actually use that now to get it into Unity.
In my Unity Demo I am using Gaia to create a rapid terrain that looks nice, I am using aquas for better water, I am using Enviro for sky and weather, and I am just using the standard third person controller for Unity that is free to test it. You do not need any of these assets, I just use them because they are great assets and speed up making something that looks nice. Here are three clickable images if you are interested in any of these products.
Those are not necessary for you to use Unity I just like them and believe they are quality projects. Gaia 2.0 is almost out and will be free to current owners of Gaia, but you may want to consider holding off on buying it if you are not in a hurry.
I created a DazImport folder and have it selected as this is where I want to import my orc.
Go to assets and then Import New Asset.
Browse to where you exported the files from Daz Studio and select the FBX. Click Import.
You should now have your orc files inside of Unity. :) There are still a few things to do.
Here I dragged the model into an empty scene to show you that yes, it is in the game. We wouldn't want to use it as is yet, but it's there and here is proof.
Notice how the eyes look off? Daz Studio eyes take some extra work. Most people I know usually actually delete the eyes and add their own textured sphere or model for the eyes rather than use the model that is exported.
So here is the Ethan Model standing in a scene I created quickly with Gaia, Enviro, and Aquas. Ethan comes with the default free Unity third person controller. We have the controller in place, but we don't want Ethan we want our orc.
Here I just show you in the scene view that I have third person controller selected and you can see Ethan and the cameras and such that are associated with it.
We need to rig our Orc as a Humanoid. I selected the orc model and then clicked on the RIG tab, then if you click CONFIGURE it will launch a view you can tweak the bones if you need to and click DONE. I apply this and once that is done it will add a bunch of things under that model including an avatar which is important for being able to animate your character.
I actually dropped this guy onto the Ethan model and then I turned set the ethan related things to disabled.
You can see there that I have Ethan turned off and this messy orc is turned on.
Select the ThirdPersonController or whereever you have your animator that references the avatar.
Change the avatar on that to use your Orc's avatar that was created with you configured the Humanoid Rig.
UH OH we have a problem. I intentionally did this so I could show you. The clothes are not actually part of this figure and are not moving with him.
Well we can make that happen, but that is something we will cover in another tutorial. Instead what we are going to do is make the clothes be baked into this Orc as part of it, so that they don't actually get taken off. For a lot of games this is actually all you need to do.
Back in Daz we will want to check some extra boxes and reexport the orc. I am going to call it Orc2 when I export it and I didn't take a lot of new screenshots when I did this. Actually I thought I did but I've already closed all of that project and I don't see them. So I am going to show you the previous export screen and tell you what extra I checked.
I checked the box that says Merge Clothing into Figure skeleton. You could also check the box that it is static. I am thinking if you use the merge into skeleton but you leave the static turned off you could potentially turn the clothing off/on and swap it out, but like I said that is for another day. For now play with those and export it. I created a new folder in Unity to import mine in just so I had the two versions to compare.
You need to setup the Humanoid Rig the same way you did before to get the new avatar.
I dropped the new model onto the location of my own one below the ThirdPersonController and then I disabled the old orc the same way as I did Ethan before. I clicked on ThirdPersonController and set the avatar to the new avatar for Orc 2.
Success. The clothing looks like it should... now we're off to the races.
You may begin to see why I make a big deal about Daz Studio and Daz 3D in conjunction with game development, but we've barely scratched the surface.
EDIT: Note If I've gotten your attention and you want to give Daz Studio a serious look then I recommend you look at my previous tutorial where I explain how to get the most bang for your buck, and discuss licensing, different generations of figures and all of the things that confused me when I first started using Daz. The below image is clickable.