Replies: 1 comment 5 replies
-
The VSG already has view frustum culling, all you would need to do is decorate subgraphs with a CullNode/CullGroup/LOD/PagedLOD or implement your own cull node. I wouldn't recommend adding/removing elements of the scene graph on the fly, if you really wanted to do this type of dynamic adding/removing then a custom node with it's own traverse method might be best to walk through the subgraphs to call. I would generally recommend keeping things simple though, the scene graph will probably perform well enough with just using the standard components like the above mentioned culll nodes. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All,
I'm in the process of trying to upgrade a codebase from DX9 into Vulkan. My base level of understanding is very minimal so please bear with me.
The original code base has the following Mesh class (trimmed):
This does what you'd expect:
I've managed to get a minimal example setup from the code base and am generating a structure as follows (some variables unused so far):
Then in my application I do the basic of setting up the pipeline and then the following:
The above works when setting up a default graph of the meshes that I want. Now I'm looking into how to best get the old API to work with the Frustum class. Based on my research I'm leaning toward a subcommand graph approach. Similar to this: https://github.com/kondrak/quake_bsp_vulkan/blob/bb149b8f15ee02417c183f9421ce8c5aae06f7fc/src/q3bsp/Q3BspMap.cpp#L538
My understanding is that I can setup that secondary command graph every frame and in the Frustum class, if something is visible - add it to the graph. Looking for feedback if I'm on the right track here. The new function would look something like:
Then in the Frustum if a node is visible, I'd record into the corresponding secondary graph and bob is your uncle. Am I overcomplicating the approach? Am I able to simplify this and just rebuild an entire vsg::Group and swap it out on each update? Any advice would be appreciated.
Thanks!
edit: For clarity, I'm not just talking about view culling. I'd like to replace all those Draw calls so I can get a working scene that is adapted to the original Draw call.
Beta Was this translation helpful? Give feedback.
All reactions