au3Irr2 Function Reference
_IrrScaleTextureSpecifies the scaling of a terrain object detail texture
#Include <au3Irrlicht2.au3>
_IrrScaleTexture($h_Terrain, $f_X, $f_Y)
Parameters
$h_Terrain | Handle of a terrain object |
$f_X, $f_Y | Scaling values for detail texture along x and y axis |
Return Value
success: TrueFailure: False
Remarks
As a terrain object is a particularly huge mesh when textures are applied to it they look extremely pixelated.To get over this effect a terrain object can have two materials applied to it, one to give general surface color and a second that is copied across the surface like tiles to give a rough detailed texture.
This call specifies the scaling of this detail texture.
Related
_IrrAddTerrain
Example
#include "au3Irrlicht2.au3"
_IrrStart()
local $nodeTerrain = _IrrAddTerrain( "./media/terrain-heightmap.bmp" )
_IrrSetNodeScale( $nodeTerrain, 40.0, 4.4, 40.0 )
_IrrSetNodeMaterialTexture( $nodeTerrain, _IrrGetTexture( "./media/terrain-texture.jpg" ), 0 )
_IrrSetNodeMaterialTexture( $nodeTerrain, _IrrGetTexture( "./media/detailmap3.jpg" ), 1 )
_IrrScaleTexture( $nodeTerrain, 1.0, 60.0 )
_IrrSetNodeMaterialFlag( $nodeTerrain, $IRR_EMF_LIGHTING, $IRR_OFF )
_IrrSetNodeMaterialType ( $nodeTerrain, $IRR_EMT_DETAIL_MAP )
local $nodeCamera = _IrrAddFPSCamera()
_IrrSetNodePosition( $nodeCamera, 3942.8, 1102.7, 5113.9 )
_IrrSetCameraClipDistance( $nodeCamera, 12000 )
WHILE _IrrRunning()
_IrrBeginScene( 240, 255, 255 )
_IrrDrawScene()
_IrrEndScene()
WEND
_IrrStop()