MBB QUIXEL PBR material with Lua

Forums: MBB QUIXEL PBR material with Lua
Forum for OctaneRender Lua scripting examples, discussion and support.

MBB QUIXEL PBR material with Lua

Postby bepeg4d » Thu Jan 21, 2016 5:48 pm

bepeg4d Thu Jan 21, 2016 5:48 pm
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
User avatar
bepeg4d
Octane Guru
Octane Guru
 
Posts: 9940
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy

Re: MBB QUIXEL PBR material with Lua

Postby smicha » Fri Jan 22, 2016 5:14 am

smicha Fri Jan 22, 2016 5:14 am
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
smicha
Licensed Customer
Licensed Customer
 
Posts: 3151
Joined: Wed Sep 21, 2011 4:13 pm
Location: Warsaw, Poland

Re: MBB QUIXEL PBR material with Lua

Postby glimpse » Fri Jan 22, 2016 5:02 pm

glimpse Fri Jan 22, 2016 5:02 pm
wow =) that's handy!
Thank You Beppe! =)
User avatar
glimpse
Licensed Customer
Licensed Customer
 
Posts: 3715
Joined: Wed Jan 26, 2011 2:17 pm

Re: MBB QUIXEL PBR material with Lua

Postby 3dhermit » Wed Jan 27, 2016 7:22 pm

3dhermit Wed Jan 27, 2016 7:22 pm
super time saver thanks man !!! :D
3dhermit
Licensed Customer
Licensed Customer
 
Posts: 21
Joined: Sun Apr 05, 2015 6:37 pm

Re: MBB QUIXEL PBR material with Lua

Postby anereton » Thu Jun 15, 2017 2:57 am

anereton Thu Jun 15, 2017 2:57 am
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
anereton
Licensed Customer
Licensed Customer
 
Posts: 37
Joined: Wed Oct 06, 2010 2:58 am
Location: Rio de Janeiro

Re: MBB QUIXEL PBR material with Lua

Postby bepeg4d » Thu Jun 15, 2017 10:08 am

bepeg4d Thu Jun 15, 2017 10:08 am
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
bepeg4d
Octane Guru
Octane Guru
 
Posts: 9940
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy

Re: MBB QUIXEL PBR material with Lua

Postby anereton » Thu Jun 15, 2017 1:48 pm

anereton Thu Jun 15, 2017 1:48 pm
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
anereton
Licensed Customer
Licensed Customer
 
Posts: 37
Joined: Wed Oct 06, 2010 2:58 am
Location: Rio de Janeiro

Re: MBB QUIXEL PBR material with Lua

Postby bepeg4d » Tue Jun 20, 2017 9:42 am

bepeg4d Tue Jun 20, 2017 9:42 am
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
User avatar
bepeg4d
Octane Guru
Octane Guru
 
Posts: 9940
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy

Re: MBB QUIXEL PBR material with Lua

Postby 3dhermit » Tue Jun 20, 2017 7:34 pm

3dhermit Tue Jun 20, 2017 7:34 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!
3dhermit
Licensed Customer
Licensed Customer
 
Posts: 21
Joined: Sun Apr 05, 2015 6:37 pm

Re: MBB QUIXEL PBR material with Lua

Postby bepeg4d » Wed Jun 21, 2017 5:36 am

bepeg4d Wed Jun 21, 2017 5:36 am
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
User avatar
bepeg4d
Octane Guru
Octane Guru
 
Posts: 9940
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy
Next

Return to Lua Scripting


Who is online

Users browsing this forum: No registered users and 7 guests

Thu Mar 28, 2024 9:39 pm [ UTC ]