home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trixter's Scene Collection
/
trixter.zip
/
trixter
/
Demos
/
MASS-ULT.ZIP
/
NIXSHADE.DOC
< prev
next >
Wrap
Text File
|
1995-04-21
|
7KB
|
175 lines
──────────────────────────────────────────────────────────────────────────────
· · ███▄ ▄███ ▄███▄ ███████ ███████ ▄█▄ ███ ███ ███▀▀▀▀· |
| ·███▀█▀███·▄██ ██▄ ██ ·▀ ██ ▀ ·▀ ███ ███ ███ · --o--
· --o-- ███ · ███ ███▄███ ▀▀▀▀███ ▀▀▀▀███ ███·███· ███ ███▀▀▀ · |
· | ███ ███ ███▀███ ▄ ·███ ▄· ███ ███ ███ ███ ███ · · ·
· · ███ ·███ ███ ███ ███████ ███████ ███ █████ ███▄▄▄▄ ·
A Living Legend
──────────────────────────────────────────────────────────────────────────────
Presents
NiX Shading
When Phong just ain't good enough anymore...
by NiX / MASSiVE
──────────────────────────────────────────────────────────────────────────────
NIX SHADING
──────────────────────────────────────────────────────────────────────────────
What is NiX Shading?
NiX Shading is a new shading method developed by NiX / MASSiVE (That's me!).
I came up with the method when I was thinking of a fast way to do real Phong
shading, which by that time was in my eyes the best shading method around.
The advantages of NiX-Shading are enormous, it provides shading which in theory
is better as Phong, but with just as much lights as you wish without any
speed loss, and talking about the speed, NiX-Shading is exactly as fast as
a texture-mapper!
──────────────────────────────────────────────────────────────────────────────
Why is it better then Phong?
The advantage above Phong shading is that NiX-Shading uses an non-linear
interpolation of the normalvector. When you do Phong shading you will notice
that when interpolating the normals linear (as Phong dictates) the length
of the normalvector changes, this ofcourse isn't correct. NiX-Shading keeps
the lenght of the normal constant, and also gives proper interpolation.
As said before, all as fast as texturemapping!
How does it works?
To do the non-linear interpolation NiX-Shading doesn't interpolates the
X, Y and Z factor of the normal but the rotation around X and Y axis needed
to let the vector (0,0,256) equal the normalvector at a certain vertice.
The Z axis isn't necessary because rotating the vector (0,0,256) around the
Z axis doesn't makes any difference.
To obtain this angles you should take the arcsin from the X and Y parts of
a normalized normalvector. The arcsin of the X part gives the angle for the
Y axis, and the arcsin of the Z part gives the angle for the X axis.
Now we only have to interpolate this 2 angles between the vertices. Using this
angles we know the normalvector of every pixel to draw, and using this normal
vector we can determine the color.
OK, But how can this be just as fast as texuremapping?
The angles calculated can be used as coordinates on a texture, the texture
should contain a circlepattern, with the brightest color in the middle, and
futher from the middle the darker colors. This might sound a little strange,
but think clearly about what I wrote, and try to realize the mathematical
meaning.
How to do the multiple lights without speed loss?
If you understand it correctly you will notice that for every possible normal
you can set the color, just by changing the color in the texture. As described
above the texture only contains one circlepattern, if you add more of them, and
let the colors mix, you will have more lights. However, on a 256 color modes
it is very hard to use multiple lights with different colors, because you
haven't got enough colors for the mixing.
──────────────────────────────────────────────────────────────────────────────
Closing words:
I realise that this is a very short and probably not very clear explanation,
but if you need more info you can always contact me. I'll be happy to help
you out.
Signed,
Jurjen Katsman
NiX / MASSiVE
──────────────────────────────────────────────────────────────────────────────
Thanks and Greetings:
Special thanks to:
Laserdance for giving me feedback on the method, and for the Phong explanation.
And BTW: Never say something is impossible :-)
Sentinel / Agony for wanting to know more about this method, forcing me to
make it myself... And ofcourse for helping with the demo!
QuickSilver / Image! for letting us into the Reality'96 organisation!
Also greetz to: Jinx/Logic Design, Hammer/Agony, Manticore/Hazard, GBC,
Code Red/Hazard, everyone in DSC and DGi, and the ones I've forgotten...
──────────────────────────────────────────────────────────────────────────────
Members List:
At the moment MASSiVE consists of 5 members:
- NiX Main Coding / Organizer
- CONTAGiON Music / Co-Organizer
- DiGiT Graphics
- Butterfly Coding Support / Research
- Acid Brain Graphics / Object Design
──────────────────────────────────────────────────────────────────────────────
How to get in touch with us:
To contact us you can send mail to us at one of our distribution-sites, a list
is in this file.
You can also get in touch with MASSiVE by sending us
netmail, you'll have to address it to:
Hendrik van den Boogaard at
---------------------------
Fido: 2:512/64 [Public Board Driebergen]
Sig: 27:2331/260 [Diabolo BBS Utrecht]
SBC: 14:1000/653 [Public Board Driebergen]
DGi: 68:310/17 [Sledge Hammer]
Internet: massive.knoware.nl
──────────────────────────────────────────────────────────────────────────────
You can also reach us at the following addres by normal mail:
Jurjen Katsman / NiX
Koppelweg 93
3704 GG Zeist
Holland
Speech: +31 (0)3404-54544
──────────────────────────────────────────────────────────────────────────────
- Distribution site list -
│BBS Name │BBS number │Sysop │Comments │
└─────────────────┴────────────────────────┴───────────────┴────────────────┘
MASSiVE BBS +31(0)????-???? Contagion MASSiVE WHQ (*)
GBC II +31(0)2502-49975 Code Red MASSiVE EHQ
GBC I +31(0)2503-25390 Consieler
Sonority Systems +31(0)30-287842 Cyanosis
The Real World +31(0)53-330190 Da Chief Ground Zero WHQ
Enigma BBS +32-2-6403136 Dark Angel Belgium HQ
World is Crazy +33 21.57.14.70 FanFan France HQ
(*) At the moment MASSiVE BBS isn't online yet, as soon as it is, it will
become our new WHQ.
LIttle message to Dark Angel: As you can see we have accepted you as a
dist-site, sorry about not mailing you but I will send mail soon...
We are still looking for demo oriented boards in every country accept Holland,
if you are interested in becoming a MASSiVE distribution site, please contact
us.
──────────────────────────────────────────────────────────────────────────────