Author Topic: Extracting grayscale values  (Read 5602 times)

Good evening, I am trying to get some maps working and I am in a dilemma to get some of the values extracted... here it goes. I am using a custom shader that is made for unity, which is Physically based (you can find it here: http://forum.unity3d.com/threads/212354-Alloy-Physical-Shader-Framework-by-RUST-LTD). SD4 has all of the nodes needed for the shader, except specularity which is a property that doesn't work natively unless I drag the output to the model.

Now, is there a way to extract the values from the parameter "specularity" (I named this specifically for each base material) using a mask? Otherwise having you guys add this into SD4 on your end... I am on a time crunch, so I need to solve this quickly...

Another issue I am having is my grayscale outputs are being exported as index when I open up photoshop to look at them... is there a way to keep this from happening... I have the output set up as RGBA...
Thanks a bunch

Bump. I am bumping this topic because I figured out a way to extract the data I need, but it is not displaying correctly, so I need to look for another way to extract the greyscale data. Are there any nodes which allow me to extract the greyscale data and feed it into an output? I am using a second Multi Blend Node, but it is displaying as a diffuse texture instead of a specularity texture which is specific to my shader...

I found a node called Color to mask, but will it matter if the source is a greyscale color?

The Color to Mask should do what you want and it should also work with a greyscale map.

I just tested it and it didn't work unless I am doing something incorrectly :(

The Color to Mask should do what you want and it should also work with a greyscale map.

I also sent you a PM in regards to modifying the Multi Material Blend node specifically for my project... I would love to hear your suggestions on that

Hi,

When you say "extract the greyscale data" to feed to an output, are you trying to create a specular map from your diffuse color?

What I've done is to take my diffuse map and create a specular from that by using a combination of HSL and Levels to create the appropriate map. I will also multiply a curvature to remove specular areas from the crevices of the surface. Finally, I will then output this to the Specular Output node.

Cheers,

Wes
Head of Substance Demo Art Team
the3dninja@adobe.com
Twitter: The3DNinja

Hi,

When you say "extract the greyscale data" to feed to an output, are you trying to create a specular map from your diffuse color?

What I've done is to take my diffuse map and create a specular from that by using a combination of HSL and Levels to create the appropriate map. I will also multiply a curvature to remove specular areas from the crevices of the surface. Finally, I will then output this to the Specular Output node.

Cheers,

Wes

Hello Wes!! :)

I have a shader that is used in Unity and it is a PBR shader (check this out: forum.unity3d.com/threads/212354-Alloy-Physical-Shader-Framework-by-RUST-LTD). Unfortunately, the multi material blend node doesn't have one of the properties I need, called "specularity", which is a grayscale color in my base materials. What I ended up doing is creating a second Multi-material blend and just using the materials that are non metal to create the map. I plug the "specularity" into the diffuse slots and use that as my map, since it's already greyscale. Not a clean workflow since I can't visualise the maps, but it looks really good.

And btw, your video tutorials REALLY helped me get up to speed on using Substance Designer, best purchase I've ever made lately...
Last Edit: February 27, 2014, 05:48:16 pm

Hello Wes!! :)

I have a shader that is used in Unity and it is a PBR shader (check this out: forum.unity3d.com/threads/212354-Alloy-Physical-Shader-Framework-by-RUST-LTD). Unfortunately, the multi material blend node doesn't have one of the properties I need, called "specularity", which is a grayscale color in my base materials. What I ended up doing is creating a second Multi-material blend and just using the materials that are non metal to create the map. I plug the "specularity" into the diffuse slots and use that as my map, since it's already greyscale. Not a clean workflow since I can't visualise the maps, but it looks really good.

And btw, your video tutorials REALLY helped me get up to speed on using Substance Designer, best purchase I've ever made lately...

Thanks very much! I'm really glad to hear you liked the videos : )

I might be misunderstanding how you are using the specular map, but the multi material blend does allow for specular channel. It is an enabled channel by default. It is a color data type so if you want greyscale, I would suggest adding a greyscale conversation node right before you pipe into the specular output. If you are in material mode (#2 on keyboard), you can see the individual channels. If you pipe this material to the outputs it will automatically connect to specular output node. It will be color datatype unless you convert it to grey.

Let me know if that is not what you are referring to.

Cheers,

Wes

Head of Substance Demo Art Team
the3dninja@adobe.com
Twitter: The3DNinja

This is close, but the shader I am using doesn't use specular in the way it is normally used... the shader is a custom PBR, and it has a property specifically named "specularity"... and the multi material node doesn't have this particular setup so it is damn near impossible to get an accurate read without having to export to Unity all the time.

Here is an attachment of the shader that I am using... it is a fully custom shader and it works nicely in Substance Designer except that the Specularity parameter is not supported currently and I can't modify the Multi material node or add specularity to a material switch node.

On the left, is the correct appearance in Unity. On the right is substance designer and my work around to get specularity exported correctly
Last Edit: February 27, 2014, 08:16:51 pm

I see what you mean about the specularity. I looks like you will have to create a custom solution as you have done to work with that particular shader. Are you then exporting bitmaps each time there is a change instead of publishing the SBS for Unity? Are you able to use "generate all outputs" and manually connect your specularity map into the correct shader slot in Unity?

Head of Substance Demo Art Team
the3dninja@adobe.com
Twitter: The3DNinja

Yes, I am exporting bitmaps to Unity... and using a texture packer to get all of the textures working. As for publishing SBS files for Unity, this feature will not work for this custom shader that I am using for my game... and also the textures I am outputting is at 4k
Last Edit: February 28, 2014, 04:43:47 pm