You are here: User Guide > Nuke > 3D Compositing > Importing Lights from FBX Files

Importing Lights from FBX Files

FBX is a standard 3D file format that gives you access to 3D scenes created in other applications supporting the same format. What you generally have in an .fbx file is an entire 3D scene containing cameras, lights, meshes, non-uniform rational B-spline (NURBS) curves, transformation, materials, and so on. From this scene, you can extract cameras, lights, transforms, and meshes into Nuke. This way, you can, for example, create a light in Maya, export it in a .fbx file, and use the same light again in Nuke.

NOTE:  For the FBX SDK version used in Nuke, see Third-Party Library Versions.

TIP:  If you have trouble with .fbx files, it may be because they were written with an older version of FBX. If they load very slowly, it is also possible that they are ASCII rather than binary. To get around these problems, you can use the FBX converter on the Autodesk web site (http://usa.autodesk.com/fbx/download/). It converts between various different formats, including older FBX versions, ASCII, and binary, and is available on Windows, Mac OS X, and Linux.

Importing Lights from an .fbx File

You can use the Light node to read in directional, point, and spot lights from FBX scene files (for more information on these three light types, refer to Lighting). One Light node only reads in one light. Therefore, if your .fbx file contains three lights and you want to import all of them into Nuke, you need to use three Light nodes.

To import a light from an .fbx file:

1.   Select 3D > Lights > Light to insert a Light node in the place where you want to add the light in your script.
2.   In the Light controls, check read from file. This enables the controls on the File tab, allowing you to read in lights from an .fbx file. It also disables all controls whose values are filled from the .fbx file. You can still view these values and use them in expressions, but you cannot modify them, because they are read from the .fbx file. Any changes you make in the .fbx file are reflected in these values of the Light node.
3.   On the File tab, click the folder icon and browse to the .fbx file that contains the light you want to use. Click Open.

4.   From the animation stack dropdown menu, select the take you want to use from the .fbx file. FBX files support multiple takes in the same file. One of the takes is usually a default take without any animation.
5.   From the node name dropdown menu, select the light node you want to import from the .fbx file.
6.   If you want to override the frame rate used in the .fbx file to sample the animation curves, enter a new frame rate (frames per second) in the frame rate field. Check use frame rate to use the rate you entered (rather than the one in the .fbx file).
7.   To scale the intensity channel values read from the .fbx file, adjust the intensity scale slider. If the light is too dark, increase this value.
8.   If you want to modify the light properties imported from the .fbx file, uncheck read from file on the Light tab and make the necessary modifications. As long as read from file is unchecked, your changes are kept.
9.   To reload the light properties from the .fbx file, make sure read from file is checked and click the reload button on the File tab.