Create Entire Cities Automatically With PCG Splines! Procedural Content Generation in Unreal Engine
Вставка
- Опубліковано 14 тра 2024
- A step-by-step tutorial on using PCG Splines to create a Medieval City with Spline Roads cutting through it with the Procedural Content Generation Framework in Unreal Engine.
🔷MASTERCLASS👉courses.azielarts.com/cc-mast...
🎬 FREE TRAINING - courses.azielarts.com/registe...
🎓 ONLINE COURSES - courses.azielarts.com/earlybi...
💖 SUPPORT ME - www.azielarts.com/donate
🏠 MEDIEVAL TOWN - www.unrealengine.com/marketpl...
PCG TUTORIALS
⚡ INTRO TO PCG VIDEO - • Save Days! Procedural ...
⚡15 MINUTE PHOTOREAL WARZONE - • 15 Minute Photoreal Wa...
⚡ 7 MINUTE PHOTOREAL FOREST - • 7 Minute Photoreal For...
⚡ PCG LIVESTREAM - ua-cam.com/users/live7CKJ0rOzkYw
CONNECT WITH THADDAEUS
◇ WEBSITE - tandreades.com/
◇ INSTAGRAM - / thaddaeus_makes
◇ ARTSTATION - www.artstation.com/thaddaeus
GEAR
◇ CAMERA - amzn.to/3mAnjF7
◇ LENS - amzn.to/48f9fDE
◇ LIGHT - amzn.to/48gp5xV
◇ SOFTBOX - amzn.to/3PBNwP5
◇ MICROPHONE - amzn.to/3KY6Nrq
◇ AUDIO INTERFACE amzn.to/3Zepa14
COMPUTER
◇ GPU - amzn.to/45OuUBc
◇ CPU - amzn.to/3om6WMG - Фільми й анімація
good content! I was trying this on a slope surface and noticed "Project Onto Surface" needs to be enabled for the Spline Sampler. Otherwise, the points will only be horizontal
Nice! Thanks for pointing that out!
life saving comment right here, thank you!!
this works, but doesn't seem to take into account if there are parts inside the spline that are higher than the spline's bounding points. I think in scenarios like that you need to use the standard PCG box, and add exclusion zones manually
ohhh Man !!! You are a life saver, thanks for sharing that note.
Thank you so much for this! I'm new to Unreal Engine 5. I already made a forest for my lands and was looking how to create towns/roads/ext and this helped tremendously.
Very clear, very helpful explanation. You definitely have a talent for teaching!
I like your tutorials. You clearly know what you're doing and know how to explain things to actually teach how something works. Most UE5 tutorials are just: Click here, type this, drag here, drag that, okay done *plays lofi outro music*.
Thank you so much for this. It is very encouraging! I love making things and teaching, so I am glad it comes through. I just try to make the videos that I would search for.
Dude, you are by far one of the best tutorial channel! Precise, easy to follow, excellent pacing! You deserve way more views!! Thanks for putting that much effort into your videos!
You are so welcome! Thanks so much for the encouragement!
The effort you put into your videos is astounding. Thanks for the spline tip in the modelling tools. That’s gonna be such a time saver
You are so welcome!! I am pumped that you found it helpful. Yeah I agree, I just avoided splines cus they are so annoying till I found that way of doing it. Do you have any topics or problems you are having that I could help with a video for?
@@azielarts need help i got 5.3 in plugins it wont show the Procedural Content Generation only gives me the mesh option what gives?..Pls help
This was super helpful, thank you!
I'm using splines and PCG to generate vineyards in our Architectural projects. The PCG populates a custom vineyard blueprint actor that I put together. I never knew I could use the modeling tab for the splines, and the road helped a lot
Wow awesome!! That is a perfect application. Yes totally that spline tool saved me so much time. It was really unwealdy making through blueprints just to use as a mask. Sounds like a fun project 👍
Thanks for the content, looking at moving industries and your videos have been some of the easiest the follow. Cheers.
Amazing! I am so glad to hear that!
the spline tip in the modelling tool is great and useful tip, really hats off
I totally agree. The spline thing is so useful. I feel like some of these new modeling tools are new and I don't see them mentioned anywhere.
Awesome result and tutorial!
Thanks mate!
Great content! I'm now seeing how easy it can be to use the PCG tools to create many different landscapes after watching this short/concise video. The town example is a great starting point, to get an idea of the different nodes and capabilities. I'm going to need to reference this video again, and follow along real soon. Hands on is always best to engrain these things.
Thanks for sharing your knowledge! I love seeing videos like this, and learning new ways to design/develop using various software & engines. You got my subscribe :)
I wanted to know more about PCG but was extremly anxious on watching a 16min video telling me how to open/file a new scene or right click and other beginner stuffs that i hate in tutorial video. This video went straight to the point and is absolutely awesome, 5 stars ! Good job you got a new subscriber
Yo!! Glad it was helpful. Yeah I agree. I started making these tutorials in the first place cus I felt similarly.
Dude you went above & beyond with this video many thanks!
You are so welcome!!
Very helpful tutorial. I will definitely show this to my high school students so they can use PCG.
Nice video man. I'm a beginner. Will be paying close attention to your channel. Thanks a lot for creating stuff like this.
A great video. Very concise and educational. Thank you.
Than you for explaining why you made each choice and giving at least a small explanation for it. Most people just tell you to "do 'this' and then 'do this'" without explaining the reasons for using a specific tool, node, etc. Such lack of information defeats the purpose of tutorials (unless it's for more advanced viewers).
Amazing video tutorial; thank you for doing it so well for those of us who enjoy learning.
I completely agree, sometimes when I watch tutorials some information seems to be missing!
Your channel is a goldmine bro keep it up!
Wow, glad to stumble upon your channel 🙏
Yo what is good! Welcome
Thanks so much! I'm working on a medieval city level in a game. I wanted to play around with PCG to see if I can randomize and spawn things faster. This helped immensely! Might have to use this for larger worlds now ❤. How big is your level that you used for this video? Also do you know the best way to make the roads not push the buildings out so far? ( Trying to generate meshes a bit closer for a few of my added roads)
wow, this is how a tutorial should be. straight to the point but also explaining quick, WHY you re using this, and what that means.
Wow, What a wonderful Generation.
Hi! this tutorial is amazing. Any plan on expanding from this to create a modern city? like having road intersections and have the buildings face the nearest road so the buildings are always parallel to the street? Also possibly only spawn building along those street splines I think would be great!
Great content. Very clear and concise. So many tutorials are just watching users plug in nodes but never telling you what the nodes are actually doing and what their purpose is but you do which is great. Liked and Subscribed.
Amazing tutorial!!! Thank you so much!!!
No problem 🤙 you got it
Bro thanks for this, I will try to apply into my upcoming city kit v3, but this will be more complex than I imagine, because I have like:
Asphalt 2 lanes
Asphalt single lane
damaged single lane asphalt
walkways
walkways with side manhole
walkways with damaged floor for tree
walkways that are the double of size
curbs
street stairs
bridge
rivercreek with side ravine
the variety of buildings is ok, there are 35 unique ones, not counting its own custom dressing and material variation, but due to its insane customization, I think I will have to learn more lol if I want it successful on my project, but this is a massively great start for me!
If your buildings (or any asset really) are not facing in the "correct direction", you can go to the modeling tool in Unreal, and with the actor selected, you can change the pivot point (aka the gizmo) quite easily. As a level designer, this helps a ton because then you don't have to send assets back to the artists or import them yourself into Maya or Blender. I'm pretty sure the red arrow on the gizmo is considered the forward-facing direction in Unreal.
Edit: I don't know much about PCG, hence why I am here, so what I mentioned above is something I would do prior to putting your assets into the static mesh spawner.
Totally that is a good approach as well 👍 usually do that especially to fix the pivot point on things
I always forget how simple PCG is until I need a refresher. Thanks.
Thanx! That's awesome! Easy to understand!
Yay nice ! Happy to hear !
great stuff ty! do one on heights and slopes doe cliffs : )
very well done. understandable content.
This is EXACTLY what i was looking for, you keep delivering when i need it the most!! I've been wanting to do some type of "Medieval" style with Knights etc and then them being attacked by a dragon setting everything on fire.. Now i just gotta figure out how to make a dragon spit fire and for the houses to burn😂
YO I am pumped for you! That sound awesome! Send me a link when you have it up! Ooh yeah actually Fire is something I have only really used as downloads from the marketplace. As soon as I figure out a good way to do it, I will make a video 👍
Absolutely, i will do! Yeah it's getting a lot better, just have to figure out the best way to do it🤷♂@@azielarts
I believe in you@@dirreeN
Thank you so much for this video! It was really helpful.
Yay! I am so glad to hear that!
Thanks Aziel, this is a game changer.
Yo!! Amazing! You are so welcome. It was a fun one!
@@azielarts Dude can this be possible with the method you explained here ?
ua-cam.com/video/Xg45I-qYFdE/v-deo.html
Will you cover more complex roadways through procedurally generated towns or cities? Kind of like how modern roads work where there are a lot of intersections and other unique roads?
Also, I love the video, man! Great work.
WOOOOOW at last some good tutorial about this!
More to come 😁
Nice tutorial! Curious about the PCG road though. How would you create a procedural road network that that has main roads as branches and alley-ways as sub-branches?
Thank a lot for valuable tutorial
You are welcome! Glad it was helpful 👍
ver much helpfull thank you very much
Awesome tutorial! Are you also planning to do videos about the new biome feature in 5.4? Looks pretty helpful for bigger landscapes and multiple biomes but also pretty complicated
Thanks so much! Yes absolutely, I plan on it.
For those not being able to see the draw spline function, you'll have to update your engine version to 5.3.
need more tutorials! good one!
Will do! Glad you liked it
Great Tutorial 👍 Is there any way in which we can project Spline data to a static mesh rather than input (Landscape)?
New subscriber here, liked and subscribed!
Wonderful and many many Thanks for this Wonderful Video ! Just one question - How can you use these buildings then they are not updated for use in Ue5 ?
Good question, I would download then into the version of unreal engine that they are built for, then you can migrate them into an unreal engine 5 project
Love you bro ❤️ that help me lot 😍
So kind! Happy to help 👍
Very cool, thanks.
No problem 👍
Great tut my man! one question tho, is this only doable in 5.3? Since i dont see the "create spline" option in my modeling tab but im using 5.2
Great video!
Question: how can I do the same with "building blueprint" assets, instead of static meshes?
I like to use the BP buildings + seeds so I can have variety in my PCG buildings
with static mesh spawner you can add multiple different buildings, as far as I know I can only add 1 building with "spawn actor" for grouped building blueprints..
I have lots of building blueprints myself and "I tried creating static meshes with the merge actors tool. This works, but found that the meshes have different origins so some start "in mid air" and others "below ground" so this might not work. Still testing options!
Oh wow, that's a good idea indeed!@@darklordstudios72
@TRABITY Okay, I have a much better workflow now. First, I copy the blueprint to a new one. I open the new one and remove any extras I don't want. I save that and drag it into the level. I then use the Merge Actors tool on the selected blueprint actor. I save the mesh with a better name. I then take the new mesh and drag it onto the level. Then using the modeling tools I go to XForm, Edit Pivot, and select Bottom and then Accept the changes and then save the mesh. So far this has worked for every Kitbash model I have done it on and it's AWESOME.
let's connect via IG dm? @ tim.tbty@@darklordstudios72
Thanks so much for such a great tutorial! How does it work if you are wanting to spawn buildings that are blueprint actors instead of static meshes though? I figured out using the spawn actor node will work but it seems to be different than the static mesh spawner node and can't figure out how to add multiple actors to the one spawner. Tried piping the to_point into multiple different spawn actors which does work but can't figure out how to get them to not spawn atop one another/randomize the buildings. Is it possible to do this?
This, I'm stuck too
Excellent!
Rock on 👍
Instant subscribe thx for content
You are welcome. Honored to have you👍
Hi, I wonder why you have used Bounds Modifier to make the points large but not using the Interior Border Sample Spacing? What is the pros and cons between the two methods. Thank you in advanced. Great video
amazing bro thanks
You got this 💪
Awesome!!
🤙
Thank you a lot!
You are welcome!! Glad to help 🤙
Fantastic video and i was looking forward to following along but ran into an issue that i cant seem to find an answer too anywhere. My modelling mode is way different then what yours looks like and doesn't have the spline tool included with it. Is it a version issue? I'm using UE5.2.
You have to update your engine to 5.3
@@Crouton_6thanks ! I recently just did so ill try again
Adding a comment for the algorithm. Great work.
I appreciate you!! It really does help a lot. Hopefully the video was helpful 👍
Thanks 4 Givin !
You are so welcome 🤙
Thank you again for another wonderful video. I have stumbled across a problem that i managed to work around somewhat but that causes many more problems out the back: The spline i created does not really sit on top of my (newly created) landscape, but somewhat lower. And i cannot see what i did wrong as i followed (seemingly at least) step by step. Do you have any idea?
After a bried break i tried something which fixed it: I took each point of the spline, lifted it up and let it stick to the surface using the END-key. I am not sure why that would have been necessary, but now i am back on track. Maybe you have an idea on that anyways? Or someone else maybe?
I had the same problem! Your struggles saved me! thx mate. I am using 5.3.
Is there any chance to bake such PCG? So to afterwards being able to adjust things manually?
This tutorial is amazing!
My issue is that I built my buildings using modular kits from the ue5 marketplace. When I merge the actors and bring them into my pcg level, I try to enable nanite but the triangles do not appear in the nanite visualization.
Hmm interesting. That should work to my knowledge, try making a new mesh render node and adding them in. Or cleaning up the graph ( on the PCG volume in the level) and regenerating. It might not be updating for some reason
@@azielarts Thanks for the reply! I think the real issue is that the building is actually not nanite enabled even though the checkbox is telling me it is. Because other nanite meshes are showing in the visualizer but the building isn't. I've been trying to figure this out for hours now so I'm at the point where I'm just going to plug the building into the graph and see what happens lol.
Also how big is your landscape in the sample video? Mine is set to the default 63 x 63 quads but it's looking too small for my city.
I need some help.
I wish to make a spline but use a blueprint.
The points of the spline weill be the wall of a room.
The idea is to build your city inside a room.
Can it be done?
If you pls give me some hinds. I'm new to UE.
Thank you!
Hello,nice tut.
PCG generating is fast but some of generated stuffs still need to be polished manually for better.
Is it possible to bake(instance) the meshes spawned by PCG.
For example in your video,remove PCG volume and splines but keep the meshes,foliages,etc.
After you spawn stuff with a PCG if you select the Clear PCG Link option in the PCG volume it unlinks it from the graph. At this point they are just instanced meshes in the world that you can do whatever you want with, but the PCG graph won't do anything to the meshes any more. Hope this helps
Why is the spline sampler gives a red error when I'm converting the dimensions to on interior can you help??
In the video 6:30-6:40 when you debug the transform points to see where ur trees are spawning, And it covered the whole landscape right, But when i did it its only spawning inside the area of the PCG. Is there something i am missing ?
I watched your Forest video where u created the forest and then trying to implement this video into that video
You have a landscape below, right? To use the PCG splines, is the landscape required or can I use them simply above meshes?
thanks
You are welcome 👍
Thank you for the tutorial. I'd like to use blueprint actors instead of static meshes when creating the town. I tried using spawn actor instead of static mesh spawner. However, there are almost 15 different actors, and trying to manage their interactions with each other using the difference node has become quite complex. How can I solve this problem?"
This is such a great question, and unfortunately one I don't yet have a solution for. I have thought about maybe creating a loop that randomly selects a blueprint from an array, but I have not gotten it to work yet. I will throw together a video as soon as I can figure it out :)
I'm not seeing the draw spline option, my modelling mode toolset looks slightly different. Any tips on where to look? Am I missing a setting or is this an update thing? using 5.2.1
Have you figured this out? My toolset also look a bit different.
Hello Aziel, I love your tutorial!
I have just one question, what if the landscape is not flat? How Can I adapt the spline to the landscape mountains and hills in order to remove some part of the pcg content?
Thank you!
You should be able to just draw on the landscape mountains or uneven surface. Fun fact, you can also use the hight of the landscape itself as a mask for your PCG graph.
I was able to paint but the difference did not work.. I tried also with the hight (from the input node) but it did not work :(@@azielarts
IIRC there is a projection node. Using the input node, take the landscape and connect it to the projection node.
I uave a question. How can I use this to generate the town inside a pcg rooms. With random towns and roads? Keep in ming the rooms generate in play time
As a side note, if you cant see your mesh populate the world its possible that you need to scale up your mesh. In case anyone was wondering.
I bet the guys at Fantastic Pixel Castle are using this PCG function of UE5 to make their "Blue Nodes" for the Ghost MMO
how can you make the seed randomize at runtime?
Hey
Can you make video like this but your main PCG is based on Spline too?
is there a way to make every building face the closest road? Or would I just have to make 2 "towns" With the north town facing the road to the south and vice versa?
That is how I would do it probably in the same graph though. Or I would use a if statement to see which side of the curve the point anywhere on and use that to branch it into two sets of points with Different transforms. It is a bit confusing though how to set up, I will try to make a video on it.
Im not quite sure but the road thingy isnt working for me, It does affect the points in the spline but the meshes are still spawning on top of the road
curve :(
Thanks so much for the tutorial! For some reason the difference node doesn't do anything when I plug everything in. My landscape sampling works, so does the spline sampler. I set the difference node to binary mode. And nothing. It keeps showing all the points. Has anyone had the same problem? I'm using version 5.3.1
Hey! If I had to guess, it would be that you are still debugging a previous node. Try making sure that none of the nodes have the colored dot on them, and then debugging specifically the different node. You can also try plugging a transform points node on the end and seeing if debugging that will show.
@@azielarts Hey! Thank you for the tip :) I figured it out in the meantime. Appearently my spline wasn't on the landscape, and so as soon as I aligned the spline on the Z axis to the landscape it worked. But thanks again!
@@marcellracz8113 Absolutely! I am glad you got it working 👍
hi thanks a lot! with all these meshs, how does your computer behave in terms of FPS? merci
Avec tout ces objets, comment se comporte un ordinateur au niveau des FPS ? Merci
For me it runs very smoothly, around 90 ish fps, you can see my specs in the description. I did convert everything into Nanite meshes which helps my particular set-up. I also made an optimization video if you would like to see what I did specifically ua-cam.com/video/_t55i17_7qE/v-deo.htmlsi=3W9DsDJfDES-DyvC
Yes, that is how you create the game if you have the forest, and that's something I see playing cold of duty warzone. It's simple, you have some programing basics and buy this software and use this paint tool. But you must pick your engine, because if you are sticking to this you don't have time for Unity. Some games have view distance or vegetation sliders, so this is an overkill with the trees. But maybe you know this, but not minecraft.
Can you please create a video on how we can generate points on the top of the actors, that are already in the world, like simple cube, except landscape
Hey! Yep it is in the works
does anyone know how this can be done with multiple actors instead? lets say you had a BP building thats much more interactable, spawn actors doesnt have multiple actor inputs like spawn static mesh does so the actors will spawn on top of themselves and cause issues, so how would you make to to where it doesnt do that? do you need some type of way to separate or array them, or should you have a bounds modifier for her spawn actor node?
I'm stuck too
Does anyone know why my spline point won’t go above the surface when I initially place a point using modeling. After I complete the circle and press done the points disappear making it unable to transform the spline by dragging. And in the video he has a transform node before the difference mode. Why do you have that Aziel and what was the reason for its use
Great stuff! Got a sub from me.
Thanks so much! Honored to have you 🤙
This is awesome but is there any way to spawn multiple actor/blueprints inside a spline? It seems impossible to do
Yes it is possible 👍🏻
hello man i have a question for you can you make a video about de PCG but with a apocalyptic city plz i want to make a game with but i dont how to do it and where i can find some asset mesh etc
Yo! Great question! I will add it to the list.
thk very mush its gonna help me and sorry for my bad inglish im french so its difficult for me to speak like that @@azielarts
@@choppware6772 no worries! I got you 👍
❤….i just wanna know where you got your forest assets? My trees look like crap!
I got you! I think they are all linked in the description of this forest video I made ua-cam.com/video/g84cg2KvJxY/v-deo.htmlsi=cCLjCXVsc-a-lejM
Good morning, I have a problem, when I place the BP_actor on the map, the white blocks inside the spline do not appear. I've already marked Unbunded, I've already selected it to spawn indoors, I don't know what else to do using version 5.3 of Unreal.
Att
Lucian
Hmm interesting, are you hitting debug on the node ?
tks for help man
@@azielarts
this is the future, adding this the AI capabilities, and you have a factory of cities!
Im using a few buildings from kitbash but the pcg makes themgo through the floor, i tried using the kitbash blueprint but it doesn't let you add multiple
You just need to use the transform node to push them up since their pivot point is not at the base of the buildings
my buildings have different heights, wouldn't that make some of them float and some of them clip through the landscape?@@azielarts
Was looking at doing this too. I converted the blueprint to static mech which does work, but as noticed, the pivot points are off. Unfortunately, they are off differently for different buildings. I have to create different spawner branches with transform points for each building to fix that right now, but it really doesn't work so boo.
Can this all be done during runtime?
Technically yes, though I have not tested it personally
I cant find the spline tool in my modeling mode 😢😢 can you help me ?
I guess its only in version 5.3
fucking awesome guide! thank you!
Turn it into a game 🙏🏼
Lol maybe I will ;)
I dont hv the spline option
Love the video, but background music can get a bit too busy and makes hearing voice clearly difficult at times.
Do you know if this can be randomized during runtime? So the town changes during runtime as the app is playing?
I know it is possible, though i have not tested it myself. You can create variables that are accessible outside of the PCG blueprint. So you could plug an exposed variable into the attribute noise node for example.
ah ok cool-- interesting., Thanks! @@azielarts
No problem, good luck@@T1mothyTee
I can't fine 'Get spline data' please help TT
How do I cut the path through Forest as well? Also Thanks for the tutorials learned a lot about PCG
You are very welcome! I am so happy they are helpful. To cut through the forest you would just need to set up the spline road the same way, and then plug it in to the difference node that I used for the clearing (or plugged into a new difference node right after that one). Let me know if it works for you
Yea I tried that but its not working @@azielarts
I did that in PCG_Forest I got splinedata->SplineSmpler->BoundModifier->DifferenceNode(->Differences)
What is happening exactly? Are you seeing the points from the forest getting cut off? Also is the difference node set to binary? @@karanbhakta8745
Hmm, let me check one sec@@karanbhakta8745