NoSleepCreative Wiki
  • Welcome to NoSleepCreative
  • After Effects
    • Getting Started with Expressions
    • Expressions & Snippets
      • JSX Cheatsheet
      • Expression Troubleshooting
      • Utilities
      • Shape & Mask
      • Type & Text
    • Cookbook
      • Algorithmic
      • Random properties
      • Harmonic Motion
      • Staggering
      • Tessellation & Tiling
      • Type animators
      • Speed lines
      • Radial Array
      • Orb & Trails
      • Shading & Texturing
      • Responsive
      • Automation
      • Setup & Rigs
    • Getting started with Scripting
    • Scripting
      • Utilities
      • Master Properties
    • ScriptUI
  • Studio Ops
    • Tooling
    • Toolkitting
    • Knowledge Base
    • Naming Convention
    • DAM
  • Cinema 4D
    • Formulas
    • Python Cheat Sheet
      • For Artists
      • Maya Environment
      • Maya snippets
      • VSFX 705
    • Cookbook
  • Info
    • About
    • Portfolio
    • Course
    • YouTube
    • Gumroad
    • GitHub
  • Dev
    • archive
      • Webscraping
      • Google Sheets Formulas
      • SQL
      • Terminal
      • C++
      • Unreal Engine
      • Concert Visualization
      • Dome-projection
      • UI UX
      • Professional Etiquettes
      • Woes
      • How to get better
        • Portfolio / Showreel
        • Design with cooking
      • Media theories
        • Post Cinematic Affect
        • Marxism, Reproduction and Aura
        • Heuristics & Authorship
        • 02 Semiotics
        • 3 Process?
        • 05
        • 06 Technology & Mediation
        • Formalism
        • Simulation
        • The Gaze & Media Critique
        • Import
        • 10-12
      • Recommended books
        • 🔴Things I learned
      • Mac Superuser
        • Applescript
      • InDesign
      • Illustrator
      • Blender
      • Premiere Pro
      • Mathematics
        • Probability
        • Linear Algebra
      • Shader Dev
      • Getting Started with After Effects
        • Best Practices
        • Pimping up AE
        • Environment
      • Houdini
        • Cheatsheet
        • Cookbook
        • Techniques
        • Dynamic
        • Rendering & Lighting
        • Animation
        • Particles
        • Others
          • Modeling
          • Fluids - Pyro & Smoke
          • Rendering
      • REGEX
    • Sandbox
      • Nexrender
        • Terminology
        • Project Files Preparation
Powered by GitBook
On this page
  • hscript
  • Data types declaration
  • Statements
  • Attributes
  • Functions
  • Expressions
  • Creating controls

Was this helpful?

  1. Dev
  2. archive
  3. Houdini

Cheatsheet

PreviousHoudiniNextCookbook

Last updated 4 years ago

Was this helpful?

hscript

References

  • Sidefx,

  • Sidefx,

Repositories

$CY // copy number    

Data types declaration

int x = 18; // integer
float y =  3.142 // float 
string name = "John";  // string
vector v = {1,1,1};
matrix3 m = ident(); // identity matrix creation
quaternion 

// array form: member_type var_name[]:
float my_array[];
vector_array[];
str_array[];

//global attribute
@myGlobalAttribute
v@myVector = set(-1,-1,-1);
i@var = 1;

Statements

// Loops
for(int i =1; i<10;i++)
    {
}

// if conditional 
if(x==1){
    ...
    }else{
    ...
}

// while 
while(condition){
    yourStatement;
}

Attributes

normalize 
// Position
@P 
@P.x
@P.y
@P.z

// Normal
@N 

// color
@Cd.r
@Cd 
@Cd.g
@Cd.b
@Alpha // Alpha


//scale
@pscale = 1;

@scale.x = 1;
@scale.y = 1;
@scale.z = 5;

// Set scale, and manipulate one axis only
@scale =set(1,1,1); 
@scale.y = 2.

// commonly used
@ptnum
@
 
// Position
@P 
@P.x
@P.y
@P.z

// Normal
@N 

// color
@Cd.r
@Cd 
@Cd.g
@Cd.b
@Alpha // Alpha


//scaling
@pscale = 1;

@scale.x = 1;
@scale.y = 1;
@scale.z = 5;
    
// Set scale, and manipulate one axis only
@scale =set(1,1,1); 
@scale.y = 2.

Functions

v@myVector = set(-1,-1,-1);

fit01(attribute,minVal,maxVal);
fit(attribute,ominVal,omaxVal,minVal,maxVal);
rand(value);
    
normalize
    
//noise types 
noise 
anoise
snoise 
pnoise 

    
//Copystamp
stamp("../copy1","variable",0)

Expressions

Time — $T / @Time
Frame — $F (int) / $FF (float)
Stamp — stamp("path","variable/channel",defaultValue)
    eg. stamp("../copy1","rotation",25)


//Centroid
$CEX, $CEY , $CEZ

$HIP — Project path
$HIPNAME — HIP project name

// Parsing file name 
name.$F4.jpg // $F4 padding: 0008.jpg

Creating controls

ch('threshold')
chf('threshold')
chi('threshold')
chv('vector_parm)'

float  chramp(string channel, float ramppos)
float  chramp(string channel, float ramppos, float time)
vector  chramp(string channel, float ramppos)
vector  chramp(string channel, float ramppos, float time)
Expression cookbook
Parameter Expressions
https://www.sidefx.com/docs/houdini/expressions/index.html