Default shader to use

Post your tutorials and help questions in this forum
Fabian-Eshloraque
Posts: 74
Joined: Sun Nov 17, 2013 3:29 pm

Default shader to use

Post by Fabian-Eshloraque »

Hi Kray Guys,

Like I promised here's our default shader. Its been tested in animation with lightwave and kray. But it could still have noise issue's - let me know if you find a problem with it. This shader is only for non-transparant, non-opaque, non-organic materials. Those shaders are driven by transparecy and translucency and are difficult to make a standard shader for. Most of the work on this shader was done by Janusz. His shaders are more advanced, maybe he will post stuff soon.

Here are the nodes:
Starter_production_Vs003.nodes
(68.38 KiB) Downloaded 290 times
Here is the shader:
Starter_production_Vs003.srf
(66.69 KiB) Downloaded 311 times
Small overview:
default_shader.jpg
So to tweak: (value 1.0 = 100% thus 0.1 = 10%)
1. Choose the texture in image node. You can mix more images with the mixer node allready in place. Texture will generate normal map.
2. Bounces: default 2
3. reflection amount: or IOR (1.01 is lowest, 30 is chrome, you find values on the interweb)
4. Reflection blur: use 0.08 for 8% - 0.16 for 16% etc
5. roughness reflection: will add texture on the reflection (now I added dirt reflection procedural node)
6. Reflection from image, from Janusz - inverted image
7. dirty fresnel: adds dirt to the fresnel of reflection, makes fresnel a bit more realistic
8. dirty fresnel fresnel scale: the scale of the used procedural (1 = 1meter)
9. bump fresnel: this pipes the normals maps into the fresnel.
10. why a material? Because you can then mix with other material setups (if you have snow and rock material on the same surface object) or/and make LM shaders like those from renderman: (LM means Layered Materials)
lmDiagram.jpg
11. Just plug the correct albedo value back into the compound:
albedo_values.jpg
You dont need to setup all parameters of this material, normally choose image, reflection and albedo will do 70% of the work. When using this shader you can do about 80% of the shading work within a small amount of time and it renders fast! The only downside is that you need to re-open the node editor every time. So have fun, hope you can use it!

Best,

Fabian
thomas
Posts: 348
Joined: Tue Aug 31, 2010 9:59 am

Re: Default shader to use

Post by thomas »

Hi Fabian,

Thanks for sharing! This is awesome stuff - makes my car paint post look like Lego-level :D

I'll need some time to study your stuff, but will definitely be back with some questions!
S0nny
Posts: 75
Joined: Thu Mar 15, 2012 12:03 am

Re: Default shader to use

Post by S0nny »

Very interesting, I'm using something similar for my lw materials, since I don't use kray anymore.
I think that mine can be converted with standard lw nodes (now it uses Delta LW material and 3rd party nodes like schlick's approximation and cache node).
prod_delta.jpg
delta_compund.jpg
What it can do is of course the basic stuff like energy conserving, reflection blur falloff, different curves for fresnel, mix 4x bumps and auto convert to normal maps and also a specular multiplies when needed. It also cache everythings to speed up the process (it speed up very much in lw engune), so the nodes can be calculated just one time.

But other interesting stuff is the Metal Mask, or the Second Material mask: what it does is mix the shaders so you can have like chipped paint with metal scuffs in one shot, or a metal with some rusty areas, or wood with painted plastic parts etc etc.
This two materials have two actual different and fully customizable charateristics, with different fresnel, falloff, blur etc just in one compound, using just a bn mask or any scalar. It also have the possibility to add an emitter texture, just for convenience.
You can of course mix two of this with material mixer: I have created also a compount that which does only the coating so you can have a carpaint or anythings with double reflection.
You can also simluate a GGX shader in this way, using different level of blur with different falloff like Grant Warwick tutorial for vray, or mix and edit different shaders after the material has been calculated, since it has split materials as output.
ideart
Posts: 144
Joined: Mon Nov 16, 2009 4:34 pm

Re: Default shader to use

Post by ideart »

Thanks Fabian for sharing, I will test it very soon.
sotto3d.com
Fabian-Eshloraque
Posts: 74
Joined: Sun Nov 17, 2013 3:29 pm

Re: Default shader to use

Post by Fabian-Eshloraque »

Hi Sonny,

This is way more advanced then what I have. Are you willing to share your setup as a preset, so I can investigate?

I made a working car shader, with specular flakes and clearcoat separated but I cant mix it together on shading level. (it is in another thread on this forum)

The problem I have is that some diffuse models are not supported by kray. Janusz can do stuff with curves, but it would be easier just to use nodal shaders for some items.

These I tested and work:
1. Ani reflections (Janusz explains this one his nodal overview)
2. Reflections (I dont use it)
3. Cook terrance (for faking flakes in carpaint or snow by using it as specular input)

But the diffuse LW shaders dont work. (orennayar for example)

Grtz,

Fabian
thomas
Posts: 348
Joined: Tue Aug 31, 2010 9:59 am

Re: Default shader to use

Post by thomas »

Wow, I'm loving the work that's being done here. Excellent stuff!

I'd never heard of GGX shading but it looks great - much better than standard Blinn!
User avatar
djwaterman
Posts: 78
Joined: Sun Apr 03, 2011 11:02 am

Re: Default shader to use

Post by djwaterman »

This is great stuff, I'm looking forward to trying this out. Sonny, please please please share that shader of yours.
S0nny
Posts: 75
Joined: Thu Mar 15, 2012 12:03 am

Re: Default shader to use

Post by S0nny »

Hi guys, sorry for the delay, I was a bit busy.
Here in attach one of my standard node with a base coating. There are some missing input like bump falloff or bump mask but this are really simple to do, you can choose your best technique and add it to the node.

As you can see it seems complicated but really it's not, what I did it's just copy here and there and create something usefull for me.
I also watched many vray and other software tutorials, and I tried to translate some of the techniques to lw.
This as an attempt to create a sort layered material, which in lw is not really always desirable because as Janusz and others already said, it comes with some problems.
In this case, since this nodes are designed for the standard lw engine, the only problem I find is an increased render time when materials are mixed with masks with low contrast (I mean many greys, so the reflection is really layered and not masked out).
Otherwise the single node is really really fast and rock solid, I've never experienced a crash in vpr or F9/10 rendering, with or without extra buffers and stuff. Maybe there is some redundancy in cache but I find it ok.

I'd be really glad if someone will find a way to improve or fix this nodes if something is wrong in the behaviour of the network. I'll probably share with the lw community because they probably find more benefit there, but you never know.
User avatar
Janusz Biela
Posts: 3265
Joined: Mon Mar 13, 2006 10:39 am
Location: Finland
Contact:

Re: Default shader to use

Post by Janusz Biela »

Some Nodes (especially shaders) has lack of documentations ....and simply G. can not add support in Kray for them because he can not "guess" in code. Some Nodes has also bugs and G. must make special traps for that to avoid deep recursion or even crashes.
Personally I avoid them all except one: DP Kit Reflection Node.
S0nny
Posts: 75
Joined: Thu Mar 15, 2012 12:03 am

Re: Default shader to use

Post by S0nny »

Fabian-Eshloraque wrote:Hi Sonny,

This is way more advanced then what I have. Are you willing to share your setup as a preset, so I can investigate?

I made a working car shader, with specular flakes and clearcoat separated but I cant mix it together on shading level. (it is in another thread on this forum)

The problem I have is that some diffuse models are not supported by kray. Janusz can do stuff with curves, but it would be easier just to use nodal shaders for some items.

These I tested and work:
1. Ani reflections (Janusz explains this one his nodal overview)
2. Reflections (I dont use it)
3. Cook terrance (for faking flakes in carpaint or snow by using it as specular input)

But the diffuse LW shaders dont work. (orennayar for example)

Grtz,

Fabian
I can see your problem, i.e. I find that Delta, which I use for like 90% of my materials, very convenient, because it has already oren-nayar and auto diffuse and you can use it for very very fast setup. I don't know if my node can help for kray, but you can try.
This is why even though kray is far superior than lw engine, I still use lw in my everyday works because I find it needs less workarounds to do what I need properly. Maybe it's me, maybe it's just because I need to redo my materials or just I'm so used to vpr for setting up everything, but my workflow is consolidated like this. Will see what happens with lw Next or K3, if they will ever come out this year.

Anyway, I'll look into the carpaint shader and the lastest setup from Janusz, I have so much to learn from him and others here and nt forum, but the problem is since I don't spend much time on forums lately I'm missing some important stuff for sure.
S0nny
Posts: 75
Joined: Thu Mar 15, 2012 12:03 am

Re: Default shader to use

Post by S0nny »

Janusz Biela wrote:Some Nodes (especially shaders) has lack of documentations ....and simply G. can not add support in Kray for them because he can not "guess" in code. Some Nodes has also bugs and G. must make special traps for that to avoid deep recursion or even crashes.
Personally I avoid them all except one: DP Kit Reflection Node.
Yes, for sure this is one of the major problems for integration. I remember my first attempt with Kray using lw dielectric and it was light leaks everywhere. Probably lw engine can cope with its own bugs, but with the lack of documentation or sdk or whatever I understand why nobody shows interest in developing something for lw. I mean, ok the userbase is small, but come on.

edit: typos
User avatar
Janusz Biela
Posts: 3265
Joined: Mon Mar 13, 2006 10:39 am
Location: Finland
Contact:

Re: Default shader to use

Post by Janusz Biela »

Yes, this Electric Node has bug which create "hot photons". Is enough when one photon exceed out of normal scale with power and due many bounces you get randomly big light splotch.
G. could write "trap" in code for that but he will back to K2 only with compatibility with future Lightwave.
Fabian-Eshloraque
Posts: 74
Joined: Sun Nov 17, 2013 3:29 pm

Re: Default shader to use

Post by Fabian-Eshloraque »

Hi Janusz,

Is it possible that kray would have custom shaders to have oren-nayer, delta, etc? I rather dont use them, cause its extra work when switching from render engine, but its what every render engine does. (aka Arnold, octane and renderman)

Or maybe a kray material where you can choose the diffuse system and just input the existing shader tree you have been developing, because thats a mathematical setup. So when I switch renderengine I only have to replace your kray material with another.

@SOnny: I downloaded your setup and will have a look at it now.
User avatar
Janusz Biela
Posts: 3265
Joined: Mon Mar 13, 2006 10:39 am
Location: Finland
Contact:

Re: Default shader to use

Post by Janusz Biela »

Fabian-Eshloraque wrote:Hi Janusz,

Is it possible that kray would have custom shaders to have oren-nayer, delta, etc? I rather dont use them, cause its extra work when switching from render engine, but its what every render engine does. (aka Arnold, octane and renderman)

Or maybe a kray material where you can choose the diffuse system and just input the existing shader tree you have been developing, because thats a mathematical setup. So when I switch renderengine I only have to replace your kray material with another.

@SOnny: I downloaded your setup and will have a look at it now.

Target for K3 is to have his own physical shaders - this is only one way to have it correct and fast working. So all above will be not because is that request but because is the MUST. Also G. wants more independence from Lightwave in that way like V-ray when adding Kray3 to other software will not have limits - render engine is not everything what need user also important are shaders and buffers.
Fabian-Eshloraque
Posts: 74
Joined: Sun Nov 17, 2013 3:29 pm

Re: Default shader to use

Post by Fabian-Eshloraque »

I just tried the delta node and it works with kray. I set the oren-nayar on. I'm doing some animation test to see if it holds.
Locked