Since | 17.0 |
The glTF ROP can export your scene as a GLTF file. See the following link for further information about the glTF format.
Note
See the following link for an overview of importing and exporting GLTF files to and from Houdini.
The glTF ROP can do the following:
-
Export cameras.
-
Export lights via the
KHR_lights_punctual
Khronos extension. -
Export mesh names and node names.
-
Export Object-level Null nodes as glTF Null nodes.
-
Export Object-level transform animations.
-
Export SOP animations to glTF, including packed primitives and instances.
-
Support ambient occlusion textures.
-
Support frame ranges and takes.
-
Optimize exported file sizes for geometry that requires point splitting.
-
Create intermediate directories.
-
Maintain the vertex order if the mesh being exported only has one glTF primitive.
-
Culls empty geometry nodes when the Cull Empty Node parameter is turned on.
-
Preserves the original textures specified on the material when the Texture Source parameter is set to Copy Original Textures.
-
Preserves the original file formats of material textures when the Texture Format parameter is set to Original Format or PNG or Original Format or JPEG.
-
Supports connecting inputs to the node to create a dependency graph.
Parameters ¶
Save to Disk
Begins the render with the last render control settings.
Controls
Opens the Render Control window, which allows you to adjust the render parameters before rendering.
Valid Frame Range
Controls whether this render node outputs the current frame or the image sequence specified in the Start/End/Inc parameters.
Render Current Frame
Export only the current frame.
Render Frame Range
Export the frames in the Start/End/Inc frame range, but also allow exporting of frames referenced by in-range frames.
Render Frame Range Only (Strict)
Only export the frames in the Start/End/Inc frame range. Do not allow exporting of other frames, including frames referenced by in-range frames.
Start/End/Inc
Specifies the range of frames to render (start frame, end frame, and increment). All of the values can be floating point values. The range is inclusive.
The Start/End/Inc parameters determine the values of the below local variables for the output driver.
$NRENDER
The number of frames to be rendered by the output driver.
$N
The current frame being rendered (starting at 1 and going to
$NRENDER
).
For example, if the parameters are set to:
Start |
End |
Inc |
---|---|---|
10.5 |
12 |
0.5 |
… there will be 4 frames rendered (10.5, 11, 11.5, and 12), so $NRENDER
will have a value of 4.
$N
will have the following values at each frame:
Frame |
|
---|---|
10.5 |
1 |
11 |
2 |
11.5 |
3 |
12 |
4 |
Render with Take
Uses the settings in a particular take while rendering. Choose Current to use the current take when rendering.
Output File
The path of the file to generate. The extension determines the type of file to generate.
A path with a .glb
extension generates a single binary GLB file and stores all resources internally.
A path with a .gltf
extension may store some resources externally. Exported resources are stored in the same folder as the file and are referenced relatively.
Export Type
The file format to export.
Detect From Filename
The file format is dependent on the extension in Output File.
glTF
Export as a file with the .gltf
format, and store some resources externally.
glb
Export as a single binary file with the .glb
format.
Create Intermediate Directories
When turned on, creates intermediate directories for the output file if the specified Output File path contains directories that do not yet exist. For example, if you specify $HIP/output/gltf_output/owl/tropical_screech.gltf
as the Output File path, and the /gltf_output
and /owl
directories do not exist, then the /gltf_output
and /owl
directories will be created automatically when you export your character.
When turned off, and the Output File path contains directories that do not exist, then the export will silently fail.
Use SOP Path
When turned on, exports a single geometry detail specified in SOP Path instead of exporting objects contained under a root object.
SOP Path
The path to the geometry detail to include in the glTF scene.
Root Object
The root object of the scene. All objects contained under this node will be included in the glTF scene.
Objects
A pattern/bundle of objects to include in the glTF scene.
Force Objects
The objects that match the names or patterns of this parameter should always appear in the scene, even if their display flag is off.
Note
This overrides the Objects and Exclude Objects parameters.
Exclude Objects
Do not include objects in the scene if they match the names or patterns given by this parameter. This overrides the Objects parameter.
Copyright
Sets the copyright information in the exported GLTF file.
Texture Source
Controls the origin of the textures that are included in the exported GLTF file.
Export from Material
New texture images will be exported based on the parameters of the material shader and the parameters on the GLTF output node.
Copy Original Textures
Any supported texture images specified in the material shader will be copied directly to the exported GLTF file, preserving the exact images that were used to build the material.
Texture Format
Controls the file format of the exported material textures.
Original Format or PNG
Textures will be exported in their original formats or as a PNG if a texture’s format is not specified or is unsupported by GLTF.
Original Format or JPEG
Textures will be exported in their original formats or as a JPEG if a texture’s format is not specified or is unsupported by GLTF.
PNG
Textures will be exported as PNGs.
JPEG
Textures will be exported as JPEGs.
Texture Quality
The level of compression to apply to outputted textures. Only applies to lossy image formats (Texture Format is set to Original Format or JPEG or JPEG).
Max Texture Resolution
If any texture is larger than this resolution, then downsize it to this resolution. Useful for quickly reducing the file size.
Rescale Texture as Power of Two
When turned on, rescales exported images so that the final image has dimensions that are powers of two (for example, 512×1024, 2048×2048).
This is required by some low-spec glTF implementations as well as WebGL implementations in older browsers.
Animation Name
The name of the exported animation.
Flip Normal Map Y
When turned on, inverts the y-coordinate on the normal texture map for each exported mesh. glTF’s orientation expects an upwards facing y-axis.
Cull Empty Nodes
When turned on, any object node with no descendants containing geometry is ignored.
Export Custom Attributes
When turned on, all public attributes are exported. When turned off, only attributes defined in the glTF standard are exported.
Attributes are exported with their original types whenever possible. However, glTF allows a maximum of 32 bits for floats and integers. Integers are also required to be unsigned. Attempting to export a datatype larger than this will narrow the type and print a warning.
Exported custom attribute names are the original names plus an _
(underscore) prefix.
As glTF only supports point attributes, name collisions will be resolved using the normal attribute resolution order.
Export Node Names
Assigns Houdini node names to the name field of glTF objects. The name attribute on packed primitives will also be exported.
Names are assigned to materials, transformation nodes, and geometry.
Export Mesh Names
When turned on, mesh names will be exported to the GLTF mesh name fields. The Mesh Names Source parameter controls the naming of the mesh.
Mesh Names Source
Node Name
The GLTF mesh name will be assigned the name of the SOP node of the exported mesh.
Attribute
The GLTF mesh name will be assigned the name stored in the attribute specified by the Mesh Name Attribute parameter. It can be any type of attribute, but it must have a consistent value.
Mesh Name Attribute
The name of the attribute that contains the mesh name’s value.
Export Materials
When turned on, this option exports Principled Shader materials. Materials are exported as a combination of emissive maps, normal maps, and pbrMetallicRoughness materials. All associated textures and images used by the material are exported alongside the material. Some Principled Shader options such as ambient occlusion and subsurface scattering are not exported.
Materials that do not use the Principled Shader will be ignored.
Export Cameras
When turned on, includes camera objects matching the Objects pattern/bundle in the glTF scene.
Export Lights
When turned on, includes light objects matching the Objects pattern/bundle in the glTF scene.
Importers for this scene will need to support the KHR_lights_punctual glTF extension in order to include the lights. This extension only supports 3 light types: directional, point, and spot.
A script command can be specified for execution at various execution points. The expression language selected for the script parameter determines whether the command is in hscript or python.
Prior to execution, this node is automatically set as the global current node.
To run statements from a file, specify the path to the file with
either a .cmd
extension (when the language is set to Hscript) or a .py
extension (when the language is set to Python). Additional arguments to the
script can also be supplied. They will be parsed in a shell-like manner.
Pre-Render Script
Run this script before any rendering.
Pre-Frame Script
Run this script before each frame.
Post-Frame Script
Run this script after each frame.
Post-Render Script
Run this script after all rendering.