just ppl (per pixel lighting)
January 26, 2001
Feb 19, 2001; (decided to change up the textures since they where so ugly and reupload)
author: akbar A.


I'll tell you what this is instead of what it is supposed to be.

the light position is described by the string which is displayed in the window.

you can very easily modify the code so the light position is rendered as a light source..
like the toon rendering demo..

following are some screen shots.

btw, this was written with Direct3D :(
 
 

if you hit r it will change from alpha blend mode to no alpha blend mode.
standard movement keys (w,a,s,d,q,a)..
and the the arrow keys work as well...

you can play with the bump scale factor pretty easily, open up normalmap.txt, and change the num.. bigger the number
the taller teh bumps appear.

here is the file with source:
   download
 
 

well, obviously, as light gets closer to an object, it will start to get brighter..
 

it is with alpha enabled here, as you can see through the object. and the per pixel lighting is apparent
cause the shades of the circles is dependent on the light position.
this is really nice since it's all in hardware..
 
 
 


 
 

here we have something similar except the light position is a tad bit further away (remember in cg everything revolves
around unit circles/implementions).
and then you get to see the pretty ground texture i made in adobe ;)
 
 


 
 
 

just in case we got some disbelievers, here it is "plane" and easy for you to see.
the dotproduct is done via the textures data, it works really nice for implementing as well ;)
lightvector is put into rgb mode, as well...

we could do this if we split them all into little triangles, but the T&L will kill you, and the memory would be to high.
textures are a good format for encoding <X,Y,Z> data <R,G,B>
there really should be more games supporting these types of rendering passes.
 
 
 
 
 



 
 



like mother, <shows mother morph into demon>
<screen fades>
like father, <shows father morph into demon>,
<screen fades>,

<flash cinematic of scene where the child is stolen as an infant (in game)>
<thunder!>,<fades>
<thunder>,
text comes in
and terror.

stolen son: "but why"
mother and father demons: huhaha
torture

i smell a hit ;)

if only the xbox didn't have that nasty controller, i'd really think about deving my game for the xbox.
but i'm always willing to "negotiate" a deal...

btw, if any of you are familar with 3d animation exporting for maya i'd be intersting in talking with you, obviuosly you'd have to know about
skinning/weights but i can guide you in development..
i'm just to busy right now to write out the code again..