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.

DarkBASIC Professional Discussion / Texture tiling a Matrix,..set matrix texture (has a mind of its own)

Author
Message
DcZee
22
Years of Service
User Offline
Joined: 28th Apr 2003
Location:
Posted: 29th Jan 2004 18:49
Im doing it,..texturing the matrix no problem,..but my question concerns how each matrix tile gets textured. According to the manual we hae three methods that can be chosen on "how" our texture map should be applied to the matrix tile.

command = "set matrix texture"

0. Repeat the texture over the surface of the tile
1. Mirror the texture to create a seemless texture over the tile
2. Lay the texture down and take the edge color (if it doesnt fit the matrix tile) and use that edge color to finish painting the matrix tile that wasnt covered by the original texture

Cool,..but,..none of those work. Instead, the texture map is "Stretched" to fit the matrix tile size. On large matrix tile sizes the poor little texture is stretched so much that it pixelates the surface like crazy,..kind of like zooming way in on a texturemap. Thats cool, it has its uses and I wouldnt want to lose that feature but,..its not even listed in the documentation. Like it could be setting number 3. "Stretch texturemap to fit the matrix tile"

Anyhow I sent a message to DBPro support about it, they have a cue a mile long...is there something im missing or is this actually how this function works?

The problem with not being able to select "Tile texture map across matrix tile" is that it causes a resolution problem with terrain mapped surfaces. Stretching a 256x256 texture map on a large matrix tile causes blockiness big time, when instead the texture map should have been repeated over and over again to fill the space occupied by the target matrix tile. Going larger than 256x256 for a texturemap becomes memory intensive. In order to make the texture look good when stretched it would have to at least be as large as the screen display you are using, 800x600 or 1024 x 768,..or u could fly way above the landscape and never get close enough to it to see the blockiness.

Which brings me to the next question:

Does anyone know how to generate mipmapped textures or does the system do that automatically if u specify it in the texture command?
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 29th Jan 2004 19:20
I have never got those tiling options to work either with matrices.

So long as the image you load for texture map does not have the ,1 on the end which usually disables the mipmapping then it should be ok.

The 'filter' flag on the SET MATRIX command mainly controls the mipmapping of a matrix.

0 = blocky and looks rubbish - specially hills in the distance
1 = blocky but smooths with distance + no horrid lines between tiles
2 = proper smoothing but get lines between tiles. SET MATRIX TRIM can be used to reduce the lines but then the textures dont tile properly.

I still think the matrix commands could do with improving to fix all these oddities which is why a lot of users are moving over to mesh based and .x type matrices. These give you far more control over the looks but are not for the beginner.

Boo!
DcZee
22
Years of Service
User Offline
Joined: 28th Apr 2003
Location:
Posted: 29th Jan 2004 19:34
Thanks spooky,..that really helps a lot. Im thinking now that perhaps most of the commands in dbpro are "what we would liek them to be " commands, they are functional in that they work but they dont work necessarily the way they would like them to finally work. I cant imagine, with a cue of 300 to 500 messages that they ever get much time to actually complete dbpro. However, with forums like this it sure helps to do the work arounds.

Yes,..I can see why going to meshes and .x maps would help because then you could actually tile map the texture onto the matrix. I like the matrix, its easy to use and hopefully the next upgrade might address some of these problems with texturing. As it is I have some work arounds for the stretch effect that seem to work nicely.

I did not know that "filter" = "mipmap", so funny,..wish they would use the right term sometimes or at least put the common term in brackets(mind u filter is probably the right term), but its great to know what they are referring to,..thanks!
Debbie McDowell
21
Years of Service
User Offline
Joined: 14th Oct 2003
Location: Florida
Posted: 30th Jan 2004 06:57 Edited at: 30th Jan 2004 07:09
The best you can do in size is 25000,25000,70,70
before your textures will begin to distort to undesirable
visual quality.
Here I refer single image on a 256 x 256 size bmp

This forces you into using the shift matric command
in order to have a larger map.
I do not like these limitations but must live with it.

I use a 768 x 768 bmp with 9 images sized at 256 x 256
You can go smaller then 256 x 256 and have more or you
can go bigger than 768 x 768.
The biggest single image in that bmp is 256

Go here to see an example
http://www.geocities.com/pakratgames/examples2

The hard part is obtaining good seamless textures and then arranging
them to stay as seamless textures when assigned to the matrix.


email me if you need more help. I have some good examples and an example program which I made in order to teach this to a team member. I made images with instructions on them.

It is not easy but not impossible after you understand it.

[email protected]

Login to post a reply

Server time is: 2025-06-12 10:53:25
Your offset time is: 2025-06-12 10:53:25