Steps to Reproduce
Hi,
One approach to achieve the results that you are describing is to create an actor that maintains a list of actors of interest and registers a console command that “toggles” those actors visible states. You can register a console command for an actor using the IConsoleManager::Get().RegisterConsoleCommand function. This function accepts a delegate that is called whenever the console command is updated.
Following is a screen capture of the results using this approach.
[Image Removed]
I have attached the project files for you inspection.
This could also be adapted to take into account distance from a point of interest ( e.g. Camera, Player). Let me know if this approach applies to your use case or if you would like to explore other avenues.
Thank you that looks interesting. However, I need to render the objects in the correct order so the nearest should render first, then the next nearest and so on. For instance the translucency pass does this from back to front, I want the same but in the reverse order for a Z Fill pass.
Hi,
You can achieve a distance based parse by modifying the delegate from the RegisterConsoleCommand call to add location tests.
e.g.
`if (FVector::Distance(DisplayLayerableActor->GetActorTransform().GetLocation(), PointOfInterest.GetActorTransform().GetLocation()) > THRESHOLD) {
// Do Something
}`Other options to explore could be extending the FSceneViewExtensionBase class to add a pre post-processing render step or investigating the RenderDependencyGraph and examining the aforementioned translucency pass to insert a render pass in reverse translucency order.
All the best
Ok, so then it looks like there is nothing ‘out of the box’ that I missed.
Thanks for the reply, I’ll create my own solution probably using whatever method Translucency is using.