Procedural Spline generator from Houdini to Unreal

   15596   16   3
User Avatar
Member
28 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
453 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
28 posts
Joined: Nov. 2017
Offline
Thank you so much for your answer. I managed to continue
User Avatar
Member
14 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
550 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
14 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
682 posts
Joined: Sept. 2013
Online
I sketched out a rollercoaster setup.

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

https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
14 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
682 posts
Joined: Sept. 2013
Online
Post a screenshot from UE4 if you like! Also don't hesitate to ask..
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
11 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
550 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
11 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
550 posts
Joined: Sept. 2016
Offline
Hi,
You can simply use an attribute delete node, deleting the rot attributes on points.
User Avatar
Member
3 posts
Joined: Aug. 2017
Offline
Hi there.
I´ve been researching a lot about the other way around with little success.
I mean, Instead of feeding the HDA with UE4 splines, I want to use Houdini to create the curves, and then use them within unreal as input for spline component.

The benefit of this would be creating really complex curves within Hou and then using them inside UE4 with native optimized solutions based on modular pieces for creating pipes, ropes and such.

I was able to create the curves inside Hou, and making them editable within UE following this

https://www.youtube.com/watch?v=TH3rnJGNsxk [www.youtube.com]

But the thing is, I cannot/don´t know how to feed that curve inside a BP spline component. I tried baking the HDA to actor, and baking to BP with litlle success.

Does anyone know if is possible at all to achieve it? (Creating curves in Hou and using them within UE4)

Attachments:
Screenshot_1.jpg (49.4 KB)

User Avatar
Member
380 posts
Joined: July 2005
Offline
I'd be keen to know as well as I'm exploring this myself.

Must admit (with UE4.26 + H18.5.32 + HE2.0) a first dummy test of a curve in an HDA showing up blank until you discover the need to add a prim attribute (unreal_output_curve=1 -- point/detail does not work for me) comes as a bit of a surprise. Is there not a way that this attribute can be marshalled automatically?

Also the Output Templated Geos UE/HE Asset Option doesn't work for splines with the attribute set -- albeit perfectly fine to polywire a spline and fake it. Its a really nice feature to have some guide support! I wonder if there might be a use case for distinguishing between template and selectable template since all templated geo gets pushed. Fair enough to keep switchable Logic in a subnet and template that to enable/disable with UE toggle, however cant help but be curious as to why setting up guide geo on the HDA itself is a no-go.

At any rate, what brought me here is my curiosity in discovering a UE4 HoudiniSpline Component by accident when dropping in a UE Spline into a blueprint. Any examples or discussion anywhere about how that can be used? thanks!
User Avatar
Member
380 posts
Joined: July 2005
Offline
Heh, discovered from the above vid you can put the name of internal curve nodes into the Editable Nodes field of the HDAs type properties. However I can't seem to use the name of a transform node just below one of the curves in my HDA. Is there some nuance here why I can see a curve sop in UE but not a transformed version of it in this way?

I do like you can setup your HDA this way to only show guide curves when the HE asset is selected in the world...
editing those Houdini served guide curves in UE to generate some other geo for output (ie. just a bound sop around all the spline points you are editing in UE is rad!)

That cleared up a bit of confusion for me in getting started as to why I was seeing the SESI Icon geo more often than curves, if its of help to anyone else.
User Avatar
Member
7 posts
Joined: Feb. 2015
Offline
David Wigforss
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
Hi, David! I met same problem as you yesterday and haven't resolved it yet. I tried to put blueprint spline in my scatter asset through Wourld Outliner Input ("Start selection" - "Use current selection", but without result. Could you tell me what else had you done that bring you result?

Attachments:
ssssssss.jpg (1.1 MB)

  • Quick Links