このダンジョン作成レッスンは、Wave Function Collapse アルゴリズムを使用してゲームレベルのベース形状を定義し、Houdini デジタルアセットを構築して UE4 で様々なダンジョンを生成します。WFC 技術はプロシージャルレベルデザインを強化するもので、レベル生成を簡単なコントロール設定からより大きなソリューションを生成、レベルへの最終出力を可能にします。このコントロールは、ビットマップ画像またはポイント上のアトリビュート、このレッスンでは両方の方法を使用します。
ダンジョンに配置されるプロップの作成は、こちらのチュートリアルで紹介されています。
注: ここのレッスンではSideFX Labs ツールを使用します。開始前に最新のツールインストールしてください。
このプロジェクトファイルは、Unreal 4.24 を使って作られました。
紹介
開始にあたり、完成したアセットを UE4 で見て、WFC の機能のを見ていきましょう。次に、以下の4つのレッスンで学ぶテクニックを理解するために、ツールがHoudiniでどのように構成されているかを探っていきます。
再生時間: 06分21秒
パート1 | Wave Function Collapse ノード
このレッスンでは SideFX Labs にある WFC ノード群をどのように連携してレベル生成のためのパターンを作成するのかを見ていきます。
次に、SideFX Labs の Wang Tiles Sample ノードを使用してグリッドを埋め、完成したレベルの基本的な形状を作成します。
再生時間: 14分26秒
パート 2 | Basic Layout using WFC
ポイント群ができレベルが形成されていくのがわかれば、次の手順は、UE4 内のジオメトリへのレファレンスをアサインし、点群をアセットで置き換えられるようにします。これには Attribute Value Replace ノードなどのツールを使用することで、Blueprint リファレンスをより簡単にアサイン可能です。
再生時間: 25分12秒
パート 3 | Add Walls and Cliffs
壁や崖の面は横向きのため特別な設定が必要です。これには、対し正しい方向に向いた法線を持つポイントを作成し、これらの壁が WFC レベルデザインからプロシージャルに生成できるようにすることです。
再生時間: 18分39秒
パート 4 | Decorate the Rooms
レベルに柱、木箱、破片、敵を配置するには、既存のジオメトリに2番目の WFC 設定をレイヤとして使用しプロシージャルに生成します。WFC を様々な方法で使用することで、ゲームプレイに対応したリッチなゲームレベルの作成方法を示しています。
再生時間: 25分16秒
コメント
bazuka 4 年, 6 ヶ月 前 |
Great tutorial my friend, thanks for sharing knowledge ;) with everyone
Cheers
BlissettDMB 4 年, 6 ヶ月 前 |
Always Quality From SideFx and Seriously great quality work from #Simon Verstraete.
I've had a quick scan of this course, and I can definately see new quality tools and workflows that will aid My Pipeline.
Always top quality training.
Thanks Simon and Thanks SideFx.
affectreflect 4 年, 6 ヶ月 前 |
Forever grateful Simon.Your lessons have helped so many artists all around the world.And thanks SideFx for the ever amazing Houdini.
AndreasNull 4 年, 6 ヶ月 前 |
Great tutorial and tool!
For some reason, the WFC Initialize Grid does not have any kind of visualisation on my end.
I see only points.
Houdini Apprentice 18.0.416 + Lab 416 (local). Any advice?
dantarion 4 年, 6 ヶ月 前 |
Click the eye thing at the bottom right of a viewport to go to Display Options. Go to the geometry tab, Particle section at bottom left, "Point Size" is what you want to adjust.
I was wondering this too, by default it was so small I couldn't tell if loading the texture worked right or not.
Simon_V 4 年, 6 ヶ月 前 |
The visualization of the pattern should be there when used the latest version of Labs, non-production . Further these are guides coming from the HDA.
dantarion 4 年, 6 ヶ月 前 |
I feel like I am doing something wrong. After the wavefunctioncollapse node, the Cd attribute no longer exists on my points. I can see that name gets assigned to 1_1_1 or 0_0_0 but it looks like the wang_tiles_decoder is expecting a Cd attribute.
I also had an issue where the sample image's jpg compression had some offwhite pixels in it? I'm not sure if user error but would love to finish this tutorial series!
dantarion 4 年, 6 ヶ月 前 |
Fixed my issue by using an attribute copy node to copy the Cd attribute back to the points, matching with the name attribute :D
Kvale 4 年, 6 ヶ月 前 |
If you download the latest "non production build" from github and install Labs manually, the WFC tools has been updated to include visualizer and Cd attrib.
Github:
github.com/sideeffects/SideFXLabs
Install guide:
www.sidefx.com/tutorials/sidefx-labs-installation/
gabhpe 4 年, 6 ヶ月 前 |
Hello Simon.
Great tutorial!
Is it possible to use trace psd file, draw a bluepritn of a level, and use it with wang tiles decoder to detect the tiles?
I am trying to do so but without success.
Simon_V 4 年, 6 ヶ月 前 |
Hey,
Yes that would be possible. I think you should look how the WFC_Initialize works as this does what you are looking for. It converts an image into points with colors that are used for the Wang decoder.
In general you can do a WFC_Initialize (this loads the image) then doing a Wang decoder then using the Wang samples to preview.
kuimig 4 年, 6 ヶ月 前 |
GJ Simon
thx for share!
DirtPizza 4 年, 6 ヶ月 前 |
Does anyone experience the WFC_Initilize from texture producing not whole numbers on the name attribute like "0.991_0.991_0.991"?
Simon_V 4 年, 6 ヶ月 前 |
Yes, that can happen sometimes. I noticed it as well. What I often do is use the color adjustment node and use the contrast or other sliders to tweak it.
DirtPizza 4 年, 6 ヶ月 前 |
Thanks!
DirtPizza 4 年, 6 ヶ月 前 |
Is anyone experience Houdini crashes when trying to add Parameters to the HDA?
As soon as I add the Rows from the WFC_Initilize and hit Apply or Accept I get a crash.
30984: Fatal error: Segmentation fault
Saving application data to
DirtPizza 4 年, 6 ヶ月 前 |
Caught signal 11
Traceback from 15056 ThreadId=0x00008b80
CURRENT THREAD 35712
+0x17628623 [GA_ATIString::setString] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libGA.dll
+0x176209c4 [GA_ATIString::copyData] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libGA.dll
+0x0d3fcf40 [SOP_AttribTransfer::xferAttribs] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libSOP.dll
+0x0d3ff6df [SOP_AttribTransfer::xferGrpAttribs] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libSOP.dll
+0x0d3f7478 [SOP_AttribTransfer::cookMySop] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libSOP.dll
+0x0d94519d [SOP_Node::cookMe] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libSOP.dll
+0x1807ee0a [OP_OTLOptions::operator!=] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libOP.dll
+0x1808c0bf [OP_Node::cook] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libOP.dll
+0x180aa01b [OP_Node::internalCookInput] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libOP.dll
+0x180aebfa [OP_Node::lockInput] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libOP.dll
+0x0d94ddb0 [SOP_Node::lockInput] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libSOP.dll
+0x17f74f91 [OP_AutoLockInputs::lockInput] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libOP.dll
+0x0d943702 [SOP_Node::cookGuide] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libSOP.dll
+0x0d3480ce [SOP_NodeVerb::cookInputs] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libSOP.dll
+0x0d9454ec [SOP_Node::cookMyselfAsVerb] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libSOP.dll
+0x0d94519d [SOP_Node::cookMe] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libSOP.dll
+0x1807ee0a [OP_OTLOptions::operator!=] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libOP.dll
+0x1808c0bf [OP_Node::cook] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libOP.dll
+0x180aa01b [OP_Node::internalCookInput] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libOP.dll
+0x180aebfa [OP_Node::lockInput] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libOP.dll
+0x0d94ddb0 [SOP_Node::lockInput] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libSOP.dll
+0x0dd06b28 [SOP_Switch::cookMySop] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libSOP.dll
+0x0d94519d [SOP_Node::cookMe] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libSOP.dll
+0x1807ee0a [OP_OTLOptions::operator!=] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libOP.dll
+0x1808c0bf [OP_Node::cook] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libOP.dll
+0x180aa01b [OP_Node::internalCookInput] C:\Program Files\Side Effects Software\Houdini 18.0.287\bin\libOP.dll
DirtPizza 4 年, 6 ヶ月 前 |
I narrowed this down to the attribute transfer node at 7:28 in Part 2 video.
If my display flag is set on that attribute transfer or lower the scene will crash when I click Apply or Accept on the HDA type properties.
Any ideas?
Simon_V 4 年, 6 ヶ月 前 |
Update your Houdini to another version might help, if you still have a lot of issues contact support.
chris rogers2 4 年, 6 ヶ月 前 |
i think the video uses houdini 18.0.391. Im trying to get it to work with 18.0.460, 18.0.416 had a lot of errors and showed nothing, .460 has errors but shows something.
If 460 doesnt work, ill download 391 and try.
chris rogers2 4 年, 6 ヶ月 前 |
18.0.461 works for me (sidefx labs version 460).
earlier i did get errors but didnt follow the directions, so it might have been user error.
thanks for the tools and tutorials Simon!
DedRed 4 年, 4 ヶ月 前 |
It was broken in 18.0.460 (labs 460) for me as well. Specifically the wang tiles sample came in rotated incorrectly (and inconsistently) when they were copied to points. I updated to the lasted daily build (18.0.496) and it fixed it.
gabhpe 4 年, 5 ヶ月 前 |
Hello Simon.
Is there a way to instance an actual HDA instead of a prefab?
Simon_V 4 年, 5 ヶ月 前 |
Hey, There are some options to use another HDA as input but it is limited.
I recommend baking the hda and use that geometry in the other HDA.
dipaolo21 4 年, 5 ヶ月 前 |
Hello Simon, How did you get the grid to display as Spheres?
Simon_V 4 年, 5 ヶ月 前 |
Hey, Do you mean at the WFC nodes? They are now grids instead of spheres
anon_user_54997945 4 年, 5 ヶ月 前 |
Hi Simon,
Thanks for the amazing tutorial !
I have started to have a look how it works and I ran into problems.
- I can see only the proxy dungeon tiles in houdini and unreal , where can I replace them and how with proper props ?
- Is there a way to see how the wang sample file content looks like (inside the stash node)? (naming convention / structure etc.)
If you could help with this that would be awesome !
Simon_V 4 年, 5 ヶ月 前 |
Hey, The project uses the wang nodes as templates. This is a great way to check if the layout is working. Some of the models used in the videos have also a tutorial
https://www.sidefx.com/tutorials/dungeon-props/
The idea is that you can use this setup to plug in your own models.
The wang sample are all stored in the stash, so it loads fast. The wang models itself are controlled by the 'name' attribute found in the primitives attributes.
These are not random numbers stored in that attribute this is based on the blob tileset patterns. See image here to what each number reference to https://imgur.com/a/FtC68GM
Use this image as well in the first part of the video to explain a bit more about the wang tiles.
chloesun 4 年, 5 ヶ月 前 |
Hey Simon, thanks for the awesome tutorial! I wonder what rules do you need to keep in mind when designing your own modules, especially when thinking about organic shape...also, for now, SideFX labs only have 2d_wfc node developed, is 3d_wfc node/tools WIP?
Simon_V 4 年, 5 ヶ月 前 |
Hey, What I did to make my own tiles is to export the wang tiles and use that as my guides. From there I fill the wang tiles with modular models in game engine. (based on reference or what feel right)
Further for the 3D_WFC node, I'm not sure if this is currently in development. But definitely request it here https://www.sidefx.com/bugs/submit/ ! (you can submit bugs here or request features)
DedRed 4 年, 4 ヶ月 前 |
There seems to be a bug between the 2d_wavefunctioncollapse and wang_tiles_decoder nodes. When "Allow Rotations" is enabled on the wfc node by the time the wang tiles sample node gets copied to points they come in rotated incorrectly and inconsistently. The main changes I saw in the attributes when turning "Allow Rotations" on and off were in the transform attribute. As a work around I just deleted the transform attribute after the 2d_wavefunctioncollapse node. That seems to solve it, but I don't know if the transform attribute might be useful for anything else using this workflow. Using 18.0.496, labs 496-embedded
CYTE 4 年 前 |
Hey Simon, thank you for that great tutorial series! Do you know how one would set up a blueprint communication to the hda inside unreal? I want a new random seed for my level each time the map gets played inside unreal. Any idea on how to do that?
Cheers
CYTE
Simon_V 4 年 前 |
The Houdini plugin for Unreal engine is used for editor time only not on playtime. The Houdini helps building your levels faster and save out the result. You can save out multiple maps and load a random map on play.
CYTE 4 年 前 |
Thank you for the clarification!
alex_posto 3 年, 11 ヶ月 前 |
Hey Simon, thanks for this amazing tutorial!
I'm pretty new to Houdini and I was thinking how should I modify this system to support more than one level ? For example I want to build a castle and for this I need to have more than one level so that I can build vertically as well.
Thanks a lot again! :)
alex_posto 3 年, 11 ヶ月 前 |
I read the comment again and realised is not that clear :/ By "level" I mean vertically stacking stuff on top of another :)
Simon_V 3 年, 11 ヶ月 前 |
Ideally the WFC node could work in 3D but at the moment it is only working in 2D space. What you can do is look over each floor/grid and in the loop use the WFC nodes and the Wang node to calculate the pieces.
alex_posto 3 年, 11 ヶ月 前 |
Thanks for the reply! Will give it a try :)
grefsen 3 年, 9 ヶ月 前 |
PSA to anyone fairly new to Houdin/UE4 following along, it seems like the prefabs (lava, floor, walls etc) that are referenced throughout this project are not included in the downloaded files, which makes sections like around 20 minutes where Simon is directly referencing prefab artwork in UE4 a bit of a speed bump in following along. The sample Houdini project doesn't provide much clarification either since (from what I can tell as a Houdini newbie) it uses a different approach (no splitting lava/non-lava), making it a bit difficult to fill in the gaps. I am not quite sure what the intention is here, should we source other premade artwork to follow along the tutorial or should we ignore these sections in the video and instead reference the example network in the General Demo hda?
Feoul 3 年, 9 ヶ月 前 |
Hi Simon, great tutorial, but I got a quick question. When placing the walls around the outer perimeter, the objects did not orientate to the normals. So I did a bit of research and and ended up writing a simple VexExpression: "@orient = dihedral({0,0,1},@N);" which fixed the issue. I'm new to Vex, but as far as I can tell this forces the orientation to be perpendicular to the Y axis, along the Z axis?
I guess I made a mistake somewhere and this Vex line corrected it, but I can't see where, any ideas on what might have prevented the walls from orientating themselves to the normals without the Vex code?
I'm using version 18.5.462
Cheers,
James
Simon_V 3 年, 9 ヶ月 前 |
So by default when copying models on a point, it will look to the Normal and Up Vector (which is @up and default {0,1,0}). So make sure these attribute are correct and not conflicting with anything, for example when using a merg node some value might be wrong after merging.
Also good to know is that if you use the @orient attribute for rotations, then this will have priority over the Normal. What I often recommend is converting the Normal to orient, you can easily to this in VOPS. ( image of that https://imgur.com/a/4IBQmvJ )
Feoul 3 年, 9 ヶ月 前 |
Thanks for the info, and apologies for the slow response! This is really useful for a newbie, your tutorials are some of the best out there right now.
WackyWhisker 3 年, 6 ヶ月 前 |
Great stuff.
Is this only useful for saving some time for the initial level creation or can Houdini actually be used to re-generate the layout when, let's say, the player dies and tries again?
Simon_V 3 年, 6 ヶ月 前 |
Houdini is used to create levels faster and save/bake them in a scene (Only editor , not in runtime). You can generate a variation of maps with Houdini, save them and load a different map when player dies.
WackyWhisker 3 年, 6 ヶ月 前 |
Thanks for the prompt reply.
That's too bad. But yeah it should be possible to make a mixture of some sort of system that spawns different rooms or levels that in turn got created with the help of Houdini.
banshay 3 年, 6 ヶ月 前 |
Can you create the tiles in unreal and import them again in houdini? I intend to use Megascan assets to create the tiles, but I'm not entirely sure on how to do it.
8fdf233df9f941bf9b0dc205d 2 年, 5 ヶ月 前 |
How can I get the UE texture;In the download, I have found nothing
preuss_evan 1 年, 8 ヶ月 前 |
hello, thanks so much for the tutorial, at one point in the tutorial you mentioned that you could delete smaller rooms created via collapse or add bridges to them. I was wondering what the process to add bridges might look like.
Please log in to leave a comment.