Was recently rendered node does not work

It always returns true even though the actor is far from being in the view

Hi Davision,

I just tested this in 4.12.5 3rd Person template and it’s working on my end. Here is what I did:

  • I created an actor class blueprint with a static mesh component

  • Then added the setup below to the ‘ThirdPersonCharacter’ blueprint

  • When the box is in view (being rendered) it registers True, when the box is out of view for 1 second it registers False.

What results do you get with this setup?

Tried it with a simple blueprint that is just a physics box and there it works fine. My more complex blueprint gives me always true, this are the components:

105109-asdaweresd.jpg

Could you also post a screenshot of your event graph setup? Or if you prefer, feel free to just post the .uasset that I can test.

It tested it just like you did with a print in the event tick. But the target was self.

I’ve the very same issue in 4.12.5. I consistently get bad results with the blueprint node Was Recently Rendered as well as AActor::GetLastRenderTime.

I have the issue even with simple actor blueprints. It seems to yeild true as soon and as long as the camera is moving while the actor resides in the frustum.

Way to reproduce:

  1. Create a fresh project (I used the content example)
  2. Create an Actor blueprint, add a static mesh component (I used a cube)
  3. Put it out of view range into the map
  4. Handle tick, output message if object was recently rendered

Actor setup and event graph:

Actor placed behind a wall:

Output:

Hi Eamid,

This is because the ‘Was Recently Rendered’ node only takes into account the frustum for code based optimization purposes. It isn’t the same as occlusion culling.

You can find it explained in a little more detail in this Forum post by Rama.

In 4.27 ‘Was Recently Rendered’ is always returning true. To test I made the same blueprint in 5.0ea2 and it works. Is this a bug that needs to be reported for 4.27?

Sorry, the function does work in 4.27, but for some reason when my game screen widget that shows my character’s health and stuff is added to the viewport, it stops working. I can’t figure out why this is happening because the WasRecentlyRender function seems to check the World for time passed. Which shouldn’t have anything to with a widget.

I found the problem. I was using a render target for my minimap. When the Minimap Blueprint with the RenderTarget was spawned is was rendering the actor I was checking with WasRecentlyRender.

1 Like