Hey everyone, first off I will say I am fairly new to Unreal and Houdini, yet I figured out how to get results and export files with the city sample process explained in the unreal tutorial .
I am using Houdini FX 19.5.368 python3 with the latest unreal plugin from Github for 19.5.368(I believe it’s release is 21 or 22 days old as of now)
I followed the Unreal tutorial and came across many of the same problems as everyone else. I will break it down in steps for what has worked for me.
These next steps are perfomed before opening Houdini
Step 1: Instead of creating the folders inside the city sample source and copying the Houdini folder to there, I wound up placing the Houdini folder in my $hip folder, which for me is C:\Users[user name] (not sure if this is standard as I am new to Houdini)
Step 2: I then placed the freeway_export.py and init.py in C:\Program Files\Side Effects Software\Houdini 19.5.368\python39\lib\freeway_export
Step 3: I edit the freeway_export.py, Every line that contained print message I put parentheses around message like so (message)
Now into Houdini
Step 4: I start a fresh project and rather than placing the nodes from the tab menu I copy them from the Small_City.hip. I open the Small_City.hip, copying and pasting to my project for each node as I go along.
4.1: Starting with the curve node(curve2) for the city shape, I then delete the points and
place my own for the shape of my city.
4.2: Now I copy the city layout node(layout2) and connect the curve to the proper
input City Shape(Input1)
4.3: Next I copy the curves(curve1 and curve3) and merge(merge1) node under city
arteries and place them in my project, Instead of deleting the points I move them to
my desired positions and connect the merge node to the proper input of the layout
node Arterial Splines(input2)
4.4:Continuing the same process with the city zones I copy the curves(curve4 & curve6)
as well as all other nodes connected(zone1 & zone2, color2 & color1, merge) and place
them in my project. For each curve you can either delete the points or move them to
where you need them. Next connect them to the proper input of the layout node City
Zones(input 3)
4.5:Moving on to the freeway path copy both nodes and paste them in your project edit
the curve(fr_curve_main) as you see fit
Be sure to switch Houdini to manual mode inside your project
4.6: Copy the city processor node(processor1) and place inside your project.
*Before connecting anything to this node*
Go to the options tab and switch connection
rules from Small City to Blank
Important
Right click the city processor node and select Type Properties
From here go to the Scripts tab use the find button and type print. You will need to add parentheses around 3 things. First “no pdg folder found” Second “no PDG result found” and Third “no CACHES folder found”.
Upon applying and accepting I would receive numerous errors if I had not placed the Houdini folder from the small_city folder in my $hip folder
4.7: Connect the city layout node(layout2) to the processor node processor1(City
Processor) city_layout(input1)
Connect the Freeway Util Curve Attributes node(curve_attributes2) to processor1(City
Processor) freeway_input(input 2)
4.8:Switch Houdini back to Auto Update mode and let the process complete
5.0: Now right click the processor node(City Processor) and click Allow Editing of
Contents
This next part I am not entirely sure about(You can perform it or not, it removes the red
triangle from the pdg_result node)
Fixing the PDG_results node(OPTIONAL)
5.1: Dive into the node and in section 4: Building Generators on the Buildings node you will
see the red problem triangle.
5.2: Right click the buildings node and click Allow Editing of Contents and dive in. You will
see the PDG_result node has another red triangle, go to the node above this
BUILDING_GENERATION_PDG_TOPNET, double click and dive in you will see the node
Bldg_generator click on this and look at the parameters shown you will notice the hda
file points to is a folder that is non existent, switch this to the building.hda contained
in C:\Users[user name}\houdini\otls
5.2.1: In the Task bar click Cook the output nodes work items. Once this completes
you can go up one level and click on the PDG_results node an the triangle will
disappear
Fixing the freeway_export reload problem(ESSENTIAL)*
5.1: Goto Section 2: Freeway and click on the Freeway node look at the parameters
window and make sure connection rules are set to blank
5.2:Right click the Freeway node and allow editing of contents, dive into the node and find the Control_Export node right click this and go to parameters and channels>edit parameter interface.
5.2.1: Once here look under existing parameters and click Export All(export_all), look
at call back script and match it to this
import freeway_export.freeway_export as fe;import importlib;importlib.reload(fe);fe.run()
Click apply and accept
Now the problems should all be fixed and you will be able to continue along with the city sample tutorial.
*I use “process city without PDG” then go to the next tab(caches and exports) and scroll down and click “EXPORT ALL PBC”( Not sure if it makes a difference if you use the button on the process tab or the caches and exports tab but I always use this one)
I was able to complete both sections of the tutorial, export to and generate my city in Unreal.
Once again I am new to both Unreal and Houdini, If someone is able to shorten the steps of this process by all means let’s all help each other out.