Jump to content

Turn off culling


SpiderPig
 Share

Recommended Posts

Ultra only uses frustum culling. People seem to have very little tolerance for the artifacts that GPU occlusion culling involves, so in the future I am more likely to look into some type of BSP system.

Why would you want to render everything in the world that is out of the camera's view?

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Oh I just have some simple meshes rendering to the UI camera, and I move them about, in and out of view for reasons too complex to explain.  I've mentioned before that especially in debug mode the culling is quite slow at the moment.  I thought If I could turn off culling for the UI camera it would probably solve the small issue, that's all.

Link to comment
Share on other sites

4 hours ago, Josh said:

Ultra only uses frustum culling. People seem to have very little tolerance for the artifacts that GPU occlusion culling involves, so in the future I am more likely to look into some type of BSP system.

Thank you for reading the feedback I got with Cyclone. People never shut up about this. 

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

btw is that culling effect when brushes partly disappear behind another one? But should not be due transparency of the brush in this case.

For clarification blue outlines and yellow tetrahedron are brushes. Yellow lines are models. This happens with some camera positions and with another ones all looks fine.

image.thumb.png.8bd08918781b2c647c24a0722bf67de7.png

Link to comment
Share on other sites

2 hours ago, Josh said:

Is the material for the yellow arrow using transparency

No. It's not an arrow tho but 3 not transparent lines from 1 point to 3 characters.

 

2 hours ago, Josh said:

This is what a tetrahedron is:

Yep. Probably had to do screen from another angle from bigger distance but pale yellow transparent shape is tetrahedron with sharp angle behind bottom left corner.

I can make an example later for an issue reproducing.

Link to comment
Share on other sites

4 minutes ago, Dreikblack said:

Yep. Probably had to do screen from another angle from bigger distance but pale yellow transparent shape is tetrahedron with sharp angle behind bottom left corner.

Oh okay, I thought you meant the blue squares. :D

Okay, ordering and transparency is difficult for GPUs to get right. Blending can only occur on top of what has already been rendered, so the renderer orders objects from furthest to closest. If the objects overlap then you can get situations where one doesn't appear underneath another. This is a general problem that all real-time renderers have.

You might get different results by enabling refraction on the camera, but this will probably always be a problem if you have overlapping transparent objects.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Not at this time, but...

I ran into something similar with the GUI system. When things slid into view, they would appear suddenly. My solution was to always draw these objects when they are not hidden, regardless of whether they are in view or not.

When it comes to a scene with a hierarchy it gets more complicated. If there was a per-entity "always draw" flag it would need to travel up the entire octree structure. I do this with some special types like lights, but it is very sensitive and errors are difficult to detect, so I am cautious to add something new there.

Another option might be a fixed visibility list, where you explicitly specify a list of entities a camera draws, and it skips the entire culling process. This might be appropriate for things that are very close to the camera, like 3D interface elements and FPS weapons.

Another option might be to add a padding value that artificially enlarges the camera frustum.

Yet another approach is to expand the visibility bounding box of entities based on velocity!

There are many ways to go about this. I prefer to let people use the system first so we can get a better understanding of what the best solution is, before I implement one of the above or something else.

  • Upvote 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

On 6/23/2023 at 3:07 PM, Josh said:

If you can produce a simple example please upload it and I'll take a look.

You was right about SetTransparent. After all i found out i was keeping same unlit mat so accidentally applied transparency to every model/brush with it :mellow: (alpha channel was 1 tho for objects that non intended to be transparent)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...