From: Thomas S. <th...@dr...> - 2008-10-06 23:08:37
|
Hi, >>Agreed. Let's support what our target audience will be using: point, >>directional and spot lights. So far we'd have these properties: >> >>position (INF for directional lights) >>direction (n/a for point lights) >>phi/theta (2pi for point lights) >> >>Well .. I think it's clear that every light has a name by which it is >>referenced by a node in the graph. So position and direction are >>specified in the node's local transformation while all other parameters >>are in a separate aiLight structure!? >>Then we need light colors ... specular, diffuse and ambient I think. >>Specular and Diffuse will be equal in most cases. Maybe add a local transformation to each light in relation to its node. I guess this is neccessary because different file formats maybe define different default directions for light sources. In one file format the spotlight points to Z+, in another format it is defined as shining in X+ direction. A local transformation matrix for each light can handle this differences, while still maintaining the node animation possibilities for lights. Apart from that, I agree with the proposed data structure. >>The difficult question is the light attenuation ... linear and quadratic? I only know the DirectX attenuation, which is defined by constant, linear and quadratic factors. Makes three floats for attenuation. As long as we don't find a better model for this, we can use this three-factor-model. Bye, Thomas |