Syntax
- string imageApproxRatio(searchQuery, axesRatio, n)
Parameters
- searchQuery—stringSearch query to apply on list of all files in the workspace. See fileSearch for details about the syntax.
- axesRatio—string{ "xy" | "xz" | "yx" | "yz" | "zx" | "zy" }—Defines which scope axes ratio is used as a reference.
- n—floatNumber (integer >= 1) of textures to consider (one is randomly picked out of the n best textures.
Returns
Texture with one of the n best ratio matches (according to axesRatio).
Description
The imageApproxRatio function returns one of the n textures with the best ratio match, from the files specified by searchQuery, according to the specified combination of axes.
Note:
imageApproxRatio(searchQuery, axesRatio, 1) = imageBestRatio(searchQuery, axesRatio)
Related
Examples
Setting up texturing based on the best pixel ratio
| The goal is to set up the texturing, depending on the best pixel ratio of the list of desired textures. The following textures all have different resolutions. Note:Note the color variations in the next two examples by using only the "best ratio" (n = 1) and "choose randomly one of the best three ratios" (n = 3). |  | 
|  |  | 
|  |  |