Page 1 of 2

MBB QUIXEL PBR material with Lua

PostPosted: Thu Jan 21, 2016 5:48 pm
by bepeg4d
Hi all,
here is a simple Lua script to facilitate the MBB QUIXEL PBR material creation based on the great preset provided by miko3d here:
viewtopic.php?f=9&t=51470
I'm absolutely not an expert in QUIXEL, but I guess that the script could be useful to speedup the workflow.
MBB_QUIXEL_PBR_Lua_gui.jpg

The script searches and downloads the MBB_QUIXEL_PBR.orbx material provided by miko3d, asks for the albedo texture path, automatically imports all the needed maps in the proper pins, and then, the resulting material will be saved as an .orbx file if needed.
Note: you need to be connected to the internet, otherwise the script can't have access to the LiveDB
Here is the script:
MBB_Quixel_PBR_02h.lua
(12.53 KiB) Downloaded 774 times

MBB_QUIXEL_PBR_Lua_before.jpg
before

MBB_QUIXEL_PBR_Lua_after.jpg
after

If the script is opened in the Script Editor window, almost on top, it is possible to change some default values like the maps suffix that could be changed if you use a different pattern, or enabling/disabling the automatic saving of the ORBX material in the same folder of the Albedo texture. Then, if the script is saved, it can be execute directly from the script menu with the desired default values.
MBB_QUIXEL_PBR_Lua_defolt_values.jpg

As always, comments, critics and feedbacks are more then welcome ;)
ciao beppe

Re: MBB QUIXEL PBR material with Lua

PostPosted: Fri Jan 22, 2016 5:14 am
by smicha
I'll test it soon. Lack of words beppe. Great work.

Re: MBB QUIXEL PBR material with Lua

PostPosted: Fri Jan 22, 2016 5:02 pm
by glimpse
wow =) that's handy!
Thank You Beppe! =)

Re: MBB QUIXEL PBR material with Lua

PostPosted: Wed Jan 27, 2016 7:22 pm
by 3dhermit
super time saver thanks man !!! :D

Re: MBB QUIXEL PBR material with Lua

PostPosted: Thu Jun 15, 2017 2:57 am
by anereton
Hi,

In this script, can we have any chance to insert an input "transform in" to all maps? (My objective is scale all maps at once, if its possible).

I´ve tried but with no sucess....

Thank you for your help.

Re: MBB QUIXEL PBR material with Lua

PostPosted: Thu Jun 15, 2017 10:08 am
by bepeg4d
Hi anereton,
I'm going to revisit this script to solve your issue and other little issues here and there.
I'll update the script in this discussion when ready.
Happy scripting,
ciao beppe

Re: MBB QUIXEL PBR material with Lua

PostPosted: Thu Jun 15, 2017 1:48 pm
by anereton
Thank you!

I will redo all my materials but i´ts definitely worth it.

: )

Re: MBB QUIXEL PBR material with Lua

PostPosted: Tue Jun 20, 2017 9:42 am
by bepeg4d
Hi,
here is the updated version of the script, now at v 0.3:
MBB_Quixel_PBR_03.lua
(18.02 KiB) Downloaded 605 times

The interface is the same, but the result is a bit different in the node inspector:
Screen Shot 2017-06-20 at 11.08.25.jpg

Now there is an error message, if the "albedo" map choosen does not have the correct suffix. All the maps are connected to the same Projection and UV Transform node, to easily change the mapping.
I have noted that in the LiveDB material the Gamma of Normal map is set to 1. In this script the Gamma is set to 2.2.
Please let me know your comments and critics.
Happy PBR,
ciao beppe

Re: MBB QUIXEL PBR material with Lua

PostPosted: Tue Jun 20, 2017 7:34 pm
by 3dhermit
Can you use this to set up materials in standalone and export a orbx file and import say into c4d to get just the shaders and re assign to geo ? This looks awesome thanks for the goodies!

Re: MBB QUIXEL PBR material with Lua

PostPosted: Wed Jun 21, 2017 5:36 am
by bepeg4d
Hi 3dhermit,
yes sure, you can even save the material in LocalDB from Standalone, and reuse it in plugins, here is an example imported in c4doctane:
IMG_0325.jpeg
in Standalone

IMG_0327.jpeg
in c4doctane

Happy rendering,
ciao beppe