Nodes Remover HDA for Houdini Indie

News / 03 July 2024

I've made a simple node for Houdini Indie that deletes select nodes or networks and optionally checks the hip filename for the presence of the string to prevent the node from deleting networks in the wrong file.

This node is particularly useful when you want to send a copy of your hip file to the cloud and clean it from unnecessary stages or nodes that require Python scripts or other package dependencies that your cloud service may not have.

You can download the Nodes Remover HDA from my GitHub page




Report

Presets Manager for OD Tools in Houdini [Indie]

News / 28 June 2024

The following videos introduce the Preset Manager node, an extension for the paid third-party plugin OD Tools. This node is designed to streamline the import of parameters from JSON files, making your workflow more efficient and organized.

Download the Preset Manager node from my GitHub page. 

Introduction to OD Tools and Presets Manager node overview.

In this video, I'll demonstrate the new features: 

  • Edit Button: Opens the selected preset in your default system editor for JSON files.
  • Apply All Presets Button: Easily apply all presets at once.
  • Parameters Filter Field and Panel: You can now filter and select specific parameters to apply to your objects, such as changing only the size of the boxes.
  • Fixed a bug with the width of the Select parameters panel and added a scroll bar to preview selected parameters.
  • Added the toggle to include or exclude presets from loading using the Apply All Parameters button.
Report

Speed Up Debris Smoke Simulation with Axiom Solver in Houdini

News / 27 May 2024

Sharing my insights on using the GPU-based Axiom Solver for faster and more stable smoke simulations in Houdini. In my experience, it cut sim times from an hour to 15 minutes! Optimize your workflow and enhance your creative decisions.


Report

Houdini Modeling Tip: Sharp Surface Corners for SubD

Tutorial / 26 May 2024

Discover this quick modeling tip in Houdini! 

When working with flat surfaces in Houdini, you can't simply use the Crease node to make a corner sharp. Instead, there's another attribute for that - "cornerweight".

  1. Create Float Point Attribute
  2. Name it "cornerweight"
  3. Adjust value to be higher than 1

This is perfect for maintaining crisp edges on plane surfaces!



Find other quick tips organized in my VFX Knowledge Base

Report

How to Reduce Cache Size for RBD Simulations in Houdini

Tutorial / 25 May 2024

Managing large cache sizes for Rigid Body Simulations can be a hassle. Did you know that you can save significant disk space by caching geometry only once for the first frame and using lightweight center points for the rest?

Here's how to do it:

  1. Add an RBD I/O node right after your RBD Bullet Solver in the network view.
  2. Set the Storage type to "simulation points."
  3. Use the quick setup to "Cache High Res Geometry" of the first frame, ensuring the Time Shift node saves only the first frame.
  4. Use the quick setup again and press: "Transform High Res Geometry" to make the cached rest geometry follow the cached points.

These steps will help you optimize your Houdini workflow and save disk space.

Watch the full video tutorial:


Find other quick tips organized in my VFX Knowledge Base

Report

Soft Boolean 2025 for Houdini: Quick Start Guide

Tutorial / 23 May 2024

Hey everyone,

I’ve just released a new video tutorial on the Soft Boolean 2025 plugin for Houdini. This quick start guide covers the installation process and how to navigate the new shelf functions and parameters. Whether you're new to Houdini or a seasoned pro, this guide will help you get started quickly.

Get the plugin here: Soft Boolean 2025 for Houdini (gumroad.com)

Join our discord community: https://discord.gg/6pSVcKqbmM

Feel free to leave your feedback or questions in the comments!


Report

Modeling in Houdini using VDB SDF volumes

Tutorial / 14 May 2023

People in Modeler for Houdini Discord group were interested in SDF boolean operations. So, I created a simple example of SDF usage and shared some of my notes.

There are two versions of the same example file:

VDB_SDF_Modeling.hiplc - The original file, but it contains nodes from the Modeler 2023.4 plugin.

VDB_SDF_Modeling_Stashed.hiplc - A copy of the first file where I replaced all operations from the Modeler 2023.4 plugin with Stash nodes.

If you do not have a Modeler plugin, then download the second file, and you will still get an idea of boolean operations using SDF volumes.


The file contains examples of using the following nodes and operations:

VDB from Polygons (to convert polygonal geometry to SDF volume).

VDB Smooth SDF (to smooth edges of geometry similar to the results from polygonal round bevel).

VDB Resample (to change voxel density to increase object detail).

VDB Combine (to apply boolean operations: SDF Union, SDF Difference, SDF Intersection).

VDB Reshape SDF (to expand or narrow voxel shapes, similar to the Peak operation).

VDB Convert (to convert SDF into polygonal geometry).

Volume Deform (to deform voxel shapes by using Lattice from Volume node in conjunction with Bend node to deform point grid which represents the voxel grid).

Name and Attribute Edit String (to build a hierarchy of LOP primitives while working in SOP)


Notes about using SDF nodes:

  1. Increase voxel density only when necessary. Generally, I used a "voxel size" of 0.02 when converting geometry through "VDB to Polygons" and could move shapes interactively. However, in some cases, I needed narrower or smaller bevels and increased density to 0.01 voxel per unit in exchange for performance.
  2. After all operations, you can increase voxel density through the "VDB Resample" to get a denser and more detailed polygonal mesh from "Convert VDB".
  3. Use different smoothing modes to maintain performance. Instead of increasing the number of smoothing iterations in VDB Smooth SDF, try changing the operation type: Mean Value for normal smoothing, Gaussian for strong smoothing, Mean Curvature Flow for weak smoothing or smoothing small details.
  4. If you need to place one object inside another, for example, a button in a housing, use VDB Reshape SDF to expand the SDF before boolean subtraction.
  5. I didn't find a way to store color in SDF and pass it through boolean operations, so after converting to polygons by "Convert VDB", I used the "Bounding Volume" parameter in the "Group" node to select the area that I want to color using SDF volume.
  6. Deform objects in voxels through "Volume deform" instead of deforming them in polygons. This is convenient because the bend deformer, when used on polygons, will not be able to bend the area where there is not enough geometry, but through Volume deformation, you bend a point grid, so you can bend and deform even each pair of voxels.

Notes on modeling in SOPs within LOPs:

  1. To improve performance, prevent SOPs from constantly transferring data to LOPs. To do this, place the "Output" node inside the SOP and connect the geometry only when you want to transfer it to the LOP; otherwise, keep the geometry disconnected.
  2. The same goes for working inside the "Component Geometry" node: connect geometry to the default, proxy, and simproxy output nodes only when necessary; otherwise, the entire node tree will be recalculated with every change.
  3. Start building a hierarchy of LOP primitives while still in SOPs. Hierarchy construction will occur from top to bottom, from leaf to root. At the beginning (for leaves), add a "Name" node to create the corresponding attribute and enter the geometry name into it, for example, Mesh. Then add an "Attribute Edit String" node, specify that you want to edit the "Name" attribute, and in the Editor tab, set "*" (all existing names) in the "From" parameter. To the "To" parameter, add the name of the LOP primitive where you want to place the geometry, like "Primitive/*". Thus, the Name attribute will become "Primitive/Mesh". Further, continue adding Attribute Edit String nodes with the same parameters to assign more parents or group primitives after merging. The last Attribute Edit String will have the "/*" name set in the "To" parameter and will close the path (for example, "/Gamepad/Triggers/Primitive1/Mesh").

I've used the video as a reference for the model.

Report

KineFX Ball for Houdini: Animation Rig and Geometry (HDALC)

Article / 13 May 2023

I made the rig for practice in animation and as example for how to make a squash and stretch constraint using KineFX in Houdini.

It consists of 3 nodes:
1. KineFX Ball Geometry (optional) node contains set of 6 pre-cached geometry presets for different types of balls: Tennis, Golf, Soccer, Volleyball, Basketball and Toy.
You can replace this node with any geometry that should be placed on the ground and be 1 unit in height.
Or don't use anything at all because next node contains a simple test sphere inside.

2. KineFX Ball Rig contains a skeleton rig for a ball, controllers, and a shape library for them. You can change the appearance of those shapes by diving inside the node and adjusting the Attach controls node's parameters.
3. KineFX Ball Animation gives you access to the Rig Pose state for animating in the viewport and a set of parameters for precise control. The node also contains logic for calculating squash and stretch deformations of the rig and "Joint Deform" to output final deformed(animated) geometry.

How to install:
1. Download these HDA files from the github repo:
FaitelTech.KineFX_Ball_Geometry.1.0.hdalc
FaitelTech.KineFX_Ball_Rig.1.0.hdalc
FaitelTech.KineFX_Ball_Animation.1.0.hdalc
2. Install them through Houdini: File - Import - Houdini Digital Asset or copy them to the Houdini preferences folder (Documents/Houdini 19.5 on Windows) - otls.
3. In SOP context in Houdini, press TAB and type: KineFX Ball

FAQ:
How to animate a ball?
- The rig made and inspired to be used along with the tutorials for Maya:
FREE Ball Animation Rig for Maya
Simple Ball Bounce Animation Tutorial
Ball Bouncing Along Animation Tutorial in Maya - PART 2
But how to do the same in Houdini?
If you don't familiar with Houdini's animation editor, watch the series:
Houdini Animation Editor 101 - Part I 
Houdini Animation Editor 101 - Part II
How do I reset the animation?
In the KineFX Ball Animation node right, right-click on any parameter or parameters tab (Ball Animation tab, for example) - Delete Channels, Revert to default.


Report

Compile OpenCV with CUDA support for Python in Houdini on Windows 11

Tutorial / 08 May 2023

With the recent release of MLOPS for Houdini, I've been interested in Python libraries for image processing. One such library is OpenCV. The pip-installable version of OpenCV mostly runs on a CPU and uses OpenCL to accelerate some functions. However, it is necessary to compile OpenCV with CUDA support to accelerate features like tracking and image warping. 

I recommend not skipping any steps in this article because it can lead to compilation errors or problems installing the compiled package. I've tried to shortcut on every step, so believe me :)

To start with, I'll briefly list what we'll need:

1. Installing the CUDA Toolkit

CUDA allows software to use graphic cards from Nvidia for data processing. 

Download and install the CUDA Toolkit with an NVIDIA graphics card on your PC. I will be using CUDA 11.8 because the MLOPS nodes use this version at the time of writing this article. Use Express settings during installation; we will install cuDNN to a folder of CUDA installation next.

2. Installing cuDNN. 

CuDNN is a GPU-accelerated library for deep neural networks. 

OpenCV supports DNN, so we must install it to compile the package successfully. 

To download cuDNN, register and sign in on the https://developer.nvidiathe.com website.

During registration, if you are not associated with any organization, then in the mandatory field "Organization name", specify "Individual". 

Click on Download cuDNN v8.9.1 (May 5th, 2023), for CUDA 11.x , then Local Installer for Windows (Zip)

Download the archive to any folder, for example, C:\Users\Aleksandr\Documents\Sources\  

Unpack and open the folder: ex. C:\Users\Aleksandr\Documents\Sources\cudnn-windows-x86_64-8.9.1.23_cuda11-archive\cudnn-windows-x86_64-8.9.1.23_cuda11-archive

To install cuDNN, you need to select and copy the bin, and include, lib folders from the downloaded cuDNN directory to the directory where CUDA Toolkit is installed: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8 by default. Copy all three folders with replacement.

Copy and replace bin, include, lib folders from cuDNN to root of CUDA/v11.8 folder.

3. Installing Visual Studio

OpenCV sources are written in C++, and we need Visual Studio software to compile them into a Python package.

Download the Visual Studio Community 2022 version. 

Run VisualStudioSetup, after which the Visual Studio Installer will open. Here, we should select all the necessary components.

First, we need to check "Desktop development with C++", 

and on the right, we will need the following optional components: 

  • MSVC v143 - VC 2022 C++ x64/x86 building tools
  • C++ ATL for the latest v143 build tools
  • Windows 11 SDK
  • Just-in-time debugger
  • C++ Profiler tools
  • C++ CMake tools for Windows
  • C++ Address Sanitizer

Second, we need "Python Development":

  • Python 3 (64-bit), 
  • Python Native development tools, 

This way, we install Python inside Visual Studio and guarantee the creation of an OpenCV package at the end of this article. 

Press Install.

3. Installing Numpy.

NumPy is a Python dependency often used with OpenCV to manipulate and process images and videos efficiently. We need it to build OpenCV.

Open Command Prompt in Windows 11: 

Press Start - Type "CMD" - Command Prompt

Install Numpy through pip Python's package manager:

Type: py -m pip install numpy

Press Enter

In this screenshot, NumPy is already installed in Python in the Visual Studio folder

4. Install CMake

CMake automates the generation of build files for various platforms. We need it to generate Visual Studio project files from downloaded OpenCV sources.

Download Cmake and install it in the default location.

Windows x64 Installer: cmake-3.26.3-windows-x86_64.msi

5. Download OpenCV sources

This is the original source code of the OpenCV project.

Download and unpack the OpenCV source files into any folder, for example, C:\Users\Aleksandr\Documents\Sources\opencv-4.7.0.

OpenCV-4.7.0 - Sources

6. Download OpenCV-contrib files

OpenCV-contrib is a repository of additional modules and extensions for OpenCV. We're going to get CUDA modules from it.

Download OpenCV-contrib files and unpack them into any folder, for example, C:\Users\Aleksandr\Documents\Sources\opencv_contrib-4.7.0

GitHub - OpenCV/OpenCV_contrib - Tags - 4.7.0

7. Create a Build folder

We need some folders to Cmake generate project files into.

Create an empty folder, "Build," to store opencv project files for the building. For ex. C:\Users\Aleksandr\Documents\Sources\Build


8. Run Cmake

Press Start - run CMake

After that, the CMake window will open, where we will prepare the Visual Studio project for launch:

In "Where is the source code" press the "browse source" button and select the folder where we extracted opencv source code previously. For ex. C:\Users\Aleksandr\Documents\Sources\opencv-4.7.0

In "Where to build the binaries," press "browse build" and select Build folder, which we created previously. For ex. C:\Users\Aleksandr\Documents\Sources\Build

Press the Configure button.

Configure window - Optional platform for generation - select x64 - Press Finish

Type the next variables in the search field:

WITH_CUDA : Check
ENABLE_FAST_MATH : Check
BUILD_OPENEXR : Check
BUILD_opencv_world : Check

Also, we need to set the path to the folder where additional OpenCV modules (opencv_contrib-4.7.0\modules) are stored:

OPENCV_EXTRA_MODULES_PATH : C:/Users/Aleksandr/Documents/Sources/opencv_contrib-4.7.0/opencv_contrib-4.7.0/modules

Press the Configure button again.

Now we can configure CUDA module variables:

CUDA_FAST_MATH : Check

You must check the Compute capability (version) specific to your graphic card here. For example, I have a graphic card, Nvidia RTX 3060, and its computing capability version is 8.6


CUDA_ARCH_BIN : 8.6

We don't need to debug the project, so change the next variable to Release only:


CMAKE_CONFIGURATION_TYPES : Release

Press Configure.

Press Generate.

Press Open Project.


After that, there will be a configuration, the first launch of Visual Studio, and the OpenCV project will open, which we will compile.

9. Build and Install OpenCV in Visual Studio


When Visual Studio and the project open, in the right-hand window Solution Explorer, expand the CMakeTargets tab.

In the tab, Right Click on ALL_BUILD - press BUILD

Wait, this building process may take a long time.

Next, Right-click on INSTALL and press BUILD.

The result of the installation is a new cv2 folder in the Python directory of Visual Studio:

C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\Lib\site-packages\cv2

10. Copy and check the OpenCV package in Houdini

We must copy the OpenCV package to the directory where Houdini's hython can find it.

If you are not using MLOPs, it can be a directory in your Houdini user preferences: C:\Users\Aleksandr\Documents\houdini19.5\scripts\python . 

If you are using MLOPs, go to the folder where you store MLOPs data: $MLOPS/data/dependencies/python, for example, C:\Users\Aleksandr\Documents\GitHub\MLOPs\data\dependencies\python. Then, backup copies of the cv2 folder to any location and delete it. 

Copy the cv2 folder to the target directory from C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\Lib\site-packages. 

Launch Houdini.

Open Windows - Python Source Editor

Type the code:

import cv2

count = cv2.cuda.getCudaEnabledDeviceCount()

print(count)

This code will output the number of devices that support CUDA computations to the console.

 If this number is greater than 0, for example, 1, you have successfully installed OpenCV with CUDA support in Houdini.

Related articles: 

How to build OpenCV with Cuda and cuDNN support in Windows – 2023

Quick and Easy OpenCV Python Installation with Cuda GPU in Under 10 Minutes

Report

Digital Human Contest 2020 - Facial Hair

Making Of / 18 November 2020

When I was looking for how to do a hair, I found the stream record where Arvid Schneider very clearly showed how to make hair using the Groombear  plugin for Houdini. The plugin seemed great to me and very convenient, but nevertheless, the overall style of work remained the same: to put a guide for the hair, you need to change the direction of the viewport's camera a lot and often, to see guide's position in three- dimensional space. Then I remembered that the most convenient thing I've seen for working with curves is the Gravity Sketch

Despite the fact that VR is still in the early stages of its development, I always have fun sketching in three-dimensional space, especially it’s convenient to manage rigs and mannequins, as well as work with complex shapes of curves, plus references could be placed anywhere and in any size.

Because of inexperience, I overdid a little bit (a lot!) with the density of the guides.

When exporting curves from Gravity Sketch there were two difficulties, the first is that the curves were three-dimensional geometry, and the second is that unlike GroomBear, the curves in Sketch Gravity fall under a geometry.

So, I've made a prototype in Houdini that turns gravity Sketch's cylindrical tubes into curves, and removes parts of the curves that are inside the mesh.

Experimentally, I found out that all the cylindrical curves in the gravity sketch consist of 12 corners, which I fused (weld) to one point.

Note: In the future, I can complete an algorithm that would save the diameter of the cylinder before flattening and write it down as a width parameter for guides to GroomBear, thus achieving a complete external matching of curves from Gravity Sketch and GroomBear.

Curves that got inside the mesh, I easily removed, thanks to the solution proposed by Petz on odforce.net.  Thank you, Petz!


//run over Primitives


int points[] = primpoints(0, @primnum);
int point_end = points[-1];
int point_next = points[1];


vector hit_pos, hit_uv;
vector ray_origin = point(0, "P", points[0]);
vector ray_dir = point(0, "P", points[1]) - ray_origin;
int count = 0;


int cond = inpointgroup(geoself(), "_inside_", points[0]);
int curve = addprim(geoself(), "polyline", points[0]);
setprimgroup(geoself(), "inside", curve, cond, "set");


int i = 1;
do
{
    int prim = intersect(1, ray_origin, ray_dir, hit_pos, hit_uv);
    if(prim == -1)
    {
        point_next = points[i];
        addvertex(geoself(), curve, point_next);
        ray_origin = point(0, "P", points[i++]);
        ray_dir = point(0, "P", points[i]) - ray_origin;
    }
    
    else
    {
        count += 1;
        point_next = addpoint(geoself(), hit_pos);
        addvertex(geoself(), curve, point_next);
        curve = addprim(geoself(), "polyline", point_next);
        if(!cond)
            setprimgroup(geoself(), "inside", curve, count % 2, "set");
        ray_dir = point(0, "P", points[i]) - hit_pos;
        ray_origin = hit_pos + normalize(ray_dir) * 0.001;
    }
}
while(point_next != point_end);
removeprim(geoself(), @primnum, 0);

Because the result is ordinary curves, GroomBear easily converted them into guides.

Then I drew the attributes where the hair will grow.

And moved the eyebrows by looking on a reference photo through Pureref, it is more convenient to do it in Houdini rather than in Gravity Sketch, because the roots of the hair are tied to the mesh.

When I was generating hair, I basically added four effects from Hair Tools shelf in different proportions: Clump, Frizz, Bend, Lift.

In the Hair Utils panel in Houdini, there are Generate Hair Cards and Hair Card Texture buttons, by using them I've transformed my hair into cards and baked color textures. I did it very intuitively and will try to better understand this feature in the near future.

The submission date for the contest is already over, but I want to work in more detail with the hair and their binding to the face of the head, as well as try to make dreadlocks with complex weaving, where all possibilities of Sketch Gravity VR will be revealed in full.


Report