Blend / Color ramp help

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
PDRA
Posts: 51
Joined: Fri Sep 27, 2019 8:49 pm

Blend / Color ramp help

Post by PDRA »

Hi guys,
I'm once again preparing some automotive renders renders using luxcore but there are a few things I currently can't work out how to do them. They are related to gradients.

I know there is a node called "Blend" to do it and it works quite well but there is one thing I can't do. I want to get the typical "reflected" gradient but I couldn't find a way to control this node to create that effect. I also tried with the "Band" node, but sincerely I didn't understand it. I attach an image of what I would like the final outcome look like, to give you a better idea.
Anotación 2020-08-18 030933.png
Aside from this, I also wanted to create a pearlescent kind of car paint. To do so, generally you want that the surfaces that are facing perpendicularly to your point of view have a certain color whereas the adyacent ones have other (in short, I'm looking to create a color gradient based in the fresnel effect). Is there any way to control the base color like that to make this effect in luxcore?
Anotación 2020-08-18 030902.png
I really will appreciate your feedback!

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

Re: Blend / Color ramp help

Post by B.Y.O.B. »

PDRA wrote: Tue Aug 18, 2020 6:10 am I know there is a node called "Blend" to do it and it works quite well but there is one thing I can't do. I want to get the typical "reflected" gradient but I couldn't find a way to control this node to create that effect. I also tried with the "Band" node, but sincerely I didn't understand it. I attach an image of what I would like the final outcome look like, to give you a better idea.
You can use the Blend texture to get the basic gradient, then use a Band/Colorramp node to remap it so it is brightest at value 0.5 and starts to get darker again toward 1. The gradient in your example picture seems to be non-linear, maybe exponential. To get that, you can use a math node in "Power" mode.
gradient.blend
(693.89 KiB) Downloaded 167 times
sdfsdf.PNG
PDRA wrote: Tue Aug 18, 2020 6:10 am Aside from this, I also wanted to create a pearlescent kind of car paint. To do so, generally you want that the surfaces that are facing perpendicularly to your point of view have a certain color whereas the adyacent ones have other (in short, I'm looking to create a color gradient based in the fresnel effect). Is there any way to control the base color like that to make this effect in luxcore?
You could check if the absorption color is enough for your purposes.
I don't think we have a possibility to use an arbitrary color gradient depending on viewing angle.
carpaint.blend
(738.5 KiB) Downloaded 156 times
aaaa.PNG
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Blend / Color ramp help

Post by Sharlybg »

For your gradient light Maybe this can Help :
Gradientlight.jpg
Blendfile:
gradient_light.blend
(696.79 KiB) Downloaded 158 times
Edit You're fast BYOB :D : will study you're setup. Mine is using Uv mapping :
setup.jpg
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
PDRA
Posts: 51
Joined: Fri Sep 27, 2019 8:49 pm

Re: Blend / Color ramp help

Post by PDRA »

Thank you a lot guys!!
Great workaround to solve this issue, you are very creative!
I've been testing them and they work pretty well for what I wanted to do.
It would be great in the future of the development of luxcore a more intuitive tool for gradients. I tend to use them quite a lot and for me it is a bit too complicated as it is right now. Anyway, I know there are other things in the roadmap and you have done gigantic steps with this render engine, but it would be pretty cool to have something like that :D
B.Y.O.B. wrote: Tue Aug 18, 2020 8:56 am You can use the Blend texture to get the basic gradient, then use a Band/Colorramp node to remap it so it is brightest at value 0.5 and starts to get darker again toward 1. The gradient in your example picture seems to be non-linear, maybe exponential. To get that, you can use a math node in "Power" mode.

You could check if the absorption color is enough for your purposes.
I don't think we have a possibility to use an arbitrary color gradient depending on viewing angle.
Apparently playing with the absorption (color and values) and changing the different colors for the different layers of the car paint can give you the chance to control it and be able to create this effect! However, it would be great to make it possible for other materials such us the Disney. A node like the Fresnel/fallof that 3ds max has would be great for this purpose.

Test 1 - Pearlescent effect (exaggerated)
Anotación 2020-08-18 225339.png
Test 2 - Aproximation to the effect wanted (mix of red and a little orange)
Anotación 2020-08-18 225513.png
Test 3 - Current car paint setup
Anotación 2020-08-18 225618.png
I think I will be using the test 2 approach, even though I like the control over the fresnel effect determined by the IOR value of the test 3 setup has.

All the best, saludos!
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Blend / Color ramp help

Post by B.Y.O.B. »

IIRC some car paints in the real world also use thin film interference to achieve this effect. In Lux you can use a disney material for this.
To use it, enable "Thin Film Coating" and adjust the film thickness. You can see which colors to expect at which film thickness in charts like here: https://soapbubble.fandom.com/wiki/Colo ... _Thickness
Attachments
Capture.PNG
carpaint_film.blend
(734.1 KiB) Downloaded 149 times
PDRA
Posts: 51
Joined: Fri Sep 27, 2019 8:49 pm

Re: Blend / Color ramp help

Post by PDRA »

B.Y.O.B. wrote: Wed Aug 19, 2020 7:15 am IIRC some car paints in the real world also use thin film interference to achieve this effect. In Lux you can use a disney material for this.
To use it, enable "Thin Film Coating" and adjust the film thickness. You can see which colors to expect at which film thickness in charts like here: https://soapbubble.fandom.com/wiki/Colo ... _Thickness
That is just great info!!
I will be playing with this for sure
Thank you again!
Post Reply