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 do u have diffrent colors and textures on a single matrix?

Author
Message
mike !use to be check it out!
20
Years of Service
User Offline
Joined: 23rd Nov 2004
Location: Arizonia
Posted: 19th Dec 2004 10:50
I have tried every thing! and i can't get my single matrix to have more than one color and texture on it. i have tried that source code they have in DBC. but i don't understand how it works please help me with this ! thatnks and please make it depth.

Mike Smythe
Zotoast
20
Years of Service
User Offline
Joined: 24th Oct 2004
Location: southside of mt everest,its warmer there
Posted: 20th Dec 2004 04:23
use the command 'set matrix tile'

"Well, if he dies it'll teach him not to do it again." - Me
Cookyzue
21
Years of Service
User Offline
Joined: 12th Oct 2003
Location: Who Cares?!
Posted: 20th Dec 2004 06:01
Ok make a texture image, say 512 by 256. Then in db load the image, and after you make your matrix use
The numbers are as follows prepare matrix texture matrix#,textureimage#,acrossimages#,downimages#. Then you use set matrix tile matrix#,matrixxtile#,matrixztile#,texture tile#. For example, just run this code(youll have to make an image called texture).



Current Project: Goonder Mania
MCK Games
Dodo
20
Years of Service
User Offline
Joined: 8th Aug 2004
Location: eating lunch
Posted: 20th Dec 2004 06:24
in order to texture a matrix with more than one texture, you need to set up a texture previously, like the one I have attached. It can have as many textures on as you want, but they all need to be the same size.

After loading this texture into DB and creating a matrix to texture, you then have to call the command 'PREPARE MATRIX TEXTURE Matrix Number, Image Number, Across, Down'. what this command does is split up the texture into seperate texture, Across is how many across it is split into(2 in this example) and the Down is how many down it is split into(again, 2 in this example).

Then, to texture the matrix, you can use 'FILL MATRIX Matrix Number, Height, Tile Number' this sets every square in the matrix to the specified height and tile number. The tile number is a number given to the sections of the texture that DB split down into smaller textures. I have included some examples of this in the attatchment.

Alternatively, you can use 'SET MATRIX TILE Matrix Number, X, Z, Tile Number'. This textures the specified square with the specified tile number. This is the command I use in the example.

Finally, In DBPro you have to update the matrix using 'UPDATE MATRIX Matrix Number'. In DBC this isn't necessary, so you will have to take the update matrix from my code out for it to work properly in DBC.




Hope this helps

Part of solving the problem is actually noticing that the problem is there in the first place

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-27 16:48:19
Your offset time is: 2024-11-27 16:48:19