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.

Author
Message
Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 8th May 2003 23:58
ok I made a matrix but I have one problem, when I texture it theres no real definition to it. Every part of the matrix gets the same amount of light, so if I texture it one solid color it just looks like a solid blob. How do I give it definition so I can texure it a single color but be able to see the grooves between hills,etc.
Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 9th May 2003 00:21
Ok I just figured out you have to use normals to do this, but I have no idea how to use them, can anyone help me? Thank you.

Yarbles
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Toronto
Posted: 9th May 2003 06:38 Edited at: 9th May 2003 06:43
Here is a code snippet for setting normals. It assumes that you have an array for your height values called land(x,x):



The Yellow Jester does not play but gently pulls the strings
And smiles as the puppets dance in the court of the Crimson King.
Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 9th May 2003 06:44
What is step#?

Yarbles
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Toronto
Posted: 9th May 2003 06:45
It's a constant that you set to whatever you want

The Yellow Jester does not play but gently pulls the strings
And smiles as the puppets dance in the court of the Crimson King.
Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 9th May 2003 07:05
hmmm Ok, I think I used that code correctly, I've attatched my code but I still get the same visual results. Can you have a look at my code to see if I did something wrong? Thank you.

Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 9th May 2003 07:06
AHA! Had update matrix in the wrong spot

Yarbles
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Toronto
Posted: 9th May 2003 07:23
hehe.. I was just about to tell you that

The Yellow Jester does not play but gently pulls the strings
And smiles as the puppets dance in the court of the Crimson King.
Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 9th May 2003 08:30
lol, nice. thanks a lot for the help...heres my main loop, if I hit l once it turns the light off, but if I hit it again it doesnt turn it back on but I cant figure out why:

do
set cursor 1,1
print screen fps()
print "X: "; camera position x()
print "Y: "; camera position y()
print "Z: "; camera position z()
print "L to toggle light on/off"
control camera using arrowkeys 0,1,1
if inkey$()="l" OR inkey$()="L"
if lstate = 0 then show light 1 : lstate = 1
if lstate = 1 then hide light 1 : lstate = 0
endif
position light 1,mousex(),100,mousey()
position object 1,mousex(),100,mousey()
fastsync
loop

Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 9th May 2003 10:22 Edited at: 10th May 2003 00:22
Also, I wanted to make a light revolve around the matrix like a sun, so I was able to do that, however it seems that even when the light is below the matrix it lights up the top of it, how can I make it so this doesnt happen? Thanks.

Ok, Im trying to disect the code for setting the matrix normals and Im still really confused. Maybe I would understand if I new what exactly a normal was. set matrix normal 1,x,z,nx#,ny#,nz# - what does nx#,ny#,and nz# do? I actually dont understand the entire matrix normal snippet posted above, can anyone help?

Login to post a reply

Server time is: 2026-07-11 10:25:02
Your offset time is: 2026-07-11 10:25:02