@AdrienLogut ;I’m very sorry that I’m here to provide feedback, but I’m not sure where to go for feedback;I encountered some issues with the layers. When using the default level (initial desert), I applied terrain material to only a small portion of the terrain. However, when I started to draw the layers, the debug squares appeared in strange locations, which left me confused. I’m wondering how I can handle this situation properly. Your help would be greatly appreciated. When I apply terrain materials to an entire piece of land, it works normally
You got your answer in the post you quoted
IterationLoopBody is the way to go. We will add Index to PointLoopBody in 5.3
Seems weird indeed… You are drawing outside of your volume so it should not impact. I’ll try to reproduce it on my end, and report the bug.
@AdrienLogut When using the “Create Spline” within the PCG Graph. How do the Apply Custom Tangents work? Can you create tangents for each point you provide the Spline? I attempted to use the “Create Attribute” node and set it to be a vector 2, vector, and vector 4. Then I set the Custom Tangents to use the names of two vector attributes. I am not sure how the Create Attribute works though. I dont see any new attributes on the PCG graph or anything. Any tips would be appreciated.
Thank you for replying.
There is still confusion, so I want to make it clear.
The term “Index” is used in two different way.
-
Each point has unique integer value as an attribute called “Index”, and we can see it outside Blueprint. So I want to call it “Index Attribute”.
-
Inside Blueprint, we have two different loop functions and each iteration has unique intager value called “Index” unless the loop is multithreaded. So I want to call it “Loop Index”.
My understanding is that both “Index Attribute” and “Loop Index” does not exist inside PointLoopBody and we cannot access them.
And insde IterationLoopBody, we surely have “Loop Index” as “iteration”, but it is not clear about “Index Attribute”.
So the question is whether we can access “Index Attribute” and how we can use it inside loop funtion.
Ofcource this is current situation, and things will be changed. Then what will the future version look like?
P.S. I think “index Attribute” and “Loop Index” are not needed to be identical inside loop function, and it is enough at least for me that “Index Attribute” is accessible inside loop funtion like other attributes.
I’m not sure I understand your issue.
Iteration Loop let you chose the number of iterations you want to do. “iteration” will contain the current loop index.
If you are looping on your points only once, it will be the same as your so called “Index Attribute”.
Each point doesn’t know its index, it just depends on its position in the Points array in PCGPointData.
CreateAttribute will add a new attribute to a point data (if a point data is connected) and all points will have the same default value.
If you want to set custom tangents for each points, you have to do the computation somehow. Either natively with Attribute Operations (like Vector Operations or Maths operations) or via Blueprint custom nodes (or c++ native ones).
@AdrienLogut I am not sure I understand what you mean. When I check Apply Custom Tangents. Its not clear how it is to find the Tangent Attribute? Create Attribute doesnt make anything it can find to make the node valid, it just shows an error. Shown in the picture. Why cant the custom input tangents be an input, so we can generate them procedurally?
Is there any way we could pass in an array of vectors to represent each points tangents?
Something like this:
// input two points per spline point to procedurally generate tangents
customTangentPoints = [
[(vA01.x, vA01.y, vA01.z), (vB01.x, vB01.y, vB01.z)],
[(vA02.x, vA02.y, vA02.z), (vB02.x, vB02.y, vB02.z)],
...
]
My overall goal is to create an unknown set of splines procedurally based on my output data of a node that is doing math on input points.
I have considered doing all of the math in a custom PCG node. That is not how I want to work though. I want to take a set of points, input them into a node that does some math and outputs pairs of points. Then I want to loop through those pairs of points and generate an array of splines.
Currently I can only create one spline with the above method. I want to create several. If I could loop the point pairs in the PCG this would work as well but then the data cant be generated in parallel. So either I need a way to generate these spline nodes in the blueprint, or I need a way to turn this “Create Spline” node into an array of sorts.
Hello!
So I tried on my end, and unfortunately, it seems that Custom Tangents is broken, in code it does not set the Control Point type accordingly, and the tangents always get overridden by the spline to satisfy its curve condition.
I’ve fixed it locally and it is working now, but on your end, it will probably means waiting for 5.3…
In this example, I have a set of points from my surface sampler (a few of them), then add an attribute of type Vector to it, named ArriveTangent. All points will have the same value, but you can design a BP to set each value differently.
Then I use CreateSpline and check ApplyCustomTangents
with the name of my previously created attribute for Arrive and Leave Tangents.
You can see the difference between the 2 options
Is PCG used strictly for spawning existing static meshes at runtime, or is there the ability to actually generate vertices/triangles/normals as the replacement to ProceduralMeshComponent?
PCG is not used to generate new meshes. I think Geometry Script is the way to go for procedural meshes.
I don’t think we support spawning DynamicMeshes though, I’ll have to check.
How is it about the generation of ground/navmeshes? I saw the PCG demonstration and presentation of UE about not only but also the ground being re-/calculated on some occasions and adjustments, creating larger or smaller pathways by just draging around objects around and seeing the engine do wonders with it.
The little cluster out of few ground, mountain, tree and other flora meshes resulted into a huge field to play with.
I was not able to find that specific part of logic creating the ground in this new PCG addition.
I found an issue. When I change the spline’s point type from curve to linear or constant, the PCG don`t want to regenerate my actor.
I need to manually clean and regenerate.
Thanks! Probably a missing callback on our end
Also experienced the same no regenerate issue, when I delete a pont from inside the spline.
Hey Adrien, have you had a chance to look at the texture sampler node anymore. The error it throws is. Is it just kaput for now?
sorry to bother how do you spawn actors that are splines procedurally simialr to how you spawn meshes
Hello Adrien,
I’m curious to hear what the possibilities are to have the content in a volume be text driven? Is there a connection possible between the PCG graph and BP to make that work in a way? I don’t have a developer background. Some basic understanding of Blueprints and now also new to this PCG tool. Really excited to learn more about it. If there is anything you can share on this or point me into any directions let me know! In the mean time I’ll go through your vids as well
@AdrienLogut
Is there a possibility to add static mesh or mesh array to PCG script as a param and/or an actor property?
Can I define somehow a default value to input param if there is no input wired to the PCG util?
I also tried to add more pcg components to one actor, but the result was some infinite loop. It always regenerated the items and editor ui buttons go nuts.
For the reusability, it would be good as well if I can set the pcg related properties independent from the parent actor. I am thinking of putting the public properties into the pcg component (or other actor component`s) properties.