Advanced clipping (3d Stencil?)

Hi all!

I have an interesting visual problem I would like to get some feedback on.

First I have a very complicated model loaded and displayed.
Next I shoot the model and show the path of the bullet thought the model.
This is currently implemented with 4 clipping planes giving me a cube along the trajectory of the bullet. I can view the elements internal to my model allowing me the ability to rotate around and inspect which is ultimately the goal.

Now I would like to add multiple shots through the model without the need to re-draw the model every time. Basically a 3d stencil where I could render elements into it, then render my model having it draw the areas that are contained within the volumes I have rendered into the 3d stencil.

I have investigated stencil buffers but this only functions with pixels… No good, I basically would get a series of stripes showing the outside of my model. I have also reviewed geometry shaders which seems an ill fit for this problem.

Any other ideas?


What kind of data do you want to put into the “3d stencil”? Do you want to put the model that remains after clipping there, or the picture of the model after clipping? I don’t really understand what you’re trying to do.