ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก
Unreal Engine 5.3 PCG - Ep 5 - Parameters and runtime execution
ฝัง
- เผยแพร่เมื่อ 16 ส.ค. 2024
- Series of videos to learn how to use the Procedural Generation Content plugin in UE 5.2/5.3.
This fifth video talks about:
* How to create generic graphs in PCG with Graph Parameters
* How to create Graph Instances
* How to Generate at runtime, switching graph/parameters
DISCLAIMER: This plugin is still in experimental mode, to learn more about Experimental, see: docs.unrealeng...
Link to GitHub for tutorial material: github.com/Ama...
My twitter if you want to be notified for future videos: / amathlog
Link to tutorial in Epic Dev Community: dev.epicgames....
0:00 Introduction to 5.3.2 and Github Link
0:49 Overview of the base graph
1:46 Add parameter to control Surface Sampler density
3:16 Override parameters on the component
4:13 Add parameter to control scale
4:27 Maths multiply node for Scale
6:32 Add parameter for meshes
7:18 Add Mesh attribute to points
8:03 Spawn meshes using an attribute
8:55 Special case for grass: Template descriptor
9:12 Overriding all meshes
10:08 Saving overrides - Graph Instance
11:24 Switch graph instances in Editor
14:27 Now do it at runtime
15:27 Demo time!
16:06 5.3 only: Set Graph Parameters from BP
19:35 Randomize the seed at runtime
20:26 Demo time again!
21:31 Conclusion
Music from #Uppbeat (free for Creators!):
uppbeat.io/t/a...
License code: W3BFN3L3NUINMK2K
oh, just beautiful - parameters - exactly what I was looking for.
I wish I could like this video twice. Thanks for spending time to make this video! Super helpful!
Fantastic! I greatly appreciate all the information you put into these PCG videos. Keep up the good work
Thanks for the video, i used a node GetActorData with the node Difference to avoid elements overlapping with my character 😅
Awesome Tutorial that I've ever seen. I've learned a lot. Thank you for your great efforts !!
10/10 video.
Much much better when the actual developers make videos about their work than when Epic decides to delegate them to some random "technical writer" who barely knows the keywords of the tech and does every mistake possible in terms of performance, modularity etc.
Happy you liked that one! But let's appreciate the work of the tech writers too.
They are spending a lot of time diving into the technique while we are busy developping the product, and they keep us in the loop to make sure they are writing/showing the right thing ;)
@@adrienlogut3482Let's also recognize the value of any work on this planet lies not in its amount or difficulty, but in its usefulness to consumers and quality. Perhaps it would be better for UE's end-users if the money and energy spent on shallow "jack-of-all-trades" attempts such as tech writers, was redirected to an extra developer or two, to relieve some of the pressure of development itself and allow them to showcase their work on their own.
finally a new video!!!
please showcase how to destroy the instances spawned using traces during gameplay in a future video
It's not really a PCG thing though :) After PCG is done, interacting with the static meshes is the same than with manually placed instanced meshes!
Amazing! Thanks for sharing the project.
Really great features implemented :0
Sweet! Thanks for the video!
Great video, thanks!!! Will you please explain the gather node in one of your next tuts?
There is not much to say on the gather node! It is a pretty basic node :)
Everything that you put in the in pin will get through the out pin.
And you can plug stuff in the Dependency pin, that will just wait for all those data to be available before continuing with the Gather node, so it's a great way to enforce dependency.
Hurray, new video)
Hi Adrien, awesome tutorial! it was something I looked for for a while! quick question. I downloaded your project but I can open it. Is it a custom editor? copying over the uassets to another project doesnt work either
Nope it was done with the current release of 5.3.2. I tried recently to download a fresh version and run it and it worked well.
@@adrienlogut3482 thanks! will try again then!
When overriding the static mesh spawner meshes, is it possible to use an array and depending on the number of entries, that's how many it swaps between?
Example: An array of 5 chairs will be like having 5 different chair entries in the static mesh spawner, but if there's only 2 entries, then it's just randomizes based on those 2.
Will be possible in 5.4 with array support. You'll have to do it yourself with a custom BP node until then.
Look good. How now create smooth async load of all of that ?
Thanks for the tool and the explanation!
Can you give us some hints on how to use arrays as parameters? Is it possible? It seems that when the static mesh spawner node is 'Weighted,' we can assign a list of meshes in mesh entries, but when it is set as an attribute, I don't see how to input an array. Thank you very much!
You can't in 5.3 unfortunately, it will come in 5.4
@adrienlogut3482 Thanks Adrien! 5.4 keeps looking better and better! ;)
Hi Adrien,
Thank you for the brilliant tool and brilliant explanation.
Currently, I am testing the capability PCG for our project. The main idea is to create a rainforest biome. The crucial component of it is moss.
Horizon Forbidden West is the closest reference for moss density. Generating this amount of moss instances for the whole forest is difficult.
I saw GPU-based PCG generation in Epic's roadmap for PCG. Could you please share some insides about development in this direction or explain how to generate a real bid amount of instances?
Biomes generation and micro scattering will be done in multiple steps.
We introduced the foundations of hierarchical generation with 5.3, even if it is not that useful in its current state. 5.4 will come with improvements on that front and runtime generation with generation sources, so you can generate with higher density at close range and lower density further away. Could also combine offline generation with runtime gen for the finer details.
And then when all of this is shipped, will tackle how we can speed up generation for scattering and with GPU generation. We don't have precise timeframe for that though, but probably won't be for 5.4
@@adrienlogut3482 Thank you for the quick response. I can't wait to play with it! I hope you'll be able to make another handy video with explanations.
How do i make sure things dont spawn on top of eachother?
You can check other videos, such as episode 2, for bounds and exclusions
@@adrienlogut3482 cheers mate
@@adrienlogut3482 hey sorry for all the questions how do i filter slope for pcg?
Hey Adrien, is there any way to know when generation completes? I don't see any event that will be fired, but the generation as we know is a delayed even (Hover on Generate Local).
I am guessing it is dependent on CPU/GPU load so we cannot use a set time. Any idea how to be sure that generation is done so we can do other tasks such as movie rendering etc?
Indeed there is no event that a BP can catch, but there are callbacks in C++ you can listen. Check in PCGComponent.h
Otherwise, there are also Post Generate Function on the PCG component that will call a function if the PCG component is on a Blueprint, that might help you too.
@@adrienlogut3482 I looked into the C++ code as well. As you had mentioned, there were 2 delegates (clean and generate) and a function name array i could use, but both of them only are made to work in the editor (#if WITH_EDITOR is used).
Is there no way to know when generation is complete after it is packaged? Can PCG even work after it is packaged?
Yes it can work at runtime I show it in this very video! And yeah indeed the callback is editor only but we will have something cleaner for 5.4. You still have the post process function as stated. Or you can check periodically for the generated flag.
@@adrienlogut3482 Thank you!
This is cool but how is it practical? The lag, during the switch, is noticeable in big worlds.
It's purely a demonstration of how to do stuff at runtime. And yeah switching like this on a big world is costly. But keep in mind that was not on a partionned world. Multiple smaller tile generation will be more practical. And we'll have hierarchical and runtime gen embedded in 5.4. so you can generate at runtime close to the player.
How can I make PCG Seed replication for multiplayer stuff ? Any idea ?
That's not really a PCG question but more of how replication works in Unreal. If you replicate your seed on multiple clients, generation in PCG should yield the same results on all clients.
Hello Adrien, Do you have a tutorial that covers attributes?
There are some info in this tuto, as graph parameters are basically attributes when used in the graph.
Episode 6 also shows how to create them in BP.
Thanks for the info. Just starting in PCGg
芜湖