Houdini 20.5 hapi

hapi.renderTextureToImage function

Render only a single texture to an image for later extraction.

Note that you must call this first for any of the other material APIs to work.

Usage

renderTextureToImage(session: hapi.Session, material_node_id: int, parm_id: int) → bool

Render only a single texture to an image for later extraction. An example use of this method might be to render the diffuse, normal, and bump texture maps of a material to individual texture files for use within the client application.

session

The session of Houdini you are interacting with. See hapi.Session for more on sessions. Pass None to just use the default in-process session.

material_node_id

The material node id.

parm_id

This is the index in the parameter list of the material_id’s node of the parameter containing the texture map file path.

hapi