It’s a shame not to utilise Apparance’s runtime capabilities, so at this point I deferred the whole thing.
I made an ApparanceEntity called “World”, which is simply an Apparance object nested within an Unreal BP. This lets me rebuild the Apparance procedures during play with whatever parameters passed through. These can be nested, so there can be a whole series of async nested procedures handled , eg the trees could be deferred to load cutouts if too far from the camera, reloading separately to the terrain.
I create some spheres in the scene with Actor Tags called
controller, I could later defer the trees, maybe to be replaced with cutouts when the viewer is very far, etc.
The BP is linked to the correct Apparance proc, and the Construction Script looks for spheres placed in the scene with Actor Tags. These will be my “controllers” to affect the scene and pass player input/world info through to the procedures.
The “Handle Controller Move” is run on Construction’s end, but also per Event Tick. This checks if the controller is moved, scaled, or rotated at runtime, and if so rebuilds the Apparance proc with the controller’s new transform.
(I’ve put a “Demo Mode” bool here, which makes the updates happen much more frequently, just to record smoother videos.)
A demo of this: the game is running, and I’ve selected the ball to manipulate via the standard UE gizmos. This updates the terrain’s frame with the ball’s position.
Side note: there are interesting inconsistent random effects happenings. Ones that I fixed later like the terrain textures, but ones that I think are not fixable like the Variations within the Resize+/Offset+/Turn+ foliage nodes. Might be nice if they could derive their random seeds consistently across all the frames . But for now I’m OK with the tree rotations being invariant.
The terrain is changing while the frame moves up and down, because Noise is using all 3 axes. I only want XY positioning to be used as I’m thinking about my “sectors” as XY coordinates for now, and this should simplify things later. After this video I cancelled out the frame’s Z coordinate before feeding it into the Noise section.
(This also shows the frame’s Y flip needed to match a flipped channel in the current Noise Op)