Ok i have a patch of terrain. Right now i just calculate the normals for every polygon. Is what i am wondering is what methods there are for garoud shading. If i am not mistaken...is what you do is average the normals of all the polygons that are in contact with the polygon. Are there any faster ways of doing this? Or am i doing it wrong? :huh:
garoud shading
Started by starboarder2001, Jul 26 2003 05:02 AM
8 replies to this topic
#1
Posted 26 July 2003 - 05:02 AM
1000
0100
0010
0001
0100
0010
0001
#3
Posted 26 July 2003 - 10:11 AM
faster ways ??? preferably you precalculate this once...
If Prolog is the answer, what is the question ?
#4
Posted 26 July 2003 - 11:42 PM
anubis said:
faster ways ??? preferably you precalculate this once...
Thanks for the help. :) I will pre-calculate them for the terrain...and probably for the models. I am still not sure what the best way to do it for the animated models. :huh:
1000
0100
0010
0001
0100
0010
0001
#5
Posted 27 July 2003 - 02:25 AM
recalculate or transform.. depends on how you animate it..
there are very fast algos for generating normals for terrain, and so for deformable terrain recalculation is easy (and you can do "local recalc" instead of recalc everything..)
there is a very fast general algorithm to calc normals wich is O( A+B ) where A is the amount of faces, and B is the amount of vertices..
most the time you don't animate your meshes randomly. if you have keyframes, you can interpolate normals as well (but don't use linear interpolation directly! ..)
if you do skinning, you can transform the normals by the skinning-matrices as well.. you just have to know how to:D
hope that gives some ideas.. i can write down the structure of the algo as well.. isn't it somewhere yet in those forums? ..
there are very fast algos for generating normals for terrain, and so for deformable terrain recalculation is easy (and you can do "local recalc" instead of recalc everything..)
there is a very fast general algorithm to calc normals wich is O( A+B ) where A is the amount of faces, and B is the amount of vertices..
most the time you don't animate your meshes randomly. if you have keyframes, you can interpolate normals as well (but don't use linear interpolation directly! ..)
if you do skinning, you can transform the normals by the skinning-matrices as well.. you just have to know how to:D
hope that gives some ideas.. i can write down the structure of the algo as well.. isn't it somewhere yet in those forums? ..
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....
#6
Posted 31 July 2003 - 08:15 AM
thanks..i got it working. :)
here are the results:
before:
after:
here are the results:
before:
after:
1000
0100
0010
0001
0100
0010
0001
#7
Posted 31 July 2003 - 08:33 PM
anybody got some code/links to code about garoud shading? sounds interesting.
thanks
:yes:
thanks
:yes:
Imagine.
#9
Posted 03 August 2003 - 08:02 PM
yep, nothing special in gouraud shading.. just different specified normals..
davepermen.net
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....
-Loving a Person is having the wish to see this Person happy, no matter what that means to yourself.
-No matter what it means to myself....
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












