Texture3D
Base volume-texture contract with width, height and depth.
Texture3D describes a data volume rather than a texture merely assigned to a 3D object. Use ImageTexture3D for generated pixels; an array of independent 2D layers has a different TextureLayered contract. The base constructor does not upload a volume.
GetDepth is the base-level slice count. With mipmaps, GetData also includes smaller levels, so Count need not equal depth. Readback format and cost depend on the implementation; not every subclass provides ready RGBA8 data.
For a custom subclass, implement dimension, format, mipmap and data hooks consistently. Native hook calls and placeholders were checked. This does not establish correct arbitrary-subclass shader sampling. Concrete ImageTexture3D persistence has a separate mipmap limitation when width and height are 1, documented on that class.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
Texture3DConstructor
public Texture3D();Creates a base resource rather than a ready volume texture containing data. Normally use ImageTexture3D or CompressedTexture3D. A custom subclass must implement dimensions, format and data methods; construction alone does not upload voxels.
Methods13
CreatePlaceholderResource
public Resource CreatePlaceholder();Creates a separate PlaceholderTexture3D with current width, height and depth. Voxel data and mipmap chain are not copied. This is a resource stand-in rather than a smaller volume copy.
ResourceResource whose concrete type is PlaceholderTexture3D, with original dimensions.
GetDataReckfell.Collections.Array<Image>
public Reckfell.Collections.Array<Image> GetData();Reads slices supplied by the implementation. For ImageTexture3D these are separate images read from GPU data: editing the result does not update the texture; use Update. With mipmaps the order is all base-level Z slices, then all slices of the next level, down to 1×1×1. Do not interpret the entire array as base layers or perform unnecessary per-frame readback. Initialize ImageTexture3D before reading it.
Reckfell.Collections.Array<Image>Image array in implementation order; for ImageTexture3D, ordered by level and Z slice.
GetDepthint
public int GetDepth();Returns base-level depth: its Z-slice count. With mipmaps, GetData.Count can exceed depth because it includes additional levels.
intBase-level Z-slice count.
GetFormatImage.Format
public Image.Format GetFormat();Returns the implementation Image.Format. Without a provider, the base Max result does not represent a usable data format. Check the concrete subclass and data before processing pixels.
Image.FormatFormat of the supplied image data.
GetHeightint
public int GetHeight();Returns base-level volume height in texels. A custom Texture3D supplies it through _GetHeight.
intBase-level height in texels.
GetWidthint
public int GetWidth();Returns base-level volume width in texels. A custom Texture3D supplies it through _GetWidth. It is neither slice count nor object world size.
intBase-level width in texels.
HasMipmapsbool
public bool HasMipmaps();Returns the implementation volume-mipmap flag. This does not mean each GetData Image has its own mipmaps: ImageTexture3D represents levels using separate slice images.
boolWhether the implementation supplies a volume mipmap chain.
_GetDataReckfell.Collections.Array<Image>
public virtual Reckfell.Collections.Array<Image> _GetData();Custom Texture3D slice-image array provider used by native GetData. The tested subclass creates independent images; other implementations can have different access costs and rules. Do not release returned resources before passing them to the caller.
Reckfell.Collections.Array<Image>Image array in implementation order; for ImageTexture3D, ordered by level and Z slice.
_GetDepthint
public virtual int _GetDepth();Custom Texture3D base-level Z-slice-count provider. Do not substitute the total image count across all mip levels for depth.
intBase-level Z-slice count.
_GetFormatImage.Format
public virtual Image.Format _GetFormat();Custom Texture3D concrete Image.Format provider. It must match _GetData; querying format does not convert images.
Image.FormatFormat of the supplied image data.
_GetHeightint
public virtual int _GetHeight();Custom Texture3D base-level height provider. Keep it consistent with supplied slice dimensions.
intBase-level height in texels.
_GetWidthint
public virtual int _GetWidth();Custom Texture3D base-level width provider. Return a value consistent with _GetData and other dimensions; it does not automatically allocate GPU storage.
intBase-level width in texels.
_HasMipmapsbool
public virtual bool _HasMipmaps();Custom Texture3D volume-mipmap flag provider. Keep it consistent with _GetData image ordering and count. Returning true alone does not generate levels.
boolWhether the implementation supplies a volume mipmap chain.