User Tools

Site Tools


gamedev:textureproperties:texcoord_scale

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
gamedev:textureproperties:texcoord_scale [2019/05/09 08:39] – removed dragonlordgamedev:textureproperties:texcoord_scale [2019/05/09 08:39] – created dragonlord
Line 1: Line 1:
 +{{tag>graphic skin texture}}
 +<WRAP youarehere>
 +[[:start|Start Page]] >> [[gamedev:main|Game Development with the Drag[en]gine]] >> [[gamedev:skinproperties|Skin Texture Properties]] >> [[gamedev:texturepropertylist|Texture Property Database]] >> **texcoord.scale**
 +</WRAP>
  
 +====== Skin Texture Property: texcoord.scale ======
 +
 +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/pebbles to have a comparable detail resolution. If we map both textures to a 1x1 meter quadrilateral the pebbles texture suddely is way too large compared to the rocks texture. For both textures to have the same sense of scale compared to other textures the pebbles texture has to be scaled down a lot compared to the rocks texture. This could be done in the [[gamedev:editors:world|World Editor]] but this is cumbersome and requires adjusting texture transformations all the time textures are changed. To solve this problem **texcoord.scale** can be used to define a pre-scaling to be applied to a texture before any other texture transformations are done.
 +
 +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 )
gamedev/textureproperties/texcoord_scale.txt · Last modified: 2019/05/24 23:43 by dragonlord