Carpaint Shader

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

Carpaint Shader

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

Portfolio : https://www.behance.net/DRAVIA
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Carpaint Shader

Post 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.
Attachments
scrn_2018-05-29_14-15-15.png
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Carpaint Shader

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

Portfolio : https://www.behance.net/DRAVIA
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Carpaint Shader

Post 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.
Attachments
scrn_2018-05-29_16-07-19.png
scrn_2018-05-29_16-07-49.png
sarmath
Posts: 135
Joined: Wed Feb 07, 2018 1:22 pm

Re: Carpaint Shader

Post 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
WIndows 11 Pro Ryzen 7 5700x RTX 3090 32 GB RAM
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Carpaint Shader

Post by B.Y.O.B. »

User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Carpaint Shader

Post by Sharlybg »

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

Portfolio : https://www.behance.net/DRAVIA
sarmath
Posts: 135
Joined: Wed Feb 07, 2018 1:22 pm

Re: Carpaint Shader

Post by sarmath »

B.Y.O.B. wrote: Wed May 30, 2018 11:21 am done.
That was fast. Thanks :)
WIndows 11 Pro Ryzen 7 5700x RTX 3090 32 GB RAM
sarmath
Posts: 135
Joined: Wed Feb 07, 2018 1:22 pm

Re: Carpaint Shader

Post 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
WIndows 11 Pro Ryzen 7 5700x RTX 3090 32 GB RAM
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Carpaint Shader

Post 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.
Post Reply