Community
Arnold General Rendering Forum
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

AiTextureHandleAccess RGB and alpha

3 ANTWORTEN 3
Antworten
Nachricht 1 von 4
Anonymous
600 Aufrufe, 3 Antworten

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)
Beschriftungen (2)
3 ANTWORTEN 3
Nachricht 2 von 4
Mike_Farnsworth
als Antwort auf: 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?

Nachricht 3 von 4
Anonymous
als Antwort auf: 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

Nachricht 4 von 4
Anonymous
als Antwort auf: 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

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report