[Papervision3D] Lighting, Face Normals and 3D Object Data
randy_blain at yahoo.co.uk
Tue Feb 13 14:50:56 EST 2007
Maybe we should add another object for developer data,
but it might be
cleaner to store information specific to your
application separated from the
Any thoughts on this?
Hello Carlos and listpeople. I took it on myself to
start developing a lighting system and have the basic
alogorithm of the directional lighting class written
and ideas kicking around for visible lights, omni
positionals and spotlights. For now, since we are not
raytracing on the fly it just lights the entire
polygon face according to light received and
multiplies it by the material color.
A couple of thngs I see would be helpful and maybe I
am missing in my glance across the classes so far is
face normals. I basically have them calculated from
the face vertices but my intuition tells me that the
looping of all the square root functions to derive
these normals per 3D object could be compacted and
done at the very first build of the geometry in the
player. Then the normals could be extracted from the
object info and its world transform to check the light
saturation per face. Another thing I was thinking
about for optimization is that the directional
lighting might itself be attached to the 3dObject. It
would not redraw all objects with light each screen
redraw but only when the vector changed on that
object. For stationary objects they would draw once
and "bake" the shadow/light map into the material.
As well I am wondering whether to use a filter or
color transform AS2.0 class or add a layer and blend
mode or change the hexColor..or write conditionals
based on whether it is a bitmap or fillcolor.
Any thoughts from the more experienced out there.
New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes.
More information about the Papervision3D