Importing Daz Studio Characters into Unity - Use them in your game... Unoptimized version

in gamedev •  3 years ago  (edited)


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.

Daz1.PNG

In this image I have changed his material to a green material rather than the red one it defaults to.

Daz2.PNG

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.

Daz3.PNG

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.

Daz4.PNG

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.

Daz5.PNG

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.

Daz6.PNG

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.

Daz7.PNG

Daz8.PNG

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.

Daz9.PNG

With the orc selected I can click File and Export...

Daz10.PNG

Give it a file name and tell it where I want to save it.

Daz11.PNG

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.

Daz12.PNG

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.

Daz13.PNG

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)

Daz14.PNG

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.

Daz15.PNG

We have exported and it has created an FBX file and a folder full of textures.

Daz16.PNG

We can actually use that now to get it into Unity.

Daz17.PNG

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.

Daz18.PNG

I created a DazImport folder and have it selected as this is where I want to import my orc.

Daz19.PNG

Go to assets and then Import New Asset.

Daz20.PNG

Browse to where you exported the files from Daz Studio and select the FBX. Click Import.

Daz21.PNG

You should now have your orc files inside of Unity. :) There are still a few things to do.

Daz22.PNG

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.

Daz23.PNG
Daz24.PNG
Daz25.PNG

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.

Daz26.PNG

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.

Daz27.PNG

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.

Daz28.PNG

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.

Daz29.PNG

I actually dropped this guy onto the Ethan model and then I turned set the ethan related things to disabled.

Daz30.PNG

You can see there that I have Ethan turned off and this messy orc is turned on.

Daz31.PNG

Select the ThirdPersonController or whereever you have your animator that references the avatar.

Daz32.PNG

Change the avatar on that to use your Orc's avatar that was created with you configured the Humanoid Rig.

Daz33.PNG

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.

Daz14.PNG

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.

Daz34.PNG

You need to setup the Humanoid Rig the same way you did before to get the new avatar.

Daz35.PNG

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.

Daz36.PNG

Success. The clothing looks like it should... now we're off to the races.

Daz37.PNG

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.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Holy... looks like hard work, but the result is awesome!

It's actually pretty easy. It just takes a little trial and error.


Nice ass by the way ;D

Thanks... I made him work out before posing for us.

Hahahaha :D

I gave up on game design as character models were just so difficult for me to create and make smooth clean cut animations with. I might have another go at it as Daz seems really useful
Thanks dwinblood

Yeah the modeling is where I have not bothered to get skilled at. My oldest son @theanubisrider actually tackles most of that stuff. I do every other type of thing for game development, and I have built some simple models from code. Though even I can use Daz 3D and get it to do pretty much any humanoid thing I want and at incredibly high quality and detail. I suspect many AAA companies have likely started using Daz for their humanoids, if they are not then they are kind of wasting money as it is so good at it... it started out rough years ago, but now it is simply amazing.

Thanks for the advice. I'll have a shot at it.

Even if you don't make games... it can be used for making videos, rendering still images, etc. A lot of people use it for making book cover art, posters, etc.

Oh and if you are serious then you should click on the DAZ3D tag and read a couple of tutorials I've made on it recently as they talk about what to look for, how to save the most money, etc. I also discuss licensing issues and what you can do without one and what you need a license for, and how to get the licenses for a low cost, etc.

very helpful! thanks. Im currently getting into animating characters in unity using mocap data, so this is very interesting to me

Yeah you can have it inherit animations and it works great with Mecanim.

Super tutorial, I will follow you because I am a fan of programming and video games. I tried Unity one day but I did not spend enough time on it. Continue doing a good job. It is thanks to people like you that Steemit will take off

Nice
Best post seen on STEEMIT about Technology gaming
Keep it up
Work more hard to achieve more success

Loading...

Thank oo for Informative post ... awesome tutorial
PLease Read my Last Post ,, Get Watch Worth 80$ for free.