no way to extract RGBA channels from packed textures

Forums: no way to extract RGBA channels from packed textures
A public forum for discussing and asking questions about the Octane for Unity Alpha

Moderator: ChrisHekman

no way to extract RGBA channels from packed textures

Postby adamnerva » Thu May 02, 2019 5:55 pm

adamnerva Thu May 02, 2019 5:55 pm
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.
adamnerva
Licensed Customer
Licensed Customer
 
Posts: 112
Joined: Mon Apr 27, 2015 9:01 pm

Re: no way to extract RGBA channels from packed textures

Postby ChrisHekman » Fri May 03, 2019 1:35 pm

ChrisHekman Fri May 03, 2019 1:35 pm
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
ChrisHekman
OctaneRender Team
OctaneRender Team
 
Posts: 968
Joined: Wed Jan 18, 2017 3:09 pm

Re: no way to extract RGBA channels from packed textures

Postby adamnerva » Fri May 03, 2019 4:13 pm

adamnerva Fri May 03, 2019 4:13 pm
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.
adamnerva
Licensed Customer
Licensed Customer
 
Posts: 112
Joined: Mon Apr 27, 2015 9:01 pm

Re: no way to extract RGBA channels from packed textures

Postby adamnerva » Fri May 03, 2019 4:40 pm

adamnerva Fri May 03, 2019 4:40 pm
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.
adamnerva
Licensed Customer
Licensed Customer
 
Posts: 112
Joined: Mon Apr 27, 2015 9:01 pm

Re: no way to extract RGBA channels from packed textures

Postby ChrisHekman » Tue May 07, 2019 1:29 pm

ChrisHekman Tue May 07, 2019 1:29 pm
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
ChrisHekman
OctaneRender Team
OctaneRender Team
 
Posts: 968
Joined: Wed Jan 18, 2017 3:09 pm

Return to Octane for Unity


Who is online

Users browsing this forum: No registered users and 6 guests

Thu Mar 28, 2024 5:23 pm [ UTC ]