tileUV operation

Syntax

tileUV(uvSet, textureWidth, textureHeight)

Parameters

Description

The tileUV operation rescales the texture coordinates of the selected uv-set such that the uv space gets tiled with tiles of a given width and height. The textureWidth and textureHeight parameters support usage of the floating and relative operators to avoid complex calculations with the texture space dimension. For example, if the parameter textureWidth is set to ~20, the projection matrix is initialized such that the surface of the current shape's geometry is exactly spanned with texture tiles of approximately size 20 along the u direction. Or if the paramter textureHeight is set to ’0.5, the texture will be repeated twice along the height.

Related

Examples

Street Tiling


Street shape


A multi-face street shape.

Street shape

Street-->
	texture("builtin:uvtest.png")
    		
The default texture coordinates.

Street shape
Street-->
	texture("builtin:uvtest.png")
	tileUV(0, 20, 10)
    		
The tiled texture coordinates. The tile width (in u-direction) is exactly 20 meters and the tile height is exaclty 10 meters. Some tiles are cut.

Street shape
Street-->
	texture("builtin:uvtest.png")
	tileUV(0, ~20, '0.5)
    		
Usage of the ~ and ' operators. The tile width is roughly 20 meters, such that the whole available space is exactly filled, and the tile height is half of the available space sucht that exaclty two tiles fit in.

Copyright ©2008-2024 Esri R&D Center Zurich. All rights reserved.