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 / prepare matrix texture probs

Author
Message
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 16th Aug 2004 04:15 Edited at: 16th Aug 2004 04:17
im just wondering if theres a trick to making the tiles for the prepare matrix texture command

my image is 128 x 128 with 4 tiles on it
the problem is that when i tile the matrix, the tiles arent being separated properly, theres a line on each of them from the tile beside it

ex:
this is the tile
+--------+
|________ |
|________ |
|________ |
+--------+
the b's indicate the part where the texture has cropped part of the next tile
+--------+
|b_______ |
|b_______ |
|b_______ |
+--------+
so the end effect is that the matrix looks wireframed like so
+--------++--------+
|b_______||b_______|
|b_______||b_______|
|b_______||b_______|
+--------++--------+
+--------++--------+
|b_______||b_______|
|b_______||b_______|
|b_______||b_______|
+--------++--------+
+--------++--------+
|b_______||b_______|
|b_______||b_______|
|b_______||b_______|
+--------++--------+
EDIT: the underscores ('_') are just because the forum doesnt like spaces

etc...

thanks for the help, the code for my prepare matrix texture command is as follows:

load image tName$, 32, 0
if image exist(32) = 0 then exitfunction -3
prepare matrix texture matrixno, 32, 2, 2
Dodo
20
Years of Service
User Offline
Joined: 8th Aug 2004
Location: eating lunch
Posted: 16th Aug 2004 05:34
yeah i had that problem too, but then i edited the texture with paint(i don't have much fancy software) and it worked just fine. just make each texture as a 64X64 tile, copy it and then paste them onto a blank 128X128 background in paint. you can then move them into the right positions very easily
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 16th Aug 2004 14:04 Edited at: 16th Aug 2004 14:11
hmm thats what i did...
ill try it again
thanks man

EDIT: ... still doing it
any ideas?
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 16th Aug 2004 14:16
i tried splitting a 2x2 image into 4 sections and it was still overlapping... i dont get it
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 17th Aug 2004 00:25 Edited at: 17th Aug 2004 00:32
yet another problem... in order for the texture to actually appear on the matrix, i need to paste it to the screen first


if i dont do this the texture shows up as a bunch of ascii characters... this is frustrating...

EDIT: heres a screenshot of the problem
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 17th Aug 2004 06:16
nobody else has ever seen this before?
Dodo
20
Years of Service
User Offline
Joined: 8th Aug 2004
Location: eating lunch
Posted: 17th Aug 2004 06:27
nope. are you updating the matrix after applying the texture?
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 17th Aug 2004 07:38
indeed i am, heres my function for ya
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 17th Aug 2004 07:44 Edited at: 17th Aug 2004 07:48
it looks to me like its grabbing some random section of memory to tile the matrix because of the irregular symbols and non printing characters, but i havent looked to see if they are in the right sequence...

EDIT: like i mentioned before, if i put a paste image command before i start tiling then the textures show up ok

the problem with this is that it will crash randomly if i leave the paste command in...
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 17th Aug 2004 07:59 Edited at: 17th Aug 2004 08:01
[Edit] Opps, forget what I said...

Any truly great code should be indisguishable from magic.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 17th Aug 2004 09:18
Here is how you should create a matrix with a 2x2 texture. To get rid of ugly seams you should set 'filter' value of SET MATRIX command to 1. This does no smoothing though but you don't get the horrid lines.

Run this code and it starts in horrid line mode. Press SPACE and see what happens!



If you want to keep the smoothing, then replace code inside spacekey condition with this:



This uses a newish command to trim the leaking edges from your tiled texture. This allows you to keep the nice smoothing but you will lose any absolutely seamless tiling. The numbers on SET MATRIX TRIM command have to be tinkered with a fair bit to get any sort of desirable effect. Personally I think it is a waste of time.


Boo!
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 17th Aug 2004 09:23
yea the problem im having mostly is the fact that my texture is showing up as those ascii characters...

i cant figure it out

for the seamless part i will try that once i can put any kind of texture on the matrix
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 17th Aug 2004 09:33
Without seeing a runnable code snippet with supplied media to see what is going on it makes life more difficult. My first impression was that it is not a good idea to delete any images you are using as matrix textures as they may need to stay loaded. Try removing the DELETE IMAGE commands and see what happens.


Boo!
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 17th Aug 2004 09:48
sweet dude good call
sorry about the lack of media i thought it was something stupid and i was right
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 17th Aug 2004 09:55
next prob is i have another matrix, and everything works ok except when i call ghost matrix on matrixno, the whole thing disappears
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 17th Aug 2004 10:00
Getting late now. 1am here in UK. Got to get up early for work!

I believe you need to tinker with SET MATRIX PRIORITY command. Possibly setting both matrices to priority of 1

I'll catch up with this thread in morning.

zzzZZZZzzz


Boo!
matt rochon
21
Years of Service
User Offline
Joined: 15th Mar 2003
Location: Canada
Posted: 17th Aug 2004 10:03
thanks dude have a good night

Login to post a reply

Server time is: 2024-11-27 06:35:58
Your offset time is: 2024-11-27 06:35:58