Specular \ Reflection Control with Arch Shader

Discussions regarding Materials, Material-Compounds or Shaders, etc.
Post Reply
Falam

Specular \ Reflection Control with Arch Shader

Post by Falam » 10 Feb 2013, 19:02

Image

I can't get the black that you see in the image to be a different color, or rather adjusting the color so it doesn't look like a washed out black. I decided to add a layer for reflections, that didn't work, I tried an image map, that didn't work either it didn't remove the black which I want to control without the use of image maps.
I haven't tried a mix2 shader, hoping I wouldn't have to add layers of the Arch shader just to achieve this.

Also with the Arch shader is you can't have two layers of reflections. The spec/reflection you see in the image is going across the entire object, the black portion of the mesh does not have it's own reflection/spec control over the top layer of spec/reflection ?

User avatar
Maximus
Posts: 1104
Joined: 09 Jun 2009, 15:45

Re: Specular \ Reflection Control with Arch Shader

Post by Maximus » 11 Feb 2013, 01:19

You need a black/white image based on that black you are using (assuming you have one). this map needs to be input in the reflectivity slot of the architectural shader.
With this setup you can control how much reflection you get based on how black or white (or gray) your image is. You can use a color correction node in between to control contrast/brightness which in this case gonna drive the amount of reflections. (white = full reflections, black = no reflections).

Another option would be plug the map directly into the reflection color and use the "Reflectivity" parameter of the arch shader to increase or decrease it.
Both options requires a "Mask" texture, meaning you need to have a b/w map of those black areas in which you want or dont want the reflections to happen.
might want to show us the render tree too if you need further help.

You can definately have more reflection levels with architectural, just layer them with a mix2color node Xtimes.
But i'm not quite sure what you want to achieve here.

Falam

Re: Specular \ Reflection Control with Arch Shader

Post by Falam » 11 Feb 2013, 01:33

Maximus wrote:You need a black/white image based on that black you are using (assuming you have one). this map needs to be input in the reflectivity slot of the architectural shader.
With this setup you can control how much reflection you get based on how black or white (or gray) your image is. You can use a color correction node in between to control contrast/brightness which in this case gonna drive the amount of reflections. (white = full reflections, black = no reflections).

Another option would be plug the map directly into the reflection color and use the "Reflectivity" parameter of the arch shader to increase or decrease it.
Both options requires a "Mask" texture, meaning you need to have a b/w map of those black areas in which you want or dont want the reflections to happen.
might want to show us the render tree too if you need further help.

You can definately have more reflection levels with architectural, just layer them with a mix2color node Xtimes.
But i'm not quite sure what you want to achieve here.
Thanks for the advice, I'll update the image once I have made the adjustments :)

Falam

Re: Specular \ Reflection Control with Arch Shader

Post by Falam » 11 Feb 2013, 03:10

I gave your suggestions a shot, I decided to post the render tree, maybe you can catch something I'm missing :) If you can post some of your results, it would help ? :)

Image

User avatar
Maximus
Posts: 1104
Joined: 09 Jun 2009, 15:45

Re: Specular \ Reflection Control with Arch Shader

Post by Maximus » 13 Feb 2013, 03:50

Alright here is a screenshot which i'm gonna describe it a bit.

[rimg=200]http://img600.imageshack.us/img600/9219/layerv.jpg[/rimg]

Now, I hope you are familiar on how the layer system works in render tree anyway i'll try to be as much clear as I can.
Basically what you want is a diffuse layer (with its own reflections control), another diffuse layer in this case a dirt in your case the black dirt (with its own reflections control) and the flexibility to change everything without much hassle.

Now you first need the diffuse images of course, the image on top must have a black/white mask to guide some of those things.
So in my setup i used a yellow gradient shader for the bottom layer, and a red dirt image with its relative b/w image to drive the parameters.

As you can see, i have 2 mia materials. The first one is set in a traditional way, it has the gradient yellow diffuse and you have all the normal controls in it.
Since we know we are gonna put on top of this layer another layer with another diffuse, i've used the b/w mask of our next diffuse to "mask" the reflectiviy and exclude from this mia_material the dirt spot. If you plug a black and white map on the refl_color of the mia material, the black part of the map will be 0 reflections while the white part will be full reflections. Since my map has the dirt part black i'm actually excluding the reflections on that part out of this materials, because we want to control them alone and we are gonna do it later with the mix node.

Still in this first mia material, i've added on top the red dirt diffuse using the layer system. I have plugged the red diffuse texture in the color input and i'm driving the diffuse with a Mask.
I'm using the color picker set to blue in this case, but u can also use red or green, doesnt matter since your image is black and white, its gonna use luminance, not rgb.
So what i did basically is just adding a diffuse layer on top of the yellow, driving the diffuse part with the black and white mask. When you add layer on the mia material you have to right click the layer name and tell it what parameter are you adding the layer to. IF you dont do this it wont work. Also in the Mia material you need to enable the mask mode "Use Mask Connection". Check the screenshot.

Now all this first Mia material setup give us: 1 yellow diffuse layer with its reflections (you can control the reflections by just increasing it with the normal reflection parameter in the mia, note that those reflections wont affect the red dirt layer because you are using the scratches.jpg mask in the refl_color port)
2 a red dirt diffuse on top which now cant have reflections because we have masked them with the scratches.jpg in the refl_color slot.

Now to have the reflections on this red dirt layer just create another mia material, make it mirror-like by increasing the facing reflectivity to 1, and mix it in "Blend" mode on top of the other mia material. I used an inverted node to invert the black/white scratches map in the weight of the mix2color node. IN this way if you increase or decrease the reflections in the second mia materials it will only affect the red dirt layer on top, and you still have the separated reflections for your yellow bottom layer in the first mia material.

I hope i made sense in all this wall of text. I've uploaded the model with the shading network and setup.
Hope that helps

Cheers, Max

p.s. obviously this setup is quite unusual i must admit, because you want 2 separate controls for reflections, usually you just plug a black/grey/white image in the reflection color to drive the reflections based on that image. But yeah if you want this, thats how you do it.

keep in mind that the layering system isnt physically accurate with mia materials, in the new upcoming shaders (miLA) this thing is gonna be easier, with better control, and you will preserve the physically accuracy of the reflections/refractions and shaders in the whole layering system.
Attachments
Cylinder.rar
(145.44 KiB) Downloaded 123 times

Falam

Re: Specular \ Reflection Control with Arch Shader

Post by Falam » 13 Feb 2013, 06:45

Maximus wrote:Alright here is a screenshot which i'm gonna describe it a bit.

[rimg=200]http://img600.imageshack.us/img600/9219/layerv.jpg[/rimg]

Now, I hope you are familiar on how the layer system works in render tree anyway i'll try to be as much clear as I can.
Basically what you want is a diffuse layer (with its own reflections control), another diffuse layer in this case a dirt in your case the black dirt (with its own reflections control) and the flexibility to change everything without much hassle.

Now you first need the diffuse images of course, the image on top must have a black/white mask to guide some of those things.
So in my setup i used a yellow gradient shader for the bottom layer, and a red dirt image with its relative b/w image to drive the parameters.

As you can see, i have 2 mia materials. The first one is set in a traditional way, it has the gradient yellow diffuse and you have all the normal controls in it.
Since we know we are gonna put on top of this layer another layer with another diffuse, i've used the b/w mask of our next diffuse to "mask" the reflectiviy and exclude from this mia_material the dirt spot. If you plug a black and white map on the refl_color of the mia material, the black part of the map will be 0 reflections while the white part will be full reflections. Since my map has the dirt part black i'm actually excluding the reflections on that part out of this materials, because we want to control them alone and we are gonna do it later with the mix node.

Still in this first mia material, i've added on top the red dirt diffuse using the layer system. I have plugged the red diffuse texture in the color input and i'm driving the diffuse with a Mask.
I'm using the color picker set to blue in this case, but u can also use red or green, doesnt matter since your image is black and white, its gonna use luminance, not rgb.
So what i did basically is just adding a diffuse layer on top of the yellow, driving the diffuse part with the black and white mask. When you add layer on the mia material you have to right click the layer name and tell it what parameter are you adding the layer to. IF you dont do this it wont work. Also in the Mia material you need to enable the mask mode "Use Mask Connection". Check the screenshot.

Now all this first Mia material setup give us: 1 yellow diffuse layer with its reflections (you can control the reflections by just increasing it with the normal reflection parameter in the mia, note that those reflections wont affect the red dirt layer because you are using the scratches.jpg mask in the refl_color port)
2 a red dirt diffuse on top which now cant have reflections because we have masked them with the scratches.jpg in the refl_color slot.

Now to have the reflections on this red dirt layer just create another mia material, make it mirror-like by increasing the facing reflectivity to 1, and mix it in "Blend" mode on top of the other mia material. I used an inverted node to invert the black/white scratches map in the weight of the mix2color node. IN this way if you increase or decrease the reflections in the second mia materials it will only affect the red dirt layer on top, and you still have the separated reflections for your yellow bottom layer in the first mia material.

I hope i made sense in all this wall of text. I've uploaded the model with the shading network and setup.
Hope that helps

Cheers, Max

p.s. obviously this setup is quite unusual i must admit, because you want 2 separate controls for reflections, usually you just plug a black/grey/white image in the reflection color to drive the reflections based on that image. But yeah if you want this, thats how you do it.

keep in mind that the layering system isnt physically accurate with mia materials, in the new upcoming shaders (miLA) this thing is gonna be easier, with better control, and you will preserve the physically accuracy of the reflections/refractions and shaders in the whole layering system.
This is excellent, very helpful, good read too :) Those new shaders are to come soon ?

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests