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 would I get differnt types of terrain into a matrix

Author
Message
ChronicFear
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 17th Dec 2002 06:40
Hey, im relatively new to DB, I have followed the tutorials, and I understand most of the commands, but, I need help with a little something. I can make a matrix, and, texture it. But, what if I wanted to run a river through it or sumtin? How would I do that? What would the code be for using a different texture at different spots?
Your suffering cause of me its divine
-Korn-
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 17th Dec 2002 23:55
Don't worry, this isnt too complicated. Lets say you want to use 2 textures, both 256x256 in size (they have to be the same size). Using any kind of graphics program, put them side by side. Your combined image should now be 512x256 pixels in size. Now you set up your matrix as usual.
now use "prepare matrix texture 1,256,2,1"
i.e Matrix 1, both textures are 256x256, there are 2 horizontally and 1 vertically.
Your first texture will be tile 1, the second tile 2.
Now, say you wanted a part of the matrix from x-position 10, to z-position 30 to be textured with tile 2, you would use:
set matrix tile 1,10,20,2.
then update the matrix as usual.

If I have time tomorrow, I will create a sample prog and post the link on this forum.

Whatever I did I didn't do it!

Login to post a reply

Server time is: 2024-11-23 17:56:36
Your offset time is: 2024-11-23 17:56:36