13.01.2013 Views

Hands On DarkBASIC Pro - Digital Skills

Hands On DarkBASIC Pro - Digital Skills

Hands On DarkBASIC Pro - Digital Skills

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

LISTING-32.10<br />

(continued)<br />

Using the SET OBJECT<br />

FILTER Statement<br />

Summary<br />

REM *** Moves spheres ***<br />

FOR z = 1 TO 4000<br />

MOVE OBJECT 1,1<br />

MOVE OBJECT 2,1<br />

MOVE OBJECT 3,1<br />

WAIT 10<br />

NEXT z<br />

REM *** End program ***<br />

WAIT KEY<br />

END<br />

Activity 32.19<br />

Type in and test the program given above (texture10.dbpro).<br />

� Texturing involves mapping an image onto the surface of a 3D object.<br />

� Use LOAD IMAGE to load any image which is to be used to texture a 3D object.<br />

� Use TEXTURE OBJECT to map an image to an object.<br />

� Images stretch automatically to fit the surface of an object.<br />

� <strong>On</strong> a cube or box the image is repeated on each face.<br />

� <strong>On</strong> other 3D objects, the image appears only once.<br />

� Mipmaps are smaller versions of the original image which are used to speed up<br />

mapping when a textured object becomes much smaller than the original image.<br />

� Tiling is the application of an image multiple times to the same surface.<br />

� Use SCALE OBJECT TEXTURE to create a tiled texture.<br />

� To create a seamless tile, make sure the opposite edges are complementary.<br />

� Use PLAY ANIMATION TO IMAGE and TEXTURE OBJECT to display a<br />

video on the surface of an object.<br />

� Use SET OBJECT TEXTURE to specify how an image is mapped to a surface.<br />

� Use SCROLL OBJECT TEXTURE to create an offset mapping of the image on<br />

a 3D surface.<br />

� Use SET OBJECT TRANSPARENCY to make black areas of a 3D object<br />

disappear.<br />

� Use SET DETAIL MAPPING ON to apply a second image to an already textured<br />

object.<br />

� Use SET OBJECT FILTER to modify how an image is filtered when being<br />

mapped onto an object.<br />

814 <strong>DarkBASIC</strong> <strong>Pro</strong>: Texturing

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!