Hi guys. I am new to OpenGL. I am trying to figure out a way to make my models be on my terrain. I am kind of confused on how to approach the situation. My terrain is actually an .obj file, so it is easy to apply textures to it. I am wondering should I store every point in the terrain, and try to find the relevant coordinates that are in the same area as my object, then translate it? Or is there an easier way to calculate the top of my terrain, and make some type of collision detection so that the no geometry can go below the terrain?
Here is a picture of the terrain's geometry and its UV map:
Here is the Terrain Textured:
Here is the Terrain Rendered in OpenGL:
Here is a house on the terrain, but it is not automatically calculated by the program:
My goal is develop something to automatically place the models directly on the surface of the terrain. How would I go about doing that anyone?