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 / one simple matrix problem

Author
Message
Zotoast
19
Years of Service
User Offline
Joined: 24th Oct 2004
Location: southside of mt everest,its warmer there
Posted: 15th Dec 2004 02:14
Hey, just quickly, does anyone know how to find out what height each tile is (Im trying to texture higher parts of the matrix with rock and the lower with grass) Any one got any ideas?

"Well, if he dies it'll teach him not to do it again." - Me
Cookyzue
20
Years of Service
User Offline
Joined: 12th Oct 2003
Location: Who Cares?!
Posted: 15th Dec 2004 09:35
This should work:



note; im not sure if you need to put update matrix or not at the end.


Current Project: Goonder Mania
MCK Games
Zotoast
19
Years of Service
User Offline
Joined: 24th Oct 2004
Location: southside of mt everest,its warmer there
Posted: 16th Dec 2004 06:06
doesnt work

"Well, if he dies it'll teach him not to do it again." - Me
Zotoast
19
Years of Service
User Offline
Joined: 24th Oct 2004
Location: southside of mt everest,its warmer there
Posted: 16th Dec 2004 07:20
i think ud need to work out the height of each tile and then texture certain tiles but i have no idea how to do that

"Well, if he dies it'll teach him not to do it again." - Me
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 16th Dec 2004 07:34
GET GROUND HEIGHT is command you need to use. Try this:



Boo!
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 16th Dec 2004 07:36
GET MATRIX HEIGHT is supposed to get height of a particular tile but it doesn't work very well as I have just found out. Just use GET GROUND HEIGHT and use the co-ordinates at the centre of each tile. My example above shows you the calculations you need.

Boo!
Zotoast
19
Years of Service
User Offline
Joined: 24th Oct 2004
Location: southside of mt everest,its warmer there
Posted: 17th Dec 2004 00:56
well how does that explain how to texture tile say higher than 100 in a rock texture and the ones below in grass?

"Well, if he dies it'll teach him not to do it again." - Me
Zotoast
19
Years of Service
User Offline
Joined: 24th Oct 2004
Location: southside of mt everest,its warmer there
Posted: 17th Dec 2004 01:16
i think somehow i shud work out which tiles are heigher and which are lower........then texture these tiles

"Well, if he dies it'll teach him not to do it again." - Me
demons breath
20
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 17th Dec 2004 01:16
Use an array with values in for the heights then read the values out of the array when texturing... or something...



or somethin like that... not too sure...

Am I the only one here who's really confused?
Zotoast
19
Years of Service
User Offline
Joined: 24th Oct 2004
Location: southside of mt everest,its warmer there
Posted: 17th Dec 2004 01:47
i doint understand it, could you try it with a matrix and stuff, i could try myself, but i can work out which tiles are heigher than a certain point

"Well, if he dies it'll teach him not to do it again." - Me
demons breath
20
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 17th Dec 2004 02:05
ok ... it'll need some tweaking probably... but I think it's...



Am I the only one here who's really confused?
Zotoast
19
Years of Service
User Offline
Joined: 24th Oct 2004
Location: southside of mt everest,its warmer there
Posted: 17th Dec 2004 02:23
YES! YOUR THE MAN DEAMONSBREATH! (now you can look back at everyone and boast about how better you are) nah, only kidding, u all tried well

"Well, if he dies it'll teach him not to do it again." - Me
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 17th Dec 2004 05:11
If you don't want to use arrays and want to use whatever matrix you are currently using where heights are not stored anywhere you can use modified version of my code that you couldn't understand.

I tried to make my previous example easy to understand. The idea being to retrieve height at centre of any tile and then do what yo like with that height. My example simply stuck an object there to show you it working. All you had to do was use a bit of logic to texture the tile.

Glad to hear you are getting to grips with things anyway.



Boo!
Zotoast
19
Years of Service
User Offline
Joined: 24th Oct 2004
Location: southside of mt everest,its warmer there
Posted: 18th Dec 2004 01:25
its cool i understand it now

"Well, if he dies it'll teach him not to do it again." - Me

Login to post a reply

Server time is: 2024-09-23 07:25:05
Your offset time is: 2024-09-23 07:25:05