Carpaint Shader

Post your tests, experiments and unfinished renderings here.
User avatar
Sharlybg
Supporting Users
Posts: 742
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Carpaint Shader

Post by Sharlybg » Tue May 29, 2018 11:13 am

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
Support LuxCoreRender project with salts and bounties

User avatar
B.Y.O.B.
Developer
Posts: 1583
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Carpaint Shader

Post by B.Y.O.B. » 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.
Attachments
scrn_2018-05-29_14-15-15.png
Support LuxCoreRender project with salts and bounties

User avatar
Sharlybg
Supporting Users
Posts: 742
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Carpaint Shader

Post by Sharlybg » Tue May 29, 2018 1:36 pm

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.
Support LuxCoreRender project with salts and bounties

User avatar
B.Y.O.B.
Developer
Posts: 1583
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Carpaint Shader

Post by B.Y.O.B. » 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.
Attachments
scrn_2018-05-29_16-07-19.png
scrn_2018-05-29_16-07-49.png
Support LuxCoreRender project with salts and bounties

sarmath
Posts: 36
Joined: Wed Feb 07, 2018 1:22 pm

Re: Carpaint Shader

Post by sarmath » Wed May 30, 2018 10:52 am

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
Windows 10 i7 5820k GTX 1070ti 16 GB RAM

User avatar
B.Y.O.B.
Developer
Posts: 1583
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Carpaint Shader

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

Support LuxCoreRender project with salts and bounties

User avatar
Sharlybg
Supporting Users
Posts: 742
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Carpaint Shader

Post by Sharlybg » Wed May 30, 2018 11:35 am

B.Y.O.B. wrote:
Wed May 30, 2018 11:21 am
done.
Arigatōgozaimashita sensei :D
Support LuxCoreRender project with salts and bounties

sarmath
Posts: 36
Joined: Wed Feb 07, 2018 1:22 pm

Re: Carpaint Shader

Post by sarmath » Wed May 30, 2018 1:54 pm

B.Y.O.B. wrote:
Wed May 30, 2018 11:21 am
done.
That was fast. Thanks :)
Windows 10 i7 5820k GTX 1070ti 16 GB RAM

sarmath
Posts: 36
Joined: Wed Feb 07, 2018 1:22 pm

Re: Carpaint Shader

Post by sarmath » Wed May 30, 2018 3:58 pm

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
Windows 10 i7 5820k GTX 1070ti 16 GB RAM

User avatar
B.Y.O.B.
Developer
Posts: 1583
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Carpaint Shader

Post by B.Y.O.B. » Wed May 30, 2018 4:31 pm

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.
Support LuxCoreRender project with salts and bounties

Post Reply