Some Shader Questions as Falloff Shader, Mix two textures ..

Come here for help & support.
User avatar
Silverwing
Posts: 71
Joined: Sun Aug 23, 2015 1:16 am
Location: Ludwigsburg Germany
Contact:

Some Shader Questions as Falloff Shader, Mix two textures ..

Post by Silverwing » Sun Aug 23, 2015 4:41 am

Hi there everyone. I´m new to Indigo. I know some of it has been recurring topic for a long time so hope my questions are not too nooby :-)


Falloff Shader:

I already found some answers like the access to the zenith angle of the incident and scattered rays:
http://www.indigorenderer.com/forum/vie ... f=1&t=9629

What I´m trying to do is just to create a "parallel perpendicular" / "falloff" shader.

What it should do:
Depended on the view normals that are facing directly towards the "Eye" get colored in one color (for example white) while Normals that are facing 90° or more are tinted in another color (for example black). Of course I am speaking of an interpolated result where the normals at 45° are 50% gray.

This could be really useful to shade for example angle depended glossiness. I mean changing the exponent over the orientation of a material. Quite some surfaces show this behavior and it would be nice to find a way in indigo to reproduce this result.

This also can be really useful for other shaders. You can even buld your custom Fresnel shader out of it.


Layer Shader / Mix two textures:

Is there a possibility to mix two textures in a shader.
I do this all the time in other render engines to avoid having to customize textures exactly for a specific use and save them seperately.

I know you could work around that using two diffuse shaders, mixing them and then for example using a coating. But that would mean longer render times (I guess) as every shader has to be evaluated fully.

Maybe there is a possibility even with ISL?

Thanks in advance!

Cheers,
Raphael
Attachments
ISL_01.jpg
This works fine, when the lighting is really flat. But when you get a lighting direction you get results like this. And that´s not what I´m looking for.
You don´t dream in cryo.

User avatar
Oscar J
1st Place Winner
Posts: 2204
Joined: Sat Mar 31, 2012 3:47 am
Location: Gothenburg, Sweden
3D Software: Blender

Re: Some Shader Questions as Falloff Shader, Mix two texture

Post by Oscar J » Sun Aug 23, 2015 4:51 am

Question one:

you mean something like this?

http://www.indigorenderer.com/materials/materials/1104

Question two: I think a blend material is your best bet so far. I don't think blending textures is possible as of yet, though I imagine that if you put the request in the bugs/request forum, the devs would look into it.

User avatar
Zom-B
1st Place 100
Posts: 4700
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Re: Some Shader Questions as Falloff Shader, Mix two texture

Post by Zom-B » Sun Aug 23, 2015 6:53 am

Check the integrated ISL Normal Shader:
Attachments
ISL normal.png
polygonmanufaktur.de

User avatar
Silverwing
Posts: 71
Joined: Sun Aug 23, 2015 1:16 am
Location: Ludwigsburg Germany
Contact:

Re: Some Shader Questions as Falloff Shader, Mix two texture

Post by Silverwing » Sun Aug 23, 2015 7:07 am

Hey Oscar and thanks a lot for the speedy reply.
Not quite (at least I think)
Let me explain this in a little bit more detail:
My shading work flow over the last few years evolved quite a bit. The most used feature in most of the render engines I use is a view depended (not light or shading depended) falloff.

Image

By having a linear falloff between parallel normals and perpendicular normals allows you a lot of stuff.
To not only use it in the diffuse but you can use it in every channel.

If course another useful feature would be to have a curves adjustment for this falloff then that allows the artist to tweak the linear falloff.

A lot of materials depended on the surface structure have the feature of viewing angle dependend roughnes.
In terms of Indigo that means that the Phong exponent changes depending on what angle you view upon a surface.

Image
Attachments
View_Dependen_Gloss_01.jpg
Normal_Stuff_01.jpg
You don´t dream in cryo.

User avatar
Oscar J
1st Place Winner
Posts: 2204
Joined: Sat Mar 31, 2012 3:47 am
Location: Gothenburg, Sweden
3D Software: Blender

Re: Some Shader Questions as Falloff Shader, Mix two texture

Post by Oscar J » Sun Aug 23, 2015 7:13 am

I'm pretty sure Indigo achieves that last surfance by the laws of physics.

I'm not great with ISL, check Zom-B's post or wait for an admin to answer. :)

User avatar
Silverwing
Posts: 71
Joined: Sun Aug 23, 2015 1:16 am
Location: Ludwigsburg Germany
Contact:

Re: Some Shader Questions as Falloff Shader, Mix two texture

Post by Silverwing » Sun Aug 23, 2015 7:22 am

Zom-B wrote:Check the integrated ISL Normal Shader:
Hi Zom-B,

thanks a lot for this hint.
Actually I tried that shader. But it gave ne not the results I was looking for.
At least when using it in the diffuse channel it returned results that did not match the black to white graditent.

I just made a test where I used it in an emitter slot. There it seems to work fine.

P.s. if you are wondering why I have a mirror in the scene. I also check if the effect is right for rays that are not coming directly from the camera. This somethinges is not the case.

Ok as this shader seems to be a good solution for my needs now to the next question:
Can I somehow alter the results... gamma curve them or tweak them?

Also would be nice to see how the code of the ISL normal shader looks like :-)

Thanks for the tip again.

Cheers,
Raphael
Attachments
View_Dependend_Shaders_02.jpg
You don´t dream in cryo.

User avatar
Silverwing
Posts: 71
Joined: Sun Aug 23, 2015 1:16 am
Location: Ludwigsburg Germany
Contact:

Re: Some Shader Questions as Falloff Shader, Mix two texture

Post by Silverwing » Sun Aug 23, 2015 7:37 am

Oscar J wrote:I'm pretty sure Indigo achieves that last surfance by the laws of physics.

I'm not great with ISL, check Zom-B's post or wait for an admin to answer. :)
Thanks for your 2nd reply.
Just a small answer about the angle dependent surface roughness:
This is an effect that does not depend on the physics of the surface but on the micro structure.

Let me explain:
You could have two surfaces made from exactly the same plastic.
Depending on the surface structure the one can show angle dependent roughness variation while the other does not.

Thats the reason why this can not be managed globally with a thing like IOR etc.

Cheers,
Raphael
You don´t dream in cryo.

User avatar
Zom-B
1st Place 100
Posts: 4700
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Re: Some Shader Questions as Falloff Shader, Mix two texture

Post by Zom-B » Sun Aug 23, 2015 7:56 am

Hey Raphael,
great to see some professional giving a try with Indigo and also visiting the Forum!
Keep your questions coming, and also feel free to request stuff if you think it is essential :)
Silverwing wrote:Actually I tried that shader. But it gave me not the results I was looking for.
At least when using it in the diffuse channel it returned results that did not match the black to white gradient.
Silverwing wrote:P.s. if you are wondering why I have a mirror in the scene. I also check if the effect is right for rays that are not coming directly from the camera. This somethinges is not the case.
Thats the beauty of unbiased raytracing, without limited raybounces (well ok... default limit is 10000) ;)
Silverwing wrote:Can I somehow alter the results... gamma curve them or tweak them?
Sadly not directly in that shader, its just a very basic GUI for some ISL code...
Silverwing wrote:Also would be nice to see how the code of the ISL normal shader looks like :-)
All ISL shaders in C4D get exported as ISL code that can be checked out (and tweaked further) in Indigo:
ISL.JPG
polygonmanufaktur.de

User avatar
Oscar J
1st Place Winner
Posts: 2204
Joined: Sat Mar 31, 2012 3:47 am
Location: Gothenburg, Sweden
3D Software: Blender

Re: Some Shader Questions as Falloff Shader, Mix two texture

Post by Oscar J » Sun Aug 23, 2015 8:00 am

I do think at least most materials get cleaner looking reflections as the viewing angle gets more narrow.

If you do a few tests with Indigo I think you'll find that Indigo does that by default. :)

User avatar
Zom-B
1st Place 100
Posts: 4700
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Re: Some Shader Questions as Falloff Shader, Mix two texture

Post by Zom-B » Sun Aug 23, 2015 8:05 am

Silverwing wrote:Thats the reason why this can not be managed globally with a thing like IOR etc.
The devs already mentioned some enhancements in this area: http://www.indigorenderer.com/forum/vie ... 66#p131966

As you maybe know Indigo devs are working hard at the v4 release atm. This is why the usually very frequent beta build updates with fixes and new features are at halt atm.
polygonmanufaktur.de

User avatar
Silverwing
Posts: 71
Joined: Sun Aug 23, 2015 1:16 am
Location: Ludwigsburg Germany
Contact:

Re: Some Shader Questions as Falloff Shader, Mix two texture

Post by Silverwing » Sun Aug 23, 2015 9:48 am

@ Oscar,
thanks a lot for your input. If I have some time I´ll do some tests to get a picture of how the Indigo shaders work exactly :-)

@ Zom-B,
thanks a lot for taking time and encouraging me to post some feature requests.
Also thanks for the link. That looks interesting!

Also thanks for showing me the code for the shader. Thats actually pretty nice that you always can see what the shader code looks like ;-)
It will need tome time for me to figure out what all the code is doing (since I am clearly no coder or computer scientist) but maybe I will get there... maybe. Ha ha ha :-)
As you maybe know Indigo devs are working hard at the v4 release atm.
I didn´t quite know. But I could see from the forum that V4 is heavily worked on. I really looking forward seeing what they will come up with :-)


Its quite nice to have such a warm welcome in a forum. Thank you guys for that!

Cheers,
Raphael
You don´t dream in cryo.

User avatar
thesquirell
Posts: 428
Joined: Fri Aug 29, 2014 3:49 am
Location: Novi Sad, Serbia

Re: Some Shader Questions as Falloff Shader, Mix two texture

Post by thesquirell » Sun Aug 23, 2015 11:35 am

Welcome Raphael!

Seeing your two art works you posted, and reading this, you seem like a man who knows his CG, and as Zom-B said, it is a really nice thing to see pros taking interest in Indigo. You will find that the guys here are amazing, as I experienced myself, being totally new to Indigo, and C4D. Zom-B, and bubs were of greatest help to me, finding my way through C4D and Indigo mat system, but I am sure you will find other members very useful, and helpful!

As for the custom Fresnel falloffs, and angle depended glossiness (exponent), I myself only noticed that effect going through mister Warwick's "Mastering V-Ray" lessons, and immediately started noticing it in Indigo. Since you already done a dispersion/volumetric scene (a hell of a job you did there), you see that Indigo capabilities are enormous. The only thing needed is actually to be true to reality, and as Ono said, tweaking IOR curves makes no physical sense (I will have to trust him on that). I have made these two simple rendering to show you, if that is the effect you are going for, the glossiness effect in Indigo. The engine is capable of calculating this effect, as Oscar said, and it does it by default. Now, I don't know if it's truly realistic to go from a rough surface at high angles, to a super glossy one at low,but, not being able to control it as you wish, I guess, is the Indigo's strategy in preventing us in doing something unrealistic. I know that artist's freedom is a great thing, but I guess that in unbiased rendering, the goal is to be as close as possible to reality, possibly sacrificing some features along the way. As for the mechanics behind these calculations, I guess that's a company's secret, and I really have no idea if it's just a Fresnel effect kicking in, or is it the exponent that's changing, or they both work together, but what I do know is that imitating the surface structure through bump maps, and normal maps, possibly displacement maps(not a good strategy though), changes a lot in Indigo. For instance, anisotropy effect is only achievable by such means in Indigo. But, as for the mentioned effect, it only remains to be seen what will the Indigo developers cook up next! Surely, it will be great as always!

Take care, and surprise us with some more of your awesome renderings!
Attachments
LowAngle.png
HighAngle.png

User avatar
Silverwing
Posts: 71
Joined: Sun Aug 23, 2015 1:16 am
Location: Ludwigsburg Germany
Contact:

Re: Some Shader Questions as Falloff Shader, Mix two texture

Post by Silverwing » Sun Aug 23, 2015 11:47 pm

thesquirell wrote:Welcome Raphael!

Seeing your two art works you posted, and reading this, you seem like a man who knows his CG, and as Zom-B said, it is a really nice thing to see pros taking interest in Indigo. You will find that the guys here are amazing, as I experienced myself, being totally new to Indigo, and C4D. Zom-B, and bubs were of greatest help to me, finding my way through C4D and Indigo mat system, but I am sure you will find other members very useful, and helpful!

As for the custom Fresnel falloffs, and angle depended glossiness (exponent), I myself only noticed that effect going through mister Warwick's "Mastering V-Ray" lessons, and immediately started noticing it in Indigo. Since you already done a dispersion/volumetric scene (a hell of a job you did there), you see that Indigo capabilities are enormous. The only thing needed is actually to be true to reality, and as Ono said, tweaking IOR curves makes no physical sense (I will have to trust him on that). I have made these two simple rendering to show you, if that is the effect you are going for, the glossiness effect in Indigo. The engine is capable of calculating this effect, as Oscar said, and it does it by default. Now, I don't know if it's truly realistic to go from a rough surface at high angles, to a super glossy one at low,but, not being able to control it as you wish, I guess, is the Indigo's strategy in preventing us in doing something unrealistic. I know that artist's freedom is a great thing, but I guess that in unbiased rendering, the goal is to be as close as possible to reality, possibly sacrificing some features along the way. As for the mechanics behind these calculations, I guess that's a company's secret, and I really have no idea if it's just a Fresnel effect kicking in, or is it the exponent that's changing, or they both work together, but what I do know is that imitating the surface structure through bump maps, and normal maps, possibly displacement maps(not a good strategy though), changes a lot in Indigo. For instance, anisotropy effect is only achievable by such means in Indigo. But, as for the mentioned effect, it only remains to be seen what will the Indigo developers cook up next! Surely, it will be great as always!

Take care, and surprise us with some more of your awesome renderings!
Hey. Thanks a lot for your long long text. I really appreciate you putting so much time into this!
Also thank you for doing the test renderings. Thats awesome of you.

I have to admit that some of my knowledge also comes from Grant´s Mastering Vray.
The funny thing is that I had a very similar work flow then he does even before watching his great Tutorials.
Since you already done a dispersion/volumetric scene (a hell of a job you did there), you see that Indigo capabilities are enormous.
Yes Indeed! I have worked with other (Bi-Directional) Pathtracers before and did comparisons between them. And I have to day that Indigo had the best and fastest result for the prism scene!
I know that artist's freedom is a great thing, but I guess that in unbiased rendering, the goal is to be as close as possible to reality, possibly sacrificing some features along the way.
I can see the benefit here. I understand that the best way to achieve some physical behavior is of course to simulate it with physically correct algorithms. But sometimes renderers lack those calculations because there are not important enough for the majority of users. And thats the point where I normally get creative and use the renderers built in tools to achieve the effect I´m after.


I´m always doing lists, when using new renderers. Listing features that I miss (or to stupid to find or in Case of ISL code)

Right now on my list says following:
To avoid misunderstandings. When I say SHADER I do not mean a MATERIAL. I mean the component like Bitmap, ISL Normal etc. that goes for example in the diffuse channel of one material.

Layer shader: (for textures and other ISL shaders) Like in Photoshop. Where you can place textures / shaders on top of each other. Set their transparency and or mix them with mixing methods like add, multiply etc.

If it was to difficult to built a layer shader than at least a mix / blend shader. As in a blend material you have shader / texture slot A and shader / texture slot B and a mix value that also can be replaced with a texture or a shader.

A ramp shader: A shader where you can remap brightens and colors of a input bitmap or shader based on a ramp / curve. C4D users know what I´m talking about (Colorizer / Filter Shader). This is what I use inside the shaders the most. Just to fine tune the look of a bitmap or another shader I have loaded in.

Dirt / Ambient Occlusion shader (with a invert normal option): Especially with the invert normals option you are able to create worn edges and all sorts of aging effects. This would also greatly benefit from a layer shader as you could multiply the dirt with a texture to get more uneven / organic results. I do stuff like this in other engines all the time.

Support for Vertex Maps: This is another way to create more organic looking textures. You for example can mix two textures based on a vertex map. It really comes in handy from time to time.

Anisotropic Reflektions / Spec: This seems to be in development as I have seen in some posts from the devs. I just want to underline that I really appreciate this feature.


I think I will also post this list in the Bugs and Request forums. Hopefully the one or the other feature will find its way into a future version of Indigo ;-)

Cheers,
Raphael
You don´t dream in cryo.

User avatar
Zom-B
1st Place 100
Posts: 4700
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Re: Some Shader Questions as Falloff Shader, Mix two texture

Post by Zom-B » Mon Aug 24, 2015 12:58 am

Hey Raphael,

regarding you Shader needs here a quite important information: The C4D Exporter does bake all C4D shaders on export, so you can use all 2D shaders that way. A baking resolution can be defined in the Material Extra Options. There should be possibilities to transfer C4D shaders to an external Renderer like Indigo without baking, but its beyond by knowledge if possible with Indigo...

Layer shader:
In theory this can be done via ISL, and there already is such a simple ISL shader included, but it only blends between other ISL Shaders, not textures using multiply, subtract and add.
Definitely a ISL Shader that could be further enhanced!

A ramp shader:
Also here no other option besides baking the C4D shader.

Dirt / Ambient Occlusion shader
Heavily requested by me quite a long time ago, fell free to push it further :)

Support for Vertex Maps:
Vertex Maps aren't supported at the moment :/

Anisotropic Reflektions / Spec:
Yes there was some developement been done regarding that with example renderings, but it has been never released.
Silverwing wrote:I think I will also post this list in the Bugs and Request forums. Hopefully the one or the other feature will find its way into a future version of Indigo ;-)
Feel free to resurrect older threads from the death regarding requests! The Devs are no 3D artists by them self, input from the community is usually very respected and with enough requests features find a way on the To-Do list :)
polygonmanufaktur.de

User avatar
Oscar J
1st Place Winner
Posts: 2204
Joined: Sat Mar 31, 2012 3:47 am
Location: Gothenburg, Sweden
3D Software: Blender

Re: Some Shader Questions as Falloff Shader, Mix two texture

Post by Oscar J » Mon Aug 24, 2015 1:08 am

As a side note on the worn edges thing (probably not what you're looking for, but...) :)

http://www.indigorenderer.com/materials/materials/1144

Post Reply
33 posts

Who is online

Users browsing this forum: No registered users and 17 guests