XML light examples

XML light examples

I've been attempting to figure out the xml format of the lights to no avail, my adjustments to the values for the most part do nothing or have unexpected results.I'm mainly interested indirectionallight,distantlight, andpointlight, but haven't been able to figure out any of them.Any help on understanding how to create the lights for the xml files would be greatly appreciated.Thanks

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Every light gets a transformation to position the light. In case of the spotlight, the spotlight is defined to shine in the z-direction of its local coordinate space.Try the following spotlight in the cornell_box_sphere.xml file as a starting point. It defines a spotlight shining into the negative y direction (3rd column of matrix is (0,-1,0)).

1 0 0 213

0 0 -1 508.77

0 1 0 227

5000000 5000000 5000000

10

30

Due to the quadratic falloff, point lights and spotlights need often a large intensity.The parameters to all lights can be found in the file app/importers/xml.cpp in the loadXXXLight functions.

Thanks so much! it's making more sense now, and I've gotten a couple lights working.Would you be able to point me in the direction of where I could find what each number in the AffineSpace matrix is used for? I'm attempting to convert a light's rotation amount in degrees to this format.

See theloadSpotLight function on app/importers/xml.cpp. Most of the included lights are very symmetric, thus ignore some components of this matrix. The spotlight for instance, only cares about the position and a direction.

Did you manage to modify the files? joc

Leave a Comment

Please sign in to add a comment. Not a member? Join today