Cube Image (RealityKit)
A texturecube with RealityKit properties.
Overview
Adjustable level of detail. Input image must be in KTX file format
Parameter Types
Parameter descriptions
FileThe image file to use for the texture.
U Wrap ModeThe way the node handles U values outside of the range of
0-1. The default value isclamp_to_edge.V Wrap ModeThe way the node handles V values outside of the range of
0-1. The default value isclamp_to_edge.Border ColorA color that fills in areas of a material’s surface not covered by the material property’s image contents. The default value is
transparent_black.Mag FilterThe magnification filtering mode the node uses to render the image contents at a size larger than the original image. For example, the texture coordinates at a point near the camera may correspond to a small fraction of a pixel in the texture image. This node uses the
Mag Filterto determine the color of the sampled texel at that point. The default value islinear.Min FilterThe minimizing filtering mode the node uses to render the image contents at a size smaller than the original image. For example, the texture coordinates at a point far from the camera may correspond to an area of several pixels in the texture image. This node uses the
Min Filterto determine the color of the sampled texel at that point. The default value islinear.Mip FilterThe mipmap filtering mode the node uses when rendering the image contents using mipmapping. Useful when rendering an image at a size smaller than the original image. If the value of this parameter is
None, the node won’t use mipmapping. The default value islinear.Max AnisotropyThe amount of anisotropic texture filtering applied when rendering the texture’s image contents. Used when rendering the image contents at an extreme angle relative to the camera. Only use this parameter with mipmapping, so it only has an effect if
Mip Filterisn’tNone. The default value is1.Max Lod ClampThe maximum level of detail allowed for the rendered image contents. As an object gets closer to the camera, the level of detail used to render the texture of that object increases up to the maximum defined by this parameter. The default value is
65504.Min Lod ClampThe minimum level of detail allowed for the rendered image contents. As an object gets farther from the camera, the level of detail used to render the texture of that object decreases to the minimum defined by this parameter. The default value is
0.DefaultThe default value to use if the
Fileparameter fails to resolve.Texture CoordinatesThe 2D coordinate at which the data is read to map the texture onto a surface. The default is the current UV coordinates, in which U is the horizontal axis and V is the vertical axis.
BiasThe bias for the level of detail of the rendered image contents. When the size of the rendered texture is between two LOD (level of detail) levels, this parameter weights the choice of which level the renderer uses toward either the more detailed level or the less detailed level. When the value is between
0and1, the node favors less detail. If the value is greater than1, the node favors more detail. The default value is0.Dynamic Min Lod ClampThe minimum level of detail allowed for the rendered image contents. Similar to the
Min Lod Clampparameter, except you can change this parameter dynamically during runtime.OffsetThe integer values added to the texture coordinates before looking up each pixel. The value must be within the range
-8-7. The default value is0.
Discussion
The Cube Image node produces a texture using the contents of the image file specified in the File parameter. It has a variety of parameters that affect the properties of the rendered textures.
The possible values for the wrap mode parameters are:
clamp_to_borderThe node sets texture coordinates outside the normal range to the color specified by the
Border Colorparameter.clamp_to_edgeThe node clamps texture coordinates outside the normal range to the normal range. The node sets any values greater than
1to1, and any values less than0to0. This means the color’s on the edge of the image extend to fill the rest of the texture.clamp_to_zeroThe node sets texture coordinates outside the normal range to a color of value of
0or black. This is equivalent to theclamp_to_borderoption with a border color oftransparent_black.mirrored_repeatThe node mirrors texture coordinates outside the normal range.
repeatThe node causes texture coordinates outside the normal range to “wrap around.” This behavior is equivalent to the node applying modulo 1 to the coordinates.
The possible values for Mag Filter and Min Filter are:
linearThe filter uses linear interpolation of the closest values to determine the rendered contents.
nearestThe filter uses the nearest value to determine the rendered contents.
The Mip Filter parameter has the same possible values, with the addition of the option to allow for the value of None, which specifies that it doesn’t use mipmapping. Below is an example of a node graph that uses the Cube Image Node to take a .ktx file and create a cube image texture:
[Image]
Below, the resulting texture applies to a cube:
[Image]
This example functions for all of the Cube Image nodes. The only difference is the various inputs used to modify how the cube image renders.
See Also
Nodes
Unlit Surface (RealityKit)PBR Surface (RealityKit)Occlusion Surface (RealityKit)Shadow Receiving Occlusion Surface (RealityKit)View Direction (RealityKit)Camera Position (RealityKit)Geometry Modifier Model To World (RealityKit)Geometry Modifier World To Model (RealityKit)Geometry Modifier Normal To World (RealityKit)Geometry Modifier Model To View (RealityKit)Geometry Modifier View To Projection (RealityKit)Geometry Modifier Projection To View (RealityKit)Geometry Modifier Vertex ID (RealityKit)Surface Model To World (RealityKit)Surface Model To View (RealityKit)