[Released] Unofficial DTU Bridge v1.2 (2021-10-31)
danielbui78
Posts: 333
NOTE: I recently changed github repository name to UDTU (2021-Dec-09)
Download binaries and source-code, Installation instructions:
https://github.com/danielbui78/UDTU/releases/tag/v1.2-unofficial-unity
Readme with Tutorials:
https://github.com/danielbui78/UDTU
Unofficial DTU Bridge version 1.2
This is an unofficial update project for the opensource Daz To Unity Bridge released by Daz3D. It contains a number of bugfixes and feature additions not yet incorporated in the official Daz To Unity project.
New in this version:
- Bugfixed crash when exporting subdivisions for more than one figure in a single session.
- Initial refactoring for planned open-source FBX and OpenSubdiv Daz-plugins.
- Updated CMakeFiles for more convenient building of FBX/OpenSubdiv/Mac support.
- Full MacOS support on versions 10.9 to 11.
- (Baked) Subdivision support, up to Subdivision Level 4. Based on https://github.com/cocktailboy/DazToRuntime implementation.
- FBX SDK and OpenSubDiv are static linked into the Unofficial DTU Bridge and requires both libraries to build the Daz Plugin.
- OpenSubDiv is used under a Modified Apache License 2.0: https://github.com/PixarAnimationStudios/OpenSubdiv/blob/release/LICENSE.txt
- FBX SDK is used under the Autodesk® FBX® SDK 2020 license: https://www.autodesk.com/developer-network/platform-technologies/fbx-sdk-2020-2
Known Issues:
- Subdivision procedure is currently only single-threaded CPU-based and may take several minutes to bake Subdivision level 3 and 4.
- dForce strand-based hair is not yet supported.
- dForce clothing with high poly counts will cause heavy performance slowdowns in Unity.
- Geograft morphs are not yet supported.
- Genesis 8/8.1 prop rigging is not yet 100% accurately converted.
- Identical / duplicate materials are not yet detected for merger in Unity.
- Cloth physics colliders are not yet resized to Daz figures.
- Daz dForce weight maps are not yet converted properly to Unity Cloth physics weight maps.
Change Log:
Version 1.1:
- MacOS filesystem support.
- Experimental uDTU shaders added for HDRP and URP, made from refactored and unified shadersubgraph codebase.
- "Use New Shaders" option added to DTU Bridge Options panel (disabled by default).
- Translucency Map, SSS, Dual Lobe Specular, Glossy Specular, Specular Strength, Top Coat implemented.
- URP Transparency support via URP-Transparent shading mode.
- Dual Lobe Specular and Glossy Specular simultaneously supported in all shading modes (SSS, Metallic, Specular, URP-Transparent).
- Metallic emulation implemented in Specular and URP-Transparent shading modes.
- SSS supported for all non-transparent materials (previously only Skin).
- Fixed Alpha Clip Threshold bug in URP: affected depth-testing, especially hair.
- Glossy Anisotropy, Roughness and Weight fixes.
- "eyelash" material assigned to Hair shader.
- Changed window titles to "uDTU".
Version 1.0:
- Bugfix: Imported asset files with different hash values are appropriately overwritten.
- Bugfix: Emission strength values are properly set for IrayUber materials.
- Bugfix: Emission Color now working for URP and Built-in RenderPipeline.
- "Enable dForce" checkbox added to Options tab of DTU Bridge window.
- RenderPipeline Detection procedure will ask to confirm Symbol Definition updates before proceeding.
- Notification windows will popup when Daz Export and Unity Import steps are complete.
- Daz Studio Subdivision settings are restored after Send To operation.
- Changed plugin name and window titles to "Unofficial DTU Bridge".
Version 0.5-alpha:
- Smoother Unity Files installation with automatic dialog popup, RP detection and proper importing of first asset.
- UI tweaks such as Daz3D menu command order, Install/Overwrite Unity Files checkbox.
- New Unity Cloth Tools component to bulk edit weights by material groups, save/load weight maps.
- Optimized HDRP and URP shadergraphs to use a single Sampler node.
Version 0.4-alpha:
- Preliminary support for dForce clothing, cloth physics export (only via the Simulation Properties of the Surfaces Pane of DazStudio).
- Pregenerated cloth collision skeleton which is automatically merged into animation skeleton of Prefabs created by the Bridge.
Version 0.3-alpha:
- Animation exporting is now enabled through the Animation asset type and disabled when exporting Skeletal or Static Mesh.
- Timeline animations are exported with sequentially numbered "@anim0000.fbx" filenames, which increment with each export operation.
- Reverted/Fixed issue caused by removal of .meta files in v0.2-alpha which can lead to problems with mismatched GUID files when upgrading the unity plugin.
Version 0.1-alpha:
- Combined support for all three rendering pipelines and an autodetection/configuration system.
Post edited by danielbui78 on
Comments
Gonna try this out, thanks!
Hi Daniel. Thanks very much for your Update and it's so awesome, but i have a question everything comes out of the box DRY!!!! Skin is so dry and Eyes don't have any water/moisture in them. Am i doing something wrong.
For the Eyelashes they were Shining everytime i moved the View, so i shot down the Speculular Color Seconday making it Black instead of the default which was like a Blue,, and that made the eyelashes not shine anymore.
Also i click the UberIraySkin and UberIraySpec .shadergraph files and the inspector shows for both of them a list of bunch of errors. maybe that's why the eyes look dry as ston^_^. I reemmber trying 1.1 and the eyes had moisture in them., The skin in 1.1 by default was also dry , is it supposed to be like this? Here are screen shots
Please reply back with some more info so I can try to reproduce your issues on my end:
Yes, this is one of the next things on my to-do list. The eyelashes and hair still use the original Daz Hair Shader. I am planning a redesign of the hair shader as well as try to add in strand-based hair support. Unfortunately, this will take some time.
As long as the only error messages are "implicit truncation of vector type", then that's a known issue and should not cause any of the things you are describing.
Thanks for your feedback!
1) Ok here i go^_^ Thanks for listening. Unity 2021.1.21f1 Personal
DAZ Figure is Genesis 8, and i use many of the Characters i bought i could tell you the names but i have many . All of them work the same.
It's like for example Beibei( Gravureboxing) asian character from Renderosity, Chihiro(Gravureboxing) asian character from Renderosity,
Accessories? None, i'm just testing Unofficial Daz to Unity Bridge 1.2 now
2) To Export I do this
a) Load the character from my folder OR if it's a character that needs to be applied, first load the Base G8 character, then apply the bought character
b) Apply the MATS that came with the product, then in Surfaces make sure the skin parts are shader: Iray Uber
c) Then go to File menu/Send to Unofficial DTU
d)IN the dialogbox, select the morphs i want to export( i made presets already), select the Assets folder of the Test Unity Project i'm currently using.
If it's the first time i check the box to Include Unity Files. and that's it SEND and Daz goes through a few fill bars then it finishes and it tells me it's done and to go to Unity to continue. then i go there and i get couple of fill bars and the process happens and a DAZ3d folder is created and i get a Prefab character in my scene but ti's green but I learened to go to The Project settings and add the IrayUberSkinProfile( i learned this by reading the instructions).. and then boom, the character now has skin but everything is dry, eyes not moist, etc.
AND when i go to the DAZ3D/Shaders folder and click the shadergraph assets for IrayUberSkin And IrayUberSpec, they have errors. But you said those are not problem. oh ok
Well that's my method. I would think that's everybody's method of doing it
3) No error messages at all. except for the ones i told you "Implicit truncation of vector....etc" for the .shadergraph assets IRAYUBERSPEC and IRAYUBERSKIN
4) Yes, i saw a message about Updating something about HDRP, and i pushed yes
5) MATERIALS assigned
FACE: DAZ3d/IRAYUBERSKIN
SCLERA: DAZ3d/IRAYUBERSPEC
EYEMOISTURE: DAZ3d/WET
888888888888888888888888888888
HOpes this helps you to help us
Hi i just want to comment, i think the Eyeball is better now. I think maybe it was some error i made or something, now it looks fine.
I'm just wondering why the iris does look like reflective but the eyeball , yu dont' see any moisture effect or reflective effect. Maybe cause it's white, you can't really see it? is that it?
Hi Daniel, so i've tried it more and more and Now it seems to all of a sudden now it WORKS fine!!!! The skin no longer looks like dry bread. It looks great. I dont know ..or who knows. . anyways now it's working well
NOw i do have a question though:
Is there a way to select multiple materials at a time and set settings for them at one time?
Because even though i said the skin looks good, it's not to perfection. By default Height (bump) is 1.5 too high for most rendo or daz textures so you will see super large pores and since the bump map textures are not made with super fine detail, they dont look great. So i tend to change all Skin Height to to 0.5, and The default Roughness is 0.504xxx but that has almost nothing skin shine/moisture. so i usually do 0.4 for Body and something like 0.37 for face and ears, and 0.28 for super moist lips.
SO THIS MEANS, i got to do these changes for 50 characters PLUS that i intend to send to Unity.
And changing one material( torso, or Face or Arrms, etc) at a time is tedious :) You know.
So is there a way to select multiple materials in Unity and apply the same change of Height And Roughness?
I'm glad you figured it out. And thanks for updating us! You are correct that the moisture shader (aka Daz Wet) is not the best and has trouble picking up reflections. Regarding getting better corneal reflections, try placing your figures in an area with lower ambient lighting and directing strong light sources towards their eyes.
Thanks Daniel did you see my question about if it's possible to select multiple materials at the same time so i can set the same Height(BUMP) and same Roughness for several materials at the same time?
Hey there , just select CTRL + click multiple materials in your project tab then you can modify them at once in your inspector , note that they have to share same parameters else it won't work
Thanks tons for your work on this bridge, it saves countless hours toying with URP shaders and gathering all proper textures. also i wanted to say that it works well with merge figure (daz 4.10) and anatomical morph are properly exported using the bridge using latest daz version . just have to import a second non merged character to have all clean material.
And my advice for nokoteb99 why you would not try to import 1 character with different head morph and change them into unity . it saves space and you can always saves your new characters into new prefab, also if you make lot's of NPC they would share same texture and material.
Awesome idea/tip!!!!!!! I didn't think of that ever!!! I will do it. But i want to know can i also insert Body morphs into my single character?
AND ALso, in DAZ how do i create body morphs of characters i create(by shaping them with various dials and products)? I would like to use those morphs^_^ as a FULL BODY MORPSH and in Unity apply one for each prefab i make with my single character.....ohhhh this is gonna be so awesome. thanks for the idea
I'm not familiar with merge figure, what kind of issues do you get that requires importing a second non-merged character? Can you send your step-by-step process and screenshots? Thanks for the feedback!
Just search the Daz forums: making and baking custom morphs using multiple morphs and controller dials is a huge area of Daz Studio with many, many experts on the forums. There are already years of tutorial posts and videos and I think even Daz plugins to automate a lot of the work.
Hello well being Pegi18 I wont post any screenshot but explain to with my best english , else i'll be happy to discuss about it in private or discord . any way:
needs for merging is because Daz does not recognize on export Genitals or extre Geograft items.
1st select your character gen8 and apply genitals such as golden palace . this should be done under Daz 4.10, i read 4.11 works also. if you use a version above merging will break your character.
once done you must have only your Figure and its genitals.
launch merge fitted figure --> F3 --> geometry editing --> Merge fitted Figure geometry
On first image you can see all figure attach to the character while doing it i deleted from scene her hair but you can merge them also
on this image you can see after process all morph transfered to the character and all figure i wanted are now part of the character. Note that some Morph might not work but what i need is working :)
then I save all and use uDTU for transfer to unity using daz 4.15 !!!
on Unity It gather almost all texture but some are missing like
so i import also a "neutral Figure" to get all texture , (proper normal map , height map ect...) I think udtu got trouble to fetch all proper texture due to it's modified state merged. but hey it does 80% of the job to import to unity we can work a bit ^^
and here i get all clean texture and I can reapply them to my merged character .
So i don't have much issue just some manual steps to get a clean character. Note One thing i forgot to mention during the process of merging. figure mesh i reducing a bit and i don't know how to prevent this to happen during the process of merging . it's not really important but if you know how to avoid i'll be glad to know just for personnal knowlege.
hope it 's helpful, and i apologize for my english as i'm not native ;)
@Ariku
Thanks for sharing this process! There are a lot of indie developers that work with geograft morphs, so I am sure this will be quite useful to the community! When I have time, I'll try to go through your steps and figure out what can be changed in the uDTU Bridge so that it will get all the correct textures in the first pass and not require a second one. If you can send me the DTU files for the merged and non-merged figures, that would also be really helpful. Note, however, that it will probably be a while before I can sit down and look into this. Thanks again.
@danielbui78
here you are , if you need anything else just ask !
First thing I notice is that the merged materials use Daz Studio Default shaders instead of the Iray Uber shaders. It could be that Daz Studio 4.10 did not yet have the behavior of defaulting to Iray Uber shaders when Iray Uber renderer is selected, but you should check to make sure Iray Uber is the selected renderer prior to adding your figures, just in case. If the shaders are not changed to Iray Uber or PBR Skin Shader or another supported shader prior to export with the Bridge, then the Bridge scripts may miss normal maps, etc. I will keep analyzing the files when I have more time and put updates here.
I am having issues exporting a Genesis 3 figure with hair to Unity 2021.2.0f1 on my Mac. I was using a URP empty project to test with. I only see the hair and no body texture. I can see the shape of the body so I assume the mesh is fine. I am assuming that I did not setup the shaders correctly (I am relativly new to Unity and Daz3D so anything is possible). I was able to get the HDRP to work with the exception of the eyes and figure nails not looking correct.
Does anyone have any suggestions or is there a document that I missed that I should read?
Will support Unity 2018.3.2 HDRP version? or is there a way to only support Iray Skin Shader?
Please post the exact Genesis 3 figure and hair product that you are using and the exact steps you are taking. With Unity versions above 2019, be sure the click "Update everything" when Unity asks you that there are scripts that need updating. If you did not do this, then just right-click on the Daz3D folder in the Projects pane of the Unity Editor and select "Reimport". Finally, there are bugs in the older URP shaders that affect transparency and emission textures. You can try the new shaders by selecting the option from the DTU Bridge Options panel. I'll post step-by-step instructions later.
EDIT:
Actually, nevermind with the above: the problem is that Genesis 3 is defaulting to using the AoA shaders instead of Iray Uber shaders. One way to fix this is to click your Daz Genesis 3 figure in the Scene pane of Daz Studio. Then open up the Surfaces Pane and select the Editor tab. Select your Genesis 3 figure in the selection area. Then switch to the Presets tab. You should see an icon for "Iray Uber Base" shader. Double-click that. Switch back to the Editor tab. There should be a line right below the tabs that now reads: "Shader: Iray Uber". Try the Send To -> Unofficial DTU. Hopefully this should fix it!
But also, do make sure that you have selected the "Update scripts" option. On some versions of Unity, the button just says, "Yes, I've made backups!", but the dialog text should explain that it needs to update scripts.
Sorry, DTU does not support Unity 2018. 2019 is the lowest version it will support. If this is a critical issue for you and you can not move to at least Unity 2019, then let me know -- I will try to assess the feasibility of adding 2018 support. From what I recall, HDRP was still experimental in Unity 2018, so there may be a large number of necessary changes. Also, Iray Skin Shader is based on Shadergraph, was this available in Unity 2018?
@Ariku: I went through the rest of the DTU files and found no other issues -- they are all set to Daz Studio Default shaders instead of Iray Uber shaders. Try making sure all figures / anatomy are set to Iray Uber materials before you do the merge operation. You should then hopefully be able to export directly from 4.10 without needing to open it in 4.15. Let me know if there are still any issues after doing this. Good luck!
PS - I also noticed that FW Laverne uses image maps on the Dual Lobe Specular Weight property. This is currently not supported in the DTU conversion scripts or the shader. One workaround to getting this imported into Unity via the DTU is to add the same image map to Specular Roughness 1 or 2. You won't be able to add it back into the Dual Lobe Specular Weight property without modifying the shader, but at least you will have it available for other properties that can take an image map for right now.
Please let me know the following information:
I empathize with your situation, finishing a game can take a lot of time and Unity updates which make break compatibility with existing projects come out so frequently that it is overwhelming. I can't make any promises or give any timeline right now, but I will keep you in mind and look into what can be done when I am able. Good luck!
thank you for your help and all the info, Daniel. the first thing i tackled was seeing if the Bridge is installed properly. it doesn't seem to be as it isn't listed under help>installed plugins. i didn't install anything myself. i let Daz Central install it. but i have already placed the .dll from github into the proper folder. how else can i get a proper installation of the DTU? is there an Official DTU plugin i need to install first and then the .dll, or is the Unofficial DTU .dll the plugin? as you can see i am a perfect noob to Daz, Unity and gihub.
i think i know the most about Unity. after we get this installation figured out, i'm wondering if my Unity version has to be the HDRP. i'm doing a project where i have to use the VR core. there isn't even a choice for HDRP in the Hub anymore. will the VR core work ok with the DTU?
If you installed DazToUnity using Daz Central, then that was probably the Official Daz To Unity Bridge and not my Unofficial version. However, since you have also placed the "unofficialdaztounitybridge.dll" in the proper plugins folder (usually it is something like "Daz 3D\Applications\64-bit\DAZ 3D\DAZStudio4\plugins\"), then you have already performed the manual installation for the unofficial DTU bridge. That should be enough for the "Unofficial DTU Bridge" to show up in the "Help->About Installed Plugins..." window.
I will try to look into the potential issues and get back to you. For now, please let me know the following:
In the future, I will look into publishing the unofficial bridge in the Daz Store so that it can be downloaded from Daz Install Manager or Daz Central. Hopefully, installing the unofficial bridge will be much easier then.
ok, thank you again, Daniel. i hadn't put it in the plugins folder. i think you may have left that off your path in github, and since there's a lot of .dll files in the DazStudio 4 folder, i thought that was the place. so i now have the Send to Unity in the menu. i have just one other question: i'm using the VR core version of Unity. the Unity Hub doesn't even offer HDRP anymore, only 3d Core and VR core. will these versons of Unity work, too, as long as they're 2019 or after?
Glad you got it working! Thanks for pointing out that issue in the documentation. I re-read what I wrote and realized that it was confusing. I will add the "plugins\" part into the path. Thanks!
I assume you are talking about the "VR" Template option that's available when creating a new project from the Unity Hub? If you are talking about a separate package, let me know. The VR support in Unity has been changing a lot from 2019 to 2021. However, I think the Unity 2019 and 2020 versions of the VR Template use Built-In Render Peipeline by default. The VR Template in Unity 2021 may default to URP, but I need to double-check that. In any case, the unofficial DTU bridge should work with all of them
(Note: the current DTU version may produce errors when importing textures with URP. This is usually fixed by enabling the optional "Use New Shaders" checkbox in the Unofficial DTU Bridge Options dialog. I plan on making the New Shaders enabled by default in the next release.)
PS: For HDRP + VR Support in the later versions of Unity, you need to first use the HDRP Project Template, then, when you start the project, there is an option to enable VR on the HD Render Pipeline Wizard that pops up.
yep, that's exactly what i was talking about. good to know it'll work in those versions. thanx for the info on the shaders, glad i could help with the DTU instructions. thanx again!
editing this cause many of the problems i was having i've solved. i'll add to this if i find some insurmountable ones.
Yes, improving the Hair Shader in Unity is one of my priorities for the next release.
Some Daz hairs are what's called dForce strand-based hair. These are not yet supported in Unity. Strand-based hair support is another priority for a future release.
When a previously textured Daz character in Unity suddenly becomes untextured after an import procedure, always check to make sure that the root node of the Character and not a body part or accessory/clothing/hair node was selected in Daz prior to doing the Send To operation. In future versions, I'll try to do an safety check and pop up a warning if a root node of a Character is not selected.
Normally, the Unofficial DTU Bridge will automatically detect when it has not been installed in a project and enable the check box to Install the Unity files for you. What version of Unity Editor are you using? What packages or items were already added to the project prior to installing the Daz files into Unity?
You can add Daz characters to existing projects.
You may have missed my postscript that I added to my last response regarding HDRP and VR: in newer versions of Unity, there is a popup window that appears after you start a new HDRP template project that allows you to add HDRP + VR to it. As for adding HDRP to an existing VR template, I think there may be some tutorials on how to do it online. If I find one, I'll post it here and message you about it.
EDIT:
Here is a page on the HDRP Unity Manual on upgrading an exisitng project to HDRP: https://docs.unity3d.com/Packages/[email protected]/manual/Upgrading-To-HDRP.html Please note that it is for HDRP version 11.0.0 (which is matched to Unity 2021.1.9f1). You will want to use the drop down and switch to the HDRP version that matches your version of Unity. HOWEVER, I personally have had very bad experiences with upgrading existing projects to HDRP. The results have never been as good as starting from the HDRP template. If you really want to test it out, then BACKUP your project first. Good luck!