Add shader
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
-
- Posts: 5
- Joined: Tue May 08, 2018 6:00 am
Add shader
Switching from Cycles to Lux, and playing with nodes in my materials. There I noticed there is no "add shader" as blender and cycles have, just a mix shader.
This makes it impossible to split my transparent material in 3 colors (with each a different roughness) which then get added, I can only mix them with the "mix materials", thus averaging the 3 components which leaves me with a dull and dark render.
Is there any way around this to add various shader components? Or are there plans to implement a add-shader?
cheers,
Rob
This makes it impossible to split my transparent material in 3 colors (with each a different roughness) which then get added, I can only mix them with the "mix materials", thus averaging the 3 components which leaves me with a dull and dark render.
Is there any way around this to add various shader components? Or are there plans to implement a add-shader?
cheers,
Rob
Re: Add shader
It is the first time someone ask for this feature, probably because there is an "add" texture. However, it can not fix your problem if you need a color dependent roughness.Rob van Berkel wrote: ↑Tue May 08, 2018 6:16 am Switching from Cycles to Lux, and playing with nodes in my materials. There I noticed there is no "add shader" as blender and cycles have, just a mix shader.
This makes it impossible to split my transparent material in 3 colors (with each a different roughness) which then get added, I can only mix them with the "mix materials", thus averaging the 3 components which leaves me with a dull and dark render.
Is there any way around this to add various shader components? Or are there plans to implement a add-shader?
At the moment, I can not think to a work around, you could try to post an image of the material you are trying to render to see if someone can find a workaround. I'm not aware of a material having a light wavelength dependent roughness
Re: Add shader
Are you by any chance tryin to emulate the cycles' trick to fake dispersion?
-
- Posts: 5
- Joined: Tue May 08, 2018 6:00 am
Re: Add shader
Agree, there is no such thing as light dependent roughness. Or is there? Let me explain a bit what I try to accomplish:Dade wrote: ↑Tue May 08, 2018 6:54 am
It is the first time someone ask for this feature, probably because there is an "add" texture. However, it can not fix your problem if you need a color dependent roughness.
At the moment, I can not think to a work around, you could try to post an image of the material you are trying to render to see if someone can find a workaround. I'm not aware of a material having a light wavelength dependent roughness
I'm a photographer (models, artistic) and sometimes I use a bit of vaseline on the lens (well on the UV filter actually) to get a blur. This vaseline has a scattering effect, which is more or less wavelength dependent. Blue colors get scattered more. That's why you get this blueish blur in the image (along with quite stong dispersion of the light).
To mimic this effect in post processing of my photowork I use Blender (I use it for a lot more than this, of course). I load the original image on a plane as an emitting texture, put a cam in the scene pointing at the image and put some light modifying material in between.
To mimic the color-depentent scattering of light I would like to split the light in R, G and B by having 3 parallel glass-material shaders, each with its own roughness and own transmission color (R G and B). Then sum the 3 material-outputs to get the whole image together.
Finally I would add some dispersion effects, which are the main reason to move to Lux. And example of dispersion and some blur is attached. I just need more control over the scattering that gives these typical pastel blurs over the image.
So there's the reason me wanting to add materials.
Before I plunge in the code, I would try to find a solution that is a bit less cumbersome
-
- Posts: 5
- Joined: Tue May 08, 2018 6:00 am
-
- Posts: 5
- Joined: Tue May 08, 2018 6:00 am
Re: Add shader
addition: I could render R G and B effects separately, resulting in 3 images which I then stack and add in photoshop but that is not workable - getting a preview of the effect needs to many actions in postprocessing.
Re: Add shader
You could try to place a glass box (with dispersion enabled) between the picture and the camera. The box should have an inner homogenous volume with scattering enabled.Rob van Berkel wrote: ↑Tue May 08, 2018 9:10 am Agree, there is no such thing as light dependent roughness. Or is there? Let me explain a bit what I try to accomplish:
I'm a photographer (models, artistic) and sometimes I use a bit of vaseline on the lens (well on the UV filter actually) to get a blur. This vaseline has a scattering effect, which is more or less wavelength dependent. Blue colors get scattered more. That's why you get this blueish blur in the image (along with quite stong dispersion of the light).
To mimic this effect in post processing of my photowork I use Blender (I use it for a lot more than this, of course). I load the original image on a plane as an emitting texture, put a cam in the scene pointing at the image and put some light modifying material in between.
To mimic the color-depentent scattering of light I would like to split the light in R, G and B by having 3 parallel glass-material shaders, each with its own roughness and own transmission color (R G and B). Then sum the 3 material-outputs to get the whole image together.
Finally I would add some dispersion effects, which are the main reason to move to Lux. And example of dispersion and some blur is attached. I just need more control over the scattering that gives these typical pastel blurs over the image.
By playing with volume scattering factor, absorption and glass dispersion, you may able to achieve the result you are looking for. However, it hard to tell, you are going to need a LOT of tests.
Re: Add shader
I've not tested it, just an idea and I'm not 100% sure if I've understood, so sorry if I'll say nonsense,
what about 3 parallel glasses each one with their own material instead of a glass with 3 parallel materials?
what about 3 parallel glasses each one with their own material instead of a glass with 3 parallel materials?
Re: Add shader
I was suggesting a single glass with a single material
Re: Add shader
I haven't see your reply. I started writing to OP then I left open the editor cause I had something to do, and posted later after your reply.
Anyway I've quickly tried mine and turned out everything black. So probably it's not a solution.
As for Add shader, it's not physically correct, it could make an object to release more light than received so I won't be so sure you'll get it in Lux.