I really like how you've articulated your entire process. This was a very enriching read. A Well deserved feature!
Great article! Thanks for the awesome read.
Wow, this is so cool! Nice job!
3D Artist Magnus Larsson has recently been experimenting a lot with procedural architecture and various ways you can use it in Unreal Engine 4. We talk with him about his production and ways UE4-developers can benefit from using Houdini tech.
UE4 and Houdini
You can work in several different ways with Houdini and UE4. In my current test project I’m using the Houdini Engine plugin in UE4, which makes it possible to create Houdini Digital Assets (HDA). These allow you to create a procedural node systems and expose values to Unreal. These values can be the amount of floors in a skyscraper, the seed value for balcony placement, etc. After placing your HDA file in the UE4 level these exposed values offer live control of the asset within UE4.
For destruction effects there is this nice tool for Houdini written by Steven Burrichter that can export simulated animations to FBX (which UE4 reads). I believe you posted some tests I did with that a couple of months ago, when I tested out a 8423 joints animation in Unreal:
For fluid effects you can do several things – either create flowmaps, or vertex animated deforming mesh. For the more advanced stuff some people will write their own exporters. But generally that’s really easy to do in Houdini.
Using Houdini for Game Development
People come up with new ways of using Houdini for games all the time. In my opinion, the best use is when you have asset types you are going to reuse a lot but want the ability to make them always look slightly different. And with Houdini Engine that becomes very easy to do in game engines that support Houdini Engine such as Unreal.
Houdini is also very useful to solve those impossible tasks since it is so flexible.
First of all let me just say that this is a work in progress – my objective is to learn more about what is possible to do with Houdini Engine in combination with UE4 – especially when using the instancing tools in Houdini. For me this project is less about what I’m building, and more about how to achieve it technically. I started building … and it evolved into a futuristic cyberpunk city kinda thing.
The main thing Houdini is doing is generating the buildings and letting me iterate quickly by pulling on sliders making the buildings look different – height/width/depth, seed values for balcony placement etc. Another thing I have confirmed that works – which somewhat surprised me – is that I can make my modules in Modo, reference them in my Houdini file, and the HDA will just work with them inside UE4. When I start to model more “final” modules at some point, it will be with a very easy and nice workflow.
You can do this in many different ways with Houdini. My approach was to generate points with rules – each point then gets assigned to be a specific module and uses a lot of submodules.
I’ve set up a lot of rules using Houdini’s VEX code – procedural grouping and some other ways. So the points have attributes, like ‘which floor this point belongs to’, ‘is it a corner point or not’ etc – and then I run the rules over this. So if it is a corner point it can not become a balcony etc.
I’m also layering the rules – for example, if there is a balcony only then it can place cups on the balcony since these are submodules of the balcony module. Same thing for the windows, which are a submodule of the wall module that has a window opening. This allows me to make each window open a different amount.
Regarding signs, they can only be placed on corners, and they have different heights so I have a rule going from the bottom floor and up each corner – and at every point there is a random chance to spawn a sign. It then chooses between the different signs I have supplied, and depending on how tall the sign is, the following points will be marked as un-available to spawn signs.
It’s very nice to work in Unreal with your HDA file placed in the level and just pull the floor slider and see your skyscraper grow in real-time.
Materials, Lighting and Other Details
My material workflow is – create your different materials in Unreal – in Houdini apply the attribute “Unreal_Face_Material” referencing that material – then when you load your Houdini asset in Unreal it will use that material. It’s rather simple thing to do.
Lighting to my knowledge is however a bit limited now. Point lights are not supported to be generated from a HDA. It is supported in Unity however and, as far as I know, will come to Unreal at some point. Also you can’t set up lightmass properties of a Houdini instanced object to be “us emissive for lighting” but I believe that will come at some point too. However, there is a work around for that – you can bake down your Houdini Asset to a blueprint asset and switch emissive on.
To be fair this is the first “big” thing I am doing with Houdini Engine in UE4, and I don’t have that much experience in UE4 – so some of the issues I’m running into might just be me. With that said, so far UE4 has crashed a couple of times, and destroyed my map, so the only way to move forward was to create a new map. I’m not sure if that’s a UE4 issue or a UE4+Houdini Engine issue, but it is very frustrating.
However, one issue I constantly run into is that when I update my HDA, the exposed parameters (eg. how many floors the house has, width/depth etc) will get reset to their default values. So I have to put all of those values back in again. When I have 16 or so values exposed and I’ve made lots of tweaks to them, it’s very frustrating if they get reset. Another thing is that sometimes when you add new exposed values they might destroy your exposed values interface, so suddenly floors might be affecting width instead in UE4, so you have to actually remove the asset from your level and place it again to get the correct newly-exposed parameters. These two things are making it very hard to work iteratively.
That said, the developers are active in the forums helping with answers where they can, and putting things on their to-do list when you flag things not working as they should. There’s also an RFE/BUG reporting option on SideFX’s site. One nice thing with Houdini support is that you can send them your node network for debugging, which I believe helps a lot developing these nice tools.
Simulation of Destruction in UE4
If you haven’t already, certainly look into the Real-time VFX tools that Steven Burrichter developed. Using these, exporting simulation destruction to UE4 is very easy. He also has related instructional video tutorials on his Vimeo channel. The tools get you moving, then it’s up to you and your Houdini skills to make your project look great!