Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
40 Views

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
0 Kudos
4 Replies
Highlighted
Moderator
40 Views

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.

0 Kudos
Highlighted
Beginner
40 Views

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.
0 Kudos
Highlighted
Moderator
40 Views

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.
0 Kudos
Highlighted
Beginner
40 Views

Did you manage to modify the files? joc
0 Kudos