x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

is occlusion culling automotic or do i need to write the logic ?

Helllo.....i want to ask that is occlusion culling automatic? i have enabled the occlusion culling from project settings but i dont know is it working or not as i m not seeing any effect ? another thing i want to ask is that like i m trying to make a racing game so will unreal engine take care of removing the actors that are behind my car or should i write the logic of removing the actors after they have rendered.? Thanks in Advance

Product Version: UE 4.14
Tags:
more ▼

asked Dec 30 '16 at 08:13 PM in Rendering

avatar image

acetate
28 2 9 6

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

It's automatic. Use the console command r.visualizeOccludedPrimitives 1 to visualize. https://answers.unrealengine.com/questions/312646/how-does-object-occlusion-and-culling-work-in-ue4.html

more ▼

answered Dec 30 '16 at 08:56 PM

avatar image

Titirez
318 13 11 24

avatar image acetate Dec 31 '16 at 01:34 PM

ok but which one is the best approach should i go with the default occlusion culling settings or should i write my own logic to remove the actors that are not being rendered.. another thing is when i was trying to write my own logic of removing the actors that are not being rendered its showing that the actors are being destroyed but when i m using unreal engine occlusion culling settings the total numbers of actors remain same..Thanks n Happy New Year :)

avatar image Titirez Dec 31 '16 at 01:47 PM

That's probably because you are destroying the actors that are not on screen and the ue4 occlusion culling algorithm doesn't do that. It just hides them so they don't use gpu for rendering. Ex: you look at a cube, it gets rendered, you turn so the cube is behind you, it does not get rendered, you face the cube again, it gets rendered again. That's why it doesn't destroy them. You should only destroy an object if you're sure you will not need it.

If you have an open world game (very large scene), ue4 has a great level streaming mechanism. I used this mechanism for buildings too (each floor in a different scene).

avatar image acetate Dec 31 '16 at 08:05 PM

ok thanks for replying ....so which approach is best my own logic of destroying the actors that are not needed anymore in the level or the unreal engine default occlusion culling algorithm ?

avatar image Titirez Jan 01 '17 at 04:04 AM

Depends on the game you are trying to make. For example if you build a side scroller that goes only to the right and at start time, the entire scene is loaded, you could delete all objects that exit the screen on the left side, because the user will not see them again. Doing this should increase the FPS as the user aproaches the end of the level. If the user will need those objects again it's not a good idea to delete them because reallocating memory to create them is time consuming. So it's a trade off: free up memory (delete them) vs. no need to reallocate memory (keep them). It all depends on how frequently the user needs those objects. That's what I think.

avatar image acetate Jan 01 '17 at 07:06 AM

ok thanks Titirez..another thing i would like to share with you is that after reading your second last comment i did a simple check to see whether unreal engine is really disabling the visibility of actors that are behind the camera and are not being rendered. I placed a simple cube in my level and assign a tick event on that cube that will constantly show the updated status of the isVisible variable of that cube. But the status of the cube "isVisible" variable is always showing as visible when it is behind the camera.

avatar image Titirez Jan 02 '17 at 11:23 AM

Before sending the draw calls to the GPU, we can decide if we want to hide some of the meshes. That's what the "isVisible" bool refers to. To make it false, use the "Set visibility" node.

After that, the GPU does another check for occlusion to see if it should render it.

I don't think there is a bool to tell us if a mesh will actually be rendered in the current frame, because like I said, this is decided on the GPU, not CPU.

avatar image acetate Jan 03 '17 at 03:54 AM

thanks man...

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question