Here is an even simpler solution to setting up Static Mesh Variables that doesn't involve setting up a new BP node ua-cam.com/video/T4HvhuQfTo8/v-deo.html
Thanks for sharing both of these methods, and all the other awesome tutorial content! - I was wondering if you would mind pointing me in the right direction with something please. What I would like to do is directly filter/select points in PCG via their index number, but it seems there is no functionallity for this? What I have been trying to do is to take the method you have shown here to save the current index number as a new attribute to be able to access key points (start and end of spline for example) But Im getting confused as to the execute function loop vs the point loop, and cant seem to work out how I could store the current indexs? Any advice you have would be greatly appreciated! Cheers!
Firstly, to clear up your confusion, in the PCG Blueprint Element node, the following events happen: - the Execute function is called, typically this will happen once for the whole data set passed in. - the Point Loop will execute for every point you passed in. In the point loop, you can get access to the Index, from the "In Point" pin, do a "Break PCG Point". For some reason, instead of calling it Index, is is called "Metadata Entry". Now you can process the point based on the index value.
@@unrealitybites763 I just gave this a go, but unfortunatly I seem to only get a value of "-1" on each point (I tested by printing to log and saving as density) if I take the data from the transform etc I can also confirm that I am pulling data from the points correctly.
Well, I just tried it again, and I definitely get a sequential set of integers from the "Metadata Entry" in my Point Loop Body. However, I don't know why it's called Metadata Entry and I can't seem to find a simple Get Point Index function.
I updated it to take a struct array and added a "weight" variable -- now it simulates the Static Mesh node where you make an array of weighted static meshes, but I can build it in the blueprint instead of inside the PCG graph, and still set up unique static mesh spawns for each blueprint instance!
@@unrealitybites763 Since PCG graph doesn't handle arrays, I use a "Get All Actors With Tag" node inside the PCG Blueprint. To keep everything in one place I have the struct array living in the Spline blueprint, which is tagged. The PCG blueprint basically finds its owner and pulls in the array. I can't pass the array outside of the PCG blueprint, so I handle all the random mesh selection in the blueprint itself based on $Density, which I've set with a Density Noise node.
Thank you very much for the tutorial (Also all the other ones in the channel) all of them are great tutorials. I have noticed something strange with the way how nodes work in the PCG. You need to use a density filter or density noise node before Assign Mesh to Points, otherwise nodes like Difference does not allow for Mesh input to show up in the Assign Mesh to Points. Just wanted to mention for further discussion or if someone else is having a problem with the node not working properly.
Yes, I've noticed this behaviour. This is because nodes like the projection node output general data, whereas the nodes you mention output concrete data (with point data). I always put a Transform Points node between projection and other nodes for that reason, even if I'm not changing anything. I'm guessing this issue will go away in the future as PCG loses its experimental status.
@unrealitybites, at 20:15, by executing "return node" within the loop, you're only processing the first iteration of said loop. So if your node has multiple inputs going into the same pin (e.g. because you sample splines as well as surfaces), only the first input will be processed. Instead, you should add the PCGTaggedData to local array, and once the loop is complete, create the PCGDataCollection from that array and return.
Hi, love your work. I'm getting an error at the end of the process where it says the MeshFilePath which is what I named it is on the actor but not visible. I don't know what that means or how to go about fixing it. Anybody had this problem?
Rhanks for the tutorial, i followed everything correctly, the mesh changes from blueprint but the pcg doesnt update the mesh unless i move the BP slightly.
My static mesh spawner shows "Mesh" Attribute not found even after attaching the "Assign Mesh To Points" to the graph. I have set the graph following the same. What can I do to fix it? Also, the "Get Actor Property" does not register the Mesh File Path too. Am I missing something? Please help!!
Use the inspector on the "Assign Mesh to Points" node to check if your new mesh attribute is there. If not, check through your code to make sure you have not mis-spelled anything or connected anything incorrectly. If all else fails, I've published an even simpler way to do this at ua-cam.com/video/T4HvhuQfTo8/v-deo.html
The type of output is normally points with attributes, I wonder is there a way that can output static mesh, or any other way, like cache type? So that I can take that generated result as 'landscape' of a new PCG, I tried for subgraph, however still couldn't figure that out.
I'm still getting the same error as other comments have been and I have gone over the system repeatedly to make sure it is definitely spelled correctly and for sure connected correctly.. could you redo this video now that Updates have been made since maybe that is why even your other "simpler" video didn't work correctly and doesn't help that you mention in the setup video I actually want to do tells me I MUST do this one. For clarity the error I will either receive is "downgraded to order consistent at node:(random node that at times are not even present in graph)" at times that I have resolved sometimes by messing with nodes but I will 100% always receive on both mesh scale and mesh file path an error that says "error: Property MeshFilePath does not exist in found actor" or "error: not matching actor was found" neither make sense to me as I have even gone as far as putting the property in other actors that it might be pointing to but still get told the property/actor can't be found.
Here is an even simpler solution to setting up Static Mesh Variables that doesn't involve setting up a new BP node
ua-cam.com/video/T4HvhuQfTo8/v-deo.html
Thanks for sharing both of these methods, and all the other awesome tutorial content! - I was wondering if you would mind pointing me in the right direction with something please.
What I would like to do is directly filter/select points in PCG via their index number, but it seems there is no functionallity for this?
What I have been trying to do is to take the method you have shown here to save the current index number as a new attribute to be able to access key points (start and end of spline for example)
But Im getting confused as to the execute function loop vs the point loop, and cant seem to work out how I could store the current indexs?
Any advice you have would be greatly appreciated!
Cheers!
Firstly, to clear up your confusion, in the PCG Blueprint Element node, the following events happen:
- the Execute function is called, typically this will happen once for the whole data set passed in.
- the Point Loop will execute for every point you passed in.
In the point loop, you can get access to the Index, from the "In Point" pin, do a "Break PCG Point". For some reason, instead of calling it Index, is is called "Metadata Entry".
Now you can process the point based on the index value.
@@unrealitybites763 Amazing, thank you so much for your help!
@@unrealitybites763 I just gave this a go, but unfortunatly I seem to only get a value of "-1" on each point (I tested by printing to log and saving as density) if I take the data from the transform etc I can also confirm that I am pulling data from the points correctly.
Well, I just tried it again, and I definitely get a sequential set of integers from the "Metadata Entry" in my Point Loop Body. However, I don't know why it's called Metadata Entry and I can't seem to find a simple Get Point Index function.
You're a certifiable genius! Thanks for figuring this out and making a tutorial on it!
I updated it to take a struct array and added a "weight" variable -- now it simulates the Static Mesh node where you make an array of weighted static meshes, but I can build it in the blueprint instead of inside the PCG graph, and still set up unique static mesh spawns for each blueprint instance!
That sounds great! How did you pass the array into the PCG Graph?
@@unrealitybites763 Since PCG graph doesn't handle arrays, I use a "Get All Actors With Tag" node inside the PCG Blueprint. To keep everything in one place I have the struct array living in the Spline blueprint, which is tagged. The PCG blueprint basically finds its owner and pulls in the array.
I can't pass the array outside of the PCG blueprint, so I handle all the random mesh selection in the blueprint itself based on $Density, which I've set with a Density Noise node.
Finally someone came up with a solution! Thank you so much!
Yes... and there's an even simpler solution which I will publish later today
@@unrealitybites763 Thanks in advance!
Your tutorials are amazing. Thank you!
Absolutely marvelous! Thank you very much.
Great video! Thanks for the help!
Thank you very much for the tutorial (Also all the other ones in the channel) all of them are great tutorials.
I have noticed something strange with the way how nodes work in the PCG. You need to use a density filter or density noise node before Assign Mesh to Points, otherwise nodes like Difference does not allow for Mesh input to show up in the Assign Mesh to Points.
Just wanted to mention for further discussion or if someone else is having a problem with the node not working properly.
Yes, I've noticed this behaviour. This is because nodes like the projection node output general data, whereas the nodes you mention output concrete data (with point data). I always put a Transform Points node between projection and other nodes for that reason, even if I'm not changing anything.
I'm guessing this issue will go away in the future as PCG loses its experimental status.
SO cool!! amazing!
love you mate
@unrealitybites, at 20:15, by executing "return node" within the loop, you're only processing the first iteration of said loop. So if your node has multiple inputs going into the same pin (e.g. because you sample splines as well as surfaces), only the first input will be processed. Instead, you should add the PCGTaggedData to local array, and once the loop is complete, create the PCGDataCollection from that array and return.
Thanks for the info, Nahor. I'm going to have to redo these PCG videos for 5.3 at some point anyway, as so much has changed.
Quality content!
Really hoping there will be a tutorial for 5.3 on this!
Yes there will. Coming soon
Hi, love your work. I'm getting an error at the end of the process where it says the MeshFilePath which is what I named it is on the actor but not visible. I don't know what that means or how to go about fixing it. Anybody had this problem?
Rhanks for the tutorial, i followed everything correctly, the mesh changes from blueprint but the pcg doesnt update the mesh unless i move the BP slightly.
My static mesh spawner shows "Mesh" Attribute not found even after attaching the "Assign Mesh To Points" to the graph. I have set the graph following the same. What can I do to fix it? Also, the "Get Actor Property" does not register the Mesh File Path too. Am I missing something? Please help!!
Use the inspector on the "Assign Mesh to Points" node to check if your new mesh attribute is there. If not, check through your code to make sure you have not mis-spelled anything or connected anything incorrectly.
If all else fails, I've published an even simpler way to do this at ua-cam.com/video/T4HvhuQfTo8/v-deo.html
Hi, this is a great tutorial, but I have a question why not use soft object path as the type of the parameter? Is there any disadvantage?
The type of output is normally points with attributes, I wonder is there a way that can output static mesh, or any other way, like cache type? So that I can take that generated result as 'landscape' of a new PCG, I tried for subgraph, however still couldn't figure that out.
how to make that custom pcg node to be like pcg static mesh spawner ?
I'm still getting the same error as other comments have been and I have gone over the system repeatedly to make sure it is definitely spelled correctly and for sure connected correctly.. could you redo this video now that Updates have been made since maybe that is why even your other "simpler" video didn't work correctly and doesn't help that you mention in the setup video I actually want to do tells me I MUST do this one.
For clarity the error I will either receive is "downgraded to order consistent at node:(random node that at times are not even present in graph)"
at times that I have resolved sometimes by messing with nodes but I will 100% always receive on both mesh scale and mesh file path an error that says "error: Property MeshFilePath does not exist in found actor" or "error: not matching actor was found"
neither make sense to me as I have even gone as far as putting the property in other actors that it might be pointing to but still get told the property/actor can't be found.
for christssake it shouldn't be that hard