P-152: Virtual World Concept Update 104: Fractal Terrain Texturing Part 1
I have added texturing to the spherical terrain. This ended up taking a lot less time than I thought, although I did run into some issues.
For some time, the textured tris were rendering as a random group, instead of a terrain.

I couldn’t figure out what was causing this, until I realised that the tris looked exactly like the default player model in T3D:

I eventually figured out, with the aid of the GarageGames IRC chat, that the Render Manage system in torque does not take primitive and vertex buffers as values, it takes them as references. What I was doing was creating a vertex buffer locally, and loading it with the correct verts, then calling the function to add that render instance to the render pass manager.
However, since this function takes reference, and not values, once the render function finished executing, the local vertex buffer that I had created was destroyed. This meant that the render pass manager had no vertex buffer to read from, and ended up reading from a random area of memory, which in this case, happened to be occupied by the default player model’s vertex buffer.
Once I fixed this, the textures appeared:


They look very good, I am quite happy with how this project is progressing. The only issues are that the textures on the lowest detailed tier of the terrain are distorted (This is likely a UV/Texcoord issue) and the framerate drops quite quickly as the terrain is subdivided.
The seaming issue is also quite obvious, but this will be fixed.
The next goals are to fix the texturing issues, and add the ability for multiple textures to be rendered based on height. I will also need to fix the seams, and scale the terrain to realistic planet sizes. There is a lot of work left to be done, but the project is progressing extremely well.
