Page 1 of 2

create a mix material with one RGBA image and lua - UPDATED

PostPosted: Sat Feb 01, 2014 12:35 am
by bepeg4d
hi all,
finally i have updated the script with the interface and refined the options,
i hope you could find it useful in some way:
bg4dCreateMixMat-1_00.lua
(23.99 KiB) Downloaded 392 times

bg4dCreateMixMat-help.jpg

note for c4d users: in order to import the material from standalone to the integrated plugin, it's necessary to "ungroup" the material, from this:
Schermata 2014-02-25 alle 18.39.20.jpg

to this:
Schermata 2014-02-25 alle 18.39.56.jpg

then, if saved as .ocs, the material can be imported into c4d.
Schermata 2014-02-25 alle 19.00.51.jpg

ciao beppe

--old version--
hi,
here is my first lua script (with the help of jedi master thomas stratified kenobi )
it's a simple script that asks for an RGBA image and creates all the nodes and inputs for the classic mix material between a glossy and a diffuse, suitable for one-poly leaves or grass, using only one texture.
i hope you can find it useful.
bg4d-organic-alpha-mat.lua
(5.12 KiB) Downloaded 396 times

Capture-organic-lua-01.JPG

Capture-organic-lua-02.JPG

ciao beppe

Re: create a mix material with one RGBA image and lua

PostPosted: Sat Feb 01, 2014 12:44 am
by niuq.cam
Bravo Beppe. :D

Re: create a mix material with one RGBA image and lua

PostPosted: Sat Feb 01, 2014 4:44 am
by Tugpsx
Thanks for sharing, I modified mine to include jpg images. BTW you may have accidentally created a great skin shader without realizing it. Just tested it on Daz character.

scripttest1.JPG
Script test maps

Re: create a mix material with one RGBA image and lua

PostPosted: Sat Feb 01, 2014 6:17 am
by glimpse
Thanks, Beppe.

Re: create a mix material with one RGBA image and lua

PostPosted: Sat Feb 01, 2014 6:38 am
by grimm
Excellent! Go Beppe, go! :D

Re: create a mix material with one RGBA image and lua

PostPosted: Sat Feb 01, 2014 9:07 am
by bepeg4d
olĂ  my friends :D
i'm glad to hear that you like it ;)
@tugpsx: i have create a variation more suitable for skin, basically i have removed the opacity nodes and added a second texture load for normal map, plus a different approach for specular and roughness.
i hope you can find it useful ;)
bg4d-simple-skin-normal-mat.lua
(5.09 KiB) Downloaded 392 times

Capture-simple-skin-lua.JPG

ciao beppe

Re: create a mix material with one RGBA image and lua

PostPosted: Sat Feb 01, 2014 4:50 pm
by Tugpsx
Awesome will give yours a go.

Re: create a mix material with one RGBA image and lua

PostPosted: Sat Feb 01, 2014 5:01 pm
by Tugpsx
Thanks for the script, Can I make a few suggestions that all can benefit from. You may need to update the prompt since it appears to prompt for both diffuse and normal texture but the requests ask for the same type. You could also make an interface to select both before the script runs. I know you were trying to keep it simple so again thanks.

Re: create a mix material with one RGBA image and lua

PostPosted: Sat Feb 01, 2014 5:17 pm
by bepeg4d
Tugpsx wrote:Thanks for the script, Can I make a few suggestions that all can benefit from. You may need to update the prompt since it appears to prompt for both diffuse and normal texture but the requests ask for the same type.

oops. sorry, corrected ;)
bg4d-simple-skin-normal-mat.lua
(5.09 KiB) Downloaded 392 times

You could also make an interface to select both before the script runs. I know you were trying to keep it simple so again thanks.

about the interface, you are right, it would be a big step for me, but i need to increase my skill first :D
but is something i want absolutly to try.
thanks for looking at my scripts, very apreciated ;)
ciao beppe

Re: create a mix material with one RGBA image and lua

PostPosted: Sat Feb 01, 2014 11:22 pm
by stratified
Great work Bepe. I think you created a nice little tool, useful for many artists.

cheers,
Thomas