Jump to content
3DCoat Forums

[Feature] Quixel Mixer texture folder to 3dcoat downloads - no zip


pr1970
 Share

Recommended Posts

  • Member

Hey All,

Does anyone know a way of getting quixel mixer downloaded materials (folders) into 3d coat. 3d coat requires a zip file and the only way i`ve found is to rezip the quixel folders. 
I found an automated way of doing it but it also zips up the parent folder which 3d coat doesnt recognise.

So here are locally downloaded quixel mixer materials.
image.thumb.png.1aac132f984ff01608df75e3a0e6028a.png 

I tried this method.  How to create individual ZIP files from folders (itsupportguides.com)

But it creates this as a zip for each folder, but 3d coat wont see the material as its in a sub folder called Concrete_Damaged....

image.thumb.png.d40f1ac4346b1fcd948d29aae81b1eac.png

image.thumb.png.1e1cf004c81bc8962d121d02a8755057.png

Anyone have an idea how it could zip up the folder but ignore the parent folder?

Thanks

 

Link to comment
Share on other sites

Hope this help

On 3/17/2021 at 8:36 PM, MatCreator said:

The complete install worked like a charm, 3dcoat back to normal, thanks on explaining that. that means the "problem" definitely was in the documents folder, because after the first uninstall the problem existed. remove the document folder and all is well.

but id really like to get those quixel smart materials working, i actually came on saturday looking to invest in building up my library, and been stuck on this ever since =/

anyway, after the clean install i tried adding the quixel materials again... first shot, i did the manual install from the zips to a desired folder for the quixel mats. no slowdown, however in BOTH the preview and when applied they were "flat", no normals/bump/displacement applied as before. no broken material error prompts either. but as they didnt work, and i knew how to "fix" the slowdown, i set 3dcoat for autodetect, which it did (i believe my issue earlier was not pointing out the EXACT folder location), and proceeded to load the shaders in. the previews showed the expected bump, but when applied i got broken material error prompts, and no bump. this no bump issue wasnt noticed the other day, so at this point, im just sticking w/ my clean install and nevermind quixel for now, im DEEPLY disappointed =( maybe there is something wrong with how 3dcoat is reading the zip?!? also, we should be able to specify which folder imported shaders go into. they load in the default folder, and from what ie seen of the quixel shaders so far, if they get moved, they stop working?!?

PBR scans store materials loaded in like a pro in a matter of moments, no issue, no problem.

 

source...

Link to comment
Share on other sites

  • Member

Thanks i had seen that but i dont think its the same issue, mine is using the quixel software that downloads its material but it doesnt use the zip format, it just expands them into a texture library. For 3d coat to recognise them they seem to be needed to be in zip format, so i need to pack the folders into a zip to import. But with 20-30 folders i`d like to automate it to create zips without a parent folder so 3d coat picks them up. 

Thanks

  • Thanks 1
Link to comment
Share on other sites

  • Carlosan changed the title to [Feature] Quixel Mixer texture folder to 3dcoat downloads - no zip
  • 2 years later...
  • Member
Carlosan
This post was recognized by Carlosan!

Rarshad000 was awarded the badge 'Great Content' and 1 points.

I ran into this issue. 

Here is a script I wrote that will automate the process of creating individual zip files without having a parent folder of the same name. 

For context my Quixel Directory is "D:\QUIXEL\Downloaded\surface" 
I used WSL Windows Subsystem for Linux so my path is defined as "/mnt/d/QUIXEL/Downloaded/surface".
But this can also be done via PowerShell where you can use the windows file system native path. 

This is what my surface folder looks like:

image.thumb.png.ae64ad4b2ac7aa8a5a24003554b3c52d.png

This is the bash script I created:

image.thumb.png.3c259618bc1593fd63524236a7679556.png


I decided to move all the .zip files into a new folder called ARCHIVE inside the surfaces directory. 

$ mkdir ARCHIVE

$ mv *.zip ./ARCHIVE

This is the final result:

image.thumb.png.bb78b8686406bf0123551707b2f7a692.png

And before you ask yes the parent folder name is not present. So these .zip files can be imported into 3DCoat without any issues!

Here is a screenshot verifying this!

image.thumb.png.ff2576fdbf158f375ae01ffd8769bb54.png

Importing the material looks like this:

image.thumb.png.0fca1b3f38dbec53ca425a8a97f87943.png

I have already done a feature request where 3DCoat does a recursive folder import, so even if there is a parent directory it recursively searches for all files ending in *.jpg or *.png and imports them appropriately. 

 

Another nice feature would be a mass material import. I have over 2200 Quixel materials in zip files, and I don't want to manually install them one by one. 

I'm looking into automating this via the 3DCoat Python API library, and will update this post if I find anything regarding that. 

 

I do hope this helps. 

  • Thanks 2
Link to comment
Share on other sites

  • Member
Carlosan
This post was recognized by Carlosan!

Rarshad000 was awarded the badge 'Great Content' and 1 points.

Okay I figured it out so I might as well share this here. 

NOTE: I will probably upload all the source code to a GitHub repo for anyone to use with additional documentation.


Script #1: remove_whitespace.sh
As the name implies this script cleans up all Quixel folders and replaces any occurrence of a whitespace (' ') with an underscore ('_'). This is important because the second script can't append the appropriate string unless the name has been cleaned up. 
 

image.thumb.png.1a44c9ad87ddca4e794d53a49f4a648c.png

The directory currently looks like this (Note: I'm showing this in WSL, but you can view this in File Explorer as well)

image.thumb.png.958647d442b46f89d944cabc79e875ec.png


Script #2: automate_quixel_rename.sh
As the name implies this script renames all Quixel folders and appends the "_2K_surface_ms" without this 3DCoat cannot recognize the file for automatic import. 

image.thumb.png.11099d6022997053f0c3b04427f910ea.png

DISCLAIMER: I only have 2K resolution assets so I've hardcoded the append variable to "_2K_surface_ms" however you can set this to whatever resolution your Quixel assets are. (i.e "_4K_surface_ms", "_8K_surface_ms")

After running the script, you the directories will look like this:
image.thumb.png.52ddce8269c91c320d0d055a6b42ad4c.png

For clarity this is what it looks like on File Explorer: 

image.thumb.png.cb66470f0b12a06cdef5a068e250d69c.png

Inside 3DCoat (version -- 2023.40), you can add the additional Quixel folder by following these steps:

1. Open 3DCoat.
2. Go to the Edit > Preferences.
3. Navigate to `Input/Output` tab.
4. Here, you should see an option for `Additional Quixel folder'
5. Set the path to where you're Quixel folder materials are and hit apply and close.  

Restart 3DCoat and you will be welcomed with the following:

image.thumb.png.144a30b945aeb25c47c7733a09b3d74e.png


image.thumb.png.8ef5c98a048867775942e1d4401448b6.png

Now I can import all of my 2200 Quixel Smart Materials (of 2K resolution) into 3DCoat 2023.40 

 

  • Thanks 1
Link to comment
Share on other sites

  • Member

Hmmmmm I don't like having to click "save" 2200 times ... I wonder if I could use this to automate this? 

# This example demonstrates how to click any item in UI
import coat
import time


for i in range(0, 1000):
    print(f'Iteration:\t{i}')
    coat.ui.cmd("$DialogButton#1");     # Click "OK" dialouge box to install the Quixel Smart Material
    time.sleep(5)                       # Wait for a few seconds so next dialouge prompt appears. 

# Rinse repeat 1000 times. 


Added screenshot below for more context of what I'm trying to automate in the UI. 

image.png

Is there a way I can check if the next dialogue prompt has appeared? 

Because if I can do that. Then I don't need to use the sleep function and I can see it working in real time. 

Hmmmmmmmmm ... how can I click the "save" button automatically using a script?
 

EDIT: This script is still experimental use this at your own risk!

Edited by Rarshad000
Added Image for more context of what I'm trying to automate!
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...