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 / light does not affect the matrix

Author
Message
Cybermind
Valued Member
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 17th Mar 2004 23:25 Edited at: 17th Mar 2004 23:26
how do I make the light affect the matrix? it affects all other objects.

EDIT: I use magicworld, but the light is not made in MW, I code it in.
zane
21
Years of Service
User Offline
Joined: 23rd Feb 2004
Location: manchester, england
Posted: 17th Mar 2004 23:37
theres a command, "set matrix", or somthing like that. on of the parameters is how light affects the matrix. check the help file.

www.zaneproductions.tk - lots of games, no Dark basic ones though (yet)!
Cybermind
Valued Member
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 17th Mar 2004 23:43
already experimented with the set matrix command, it did not do anything
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 18th Mar 2004 19:18
All I can think of is toying around with the set matrix command until you find something useful. Otherwise, if you learn to hate matrices (as I have ) you can try making terrain out of 3d objects.

Crazy Donut Productions
Current Project: KillZone
Algae Man
22
Years of Service
User Offline
Joined: 11th Nov 2002
Location: Canada
Posted: 19th Mar 2004 03:50
I think I know what the problem is. For some reason DarkBasic doesn't automatically calculate the normals for the matrices, so they don't render with any shadows/highlights, just flat colour. Here's some code that manually calculates the normal data for your matrix (You need only run this code once after making changes to your matrix):



Change the '32' in the 'for x' and 'for z' loops for however many x-segments and z-segments your matrix has.
Manticore Night
21
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 19th Mar 2004 05:09
Actualy I think there's a much simpler way. There's some command in the help file not the set matrix command but one under light3d it's got somthing for the matrix.

It's amazing how much TV has raised us. (Bart Simpson)
Code Ninja
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: AZ, U.S.
Posted: 19th Mar 2004 16:58
I think Manticore is right... BTW ppl, the help files are there for a reason.

PC: Pentium II, 333Mhz, 128 Mb SDRAM, 20 & 4Gb hard drives, 8Mb Videocard, DBC 1.13
~Dragael Software
Math89
21
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: UK
Posted: 19th Mar 2004 22:30 Edited at: 19th Mar 2004 22:32
I don't have any problems with matrix. Set the ambient light at 0 and make it as a point light.
(sorry for my bad english lol )

Login to post a reply

Server time is: 2025-05-23 01:00:33
Your offset time is: 2025-05-23 01:00:33