Procedural Spline generator from Houdini to Unreal

   1577   12   1
User Avatar
Member
21 posts
Joined: Nov. 2017
Offline
Hi everyone!
I’m trying to create a tool with Houdini Engine for Unreal Engine 4.
I want to create a spline on which points I can place different meshes. For example: procedural loop shapes, twist shapes, banking etc… (like a rollercoaster).
Could anyone give me some advice on how to do it? Or send me a tutorial about it?
My goal is to create a Tool that allows me to create multiple splines in Unreal and attach them to one another in order to create a single track.
How can I set the tool to combine each spline into a track every time in new “piece” is created and still be able to edit that single piece?
I’d like to create a button that allows me to create new curves in Unreal as a part of the Digital Asset and then edit those curves as described above.
Do you think is possible or there’s better way to accomplish this?
In Houdini I created a procedural curve where I can set banking and another curve for loop shapes that it is attach to the last point of the first curve. But I don’t no how I can create this tool for create this track in Unreal then.
In Houdini I created a procedural curve in which it is possible to set up banking operations and another curve for loop shapes that is connected to the last point of the first curve. But I don't know how I can create this tool to create this track in Unreal and continue to add new procedural curves after and blend them.

I am attaching what I created in Houdini and imported into Unreal with Houdini Engine.

Edited by Mary537 - May 15, 2019 10:41:00

Attachments:
Houdini_splineEditor.JPG (89.3 KB)
Unreal_splineEditor.JPG (126.6 KB)

User Avatar
Member
400 posts
Joined: Feb. 2013
Offline
You seem to have a good handle on things already.
My thoughts:
1. You probably already know this, but be aware that your tool will (for the foreseeable future) only ever be usable at editor time (not runtime) in Unreal.
2. In Unreal make a simple Blueprint with just an Unreal spline object component in it. (I will call this splineBP.) When you drag the splineBP into the Unreal editor you should be able to move and edit it (add remove points etc).
2. In Houdini, when you put down an object merge node and expose the Object* parameter to your HDA, you get that as an input on your HDA. You can plug splineBPs in there. You can have any number of inputs and any input may take any number of things. So you could make inputs that have different meanings and give you different controls. You could also plug in meshes and other things.
You can also set the input to generate its own special spline curve.
3. The unreal spline component gets re-sampled when it goes into the HDA. Plug a splineBP into the HDA and use the debug open Scene in Houdini menu option to see what you actually get. I recommend saving that for reference and working from there.
4. Resample, ends, refine, polyframe and many other SOPs as well as VEX/VOPs will be your friends. Personally I strongly recommend to work with VEX or VOPs if you are serious about learning Houdini, but VOPs is easier to start with if you don't find a good guide.
User Avatar
Member
21 posts
Joined: Nov. 2017
Offline
Thank you so much for your answer. I managed to continue
User Avatar
Member
13 posts
Joined: March 2014
Offline
Hi. I can't seem to get this working; I can't attach a BP (with spline component) to the HDA (with object merge node).

In Houdini, in my HDA, I have object merge node feeding into my graph. I dragged “Object 1” from the object merge into Type Properties. In Channels tab of the parameter now has “object_merge1/objpath1”. Apply,Accept. Save Node Type, Match Current Definition.

In Unreal, I select my imported HDA and Rebuild All Instances. I now have an input parameter that can be: Geometry Input, Asset Input, Curve Input, Landscape Input, World Outliner Input, Skeletal Mesh Input. No matter which I choose, I can't select my CharacterSplinePath BP (which contains a simple Spline Component created from Add Component, and I checked Editable when Inherited). What Input setting does it need to be to use the blueprint?

Probably something stupid that I'm missing, but I can't figure this out.

Thanks in advance!
-Dave
User Avatar
Staff
367 posts
Joined: Sept. 2016
Offline
Hi,

Spline Component nested in a Blue print can be read via world outliner input:
- Create an instance of your BP with the spline component in the level.
- Set your input type to World Outliner
- Select the BP Actor

The BP's spline will be resampled and converted to a Houdini Curve by the plugin, and assigned to the input.
User Avatar
Member
13 posts
Joined: March 2014
Offline
Almost got it. My stupid problem was with selecting the BP (“Start Selection (Locks Details Panel)”; “Use Current Selection(Unlocks Details Panel)”).

I'm close, but now I've discovered a new problem. When I try using the Unreal BP Spline, I get weird results when I translate to the side, Y. If I keep the spline in XZ coordinates it works great. I added a switch to my HDA so I can switch between the unreal spline and my internal Houdini curve. When I try using my Houdini Curve, it works perfect with none of the issues of the unreal spline when translating to the side. Any ideas?

Thanks for you help!
-Dave
Edited by David Wigforss - Oct. 3, 2019 16:01:56

Attachments:
UNREAL-BadCurve.jpg (79.4 KB)
DW_TrainTracks.hdalc (43.7 KB)

User Avatar
Member
460 posts
Joined: Sept. 2013
Offline
I sketched out a rollercoaster setup.

Attachments:
rollercoaster.jpg (29.8 KB)
rollercoaster.hipnc (125.3 KB)

User Avatar
Member
13 posts
Joined: March 2014
Offline
Wow. Thanks for putting that together!

So I could try it in UE4, I separated the circle & point jitter and referenced that with an object merge. Works perfect with the Unreal Spline!

It's gonna take me a little bit to fully dissect what you're doing in the point wrangles.

Really appreciate you posting the hip file. Thanks!
-Dave
User Avatar
Member
460 posts
Joined: Sept. 2013
Offline
Post a screenshot from UE4 if you like! Also don't hesitate to ask..
User Avatar
Member
6 posts
Joined: Sept. 2018
Offline
Konstantin Magnus
Post a screenshot from UE4 if you like! Also don't hesitate to ask..

Hi there Im trying to achieve a similar effect to david above, what ive noticed is when rotating my ue4 spline from its base actor position my mesh becomes skewed.

Do you gave any recommendations on how to fix this issue? (below are images of a two point spline and the same spline rotated 30 degrees)







Cheers!

Attachments:
straight line.png (1.8 MB)
rotated 30.png (1.8 MB)

User Avatar
Staff
367 posts
Joined: Sept. 2016
Offline
@DominicSewell I think the rotation issue you're having is a side effect of the added rot/scale attributes that the UE4 plugin adds on curve. Try adding an attribute delete after your curve input in your HDA, and delete the rot/scale attributes.

There should be alternative solutions, depending on the nodes your using to generate the geometry, that wouldnt require removing those attributes. For example, the sweep SOP has the “Transform using attributes” param that should be disabled when used with curve that have extra rot/scale attributes.
User Avatar
Member
6 posts
Joined: Sept. 2018
Offline
@dpernuit Hi thanks for the feedback i appreciate it!

sorry to be a nuisance but what would be the syntax for deleting strictly the rotational attribute?
(im aware of P, scale etc. but can not seem to find the term that specifically relates to only rotation)

Thanks again!
User Avatar
Staff
367 posts
Joined: Sept. 2016
Offline
Hi,
You can simply use an attribute delete node, deleting the rot attributes on points.
  • Quick Links