We've had a hard time with scene parsing too. It seems that SU just doesn't know what it has in the scene very well. We've contacted Google and are still waiting for some sort of a response. I'm not all that familiar with the exact details behind our scene parsing process. Some of it is done in C++, the rest in Ruby. If you download the demo of V-Ray for SketchUp, there should be a file that it installs named "VRayForSketchUp.rb" that at least appears to have a good bit of scene parsing stuff in there. I hope it helps.
Below is our cry for help to Google ::weeps:: no love.
http://groups.google.com/group/Ruby-API/browse_thread/thread/1c69cc4490e0f6d/e63df2c6561af900#e63df2c6561af900