[Released] Unofficial DTU Bridge v1.1
UPDATE: Version 1.1 is now available to download. It contains experimental MacOS support and new shaders for HDRP and URP.
Download the latest version (compiled and source code): https://github.com/danielbui78/DazToRuntime/releases
I am happy to announce the release of version 1.0 of the Unofficial DTU Bridge. Here are a few of the things that the Unofficial DTU Bridge now supports:
- Genesis 8.1 and PBRSkin shader
- URP and Built-In RenderPipelines
- Animation, Timeilne support
- Bugfixes: emission strength, material naming, etc.
- Experimental dForce clothing support
Unofficial DTU Bridge version 1.1
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:
- Experimental MacOS 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".
Known Issues:
- dForce strand-based hair is not yet supported.
- dForce clothing with high poly counts will cause heavy performance slowdowns in Unity.
- Exporting Subdivisions levels are not yet supported.
- 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.
- Mac OS support is still experimental and requires manual installation of Unity plugin (see instructions below). Only tested with Big Sur.
macOS Installation Instructions:
Unity Plugin must be installed using the "Unofficial_Daz3D_Bridge_v1_1.unitypackage". You can drag this into the Unity Editor Window, or double-click while Unity Editor window is open.
Daz Studio Mac Plugin: Unzip the "libunofficialdzunitybridge.dylib.v1_1.zip" file and move the "libunofficialdzunitybridge.dylib" file into the plugins folder of Daz Studio. The plugin folder is found in the same folder containing the main Daz Studio application icon. The bridge can then be accessed from the main menu: File->Send To->Unofficial Daz To Unity.
Windows Installation Instructions:
The "unofficialdzunitybridge_v1_1.7z" file should be unzipped and the "unofficialdaztounitybridge.dll" file should be placed in the plugins folder of Daz Studio (example: "\Daz 3D\Applications\64-bit\DAZ 3D\DAZStudio4"). Daz Studio can then be started, and the bridge can be accessed from the main menu: File->Send To->Unofficial Daz To Unity. The embedded Unity plugin can be installed with the "Install Unity Files" option, just like the official DazToUnity Bridge.
Alternatively, you can install the "Unofficial_Daz3D_Bridge_v1_1.unitypackage" by drag-and-dropping it into the Project pane of the Unity Editor window, if you want to install it without using the DazStudio plugin.
To Test dForce Clothing to Unity Cloth Physics support:
Make sure you save your DazStudio project before taking these steps, some will Not revert with Undo command.
Preparation:
0. In the Unity Editor, open the Unofficial DTU Bridge window. Go to the Options tab. Make sure the "Enable dForce Support" option is checked on. Close the Unofficial DTU Bridge window. Switch to Daz Studio.
- Load dForce compliant clothing onto your figure.
- Clear any dForce simulation calculations in the scene by selecting the Simulations Settings Pane and clicking "Clear". Warning: you will NOT be able to undo this procedure.
- Select the Surfaces Pane and select the clothing surface materials. For each material, double-check the Simulation Properties Tab to make sure that Dynamics Strength is set correctly: a value of 1.00 will often cause clothing to fall off or explode in Unity. Try setting this to 0.5 if this happens.
- Recommend setting one Material's Dynamics Strength to 0.2 or less, to act as an anchor for the rest of the clothing -- example: waist-line of pants and skirts, neck-line of shirts and jackets.
- With dForce Clothing still selected, add a Push Modifier via the "Edit->Object->Geometry->Add Push Modifier..." menu command. This will add a new property in the Parameters Pane called "PushModifier" in the "Mesh Offset" Property Group. Try 0.1 as an initial value. It can be increased if you are having cloth collision issues such as clothes exploding.
- Select "File->Send To->Unofficial Daz to Unity Bridge".
- Open Unity Editor window and wait for DTU import to complete and Prefab to be created in the Scene.
Cloth Colliders:
- In the Scene Pane, open the imported prefab and select the "Cloth Collision Rig". In the Inspector Pane, you will see the "Cloth Collision Assigner" Script Component.
- There are three sections that can be expanded: "Upperbody Colliders" contains a list of paired sphere colliders for the upper body. "Lowerbody Colliders" contains a similar list of paired sphere colliders for the lower body. "Paired" sphere colliders are a two sphere colliders that joined together by the Cloth Physics component into a collision cylinder with differing sized round ends. This way, you can make custom shapes for limbs, torso and other body parts.
- You may click on each sphere collider to access the specific sphere collider component within the animation skeleton. You can then adjust the position or size of the collider.
- The third section is "Cloth Configuration List". Expand this section and you will see a list of all imported dForce items that have been converted to use Unity Cloth Physics components. Select each item and uncheck "Upper Body" or "Lower Body" to disable any cloth collision skeleton parts that are unneeded by that clothing.
- Double click on a Cloth component here will take you to the clothing object that it controls. Do this for each one: Find the Cloth component and check the Sphere Colliders section. You will notice that this is empty. It is filled at runtime (when the project is Played) by the "Cloth Collision Assigner" Script. If you want the list to be populated at Edit-Time, then during runtime, click on the three dots of the component and select "Copy Component". Then stop the project and click the three dots again, now select "Paste Component Values".
Cloth Physics Weight Maps:
- Select dforce clothing in the Scene Pane and you should see the Cloth Physics Component in the Inspector Pane.
- Below the Cloth Physics Component is a new "Cloth Tools" component that contains convenience features for working with cloth physics weight maps.
- The first section lists all the material groups within the current dforce item. Each one contains a slider and number textfield and a "Set" and "Clear" button.
- Use the slider or textfield to enter a decimal number then click "Set" to assign that number as the "Max Distance" to all vertices within that material group. Note: "Max Distance" is the maximum distance a vertex can travel from its original position due to cloth physics and is measured in Unity worldspace units. That means a value of "1.0" will let a vertex move up to 1 meter in the world. The slider will move up to 0.2 units (20 centimeters) but the textfield can be used to enter a value of any size.
- Click "Clear" to remove all constraints, represented by a black sphere. This will let the vertex travel an infinite distance from its original position due to cloth physics.
- "Load Weightmap data" can be used to load Unity Weight Maps or Dforce Weight Maps. You can use the drop down menu in the load file dialog to choose which file types to filter or to see all files. The Unity Weight Maps are raw binary dumps of the floating point information for MaxDistance values of the selected item. The Dforce Weight Maps are raw binary dumps of the unsigned shorts (16bit) information from the Daz Studio "Dforce Weight Node Modifier / Influence Maps". Dforce Weight map files are automatically created if Daz item contains a Dforce weightmap.
Note: In Daz Studio, this value is multiplied by the Dynamics Strength for the corresponding material group. However, the imported Unity value is not currently multiplied by the corresponding material group because the vertex ordering of the raw Dforce weight map has not yet been decoded. - "Save Weightmap data" will popup the save file dialog to let you save the current weightmap in a Unity-compatible Weight Map format.
- "Load Gradient Pattern" will create a gradient pattern from 0.0 to 1.0 from index 0 of the weightmap to the last index of the weightmap.
- "Zero All Weights" will set the entire weightmap to 0.0.
- "Clear All Weights" will remove all constraints from the entire weightmap and allow infinite distance to be travelled by cloth physics.
Tips: if clothing falls off or explodes, try decreasing the Dynamics Strength inside Daz Studio and/or increasing the Push Modifier Offset.
Change Log:
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.
Comments
Congratulations. It is a great achievement.
Thanks so much! This saves so much time.
That's amazing ! Thank you so much for your awesome work, it works so great !
Looking forward the subdivision levels support ;-)
FYI, I'm almost done with the version 1.1 (few more days). It will have improved skin and SSS shader based on a new refactored SubGraph based Shaderlab code base. It will also have Mac support. Version 1.2 will have integrated bone-mapped SubDivision support (few more weeks).
Couldn't wait for the Mac support!!! Good job!
Just posted version 1.1. The MacOS support is still experimental, I encountered a bug when trying to install .meta files into the Unity project folder. I'll try to research and provide a full fix in a future version. For now, the workaround is to install the Unity Plugin via the .unitypackage. It also contains the a new set of shaders for HDRP and URP. They implement a number of new features (see Readme for more info). The end result is that they should be much more accurate to what Iray renders look like. See old vs. new shaders below (old on left, new on right).
The most dramatic improvement should be visable between old and new URP shaders, since the old URP shaders had very poor specular support and broken depth-testing (important for hair) and transparency.
MacOS support confirmed working on Big Sur and Catalina!
Hello Daniel,
I have an issue in Unity (2021.1.22 and HDRP). Everything works great and suddenly, when deleting the previous one and importing another character all skin materials are green and my character looks like Hulk :-)
If I create a new HDRP Unity project everything works fine so I guess something is broken in my project? I'm using Unity for many years but I'm still new with the HDRP. Do you have any idea?
Note : I already had this issue with your previous version of DTU bridge.
Anyway, thanks again for your fantastic work !
Wabby
Green tinted skin is a common issue whenever a required Diffision Profile is not yet added to your HDRP Default Settings. This can happen in any version of Unity when using HDRP (2019-2021+). All you need to do is add the IrayUberSkinDiffusionProfile to your HDRP Default Settings:
In the future, I'll try to figure out how to check and automatically add missing diffusion profiles to your project settings when the DTU scripts run.
That's it ! Thank you very much !!!
I also wondering if you think it would be possible to have something less... pixelated with the hair. Especialy when the camera is moving, the hair looks so weird (I know this issue comes from the "official" DTU bridge).
Even with Lit Shader mode set to Forward and using Multisample Anti-Aliasing...
Not sure it could be usefull but I could try somethings in Photoshop on the diffuse and alpha maps of the hairs... I'll tell you if it changes something.
Yes, the current version is still using the original Hair shader from the "official" DTU bridge. I plan to analyze and improve the Hair shader code in the next several weeks. Probably after the update with Subdivision support. You can try to change the Alpha Threshold paramaters (Alpha Strength, Alpha Offset, Alpha Power). It may help a little.
It sounds good ! I'm looking forward the next updates :-)
Mac is now fully supported and on par with the Windows version. You can read more about the fix in my dev-journal post here. The source code can be downloaded here.
I will post updated binaries and merge the source code changes into the version 1.2 release, which will hopefully be posted within the next 1-2 weeks.
SubDivision Test Screenshots of Victoria 8.1 HD at Subdivision Level 3 (editor view and game view). Unity 2019 HDRP is drawing 8.3 million triangles at ~1440p@60fps (in Game mode of Unity Editor).
FYI, Victoria 8.1 HD morphs require Subdivision Level 5 before they are applied, so this is technically still Victoria 8.1 and not 8.1 HD.
Slightly off-topic: It would be very cool to see how well the true SubD Level 5+ Victoria 8.1HD can perform using the advertised power of Unreal Engine 5.
And here is Victoria 8.1 HD at SubD Level 4, running at ~1440p @ 30fps, 33.4 million triangles. It took a few minutes just for Daz Studio to export the HD fbx file, which was 250 MB. I tried to reach SubD Level 5, but it looked like Daz FBX export process crashed after 15+ minutes. I'll try again later when I can let it run as long as it needs.
Edit: sorry, the last two posts just had the default 2048 resolution textures, so visual quality was misleading. Here's a new post with textures set to 4096.
I keep getting a warning from my anti virus that the dll file is a network risk and it is put into quarantine. Is this a common issue?
Yes, depending on your anti-virus software, unsigned EXE and DLL files may trigger those warnings. However, I am using the built-in Windows 10 Virus & threat protection software and have never received any similar warning like that before. Make sure you are downloading from the Github repository: https://github.com/danielbui78/DazToRuntime/releases/tag/v1.1-unofficial-unity. After version 1.2, I will try to submit to Daz Store for easier installation (version 1.1 did not have the full MacOS filesystem support merged in yet). Hopefully, you will have less problems installing from DIM / DazCentral.
I'd like to thank Daniel for this awesome Unity bridge. I found the official bridge to be a total mess, not only did it disappear in Daz, but I'm not impressed with the support. I haven't had a reply from the team when it comes to answering my questions.
I think the unofficial bridge should be the official bridge since it supports URP which is important since there a lot of developers making mobile games.
Sorry, I did not have time to address this issue previously. Daz Studio has a fully user-customizable main menu bar. Whenever menu bar commands like the DazToUnity Bridge disappears, you probably need to re-add the menu command back in:
Hopefully, this will work. If it does not, then you may need to take more drastic actions and use the "Window->Workspace->Update and Merge Menus" option. !!WARNING!! This command may delete all of your custom menu actions. Unfortunately, I haven't figured out how to save and restore these custom user-made actions prior to using the "Update and Merge Menus" command. Maybe you can ask someone in the main Daz Studio forum.
Unfortunately, the Daz Bridge team is extremely small, consisting of (I think) three people who are responsible for the entire line of Daz Bridge plugins (Blender, Untiy, Unreal, etc) And that's just one of their jobs. In my opinion, what they've been able to accomplish across all Bridges in a year's time is pretty impressive. I have made so much progress on the unofficial DTU bridge only because I have devoted 500+ hours over the last several months working on it. A more prudent business person would probably not have invested so much time in something that is free, but I'm just very passionate about free and open-source software. I much prefer that Daz provide the Bridges as free and open-source than any paid, closed-source option that might offer more support.
Yes, actually the Daz Bridge team has been in communication with me to coordinate merger of some of my unofficial updates into the official bridge (aka Github pull-request). There is some more planning to be done, but I will continue with the unofficial DTU bridge in the mean time.
Good news ! I'm very happy for you, Daniel. Your plugin really deserves it !
Thanks! Sorry you are having problems though!
First, please click on the figure and verify that the materials without bump or normal textures is using one of the Daz3D shaders and not the Standard or HDRP/Lit shader (you may need to click twice to get the materials to show up). One common reason for this to happen is that you are using the FBX file directly rather than the Prefab which is generated by the bridge. Usually in that case, the eyes are opaque white and the eyelashes are black. However, I'm not sure why you would not be getting the same issue if you were doing that in the official bridge as well.
Please let me know your answers to these questions:
Hopefully, it will be an easy thing for us to solve.
Tried it with a new project and it worked.
The only difference with the one that doesn't work is that it was a built-in project that I "upgraded" to HDRP. I think it was something with the "upgrading symbol definitions", because selecting the dtu and clicking "create unity prefab" didn't do anything.
Sorry to bother you
Sorry to point out that it does not work, really. You can export the figure and animation one time. Every other animation, new animation, added animation will be ignored if sent, just like before.
This means that I have to re-import another figure every time I want to import a new animation??? No. Not really. Because after the inital export the tool does resumes its function as with the other versions before it. Meaning it does not import ANY animations.
You guys are making re metahuman look reeeeally interesting. Is this really necessary?
Hi! It sounds like you are really frustrated and I'd like to help since animations have been working fine for me. First, make sure you are using the unofficial DTU bridge and not the official one. Animations are only implemented in the unofficial DTU Bridge v0.3-alpha and above. Here are the steps to export an animation.
Hopefully this clears up any confusion. Good luck!
I have the prototype SubDivision branch now working in MacOS. I need to implement the lookup Object Name to SubD Level lookup table (to skip using an external JSON/DTU reader), then the SubD branch will be ready for release.
I need help testing Subdivision and Mac support of Pre-Release BETA version 1.2. It is posted on github: https://github.com/danielbui78/DazToRuntime/releases/tag/v1.2-beta-unofficial-unity
[Pre-release BETA] Unofficial DTU Bridge version 1.2
This is a pre-release BETA version. I need help testing Subdivision and Mac Support on a wider scale.
New in this version:
Known Issues:
macOS Installation Instructions:
Daz Studio Mac Plugin: Unzip the "libunofficialdzunitybridge.dylib.v1_2beta.zip" file and move the "libunofficialdzunitybridge.dylib" file into the plugins folder of Daz Studio. The plugin folder is found in the same folder containing the main Daz Studio application icon. The bridge can then be accessed from the main menu: File->Send To->Unofficial DTU. The embedded Unity plugin can be installed with the "Install Unity Files" option, just like the official DazToUnity Bridge.
Windows Installation Instructions:
The "unofficialdzunitybridge_v1_2beta.7z" file should be unzipped and the "unofficialdaztounitybridge.dll" file should be placed in the plugins folder of Daz Studio (example: "\Daz 3D\Applications\64-bit\DAZ 3D\DAZStudio4"). Daz Studio can then be started, and the bridge can be accessed from the main menu: File->Send To->Unofficial DTU. The embedded Unity plugin can be installed with the "Install Unity Files" option, just like the official DazToUnity Bridge.
To Test Subdivision support:
Hello Daniel,
So I have tested your beta 1.2 and it seems nothing happen with subdivision level settings.
In Daz > Choose Subdivision Levels > Nothing changes in the "Base Vert count" column when I'm setting another Subdivision level for the objects (yes : "Enable Subdivision" is checked).
I tested with different levels for the body part and in Unity I still have same meshes like with your 1.1 plugin version.
To be sure, I'm using the 1.2beta I have uninstalled the 1.1 and reinstall 1.2beta but same result.
See attached file for Unity result (scene window at left and game window at right).
I hope it helps and my English is not too bad (I'm French).
Thank you again for all your efforts.
Wabby
------
My config :
Windows 10 64bits
Daz 4.15.0.30 Pro
Unity 2021.1.24 with HDRP 11.0.0
Thanks for the report! First, you are correct: the "Base Vert count" does not change, because it's just the base vertex count -- not the subdivided vertex count. The only thing that changes is what you choose in the Subdivision Level drop-down.
Please let me know the following things so I can try to reproduce your issues:
Some things to verify: Go into Help->About Installed Plugins and scroll down to "Unofficial DTU Bridge". The version should be listed as 1.2.0.5. And make sure the dialog window says "Unofficial DTU Bridge". Also, make sure you are setting a Subdivision level higher than zero. Try subdivision level 2 -- noticeable higher mesh detail level with minimal time to bake.
EDIT:
I've verified that Subdivision at Level 2 is working on Unity 2021.1.24 with Genesis 8.1 Base Male and Female, Genesis 8 Base Male and Female, Genesis 3 Base Male and Female, Genesis 2 Base Male and Female, Victoria 8.1, Victoria 7, Victoria 6. Please answer the questions above so I can try to reproduce your problems with assets you are using.
Known bug: Daz Studio crashes when you export two different models with Subdivision Enabled. Already fixed, will be part of next beta.
Hello Daniel and thanks for the reply.
Everything works fine ! I made a lot of new tests and the issue is only there with the DAZ scene I used in my previous tests. I can't replicate it too and everything works fine like you said with new scenes.
In this old test scene, I'm not sure but maybe I have mixed Genesis 8 and 8.1 shapes on the character by doing a lot of tests so maybe that's why the plugin can't "understand" what is happening.
I confirm you that Daz crashes if I try to export another model in a same session, so it's good you have solved it and thank you for the clarification concerning the Base vertex count.
I also made some tests with poses and everything works fine too. I'll make some tests later with animations but your plugin 1.2 is already validated for me ;-)
Seriously : Bravo !!! ... for your amazing work and efforts.