Page 1 of 1

no way to extract RGBA channels from packed textures

PostPosted: Thu May 02, 2019 5:55 pm
by adamnerva
This is a feature request that is especially valuable to Unity users, but would also benefit all octane users. Please redesign the texture node, or add an additional node that allows for quick isolation of the individual RGBA channels of packed textures. The Unity standard shader, and thus most Unity assets are using packed textures that pack multiple black and white textures into the RGBA channels of a color image. When you go to convert a unity standard shader into an octane shader for more features or control, there is no straightforward way to directly access these channels.

Re: no way to extract RGBA channels from packed textures

PostPosted: Fri May 03, 2019 1:35 pm
by ChrisHekman
This is an octane limitation because of spectral rendering. Under the hood octane is using wavelengths instead of rgb.

However OSL Texture nodes allow you to circumvent this. OSL Textures do use RGB.
Steps:
- Create a new OSL Texture node
- Select it and press the Edit Code button
OSL.png

- A code window will now pop up. Place the following code in it and press the play button.
Code: Select all
shader RChannelAsGrayscale(
    color inColor = 0,
    output color c = 0)
{
    c = color(inColor[0]); //return the R component as a grayscale color
}

- The OSL Texture should now have a new input pin that takes a texture. And it will output the R channel of that pin as a grayscale texture

Re: no way to extract RGBA channels from packed textures

PostPosted: Fri May 03, 2019 4:13 pm
by adamnerva
So it is possible for otoy to include an rgba channel splitter node that is available from the right click menu. Dont make your users open a text editor for such a basic function. I appreciate the suggestion, but I was suggesting that this is important enough to be supported as a ready made node and included in the documentation.

Re: no way to extract RGBA channels from packed textures

PostPosted: Fri May 03, 2019 4:40 pm
by adamnerva
Please brainstorm this issue with the octane for unreal plugin developer. This is going to be a common issue between unity and unreal, and whatever node you create can be shared by both.

Re: no way to extract RGBA channels from packed textures

PostPosted: Tue May 07, 2019 1:29 pm
by ChrisHekman
adamnerva wrote:So it is possible for otoy to include an rgba channel splitter node that is available from the right click menu. Dont make your users open a text editor for such a basic function. I appreciate the suggestion, but I was suggesting that this is important enough to be supported as a ready made node and included in the documentation.


It is possible to create an OSL node to do this yes. OSL is a different system than the standard Octane texture nodes. Which is why I made the suggestion.

That said, I agree with you, and have requested the same addition a while ago myself, but not much came of it.
Adding a new inbuilt octane node that does rgb channel masking is an octane feature request. Please do add a request for it here:
viewforum.php?f=9