Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / HOW To : Tile a matrix??

Author
Message
CuCuMBeR
21
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 20th Jan 2003 13:03
well maybe im asking too much of these how to's, but i really cant do it myself even i try alot. i made a heightmap and made a matrix which looks like there are many square buildings around.
now i want to texture the parts which are higher than 0 with a window texture, and the parts which are absolutely 0 are supposed to be textured with a grass texture..
help
indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 20th Jan 2003 14:58
if u placed cubes around the place as your buildings then u could activate the transparency flag in the set object command.
make the windows all one colour jet black

if your building walls are part of the matrix then
I think that feature is in the matrix also but not sure

indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 20th Jan 2003 15:04
and to answer the tiling part.
u could make two for loops
psuedo code as matrix is assumed created in mtx num 1

for z = 0 to 3
for x = 0 to 3
set matrix tile 1,x,z,rnd(3)+1
next x
next z

update matrix 1

if u had made a matrix and prepared the matrix texture to have a 3x3 area then the above peice of code would randomly plot a tile number for reference into that position.

the graphics required for the tiles are a combinations of all the rotations and angles for two or more distinct patterns.

this tileplate solves a lot of hassles as it allows u to start setting up raw colour and provides all the rotations required for a 4x4 tileset or 16 tiles.

IT also leaves 2 tiles spare if u want to use them for specials or extra master plate tiles which are the ones with full texture and no transition of anysort.



if u types set matrix tile into dbclassic or dbpro and pressed F1 it will show u the uasge and instructions.



SET MATRIX TILE
This command will texture an individual grid square with an image specified by the tile number. Only if the
matrix has been prepared with a texture will this command work. The tile number equates to a portion of
graphic within the sectioned image you used to prepare the matrix texture. If you had prepared a matrix
texture with four segmented images, you would reference these images as tile numbers from 1 to 4. The
parameters should be integer values.

SYNTAX
SET MATRIX TILE Matrix Number, TileX, TileZ, Tile Number

Login to post a reply

Server time is: 2024-05-20 05:39:19
Your offset time is: 2024-05-20 05:39:19