Friday, October 12, 2018

Houdini MIGS Talk online

Hello everyone,

This talk was made by 3 people : Alejandro Martinez / Pascal Beeckmans / Alexandre Stroukoff

We worked hard to make this talk for the 2017 MIGS to share our great experience with Houdini. We though it was a very good example of showing how you can use Houdini in a game production in a multitude of differents ways. 

I Hope you'll find it interesting !

00:00 Introduction
02:50 Procedural Backgrounds (High detailed backgrounds)
11:53 Procedural Rocks Formations ( Displacement techniques)
19:20 Vegetation Tool (Procedural Vertex Coloring of meshes)
26:20 Vertex Heatmap Tool (Visualizing Vertex Density)
34:34 Shatter Effect ( Mesh Processing for Realtime VFXs)
42:17 Vertex Destruction Tool ( Vertex Texture Animation Rigids )

Sunday, May 20, 2018

Houdini edge to curve

Just a quick houdini tips : Extract a curve from an edge group !

Saturday, May 19, 2018

Data from Houdini To Unity via text file

For my current project, I needed a way to get some position and vector from houdini to unity.
I just wanted to store points position + normals in two Vector3 Array in unity for different usage

This may be something really simple for python users, but it was kind a new for me, because I don't  really do a lot of Python and Text parsing at all !

Here are the basics steps :

  1. Generate data in houdini
  2. Save data in text file with Python sop
  3. Parse that data and convert it to something unity can read 

This is the geometry I'm working on, I'm going to scatter some points on it

I have the data I want to transfer from houdini.  Here are some randomly scattered points, each points has a position ("P" attribute, and a normal "N" attribute)

Now for the interesting part : Using a Python SOP, with some code I can have houdini write everything in a text file for me. Here is that code snippet with comments

node = hou.pwd() # get the current node
geo = node.geometry() #get geometry of node

myTxt = file("C:/Houdini/MyTextFile.txt", "w") #create file, w = write mode

for point in geo.points(): #iterate through each geo point
    pos = point.position() #save position in a pos var
    s = str(pos) #write position to s string
    myTxt.write(s) #write s string into a file


It's really simple code, and it will output something like this (change "C:/Houdini/MyTextFile.txt" to what you want of course)

Each points position is now written in the file, if you check in your geometry spreadsheet, you will see that the position indeed match in the same order. I duplicate the node and did the same thing for the Normal. the only change is  :

nm = point.attribValue("N")  instead of pos = point.position() 

Just import that Text file in Unity (drag and drop in your project, or just save it directly in your project folder by changing the path in the Python code)

In unity I them created a (pretty crappy) code to parse this file, this was actually a bit painful for me, parsing text is really not fun.  you can see the whole code here, I did my best to comment it, but it's honestly bad code...I did all of this in a scriptable object, that way I can have this data sitting nicely in my project

in association to this code that convert the textfile into two vector3 lists of Position and normals, I did a quick custom inspector to have a button to refresh those values  that trigger the main parse function

this tiny bit of code gives me acces to this button, when I create a new object of type SamplingPointlist, by Right Clicking my project > Create > Sampling Point List

After the button is pressed...Done ! My data is now ready to be used ! 
To visualize it quickly, I have another script with declared variable of type  

public SamplingPointsList myPointListAsset;

And I can just iterate through every single myPointListAsset.Positions[x] and myPointListAsset.Normals[x] and draw a quick sphere, and line using the normal (also drive the line color from normal, just for fun).

Its not the most optmized code, but this is all offline generation and parsing, so it works for me :)

At the end here is the files I have in unity : 
  • pointNormals.txt  (file from houdini)
  • pointPosition.txt  (file from houdini) 
  • SamplingPointList.cs (Scriptable Object Class with the main code for parsing )
  • LevelPointList01.asset (this is a scriptable object create with the RightClick>Create menu, derived from the above class. I'll have one for each level in my case)
  • GenerateSamplingPoints.cs (Editor class to add a button to the scriptable object inspector)
  • +Code to visualize the gizmo

I hope it help someone ! 
Also feel free to share the proper way to parse the data to directly get the data as vector ! I tried some regex, but I won't touch that thing ever again unless I need too 😫

edit : added/updated code link/ typos

Friday, April 27, 2018

Latest Houdini+ unity project

Here is one of the project I'm working on, (on and off at various time...)

The goal is to make a small interactive experience, with a gameplay centered around finding hidden locations in a map by using a flow to find it.

This "flow" will actually be a flowmap generated with houdini, and I'm trying to develop a system stable enough to be able to create a gameplay around this.

Being an amateur programmer, everything is CPU right now, but I guess at some point I will have to learn about multi threading to optimize it (maybe compute shader or crazy stuff like this ?)....Anyway, it works for now, and the performances are quite good.

This is a continuation of the two first gif of this post

here are a bunch of gifs from this experimenting stage (I'm also posting the failed one :p)

first test, having trouble to getting my system to sample the flowmap in 3d

starting to work ! using multiple raycast in random directions per frame to find the nearest surface, and sampling that flowmap

Geometry used to generated the flowmap, using VEX space colonizaton for now, but that will change for sure

Latest progress, everything is starting to work nicely
Next step is to test the system on a big complex scene, and also making the system more stable, I already have a lot of idea for this, but i will only optimized and refactor when needed !! Finding the art direction of the project is also in progress

Wednesday, October 11, 2017

Houdini Pyro FX learning

Having fun understanding all the stuff that goes into a fire simulation and the combustion algorithm ( Pyro Solver as called in Houdini )...As someone who has never done fluid and fire sims, it can be pretty daunting, but after some time, the pieces start to make sense

here are a bunch of different tests I made. A lot of wrong stuff here but you can see the process of playing and learning the parameters. I find those to be way too noisy, and too fast and linear in speed

I still have trouble tweaking some parameters (namely Drag, Dissipation, Disturbance,...)

In the end it all come to doing a lot of iterations and seeing what each parameter does. It can be scary how a small change can give a completely different look, but that's the beauty of it I guess !

Friday, June 2, 2017

Houdini + Unity

procedural japanese store progress (inspired by @gommatt) :

Tuesday, February 14, 2017

VFX training #02

03 - lightning strike

Sunday, February 5, 2017

VFX training #01

I'm starting a series of VFX (at least one per week) ...

01 - water twirl

02 - GenericHeal.fx

More Houdini

More houdini stuff : 

"space colonisation algorithm"  in VEX

Basic procedural modeling

Monday, January 23, 2017

Cracks mesh generation

A simple houdini exercise, to generate cracks/veins-like shapes. It generates stripes with correct uvs with a random V scale, to create speed variation when scrolling a texture or something.

The graph is pretty simple, it's mainly based around the findShortestPath SOP I use a lot since I saw this video ( from Entagma.  The "Tricky" part is just iterating over each branch, and creating a witdh to the geometry, and the uvs.

The uvs are generated from the origin line ($PT/$NPT), apply a random scale in V in the for each loop, and drive the scale of the line with the same expresion ($PT/$NPT) !

I export the mesh in unity, and with a simple shader that use the V of the UVs, it create this "growing" feeling, with a nice speed variation

you can download the very simple file here :

Tuesday, October 18, 2016

Houdini terrain tests

playing with vex and vops in houdini, staying in sops for now (that sentence doesnt make ANY sense out of the context)