Page 1 of 2

Carpaint Shader

Posted: Tue May 29, 2018 11:13 am
by Sharlybg
Hi guys ! i'm currently trying to create a decent and easy to use carpaint shader base for all my Cars ( :lol: 3D mesh).
I've followed this tutorial from mike pan : http://blog.mikepan.com/post/1377598859 ... f-material

Here is the result :
Carpaint.jpg
but i got to major issues :


# 1 I also want to simulate a fresnel effect for the reflection but can't. i don't if Luxcore support it or if i've doing something bad.

# 2 My noise texture bump don't work when i switch to opencl GPU compute with Nvidia GTX 1080Ti


Here is my interpretation of The Node setup :
carpaint node setup.jpg

Re: Carpaint Shader

Posted: Tue May 29, 2018 12:21 pm
by B.Y.O.B.
Sharlybg wrote: Tue May 29, 2018 11:13 am # 1 I also want to simulate a fresnel effect for the reflection but can't. i don't if Luxcore support it or if i've doing something bad.
The glossy material in LuxCore simulates the fresnel effect for its specular color internally.
Sharlybg wrote: Tue May 29, 2018 11:13 am # 2 My noise texture bump don't work when i switch to opencl GPU compute with Nvidia GTX 1080Ti
I think this is a limitation in the OpenCL engines.
Try to add all bump textures with a math node and plug the outcome into the last Mix Material.

Some tips:
- Why do you use the band node in the metallic flaces part? It seems to do nothing, or am I misunderstanding something? If you just want to clamp the output to 0..1 range, the "clamp" option on the math node has better render performance.
- You can use frames in the node editor to group nodes visually: Select some nodes and press Ctrl+J.

Re: Carpaint Shader

Posted: Tue May 29, 2018 1:36 pm
by Sharlybg
B.Y.O.B. wrote: Tue May 29, 2018 12:21 pm
Sharlybg wrote: Tue May 29, 2018 11:13 am # 1 I also want to simulate a fresnel effect for the reflection but can't. i don't if Luxcore support it or if i've doing something bad.
The glossy material in LuxCore simulates the fresnel effect for its specular color internally.
Sharlybg wrote: Tue May 29, 2018 11:13 am # 2 My noise texture bump don't work when i switch to opencl GPU compute with Nvidia GTX 1080Ti
I think this is a limitation in the OpenCL engines.
Try to add all bump textures with a math node and plug the outcome into the last Mix Material.

Some tips:
- Why do you use the band node in the metallic flaces part? It seems to do nothing, or am I misunderstanding something? If you just want to clamp the output to 0..1 range, the "clamp" option on the math node has better render performance.
- You can use frames in the node editor to group nodes visually: Select some nodes and press Ctrl+J.
Aah super interesting we don't have to worry about fresnel value Lux does it alone ;)

I use Band to invert texture value/color.

Re: Carpaint Shader

Posted: Tue May 29, 2018 2:08 pm
by B.Y.O.B.
Sharlybg wrote: Tue May 29, 2018 1:36 pm I use Band to invert texture value/color.
If the input colors are always guaranteed to be in 0..1 range, you can also use a ColorMix or Math node to invert (subtract from 1).
This should lead to better render performance.

In your case, the values are in 0..2 range because of the multiply node, but since the colorramp clips the values to 0..1 anyway, you can just enable "clamp" on your current multiply math node and then use the ColorMix/Math method to invert.

Re: Carpaint Shader

Posted: Wed May 30, 2018 10:52 am
by sarmath
B.Y.O.B. wrote: Tue May 29, 2018 2:08 pm
Sharlybg wrote: Tue May 29, 2018 1:36 pm I use Band to invert texture value/color.
If the input colors are always guaranteed to be in 0..1 range, you can also use a ColorMix or Math node to invert (subtract from 1).
This should lead to better render performance.

In your case, the values are in 0..2 range because of the multiply node, but since the colorramp clips the values to 0..1 anyway, you can just enable "clamp" on your current multiply math node and then use the ColorMix/Math method to invert.
Just a small idea here...maybe you could add simple Invert Node to BlendLuxCore like in Cycles. It would be fast and obvious solution to invert anything?? Regards

Re: Carpaint Shader

Posted: Wed May 30, 2018 11:21 am
by B.Y.O.B.

Re: Carpaint Shader

Posted: Wed May 30, 2018 11:35 am
by Sharlybg
B.Y.O.B. wrote: Wed May 30, 2018 11:21 am done.
Arigatōgozaimashita sensei :D

Re: Carpaint Shader

Posted: Wed May 30, 2018 1:54 pm
by sarmath
B.Y.O.B. wrote: Wed May 30, 2018 11:21 am done.
That was fast. Thanks :)

Re: Carpaint Shader

Posted: Wed May 30, 2018 3:58 pm
by sarmath
Oh and another small node (as well from cycles orginally) you could consider is RGB to Black and Wihite. I found it simple and usefull when converting textures to black and white format...? Regards

Re: Carpaint Shader

Posted: Wed May 30, 2018 4:31 pm
by B.Y.O.B.
You can either select one of the texture channels, or select the "mean" or "colored mean" channels, or use an HSV node with saturation set to 0, or use a band node to convert a texture to greyscale.