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 / matrix heights

Author
Message
muscles
20
Years of Service
User Offline
Joined: 12th Apr 2004
Location:
Posted: 13th Apr 2004 00:34
i am working on rendering an environment that uses multiple matrices. as you move across the environment, i use the "get ground height" command to reposition the camera (its in first person perspective) above the matrix so there is an effect of following the terrain. however, when i move from one matrix to the next, it stops getting the ground height and defaults to my preset variable value of zero. what's wrong? (I already made sure I had the right matrix numbers for the get ground height command)
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 13th Apr 2004 02:43
The ground height commands use positions relative to where matrix is positioned and not the world 0,0,0 coordinate.

So if matrix 1 is at 0,0,0 and matrix 2 is at 1000,0,0 then to get ground heights of matrix 2

h#=get ground height(2,x#-matrix position x(2),z#-matrix position z(2))

So basically deduct matrix postiion x from desired x coord and same with z coord

Boo!
muscles
20
Years of Service
User Offline
Joined: 12th Apr 2004
Location:
Posted: 13th Apr 2004 20:44
very much obliged
muscles
20
Years of Service
User Offline
Joined: 12th Apr 2004
Location:
Posted: 13th Apr 2004 20:48
i have another question: i'm using the "shift matrix" command to move a transparent matrix to create a water effect. is there anyway to control the speed at which the matrix shifts? i can't figure out one and was wondering why the command didn't have two parameters or something.
another problem i'm having is with texturing my matrices. i want to put multiple bitmaps on the same matrix so that I can use one matrix to slowly shift from a "grass" texture to a "dirt" texture smoothly. but everytime i use the "set matrix tile command", it just paints the whole matrix with one texture. any ideas?
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 14th Apr 2004 00:43
'shift matrix' shifts the entire matrix 1square in the direction you specify each time you call the function. If you've got your sync rate set to 60 this means the matrix will be shifted across 60 times a second. you could control this with a timer i suppose, but there are better ways of making a water effect.

In the beginning, the universe was created...
This made alot of people very angry and it has been widely regarded as a bad idea...
Visit http://redeye.dbspot.com
muscles
20
Years of Service
User Offline
Joined: 12th Apr 2004
Location:
Posted: 14th Apr 2004 00:49
not to smack a gift horse in the mouth (thanks very much), but could you maybe expound on a better method for rendering flowing water? (instead of merely alluding to that there is one)

Login to post a reply

Server time is: 2024-11-26 12:25:25
Your offset time is: 2024-11-26 12:25:25