[index]

Anton's Research Ramblings

27 June 2012

3D Picking, Debug Geometry, Engines

I coded an algorithm for 3D mouse picking of objects based on their bounding sphere. I have a C version and a Javascript version. Experience tells me that I need to visualise as much of the algorithm as possible to make sure that all the ducks are in a row. I think that I can draw some debug geometry to show the bounding spheres; actually draw transluscent spheres around each pick-able object. I could change their colour when they are being clicked on. That would give me an indication if the algorithm is working accurately, but also if the spheres are a good enough approximation for bounds, based on how much the spheres overlap.

My Javascript WebGL demos are a bit messy, so I've started to build a little engine. I think something like a Renderable.createSphere() sort of function is in order. My OpenGL C code is pretty stable, so I think I can just create a createSphere sort of function directly.

Timers

I had a look at the timer javascript that I've been using. I suspect that I can tweak it a bit to improve the rendering rate.