Regarding concave collision detection (Chap 10 RTCD)[SOLVED]
Posted: Tue Aug 12, 2014 8:05 am
Hi all,
I am reading chapter 10 of book (realtime collision detection by Christer Ericson). The GPU collision chapter first gives Convex collision detection code snippet. I implemented it in OpenGL as given in Table 10.1 and it works as advertised. I then followed suit with the concave collision detection based on the information given on page 422 in Table 10.2. But since the information about hardware occlusion query is not detailed enough, I could not get it to work. So far I have implemented it as follows.
I colour my objects green on collision to see if it works. for this demo, as soon as the two objects collide, i get flickering since we might have even and odd number of occlusion samples. My question is has anybody implemented this code snippet as given in Table 10.2 before?
Please don't suggest me to look out for alternative solutions (I know there are better solutions) rather than trying this. I am really surprised at why the book does not include workable demos. It only contains code snippets which one can easily copy from the book.
Thanks,
Mobeen
I am reading chapter 10 of book (realtime collision detection by Christer Ericson). The GPU collision chapter first gives Convex collision detection code snippet. I implemented it in OpenGL as given in Table 10.1 and it works as advertised. I then followed suit with the concave collision detection based on the information given on page 422 in Table 10.2. But since the information about hardware occlusion query is not detailed enough, I could not get it to work. So far I have implemented it as follows.
Code: Select all
...check the reply below
Please don't suggest me to look out for alternative solutions (I know there are better solutions) rather than trying this. I am really surprised at why the book does not include workable demos. It only contains code snippets which one can easily copy from the book.
Thanks,
Mobeen