This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
gamedev:textureproperties:texcoord_scale [2019/05/08 20:12] – dragonlord | gamedev:textureproperties:texcoord_scale [2019/05/09 08:39] – removed dragonlord | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{tag> | ||
- | <WRAP youarehere> | ||
- | [[: | ||
- | </ | ||
- | <WRAP boxheader> | ||
- | ====== Summary ====== | ||
- | </ | ||
- | <WRAP boxcontent> | ||
- | |Texture Property Name|texcoord.scale| | ||
- | |Description|Defines the scaling for texture coordinates| | ||
- | |Excepted Data Source|3 component value| | ||
- | |Data Range|Greater than 0 for all components| | ||
- | |Default Value|(1, 1, 1)| | ||
- | |Affected Modules|Graphic| | ||
- | |Linked Properties|-| | ||
- | </ | ||
- | |||
- | ====== Description ====== | ||
- | The **texcoord.scale** texture property defines the scaling for texture coordinates. This texture property is useful to align individual materials of different detail scale. | ||
- | |||
- | To get an understanding of the problem imagine two textures. One contains a tiling rock image where the rocks all fit in your palm. The second texture has a tileable pebbles image where the pebbles are very small compared to the rocks of the first texture. Both textures are of the same size and contain a similar amount of rocks/ | ||
- | |||
- | The scaling has to be chosen to get the correct size of the elements on the texture if mapped 1-to-1 on a 1x1 meter quadrilateral. If done correctly artists can only swap materials while creating maps without having to worry about texture scale differences. Furthermore their custom texture transformations still work correctly. If a texture artists wishes to scale a material up by the factor of two this works correctly with the **texcoord.scale** texture property producing in all cases a texture mapped at double the standard size no matter what the real size of the elements on the textures are. | ||
- | |||
- | The source is typically a 2 or 3 component value with all components greater than 0. The red component (component 1) defines the scaling in the U texture direction while the green component (component 2) defines the scaling in the V texture direction. If a 3D texture is used (image with depth larger than 1) the blue component (component 3) defines the scaling in the W texture direction. | ||
- | |||
- | The default value for this texture property is (1, 1, 1). | ||
- | |||
- | ====== Examples ====== | ||
- | ( TODO: example image ) |