I've made an example asset that demonstrate this. The asset simple takes in a Maya geometry and the camera parameters, and cull the geometry based on the camera frustum.
The following MEL can be used to connect the Maya camera to the Houdini Engine asset.
proc connect_camera(string $camera, string $engine_asset)
{
string $children = `listRelatives -shapes -type camera $camera`;
string $camera_shape = $children;
connectAttr -f ($camera + “.translate”) ($engine_asset + “.houdiniAssetParm_camera_translate”);
connectAttr -f ($camera + “.rotate”) ($engine_asset + “.houdiniAssetParm_camera_rotate”);
connectAttr -f ($camera_shape + “.focalLength”) ($engine_asset + “.houdiniAssetParm_focal_length”);
connectAttr -f ($camera_shape + “.cameraAperture”) ($engine_asset + “.houdiniAssetParm_camera_aperture”);
connectAttr -f ($camera_shape + “.nearClipPlane”) ($engine_asset + “.houdiniAssetParm_near_plane”);
connectAttr -f ($camera_shape + “.farClipPlane”) ($engine_asset + “.houdiniAssetParm_far_plane”);
}
connect_camera(“camera1”, “camera_culling1”);
Hope this helps some of you out there.
![](/static/djangobb_forum/img/smilies/smile.png)