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 / Normalization

Author
Message
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 11th Jul 2003 16:00
I'm currently in interested normalization(sp??)especially the command
set matrix normals()
as far as i can tell using this command makes the matrix it is applied to become effected by light whithout this a matrix would not. I don't need any code but could someone explain how normalising works?? and also if possible why the example in dbc has all this


when i can just use this


and it seems to work ok?
thanks in advance
ReD_eYe
hi guys
ifman1
21
Years of Service
User Offline
Joined: 3rd Jul 2003
Location:
Posted: 11th Jul 2003 19:34
Heh, I don't have my DBPRO yet, still waiting for the mail man to come... those old Roadrunner cartoons where Wiley orders something and waits by the mailbox for 10 seconds...I wish....

Anyway.. since I don't know about DBPro, in OpenGL, a normal, or surface normal to be specific, is a vector that is perpendicular to a plane. OpenGL and I assume DirectX (and thus DBPro) use the angles from this vertex along with surface materials and the direction of the lighting to calculate the amount of light and the degree of shading that hits the plane. That is how Normals work!

As far as how using them in DB works... hell, when the post man gets here, I'll figure it out for ya.

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Jul 2003 20:28
Try adding a directional light to your scene and see what type of effect it has on your matrix.

DBPro uses vertex normals, which are usually calculated by adding together all the surface normals that join at that vertex. I have a set of routines to calculate this for me, but it's all tied up inside a pretty hefty piece of code.
JamesBlond
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Germany
Posted: 11th Jul 2003 20:33
With "set matrix normal" you can set a vector which is perpendicular to the surface of the matrix tile. Now you have to calculate the angle of the plane and use this angle to calculate the x,y and z components of the normalvector, hence all the trigonometry in there. I attached a shortened version of the code for that.

Smile and be happy, things could be worse!
So I smiled and was happy, and things got worse...
ReD_eYe
21
Years of Service
User Offline
Joined: 9th Mar 2003
Location: United Kingdom
Posted: 11th Jul 2003 20:34
thanks guys that helped alot!!!

***Ordered Dbpro today(friday)****
Lets see how quick amazon really are!!!

Login to post a reply

Server time is: 2024-11-24 22:35:07
Your offset time is: 2024-11-24 22:35:07