Hi,
After successfully hooking DirectX, I was able to detect the whereabouts of mining rocks which were easy to identify during calls to DrawIndexedPrimitive(...). This is sufficient for most objects in the game. The various types of trees for example, are easily identified using this method. However rock types seem to be somewhat more illusive!
Running RS3 with the "Medium" graphics presets, all rocks appear to consist of two primitives. One primitive models the main body of the rock which has a common appearance across all rock types, while a second primitive models the colored segments of the rock.
As the appearance of the second primitive varies with each rock type and has a color to represent each rock type (Copper, Iron etc), this appears to be the primary point of interest. My first thought was to call GetTexture() during the DrawIndexedPrimative call and produce a CRC of the texture's data. However this produces an identical CRC regardless of the rock type.
I've since spent far too long inspecting the data obtainable with most "IDirect3DDevice9::Get..." functions, however I have not found any information which can be used to reliably differentiate between the rock types. It's also interesting to note that if I save all of the textures created during calls to CreateTexture() and those which are encountered during DrawIndexedPrimative(), none resemble the color of a Copper, Iron, Mithril rock etc, however the various grass and ground textures are clearly identifiable.
At this stage, I could have saved a great deal of time using color based techniques to identify the rock, however a DirectX solution would yield many advantages in terms of performance and reliability.
If you have successfully used OpenGL or DirectX hooking methods to identify rock types, any information would be appreciated. I have even considered that Jagex are deliberately rendering this particular part of the rock outwith DirectX haha... I'm probably just looking in the wrong place.
Thanks!