danielbui78 / udtu-unity-package

Unity Package for Unofficial DTU Bridge
Apache License 2.0
3 stars 3 forks source link

HQ Materials Don't Have Textures #2

Closed echads closed 2 years ago

echads commented 2 years ago

After the .dtu detection the new materials fail to copy over textures from the .fbx HDRP/URP materials. I have not tested Standard pipeline yet. If the code is there and it is still failing for some reason, my guess is a default setting may be needed to import .fbx's with materials saved to a folder rather than built into the .fbx. The other reason could then be those materials or textures might need to be marked writable in order to access them. I haven't played with those API's in a while so these are just guesses.

image

Checking "Replace FBX materials..." is what I'm discussing in case it isn't clear. Unchecked the textures do copy using the NON high quality ones.

danielbui78 commented 2 years ago

Sorry, it's unclear what you mean by "new materials fail to copy over textures from the .fbx HDRP/URP materials".

FYI, the uDTU Daz Studio plugin does NOT embed any texture files into the FBX. Instead, it relies on the uDTU Unity plugin to parse the information stored in the DTU files and then copy the original texture files used by Daz Studio directly from the Daz Studio Asset Library folders into the Unity project folder. So there are no low quality textures used or created -- just the original textures directly from Daz Studio. Please clarify your exact situation by answering the above questions, then do the following steps to help us better understand exactly what is going on:

  1. Make sure that you are using the latest uDTU plugin inside Daz Studio instead of the official Daz Studio plugin. Use "File->Send To->Unofficial DTU" instead of "File->Send To->Daz To Unity".
  2. Do not modify any of the FBX Export options, aka Uncheck the "Show FBX Dialog" checkbox in the uDTU Daz Studio plugin Send To dialog window.
  3. Make sure you never have "Install Unity Files" checked. If it says "Overwrite Unity Files" and you also have an "Assets/Daz3D/Scripts folder" and/or "Assets/Daz3D/Shaders" folder, then your project is already messed up and you need to delete the Assets/Daz3D folder from your Unity project and re-install the uDTU package with the package manager.
  4. Make sure that after uDTU package installation, you do not have any Error message in the Unity Console pane when opening the Unity project. If you do have Error messages when opening the Unity project, then please take screenshots with fully readable error messages and post them here.
  5. After a figure is imported from Daz Studio into Unity do the following:
  6. Verify that a prefab was generated in the Scene window pane. If not present, then find the generated prefab in the Unity Project files and drag it into the Scene. NEVER drag the FBX directly into the Scene or Heirarchy.
  7. Please go to the uDTU dialog window's History pane and open up all the Import Events and take a screenshot and post it here.
  8. Open the prefab file generated by uDTU import process and take a screenshot of what the figure looks like and post it here.
  9. Go to the Unity Console pane and adjust the filter to show only Error messages. Resize everything to be readable and take a screenshot and post it here.
echads commented 2 years ago

I apologize for being a little vague. I thought this was a known issue as it happens for me in the official repo as well.

I'll paste a few shots: Step 1: image Step 2: Check settings before export/import. image Step 3: Auto detect and import: image Step 4: Add the profile (I have had the profile added before and the issue still happens) image Step 5: Review what was created, here a "uDTU HDRP.Specular" shader was used however with the G3F I got a SSS shader, in either case these uDTU materials are added to the prefab but no textures assigned. image image Now if I unchecked the [ ] Replace FBX materials with HQ ones...box the standard HDRP Lit shaders would have the correct textures assigned.

Like mentioned above this also happens with the official DazToUnity, am I the only one seeing this issue?

danielbui78 commented 2 years ago

Thanks very much for taking the time to post your step-by-step screenshots. However, you have not shown me a if you had any Error messages in the Unity Console pane.

Are you running Unity on Mac or Linux? Are you running the Windows version of Daz Studio via WINE? Are you running the official bridge for the Daz Studio plugin and mismatching it with the unofficial bridge for the Unity plugin? While all these things are not necessarily deal-breakers, it would have been extremely helpful to know these things. All of these things have different expected behaviors and implications when things go wrong.

As I mentioned in the previous reply, the uDTU Unity plugin copies the original texture files directly from the Daz Studio Asset Library. It does this by reading the ABSOLUTE FILE PATH to the textures which is stored inside the DTU file. Based on your screenshots, my suspicion is that the drive/folder/file mapping that is used for Daz Studio is not the same exact mapping that is being used or understood by Unity. If you can please clarify exactly what platform you are running, what filesystem(s) you are using and what file/folder/drive mappings are being used, then it would help me understand what exactly is not working. Also, please send me the Error messages in the Unity Console pane.

Thanks

echads commented 2 years ago

There were no errors but I did have warnings: image Which now gives me the point of failure. Thanks!

Yeah I run a complex setup on linux running Daz on Wine / Steam Proton. And Unity natively on linux. I can also run Unity in Wine so it looks like I need to do that to at least grab the textures as linux doesn't have a concept of a C:/ drive so that is why it isn't finding the textues. It does find some textures though (which was why I thought some came through the .fbx) anyways I should be able to solve it from here. Thank you for helping me find the hiccup.

danielbui78 commented 2 years ago

Sorry, you still seem to be confused on some very big points:

The official DAZ STUDIO PLUGIN has bugs and behaviors that are fixed and/or changed in the unofficial DAZ STUDIO PLUGIN. The official DAZ STUDIO PLUGIN will embed textures by default into the FBX. The unofficial DAZ STUDIO PLUGIN will not embed textures by default. This behavior can be toggled on/off in the "Show FBX Dialog" option of the unofficial DAZ STUDIO PLUGIN.

You are confused about whether or not textures are copied/not copied because you are mismatching the official/unofficial parts of the bridge. Consequently, you are creating very confusing and contradictory posts here because you are not clearly stating this situation. This is wasting your time and my time and the time of everyone reading these posts. Please try to understand this for future posts. Thanks very much.

echads commented 2 years ago

I understand now. I admit I should of picked up on the UDTU repo earlier as you kept referring to it and I remained unclear what you fully meant.

So from all this to me the take away here is updating the README.md.

IMHO clearly mentioning that both projects need the other to be complete would be helpful. I scrolled through https://github.com/danielbui78/UDTU and found no link to this repo for instance. Just adding your bullet point:

There are TWO halves to the uDTU Bridge: an unofficial DAZ STUDIO PLUGIN and an unofficial UNITY PLUGIN.

And then linking to the tandem repo would do it.

However I could see the counter point, under https://github.com/danielbui78/UDTU#windows-installation-instructions where you mention:

The embedded Unity plugin can be installed with the "Install Unity Files" option, just like the official DazToUnity Bridge.

As being enough. Anyways, I will close this issue out.

danielbui78 commented 2 years ago

No worries. It is completely my fault for assuming that only people familiar with the original UDTU github project and follow my posts on the Daz Forums thread about the unofficial Bridges would even know about this repository. This was obviously a silly assumption by me in the era of Google.