Community
Arnold General Rendering Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AiTextureHandleAccess RGB and alpha

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
380 Views, 3 Replies

AiTextureHandleAccess RGB and alpha

Hi

I'm reading a rgba texture with AiTextureHandleAccess.

It seems like .rgb() values are affected by the alpha channel (rgb * a). Is this expected?

Mtoa 2.0.2

Thanks

AtTextureHandle* textureHandle = AiTextureHandleCreate(texture_path);<br>AtRGBA textureSample = AiTextureHandleAccess(sg, textureHandle, &textureParams, &textureSampleSuccess);<br>sg->out.RGB = textureSample.rgb();
Tags (2)
Labels (2)
3 REPLIES 3
Message 2 of 4
Mike_Farnsworth
in reply to: Anonymous

I would only expect this to happen for textures that are sourced from data that expects premultiplied alpha (such as PNG, I believe). If sampling directly from PNG, or converting to TX from PNG, you might end up with that situation. Have you tried a TIFF source, and then turn that into TX to see if the alpha stays indepdendent?

Message 3 of 4
Anonymous
in reply to: Mike_Farnsworth

render-box-textures.zip

Hi

Source is tiff, tx command looks like this:

maketx in.tiff --nchannels 4 -d float -v --unpremult -o out.tx

I've attached tiff and tx

Thank you

Message 4 of 4
Anonymous
in reply to: Mike_Farnsworth

I was using maketx from mtoa 1.4.2.2, when using the one from 2.0.1.1 and the tx comes out right.

Feel free to rename the title of this post... false alarm

Thanks

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report