Ahmed Hindy

AhmedHindy

About Me

Technical Artist @Trend VFX
専門知識
VFX Artist
業界:
Film/TV

Connect

LOCATION
Cairo, Egypt
ウェブサイト

Houdini Engine

Availability

I am available for Full Time Work

Recent Forum Posts

How to export volumes that appear-disappear to a USD file? 2025年9月20日6:57

nvm I wrote a python script that can be dropped in a python LOP node after the volume LOP:


from pxr import Usd, UsdGeom, UsdVol
import hou


node = hou.pwd()
stage = node.editableStage()


def hide_volumes_without_vdb(stage, root="/", verbose=True):
    """Hide Volume prims that don't contain any OpenVDBAsset children.

    Args:
        stage (Usd.Stage): Editable USD stage (e.g., from a Python LOP).
        root (str): Path under which to search; "/" scans the whole stage.
        verbose (bool): If True, print what was hidden.

    Returns:
        list[str]: Paths of Volume prims whose visibility was set to invisible.
    """
    if root == "/":
        start_prim = stage.GetPseudoRoot()
    else:
        start_prim = stage.GetPrimAtPath(root)
        if not start_prim:
            if verbose:
                print(f"[hide_volumes_without_vdb] Root '{root}' not found.")
            return []

    hidden_paths = []
    for prim in Usd.PrimRange(start_prim):
        # Check prims typed as Volume
        if not prim or not prim.IsValid():
            continue
        if not prim.IsA(UsdVol.Volume):
            continue

        # Look for active OpenVDBAsset children directly under the Volume
        has_openvdb_child = any(
            child.IsActive() and child.IsA(UsdVol.OpenVDBAsset)
            for child in prim.GetChildren()
        )

        if not has_openvdb_child:
            img = UsdGeom.Imageable(prim)
            img.GetVisibilityAttr().Set(UsdGeom.Tokens.invisible)
            hidden_paths.append(str(prim.GetPath()))

    if verbose and hidden_paths:
        print("[hide_volumes_without_vdb] Set invisible:", *hidden_paths, sep="\n  ")
    elif verbose:
        print("[hide_volumes_without_vdb] No empty Volume prims found.")

    return hidden_paths



node = hou.pwd()
stage = node.editableStage()
hide_volumes_without_vdb(stage, root="/", verbose=True)

I hope that helps.

How to export volumes that appear-disappear to a USD file? 2025年9月20日6:38

Houdini 21.0.440 and that behavior still hasn't changed. Any tips on how this is solved?

Pop-up windows for every work item when using TOP services 2025年9月5日7:32

I still have the same issue on windows 10. it keeps spawning husk.exe cmd windows, this makes the whole PC unusable.

UPDATE: This happens when running the LOPs Component Output node in a PDG network using services.