TextureToArray_v2 Op

TextureToArray

There is a newer version of this op!


This version will not receive any updates. It is recommended to use a newer version.

Current version: Ops.Gl.TextureToArray_v3

extract colors from a texture


<p>This op will take an incoming texture and convert each color pixel value to an Array 4 (RGBA). </p> <p>When using 32bit textures your array values will be in the range of 0.0-1.0. 8bit textures will have values of 0-255.</p> <p>Be careful with using high resolution textures. For example a texture of only 100x100 pixel will result in 40,000 values: Red 10,000 Green 10,000 Blue 10,000 Alpha 10,000</p>


Full Name
  • Ops.Gl.TextureToArray_v2
Visibility
  • Core Op - Official cables op
License
  • MIT
AuthorgithubTest Patches


Example Patch field / array unpack4 example

Open In Editor

Youtube Video Tutorial

INPUT PORTS


update (Trigger)

<p>Trigger the op</p>

texture (Object)

<p>texture in to turn into an array. Beware of high resolutions.</p>

Format index (Number:

<i>integer</i>

)
 RGBA  RGB  RG  R  G  B  A 
Force floats (Number:

<i>boolean</i>

)

<p>Force output of floats, when the texture is 8 bit and you don&#39;t want byte values (0-255)</p>

OUTPUT PORTS


trigger (Trigger)

<p>Trigger out</p>

Colors (Array)

<p>Outputs the RGBA arrays as one large array</p>

Floating Point (

<i>boolean</i>

Number)

<p>If HDR is enable on Image compose this will be true else false</p>

Num Pixel (Number)

Patches using TextureToArray_v2

  • Examples
  • Public
  • My Patches

Changelog


cloned op from Ops.Gl.Texture2ColorArrayuser avatarpandur - 2023-02-03 15:35
bugfixFix problem with floating point texturesuser avatarpandur - 2024-08-09 14:47
improvementAdd option to not always output floating point numbersuser avatarpandur - 2024-08-30 11:31
bugfixFix outputing wrong amount of valuesuser avatarpandur - 2024-09-04 07:57
renameOps.Gl.TextureToColorArray_v2 renamed to Ops.Gl.TextureToArray_v2user avatarpandur - 2024-10-30 08:30