Nic Tanghe

NicTanghe

About Me

EXPERTISE
Freelancer

Connect

LOCATION
Leuven, Not Specified
WEBSITE

Houdini Skills

ADVANCED
Lighting  | VEX  | Python
INTERMEDIATE
Procedural Modeling  | Environments  | Digital Assets  | Motion Editing  | Animation  | Hair & Fur  | Cloth  | Solaris  | Karma  | Pyro FX  | Fluids  | Destruction FX  | Realtime FX  | PDG
BEGINNER
Character Rigging  | Crowds  | Muscles  | Mantra

Availability

Not Specified

Recent Forum Posts

Component Neseted instances on varients. April 13, 2024, 11:04 a.m.

Greetings traveler.

It seems i can get isntances referancing a usd file stored somewhere else without anny problems. |
When using the component builder.

However when i try to add instances with the component builder that vary with the variations,

It doesn't seem to work.

selecting varient based on logic. April 11, 2024, 4:08 p.m.

Hello I`d like to edit variants programatically.


my apttemts are failing.

Vex:

In vex there aren`t even any prints happening
string @primpath; 

// Debugging message for variable definition
printf("Variables defined.");

// Retrieve variants
string models[] = usd_variants(0, @primpath, "model");

// Debugging message to check if variants are retrieved
printf("Number of variants: %d", len(models));

// Check if at least one variant is available
if (len(models) > 0) {
    // Set the desired variant
    usd_setvariantselection(0, @primpath, "model", models[1]);

    // Debugging message for variant selection
    printf("Variant selection set.");

    // Apply API to the variant
    usd_applyapi(0, @primpath, "GeomModelAPI");

    // Debugging message for API application
    printf("API applied.");
} else {
    // Debugging message if no variants are available
    printf("No variants available.");
}




Python:

It seems however that my python script isn`t working.
(ive also tried @TESTING wich didn`t work)

here is my script.

from pxr import UsdGeom

from pxr import UsdGeom

try:
    lopNode = hou.pwd().inputs()[0]
    stage = lopNode.stage()
    print(stage)

    node_base = "/instanced_variants1/Instance"
    variable_value = hou.node(".").parm("primnr").eval()
    node_base += str(variable_value)

    prim = stage.GetPrimAtPath(node_base)
    
    testing = prim.GetAttribute("primvars:TESTING").Get()
    
    
    pvAPI = UsdGeom.PrimvarsAPI(prim)
    primvar = pvAPI.FindPrimvarWithInheritance("TESTING")
    primvarValue = primvar.ComputeFlattened()
    return testing


except Exception as e:

    return 2

it returns 0 indicating that it cant find the attrib
although sometimes its all 2.

I`m at a loss here as it seems like this is a good workflow.

Dreamworks opensource renderer March 26, 2024, 10:30 p.m.

someone made this guide for a docker build but can`t seem to get xpu working.
https://github.com/adro79/openmoonray/discussions/2 [github.com]

If annyone could help withthat that`d be gr8