Hi all,
I'm trying to apply a small texture to a 3D-Object and have it repeat along it's width and length. I would have thought that the SetImageWrapU- and SetImageWrapV-commands could be used for this purpose, as long as a 2^n image is used. The code below and the attached image don't work however. (It's a 128x128 image, applied to a 256x256 plane). Can someone tell me where I'm amiss?
// Repeat 3D-texture Test
//
setvirtualresolution(640,480)
setsyncrate(60,0)
global Img as integer
global Obj as integer
global Ang# as float
Img = loadimage("ground_01.png")
SetImageWrapU(Img, 1)
SetImageWrapV(Img, 1)
Obj = CreateObjectPlane(256, 256)
SetObjectImage(Obj, Img, 0)
SetObjectPosition(Obj, 0, -200, 400)
Ang# = 1
do
RotateObjectLocalX(Obj, Ang#)
RotateObjectLocalY(Obj, Ang#)
Sync()
loop