MBB QUIXEL PBR material with Lua

Forum for OctaneRender Lua scripting examples, discussion and support.
User avatar
bepeg4d
Octane Guru
Posts: 10328
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy
Contact:

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 847 times
before
before
after
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
User avatar
smicha
Licensed Customer
Posts: 3151
Joined: Wed Sep 21, 2011 4:13 pm
Location: Warsaw, Poland

I'll test it soon. Lack of words beppe. Great work.
3090, Titan, Quadro, Xeon Scalable Supermicro, 768GB RAM; Sketchup Pro, Classical Architecture.
Custom alloy powder coated laser cut cases, Autodesk metal-sheet 3D modelling.
build-log http://render.otoy.com/forum/viewtopic.php?f=9&t=42540
User avatar
glimpse
Licensed Customer
Posts: 3740
Joined: Wed Jan 26, 2011 2:17 pm
Contact:

wow =) that's handy!
Thank You Beppe! =)
3dhermit
Licensed Customer
Posts: 21
Joined: Sun Apr 05, 2015 6:37 pm

super time saver thanks man !!! :D
User avatar
anereton
Licensed Customer
Posts: 37
Joined: Wed Oct 06, 2010 2:58 am
Location: Rio de Janeiro
Contact:

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.
Windows 10 pro x64 | Geforce GTX 980| AMD FX-9590 | 8GB DDR3| Octane render 3.03 |
User avatar
bepeg4d
Octane Guru
Posts: 10328
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy
Contact:

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
User avatar
anereton
Licensed Customer
Posts: 37
Joined: Wed Oct 06, 2010 2:58 am
Location: Rio de Janeiro
Contact:

Thank you!

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

: )
Windows 10 pro x64 | Geforce GTX 980| AMD FX-9590 | 8GB DDR3| Octane render 3.03 |
User avatar
bepeg4d
Octane Guru
Posts: 10328
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy
Contact:

Hi,
here is the updated version of the script, now at v 0.3:
MBB_Quixel_PBR_03.lua
(18.02 KiB) Downloaded 739 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
3dhermit
Licensed Customer
Posts: 21
Joined: Sun Apr 05, 2015 6:37 pm

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!
User avatar
bepeg4d
Octane Guru
Posts: 10328
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy
Contact:

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:
in Standalone
in Standalone
in c4doctane
in c4doctane
Happy rendering,
ciao beppe
Post Reply

Return to “Lua Scripting”