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 Discussion / does DB automatically scale down large matrix textures?

Author
Message
bugsquish
22
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 2nd Feb 2003 09:33
it seems that DBC halves the resolution of your prepared matrix texture if it is over a certain size. i cant find any documentation of this but its the only explanation i have based on trial/error

heres my problem:

i did this before with a 256x256 tile with 4 textures:

get image 1,0,0,256,256
prepare matrix texture 1,1,2,2

which worked fine...
i want to prepare a pretty large texture for my matrix. its a 2048,2432 bitmap with 304 texture tiles at 128x128 each. so i assumed this would work for my large file:

get image 5,0,0,2048,2432
prepare matrix texture 1,5,16,19

BUT! At a first glance it looks not bad but kind of smudged. turning off the texture smoothing reveals how pixellated it had become. I counted the pixels on a tile and it seems to now be 64x64 stretched. Worse still, it's more like 64.1 and the .1 is shaved off the next tile in the tileset creating unsightly lines.

Does DB attempt to halve the resolution of my large file? Is this a feature I can turn off? This along with the matrix polygon limits are useless to me. Is there some workaround both these limits? i am not quite ready to upgrade to DBP yet!

thanks
Lance
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 2nd Feb 2003 23:50
you might split your matrix in 4,which will divide your texture's x and y resolution in 2

freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 2nd Feb 2003 23:53
maybe you could also double the x and y resolution of your matrix (so there are still 64x64 pixels on a tile, but because there are more tiles the resolution of all tiles together will be higher), but this might not be very good because it will make the polygon count 4 times higher

bugsquish
22
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 2nd Feb 2003 23:53
hmm thats gonne be tricky (the tileset is generated by the terrain) but it just might work! thx m8
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 2nd Feb 2003 23:55
the tileset is generated by the terrain

what do you mean by this? maybe I don't understand this 'coz English isn't my native language, or maybe because I don't know what a tileset is

bugsquish
22
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 2nd Feb 2003 23:56
your second suggestion i tried already and got a polygon limit error. i was hoping to find a way round that limitation too, but it seems i can make 4 matrices without the error, so im gonna press on with ur first suggestion
bugsquish
22
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 2nd Feb 2003 23:58
by tileset i just mean the texture image thats prepared for the matrix. a set of texture tiles dunno if thats the right term but its what ive been calling it
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 3rd Feb 2003 00:02
What's the polygon count limit for DB?
I have no idea how many poly's you can use...
I once tried to make some program in which I'd be able to turn on/off objects, so you could see with how many objects (and how many polys) you still have a decent framerate. But it worked with all objects turned on (= 40.000 polys)

here's a screenshot of that scene (it was online already, so why not showing it I thought, sorry coz it's a bit off-topic)


bugsquish
22
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 3rd Feb 2003 00:27
it seems theres only a limit per matrix. try running this

make matrix 1,10000.0,10000.0,128,128

you will get a runtime error (matrix exceeds 10000 polygon limit)

but you can make 4 matrices at 64x64. im gonna try that for ur first suggestion. doesnt the camera view distance and the power of todays machines decrease the need to use less matrix polys anyhow?
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 3rd Feb 2003 00:35
that's quite stupid, such limitations, I don't like that...
but maybe there's some logical reason for it...

bugsquish
22
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 3rd Feb 2003 01:04
i believe it is the same reason as why the large textures are scaling down: DB is based on 1999 technology.

I really wish there was a option to turn these things off, or some kind of patch... The limitations are irrelevant by todays standards.

Looks like the only option is your first suggestion about using 4 smaller matrices & tilesets, which is next on my agenda.
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 3rd Feb 2003 01:22
I tested that 40k polys test program on a pc which we bought earlier than 1999... (16mb RAM on my video card), so I guess it's not because it's too heavy

maybe there's a limitation in directX 7.0 which is the reason for that 10k poly limit for matrixes... it's just a guess

bugsquish
22
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 3rd Feb 2003 01:40
yes, perhaps 10000 per object in general... it means there is a 70x70 limit on matrices... either way it looks like im stuck with it. i have been looking into the 4 smaller matrices idea. its gonna take days to update my damn script. i have done a helluva lot with this matrix....

time to get my hands dirty again methinks
minkus
22
Years of Service
User Offline
Joined: 18th Jan 2003
Location: My House
Posted: 3rd Feb 2003 01:53
actually, i think that directx didn't handle more than 10000 polygons per object back then-it isn't db

The World has no meaning - but gaming does!
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 3rd Feb 2003 02:00
bugsquish, if quality isn't too important, you just could scale down your texture size yourself...
what kind of project are you working at?

bugsquish
22
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 3rd Feb 2003 02:59
mr program, do you know if directx is also responsible for the unwanted texture scaling on my large matrix textures?

freak, quality is of the utmost importance thats why i am determined to get 128px per tile even if it means i have to recode my script for 4 matrices (im getting a headache just thinking about it ). being able to make a 128*128 matrix would solve all my problems cos the smaller tiles would suit 64px textures. im assuming theres no way round this direct x limitation though, so its gotta be 4 matrices, or upgrade or give up altogether. im broke and i aint a quitter

to be honest freak i havent really started a specific project. at the moment im building tools to help me rapidly develop environments for future projects (ie terrain/texture/object generation and placement). i guess its kinda lazy but at the same time im planning ahead. gonna release all my code for my tools eventually too
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 3rd Feb 2003 23:55
that might be a good solution to create a game rapidly; when you have developed some tools for level editing etc.

I don't have very much experience with making complete games, I didn't finish one... but I'm busy with a card playing game (this doesn't need a level editor...)

I wish you much succes with your matrices

bugsquish
22
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 4th Feb 2003 15:04
well using 4 matrices helps smash the polygon limit, but the lower resolution doesn't look much better on the smaller tiles. mostly cos the tiling effect is too much more obvious.
i tried ur suggestion of manually scaling down the textures, which looks slightly different but not much better.
its time to admit defeat i think, unless there is another solution i missed! i cant afford pro (nor do i really need it apart from this) so im gonna have to stick with the dodgy textures for now and hope i can draw atttention away from it with enough eye candy
oh well... thanks for ur input anyway. good luck with ur card game (i think i saw a picture on another thread). and maybe u can find a use for my code when it is finished
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 5th Feb 2003 01:12
there was indeed a picture on another thread, within about a week I'll have enough changed for some new screenshots

I wish you much succes with your project, let me know if it's finished, I'd like to test it

Login to post a reply

Server time is: 2025-08-08 11:44:52
Your offset time is: 2025-08-08 11:44:52