I have one more question.

The thing is I am having a hard time merging your project with an empty ARToolkit project (AR library).

I added all of your classes to an ARToolkit project, copied all required .lib and .h files from the project and a have an error “LNK1181 cannot open input file SOIL.h”. I added SOIL project to the ARToolkit solution and added additional include and library directories in project properties.

Do you have any idea why this issue occurs?

Many thanks in advance!

]]>`m_InverseLocalToWorldMatrix`

variable is computed from the world matrix of the Terrain.
`m_InverseLocalToWorldMatrix = glm::inverse(m_LocalToWorldMatrix);`

In this demo, the terrain is placed at the origin of the world and the local-to-world transform matrix is the identity matrix. Since the inverse of the identity matrix is also the identity matrix, the inverse of the local-to-world matrix is also an identity matrix. In your own code, you can simply use an identity matrix if your terrain is placed at the origin of the world.

As far as the GLM functions are concerned, I’m not sure where these functions are in the latest version of the library but the demo solution that you can download at the end of the article contains the GLM library that was available when this tutorial was written (7 years ago!). If you use the GLM library provided in the demo for this tutorial, then these should work fine. (I just download, unzipped, recompiled and ran the demo in VS 2017 (15.9.0) and it still works “out-of-the-box”!).

If you want to use a newer version of the GLM math library, then I suggest you check the GML docs to see where they have gone…

According to the docs here: https://glm.g-truc.net/0.9.9/api/a00722.html, you need to include `glm/gtc/type_ptr.hpp`

for `glm::value_ptr()`

.

It seems the `glm::saturate()`

function has been deprecated but is still available by including the `glm/gtx/compatibility.hpp`

file.

First of all – what a wonderful tutorial – many thanks for it!

I am having a problem with ‘m_InverseLocalToWorldMatrix’ variable – it is not initialised anywhere.

Also glm::value_ptr() and glm::saturate() methods seem not to be members of glm.

Are you able to give me a hand with solving this?

Once again thank you a lot for the time put in creating this tutorial.

Regards!

There is likely a way to create a binary format for MD5 files but I would recommend you look into other file formats such as OpenGEX (https://opengex.org). I haven’t used it myself, but I’ve heard a lot of good things about this library.

]]>Is there any binary-formatted MD5 files? ASCII format MD5 files are too large. ]]>