Table of Contents

Houdini – Detail function

< Previous Page

You will find here how to use the detail() function in Houdini.

The detail() function is build like this:

detail (geometry, attribute, index)

The use of the function is different if you are using VEX (wrangle) or Hscript.

In order to get the value stored at detail level, you can use the following options:

VEX

Tip
In VEX the index is ignored, keep it to 0 or remove it.

Use the entry number

The wrangle as 4 inputs (from 0 to 3). Hence, if the attribute is linked to the first entry of the wrangle, then type 0 for the parameter geometry:

@variable = detail(0,"parameter_name",0)

In the example above my “max” parameter is a vector that stores the maximal dimension of my box in X, Y and Z.

In VEX, to access the max.y, I need to use the vector() function to get the y index only.

Enter the geometry name

If you prefer enter the geometry’s name, then in this case you will need to add op: before the name of your geometry in the function.

f@variable = detail("op:/obj/geo/node_above","myattribute",0)

If you stored a vector and want to get the complete vector, just specify the v before your variable (v@variable)

Hscript

In Hscript, the function works a bit different.

If the detail stores

  • one value (float/string/int…)
detail("../node_above/","myattribute",0)
detail(0,"myattribute",0)
  • a vector (or array)

Entry Number

detail(0,"myattribute",0) for x
detail(0,"myattribute",1) for y
detail(0,"myattribute",2) for z

Geometry path

detail("../node_above/","myattribute",0) for x
detail("../node_above/","myattribute",1) for y
detail("../node_above/","myattribute",2) for z

Top KB Categories

Recent Articles