Sign in to follow this  
Tchami

Create graph based mesh on the GPU

Recommended Posts

Hi, I'm working on an algorithm that can process a graph and convert it to a polygon mesh. Each node (a cube) on the graph has 6 faces - with one inbound connection and up to 5 outbound. In short the algorithm takes a node, and then recursively adds children one at a time. This data structure is relatively easy to model on the CPU, however I'm looking into options on how to do it on the GPU in the geometry shader and I'm at a bit of a loss at the best approach. Ideally I would like to feed the geometry shader a (seed) point, and then create the geometry based on this. But how would I go about doing this? I only really see one option, but I don't have much experience with geometry shaders so I'm unsure if I'm missing something or if there's another way to do things. Anyway, here's what I've considered: Create a point/vertex for each node in the graph in a preprocessing step, and for each vertex store relevant information about the node such as position, faces with connections etc. I've looked at the ParticlesGS and PipesGS of the DirectX SDK, and especially the latter is somewhat of interest. However, that sample doesn't consider branching which is my main problem. So basically I'm asking if any of you have suggestions on how to create a data structure that will allow me to create geometry with branches in the geometry shader.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this